1. Packages
  2. Harness
  3. API Docs
  4. platform
  5. Variables
Harness v0.1.2 published on Friday, Jul 19, 2024 by Pulumi

harness.platform.Variables

Explore with Pulumi AI

harness logo
Harness v0.1.2 published on Friday, Jul 19, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@pulumi/harness";
    
    const test = new harness.platform.Variables("test", {
        identifier: "identifier",
        name: "name",
        orgId: "org_id",
        projectId: "project_id",
        type: "String",
        spec: {
            valueType: "FIXED",
            fixedValue: "fixedValue",
        },
    });
    
    import pulumi
    import pulumi_harness as harness
    
    test = harness.platform.Variables("test",
        identifier="identifier",
        name="name",
        org_id="org_id",
        project_id="project_id",
        type="String",
        spec=harness.platform.VariablesSpecArgs(
            value_type="FIXED",
            fixed_value="fixedValue",
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-harness/sdk/go/harness/platform"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := platform.NewVariables(ctx, "test", &platform.VariablesArgs{
    			Identifier: pulumi.String("identifier"),
    			Name:       pulumi.String("name"),
    			OrgId:      pulumi.String("org_id"),
    			ProjectId:  pulumi.String("project_id"),
    			Type:       pulumi.String("String"),
    			Spec: &platform.VariablesSpecArgs{
    				ValueType:  pulumi.String("FIXED"),
    				FixedValue: pulumi.String("fixedValue"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harness = Pulumi.Harness;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Harness.Platform.Variables("test", new()
        {
            Identifier = "identifier",
            Name = "name",
            OrgId = "org_id",
            ProjectId = "project_id",
            Type = "String",
            Spec = new Harness.Platform.Inputs.VariablesSpecArgs
            {
                ValueType = "FIXED",
                FixedValue = "fixedValue",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.harness.platform.Variables;
    import com.pulumi.harness.platform.VariablesArgs;
    import com.pulumi.harness.platform.inputs.VariablesSpecArgs;
    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) {
            var test = new Variables("test", VariablesArgs.builder()
                .identifier("identifier")
                .name("name")
                .orgId("org_id")
                .projectId("project_id")
                .type("String")
                .spec(VariablesSpecArgs.builder()
                    .valueType("FIXED")
                    .fixedValue("fixedValue")
                    .build())
                .build());
    
        }
    }
    
    resources:
      test:
        type: harness:platform:Variables
        properties:
          identifier: identifier
          name: name
          orgId: org_id
          projectId: project_id
          type: String
          spec:
            valueType: FIXED
            fixedValue: fixedValue
    

    Create Variables Resource

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

    Constructor syntax

    new Variables(name: string, args: VariablesArgs, opts?: CustomResourceOptions);
    @overload
    def Variables(resource_name: str,
                  args: VariablesArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def Variables(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  identifier: Optional[str] = None,
                  spec: Optional[VariablesSpecArgs] = None,
                  type: Optional[str] = None,
                  description: Optional[str] = None,
                  name: Optional[str] = None,
                  org_id: Optional[str] = None,
                  project_id: Optional[str] = None)
    func NewVariables(ctx *Context, name string, args VariablesArgs, opts ...ResourceOption) (*Variables, error)
    public Variables(string name, VariablesArgs args, CustomResourceOptions? opts = null)
    public Variables(String name, VariablesArgs args)
    public Variables(String name, VariablesArgs args, CustomResourceOptions options)
    
    type: harness:platform:Variables
    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 VariablesArgs
    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 VariablesArgs
    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 VariablesArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VariablesArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VariablesArgs
    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 variablesResource = new Harness.Platform.Variables("variablesResource", new()
    {
        Identifier = "string",
        Spec = new Harness.Platform.Inputs.VariablesSpecArgs
        {
            FixedValue = "string",
            ValueType = "string",
        },
        Type = "string",
        Description = "string",
        Name = "string",
        OrgId = "string",
        ProjectId = "string",
    });
    
    example, err := platform.NewVariables(ctx, "variablesResource", &platform.VariablesArgs{
    	Identifier: pulumi.String("string"),
    	Spec: &platform.VariablesSpecArgs{
    		FixedValue: pulumi.String("string"),
    		ValueType:  pulumi.String("string"),
    	},
    	Type:        pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	OrgId:       pulumi.String("string"),
    	ProjectId:   pulumi.String("string"),
    })
    
    var variablesResource = new Variables("variablesResource", VariablesArgs.builder()
        .identifier("string")
        .spec(VariablesSpecArgs.builder()
            .fixedValue("string")
            .valueType("string")
            .build())
        .type("string")
        .description("string")
        .name("string")
        .orgId("string")
        .projectId("string")
        .build());
    
    variables_resource = harness.platform.Variables("variablesResource",
        identifier="string",
        spec=harness.platform.VariablesSpecArgs(
            fixed_value="string",
            value_type="string",
        ),
        type="string",
        description="string",
        name="string",
        org_id="string",
        project_id="string")
    
    const variablesResource = new harness.platform.Variables("variablesResource", {
        identifier: "string",
        spec: {
            fixedValue: "string",
            valueType: "string",
        },
        type: "string",
        description: "string",
        name: "string",
        orgId: "string",
        projectId: "string",
    });
    
    type: harness:platform:Variables
    properties:
        description: string
        identifier: string
        name: string
        orgId: string
        projectId: string
        spec:
            fixedValue: string
            valueType: string
        type: string
    

    Variables Resource Properties

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

    Inputs

    The Variables resource accepts the following input properties:

    Identifier string
    Unique identifier of the resource
    Spec VariablesSpec
    List of Spec Fields.
    Type string
    Type of Variable
    Description string
    Description of the entity
    Name string
    Name of the Variable
    OrgId string
    Organization Identifier for the Entity
    ProjectId string
    Project Identifier for the Entity
    Identifier string
    Unique identifier of the resource
    Spec VariablesSpecArgs
    List of Spec Fields.
    Type string
    Type of Variable
    Description string
    Description of the entity
    Name string
    Name of the Variable
    OrgId string
    Organization Identifier for the Entity
    ProjectId string
    Project Identifier for the Entity
    identifier String
    Unique identifier of the resource
    spec VariablesSpec
    List of Spec Fields.
    type String
    Type of Variable
    description String
    Description of the entity
    name String
    Name of the Variable
    orgId String
    Organization Identifier for the Entity
    projectId String
    Project Identifier for the Entity
    identifier string
    Unique identifier of the resource
    spec VariablesSpec
    List of Spec Fields.
    type string
    Type of Variable
    description string
    Description of the entity
    name string
    Name of the Variable
    orgId string
    Organization Identifier for the Entity
    projectId string
    Project Identifier for the Entity
    identifier str
    Unique identifier of the resource
    spec VariablesSpecArgs
    List of Spec Fields.
    type str
    Type of Variable
    description str
    Description of the entity
    name str
    Name of the Variable
    org_id str
    Organization Identifier for the Entity
    project_id str
    Project Identifier for the Entity
    identifier String
    Unique identifier of the resource
    spec Property Map
    List of Spec Fields.
    type String
    Type of Variable
    description String
    Description of the entity
    name String
    Name of the Variable
    orgId String
    Organization Identifier for the Entity
    projectId String
    Project Identifier for the Entity

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Variables 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 Variables Resource

    Get an existing Variables 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?: VariablesState, opts?: CustomResourceOptions): Variables
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            identifier: Optional[str] = None,
            name: Optional[str] = None,
            org_id: Optional[str] = None,
            project_id: Optional[str] = None,
            spec: Optional[VariablesSpecArgs] = None,
            type: Optional[str] = None) -> Variables
    func GetVariables(ctx *Context, name string, id IDInput, state *VariablesState, opts ...ResourceOption) (*Variables, error)
    public static Variables Get(string name, Input<string> id, VariablesState? state, CustomResourceOptions? opts = null)
    public static Variables get(String name, Output<String> id, VariablesState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    Description string
    Description of the entity
    Identifier string
    Unique identifier of the resource
    Name string
    Name of the Variable
    OrgId string
    Organization Identifier for the Entity
    ProjectId string
    Project Identifier for the Entity
    Spec VariablesSpec
    List of Spec Fields.
    Type string
    Type of Variable
    Description string
    Description of the entity
    Identifier string
    Unique identifier of the resource
    Name string
    Name of the Variable
    OrgId string
    Organization Identifier for the Entity
    ProjectId string
    Project Identifier for the Entity
    Spec VariablesSpecArgs
    List of Spec Fields.
    Type string
    Type of Variable
    description String
    Description of the entity
    identifier String
    Unique identifier of the resource
    name String
    Name of the Variable
    orgId String
    Organization Identifier for the Entity
    projectId String
    Project Identifier for the Entity
    spec VariablesSpec
    List of Spec Fields.
    type String
    Type of Variable
    description string
    Description of the entity
    identifier string
    Unique identifier of the resource
    name string
    Name of the Variable
    orgId string
    Organization Identifier for the Entity
    projectId string
    Project Identifier for the Entity
    spec VariablesSpec
    List of Spec Fields.
    type string
    Type of Variable
    description str
    Description of the entity
    identifier str
    Unique identifier of the resource
    name str
    Name of the Variable
    org_id str
    Organization Identifier for the Entity
    project_id str
    Project Identifier for the Entity
    spec VariablesSpecArgs
    List of Spec Fields.
    type str
    Type of Variable
    description String
    Description of the entity
    identifier String
    Unique identifier of the resource
    name String
    Name of the Variable
    orgId String
    Organization Identifier for the Entity
    projectId String
    Project Identifier for the Entity
    spec Property Map
    List of Spec Fields.
    type String
    Type of Variable

    Supporting Types

    VariablesSpec, VariablesSpecArgs

    FixedValue string
    FixedValue of the variable
    ValueType string
    Type of Value of the Variable. For now only FIXED is supported
    FixedValue string
    FixedValue of the variable
    ValueType string
    Type of Value of the Variable. For now only FIXED is supported
    fixedValue String
    FixedValue of the variable
    valueType String
    Type of Value of the Variable. For now only FIXED is supported
    fixedValue string
    FixedValue of the variable
    valueType string
    Type of Value of the Variable. For now only FIXED is supported
    fixed_value str
    FixedValue of the variable
    value_type str
    Type of Value of the Variable. For now only FIXED is supported
    fixedValue String
    FixedValue of the variable
    valueType String
    Type of Value of the Variable. For now only FIXED is supported

    Import

    Import account level variables

    $ pulumi import harness:platform/variables:Variables example <variable_id>
    

    Import org level variables

    $ pulumi import harness:platform/variables:Variables example <ord_id>/<variable_id>
    

    Import project level variables

    $ pulumi import harness:platform/variables:Variables example <org_id>/<project_id>/<variable_id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    harness pulumi/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Harness v0.1.2 published on Friday, Jul 19, 2024 by Pulumi