1. Packages
  2. Checkly
  3. API Docs
  4. EnvironmentVariable
Checkly v2.0.0 published on Tuesday, Feb 4, 2025 by Checkly

checkly.EnvironmentVariable

Explore with Pulumi AI

checkly logo
Checkly v2.0.0 published on Tuesday, Feb 4, 2025 by Checkly

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as checkly from "@checkly/pulumi";
    
    // Simple Enviroment Variable example
    const variable1 = new checkly.EnvironmentVariable("variable_1", {
        key: "API_KEY",
        value: "loZd9hOGHDUrGvmW",
        locked: true,
    });
    const variable2 = new checkly.EnvironmentVariable("variable_2", {
        key: "API_URL",
        value: "http://localhost:3000",
    });
    
    import pulumi
    import pulumi_checkly as checkly
    
    # Simple Enviroment Variable example
    variable1 = checkly.EnvironmentVariable("variable_1",
        key="API_KEY",
        value="loZd9hOGHDUrGvmW",
        locked=True)
    variable2 = checkly.EnvironmentVariable("variable_2",
        key="API_URL",
        value="http://localhost:3000")
    
    package main
    
    import (
    	"github.com/checkly/pulumi-checkly/sdk/v2/go/checkly"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Simple Enviroment Variable example
    		_, err := checkly.NewEnvironmentVariable(ctx, "variable_1", &checkly.EnvironmentVariableArgs{
    			Key:    pulumi.String("API_KEY"),
    			Value:  pulumi.String("loZd9hOGHDUrGvmW"),
    			Locked: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = checkly.NewEnvironmentVariable(ctx, "variable_2", &checkly.EnvironmentVariableArgs{
    			Key:   pulumi.String("API_URL"),
    			Value: pulumi.String("http://localhost:3000"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Checkly = Pulumi.Checkly;
    
    return await Deployment.RunAsync(() => 
    {
        // Simple Enviroment Variable example
        var variable1 = new Checkly.EnvironmentVariable("variable_1", new()
        {
            Key = "API_KEY",
            Value = "loZd9hOGHDUrGvmW",
            Locked = true,
        });
    
        var variable2 = new Checkly.EnvironmentVariable("variable_2", new()
        {
            Key = "API_URL",
            Value = "http://localhost:3000",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.checkly.EnvironmentVariable;
    import com.pulumi.checkly.EnvironmentVariableArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            // Simple Enviroment Variable example
            var variable1 = new EnvironmentVariable("variable1", EnvironmentVariableArgs.builder()
                .key("API_KEY")
                .value("loZd9hOGHDUrGvmW")
                .locked(true)
                .build());
    
            var variable2 = new EnvironmentVariable("variable2", EnvironmentVariableArgs.builder()
                .key("API_URL")
                .value("http://localhost:3000")
                .build());
    
        }
    }
    
    resources:
      # Simple Enviroment Variable example
      variable1:
        type: checkly:EnvironmentVariable
        name: variable_1
        properties:
          key: API_KEY
          value: loZd9hOGHDUrGvmW
          locked: true
      variable2:
        type: checkly:EnvironmentVariable
        name: variable_2
        properties:
          key: API_URL
          value: http://localhost:3000
    

    Create EnvironmentVariable Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new EnvironmentVariable(name: string, args: EnvironmentVariableArgs, opts?: CustomResourceOptions);
    @overload
    def EnvironmentVariable(resource_name: str,
                            args: EnvironmentVariableArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def EnvironmentVariable(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            key: Optional[str] = None,
                            value: Optional[str] = None,
                            locked: Optional[bool] = None,
                            secret: Optional[bool] = None)
    func NewEnvironmentVariable(ctx *Context, name string, args EnvironmentVariableArgs, opts ...ResourceOption) (*EnvironmentVariable, error)
    public EnvironmentVariable(string name, EnvironmentVariableArgs args, CustomResourceOptions? opts = null)
    public EnvironmentVariable(String name, EnvironmentVariableArgs args)
    public EnvironmentVariable(String name, EnvironmentVariableArgs args, CustomResourceOptions options)
    
    type: checkly:EnvironmentVariable
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args EnvironmentVariableArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args EnvironmentVariableArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args EnvironmentVariableArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EnvironmentVariableArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EnvironmentVariableArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var environmentVariableResource = new Checkly.EnvironmentVariable("environmentVariableResource", new()
    {
        Key = "string",
        Value = "string",
        Locked = false,
        Secret = false,
    });
    
    example, err := checkly.NewEnvironmentVariable(ctx, "environmentVariableResource", &checkly.EnvironmentVariableArgs{
    	Key:    pulumi.String("string"),
    	Value:  pulumi.String("string"),
    	Locked: pulumi.Bool(false),
    	Secret: pulumi.Bool(false),
    })
    
    var environmentVariableResource = new EnvironmentVariable("environmentVariableResource", EnvironmentVariableArgs.builder()
        .key("string")
        .value("string")
        .locked(false)
        .secret(false)
        .build());
    
    environment_variable_resource = checkly.EnvironmentVariable("environmentVariableResource",
        key="string",
        value="string",
        locked=False,
        secret=False)
    
    const environmentVariableResource = new checkly.EnvironmentVariable("environmentVariableResource", {
        key: "string",
        value: "string",
        locked: false,
        secret: false,
    });
    
    type: checkly:EnvironmentVariable
    properties:
        key: string
        locked: false
        secret: false
        value: string
    

    EnvironmentVariable Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The EnvironmentVariable resource accepts the following input properties:

    Key string
    Value string
    Locked bool
    Secret bool
    Key string
    Value string
    Locked bool
    Secret bool
    key String
    value String
    locked Boolean
    secret Boolean
    key string
    value string
    locked boolean
    secret boolean
    key str
    value str
    locked bool
    secret bool
    key String
    value String
    locked Boolean
    secret Boolean

    Outputs

    All input properties are implicitly available as output properties. Additionally, the EnvironmentVariable resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing EnvironmentVariable Resource

    Get an existing EnvironmentVariable resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: EnvironmentVariableState, opts?: CustomResourceOptions): EnvironmentVariable
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            key: Optional[str] = None,
            locked: Optional[bool] = None,
            secret: Optional[bool] = None,
            value: Optional[str] = None) -> EnvironmentVariable
    func GetEnvironmentVariable(ctx *Context, name string, id IDInput, state *EnvironmentVariableState, opts ...ResourceOption) (*EnvironmentVariable, error)
    public static EnvironmentVariable Get(string name, Input<string> id, EnvironmentVariableState? state, CustomResourceOptions? opts = null)
    public static EnvironmentVariable get(String name, Output<String> id, EnvironmentVariableState state, CustomResourceOptions options)
    resources:  _:    type: checkly:EnvironmentVariable    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Key string
    Locked bool
    Secret bool
    Value string
    Key string
    Locked bool
    Secret bool
    Value string
    key String
    locked Boolean
    secret Boolean
    value String
    key string
    locked boolean
    secret boolean
    value string
    key str
    locked bool
    secret bool
    value str
    key String
    locked Boolean
    secret Boolean
    value String

    Package Details

    Repository
    checkly checkly/pulumi-checkly
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the checkly Terraform Provider.
    checkly logo
    Checkly v2.0.0 published on Tuesday, Feb 4, 2025 by Checkly