1. Packages
  2. AWS
  3. API Docs
  4. opsworks
  5. Stack
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.opsworks.Stack

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Provides an OpsWorks stack resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const main = new aws.opsworks.Stack("main", {
        name: "awesome-stack",
        region: "us-west-1",
        serviceRoleArn: opsworksAwsIamRole.arn,
        defaultInstanceProfileArn: opsworks.arn,
        tags: {
            Name: "foobar-stack",
        },
        customJson: `{
     "foobar": {
        "version": "1.0.0"
      }
    }
    `,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    main = aws.opsworks.Stack("main",
        name="awesome-stack",
        region="us-west-1",
        service_role_arn=opsworks_aws_iam_role["arn"],
        default_instance_profile_arn=opsworks["arn"],
        tags={
            "Name": "foobar-stack",
        },
        custom_json="""{
     "foobar": {
        "version": "1.0.0"
      }
    }
    """)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opsworks"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := opsworks.NewStack(ctx, "main", &opsworks.StackArgs{
    			Name:                      pulumi.String("awesome-stack"),
    			Region:                    pulumi.String("us-west-1"),
    			ServiceRoleArn:            pulumi.Any(opsworksAwsIamRole.Arn),
    			DefaultInstanceProfileArn: pulumi.Any(opsworks.Arn),
    			Tags: pulumi.StringMap{
    				"Name": pulumi.String("foobar-stack"),
    			},
    			CustomJson: pulumi.String("{\n \"foobar\": {\n    \"version\": \"1.0.0\"\n  }\n}\n"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var main = new Aws.OpsWorks.Stack("main", new()
        {
            Name = "awesome-stack",
            Region = "us-west-1",
            ServiceRoleArn = opsworksAwsIamRole.Arn,
            DefaultInstanceProfileArn = opsworks.Arn,
            Tags = 
            {
                { "Name", "foobar-stack" },
            },
            CustomJson = @"{
     ""foobar"": {
        ""version"": ""1.0.0""
      }
    }
    ",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.opsworks.Stack;
    import com.pulumi.aws.opsworks.StackArgs;
    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 main = new Stack("main", StackArgs.builder()
                .name("awesome-stack")
                .region("us-west-1")
                .serviceRoleArn(opsworksAwsIamRole.arn())
                .defaultInstanceProfileArn(opsworks.arn())
                .tags(Map.of("Name", "foobar-stack"))
                .customJson("""
    {
     "foobar": {
        "version": "1.0.0"
      }
    }
                """)
                .build());
    
        }
    }
    
    resources:
      main:
        type: aws:opsworks:Stack
        properties:
          name: awesome-stack
          region: us-west-1
          serviceRoleArn: ${opsworksAwsIamRole.arn}
          defaultInstanceProfileArn: ${opsworks.arn}
          tags:
            Name: foobar-stack
          customJson: |
            {
             "foobar": {
                "version": "1.0.0"
              }
            }        
    

    Create Stack Resource

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

    Constructor syntax

    new Stack(name: string, args: StackArgs, opts?: CustomResourceOptions);
    @overload
    def Stack(resource_name: str,
              args: StackArgs,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Stack(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              default_instance_profile_arn: Optional[str] = None,
              service_role_arn: Optional[str] = None,
              region: Optional[str] = None,
              default_root_device_type: Optional[str] = None,
              default_subnet_id: Optional[str] = None,
              custom_cookbooks_sources: Optional[Sequence[StackCustomCookbooksSourceArgs]] = None,
              custom_json: Optional[str] = None,
              default_availability_zone: Optional[str] = None,
              configuration_manager_name: Optional[str] = None,
              default_os: Optional[str] = None,
              agent_version: Optional[str] = None,
              default_ssh_key_name: Optional[str] = None,
              configuration_manager_version: Optional[str] = None,
              hostname_theme: Optional[str] = None,
              manage_berkshelf: Optional[bool] = None,
              name: Optional[str] = None,
              color: Optional[str] = None,
              berkshelf_version: Optional[str] = None,
              tags: Optional[Mapping[str, str]] = None,
              use_custom_cookbooks: Optional[bool] = None,
              use_opsworks_security_groups: Optional[bool] = None,
              vpc_id: Optional[str] = None)
    func NewStack(ctx *Context, name string, args StackArgs, opts ...ResourceOption) (*Stack, error)
    public Stack(string name, StackArgs args, CustomResourceOptions? opts = null)
    public Stack(String name, StackArgs args)
    public Stack(String name, StackArgs args, CustomResourceOptions options)
    
    type: aws:opsworks:Stack
    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 StackArgs
    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 StackArgs
    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 StackArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args StackArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args StackArgs
    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 examplestackResourceResourceFromOpsworksstack = new Aws.OpsWorks.Stack("examplestackResourceResourceFromOpsworksstack", new()
    {
        DefaultInstanceProfileArn = "string",
        ServiceRoleArn = "string",
        Region = "string",
        DefaultRootDeviceType = "string",
        DefaultSubnetId = "string",
        CustomCookbooksSources = new[]
        {
            new Aws.OpsWorks.Inputs.StackCustomCookbooksSourceArgs
            {
                Type = "string",
                Url = "string",
                Password = "string",
                Revision = "string",
                SshKey = "string",
                Username = "string",
            },
        },
        CustomJson = "string",
        DefaultAvailabilityZone = "string",
        ConfigurationManagerName = "string",
        DefaultOs = "string",
        AgentVersion = "string",
        DefaultSshKeyName = "string",
        ConfigurationManagerVersion = "string",
        HostnameTheme = "string",
        ManageBerkshelf = false,
        Name = "string",
        Color = "string",
        BerkshelfVersion = "string",
        Tags = 
        {
            { "string", "string" },
        },
        UseCustomCookbooks = false,
        UseOpsworksSecurityGroups = false,
        VpcId = "string",
    });
    
    example, err := opsworks.NewStack(ctx, "examplestackResourceResourceFromOpsworksstack", &opsworks.StackArgs{
    	DefaultInstanceProfileArn: pulumi.String("string"),
    	ServiceRoleArn:            pulumi.String("string"),
    	Region:                    pulumi.String("string"),
    	DefaultRootDeviceType:     pulumi.String("string"),
    	DefaultSubnetId:           pulumi.String("string"),
    	CustomCookbooksSources: opsworks.StackCustomCookbooksSourceArray{
    		&opsworks.StackCustomCookbooksSourceArgs{
    			Type:     pulumi.String("string"),
    			Url:      pulumi.String("string"),
    			Password: pulumi.String("string"),
    			Revision: pulumi.String("string"),
    			SshKey:   pulumi.String("string"),
    			Username: pulumi.String("string"),
    		},
    	},
    	CustomJson:                  pulumi.String("string"),
    	DefaultAvailabilityZone:     pulumi.String("string"),
    	ConfigurationManagerName:    pulumi.String("string"),
    	DefaultOs:                   pulumi.String("string"),
    	AgentVersion:                pulumi.String("string"),
    	DefaultSshKeyName:           pulumi.String("string"),
    	ConfigurationManagerVersion: pulumi.String("string"),
    	HostnameTheme:               pulumi.String("string"),
    	ManageBerkshelf:             pulumi.Bool(false),
    	Name:                        pulumi.String("string"),
    	Color:                       pulumi.String("string"),
    	BerkshelfVersion:            pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	UseCustomCookbooks:        pulumi.Bool(false),
    	UseOpsworksSecurityGroups: pulumi.Bool(false),
    	VpcId:                     pulumi.String("string"),
    })
    
    var examplestackResourceResourceFromOpsworksstack = new Stack("examplestackResourceResourceFromOpsworksstack", StackArgs.builder()
        .defaultInstanceProfileArn("string")
        .serviceRoleArn("string")
        .region("string")
        .defaultRootDeviceType("string")
        .defaultSubnetId("string")
        .customCookbooksSources(StackCustomCookbooksSourceArgs.builder()
            .type("string")
            .url("string")
            .password("string")
            .revision("string")
            .sshKey("string")
            .username("string")
            .build())
        .customJson("string")
        .defaultAvailabilityZone("string")
        .configurationManagerName("string")
        .defaultOs("string")
        .agentVersion("string")
        .defaultSshKeyName("string")
        .configurationManagerVersion("string")
        .hostnameTheme("string")
        .manageBerkshelf(false)
        .name("string")
        .color("string")
        .berkshelfVersion("string")
        .tags(Map.of("string", "string"))
        .useCustomCookbooks(false)
        .useOpsworksSecurityGroups(false)
        .vpcId("string")
        .build());
    
    examplestack_resource_resource_from_opsworksstack = aws.opsworks.Stack("examplestackResourceResourceFromOpsworksstack",
        default_instance_profile_arn="string",
        service_role_arn="string",
        region="string",
        default_root_device_type="string",
        default_subnet_id="string",
        custom_cookbooks_sources=[{
            "type": "string",
            "url": "string",
            "password": "string",
            "revision": "string",
            "ssh_key": "string",
            "username": "string",
        }],
        custom_json="string",
        default_availability_zone="string",
        configuration_manager_name="string",
        default_os="string",
        agent_version="string",
        default_ssh_key_name="string",
        configuration_manager_version="string",
        hostname_theme="string",
        manage_berkshelf=False,
        name="string",
        color="string",
        berkshelf_version="string",
        tags={
            "string": "string",
        },
        use_custom_cookbooks=False,
        use_opsworks_security_groups=False,
        vpc_id="string")
    
    const examplestackResourceResourceFromOpsworksstack = new aws.opsworks.Stack("examplestackResourceResourceFromOpsworksstack", {
        defaultInstanceProfileArn: "string",
        serviceRoleArn: "string",
        region: "string",
        defaultRootDeviceType: "string",
        defaultSubnetId: "string",
        customCookbooksSources: [{
            type: "string",
            url: "string",
            password: "string",
            revision: "string",
            sshKey: "string",
            username: "string",
        }],
        customJson: "string",
        defaultAvailabilityZone: "string",
        configurationManagerName: "string",
        defaultOs: "string",
        agentVersion: "string",
        defaultSshKeyName: "string",
        configurationManagerVersion: "string",
        hostnameTheme: "string",
        manageBerkshelf: false,
        name: "string",
        color: "string",
        berkshelfVersion: "string",
        tags: {
            string: "string",
        },
        useCustomCookbooks: false,
        useOpsworksSecurityGroups: false,
        vpcId: "string",
    });
    
    type: aws:opsworks:Stack
    properties:
        agentVersion: string
        berkshelfVersion: string
        color: string
        configurationManagerName: string
        configurationManagerVersion: string
        customCookbooksSources:
            - password: string
              revision: string
              sshKey: string
              type: string
              url: string
              username: string
        customJson: string
        defaultAvailabilityZone: string
        defaultInstanceProfileArn: string
        defaultOs: string
        defaultRootDeviceType: string
        defaultSshKeyName: string
        defaultSubnetId: string
        hostnameTheme: string
        manageBerkshelf: false
        name: string
        region: string
        serviceRoleArn: string
        tags:
            string: string
        useCustomCookbooks: false
        useOpsworksSecurityGroups: false
        vpcId: string
    

    Stack 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 Stack resource accepts the following input properties:

    DefaultInstanceProfileArn string
    The ARN of an IAM Instance Profile that created instances will have by default.
    Region string
    The name of the region where the stack will exist.
    ServiceRoleArn string
    The ARN of an IAM role that the OpsWorks service will act as.
    AgentVersion string
    If set to "LATEST", OpsWorks will automatically install the latest version.
    BerkshelfVersion string
    If manage_berkshelf is enabled, the version of Berkshelf to use.
    Color string
    Color to paint next to the stack's resources in the OpsWorks console.
    ConfigurationManagerName string
    Name of the configuration manager to use. Defaults to "Chef".
    ConfigurationManagerVersion string
    Version of the configuration manager to use. Defaults to "11.4".
    CustomCookbooksSources List<StackCustomCookbooksSource>
    When use_custom_cookbooks is set, provide this sub-object as described below.
    CustomJson string
    Custom JSON attributes to apply to the entire stack.
    DefaultAvailabilityZone string
    Name of the availability zone where instances will be created by default. Cannot be set when vpc_id is set.
    DefaultOs string
    Name of OS that will be installed on instances by default.
    DefaultRootDeviceType string
    Name of the type of root device instances will have by default.
    DefaultSshKeyName string
    Name of the SSH keypair that instances will have by default.
    DefaultSubnetId string
    ID of the subnet in which instances will be created by default. Required if vpc_id is set to a VPC other than the default VPC, and forbidden if it isn't.
    HostnameTheme string
    Keyword representing the naming scheme that will be used for instance hostnames within this stack.
    ManageBerkshelf bool
    Boolean value controlling whether Opsworks will run Berkshelf for this stack.
    Name string
    The name of the stack.
    Tags Dictionary<string, string>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    UseCustomCookbooks bool
    Boolean value controlling whether the custom cookbook settings are enabled.
    UseOpsworksSecurityGroups bool
    Boolean value controlling whether the standard OpsWorks security groups apply to created instances.
    VpcId string
    ID of the VPC that this stack belongs to. Defaults to the region's default VPC.
    DefaultInstanceProfileArn string
    The ARN of an IAM Instance Profile that created instances will have by default.
    Region string
    The name of the region where the stack will exist.
    ServiceRoleArn string
    The ARN of an IAM role that the OpsWorks service will act as.
    AgentVersion string
    If set to "LATEST", OpsWorks will automatically install the latest version.
    BerkshelfVersion string
    If manage_berkshelf is enabled, the version of Berkshelf to use.
    Color string
    Color to paint next to the stack's resources in the OpsWorks console.
    ConfigurationManagerName string
    Name of the configuration manager to use. Defaults to "Chef".
    ConfigurationManagerVersion string
    Version of the configuration manager to use. Defaults to "11.4".
    CustomCookbooksSources []StackCustomCookbooksSourceArgs
    When use_custom_cookbooks is set, provide this sub-object as described below.
    CustomJson string
    Custom JSON attributes to apply to the entire stack.
    DefaultAvailabilityZone string
    Name of the availability zone where instances will be created by default. Cannot be set when vpc_id is set.
    DefaultOs string
    Name of OS that will be installed on instances by default.
    DefaultRootDeviceType string
    Name of the type of root device instances will have by default.
    DefaultSshKeyName string
    Name of the SSH keypair that instances will have by default.
    DefaultSubnetId string
    ID of the subnet in which instances will be created by default. Required if vpc_id is set to a VPC other than the default VPC, and forbidden if it isn't.
    HostnameTheme string
    Keyword representing the naming scheme that will be used for instance hostnames within this stack.
    ManageBerkshelf bool
    Boolean value controlling whether Opsworks will run Berkshelf for this stack.
    Name string
    The name of the stack.
    Tags map[string]string
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    UseCustomCookbooks bool
    Boolean value controlling whether the custom cookbook settings are enabled.
    UseOpsworksSecurityGroups bool
    Boolean value controlling whether the standard OpsWorks security groups apply to created instances.
    VpcId string
    ID of the VPC that this stack belongs to. Defaults to the region's default VPC.
    defaultInstanceProfileArn String
    The ARN of an IAM Instance Profile that created instances will have by default.
    region String
    The name of the region where the stack will exist.
    serviceRoleArn String
    The ARN of an IAM role that the OpsWorks service will act as.
    agentVersion String
    If set to "LATEST", OpsWorks will automatically install the latest version.
    berkshelfVersion String
    If manage_berkshelf is enabled, the version of Berkshelf to use.
    color String
    Color to paint next to the stack's resources in the OpsWorks console.
    configurationManagerName String
    Name of the configuration manager to use. Defaults to "Chef".
    configurationManagerVersion String
    Version of the configuration manager to use. Defaults to "11.4".
    customCookbooksSources List<StackCustomCookbooksSource>
    When use_custom_cookbooks is set, provide this sub-object as described below.
    customJson String
    Custom JSON attributes to apply to the entire stack.
    defaultAvailabilityZone String
    Name of the availability zone where instances will be created by default. Cannot be set when vpc_id is set.
    defaultOs String
    Name of OS that will be installed on instances by default.
    defaultRootDeviceType String
    Name of the type of root device instances will have by default.
    defaultSshKeyName String
    Name of the SSH keypair that instances will have by default.
    defaultSubnetId String
    ID of the subnet in which instances will be created by default. Required if vpc_id is set to a VPC other than the default VPC, and forbidden if it isn't.
    hostnameTheme String
    Keyword representing the naming scheme that will be used for instance hostnames within this stack.
    manageBerkshelf Boolean
    Boolean value controlling whether Opsworks will run Berkshelf for this stack.
    name String
    The name of the stack.
    tags Map<String,String>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    useCustomCookbooks Boolean
    Boolean value controlling whether the custom cookbook settings are enabled.
    useOpsworksSecurityGroups Boolean
    Boolean value controlling whether the standard OpsWorks security groups apply to created instances.
    vpcId String
    ID of the VPC that this stack belongs to. Defaults to the region's default VPC.
    defaultInstanceProfileArn string
    The ARN of an IAM Instance Profile that created instances will have by default.
    region string
    The name of the region where the stack will exist.
    serviceRoleArn string
    The ARN of an IAM role that the OpsWorks service will act as.
    agentVersion string
    If set to "LATEST", OpsWorks will automatically install the latest version.
    berkshelfVersion string
    If manage_berkshelf is enabled, the version of Berkshelf to use.
    color string
    Color to paint next to the stack's resources in the OpsWorks console.
    configurationManagerName string
    Name of the configuration manager to use. Defaults to "Chef".
    configurationManagerVersion string
    Version of the configuration manager to use. Defaults to "11.4".
    customCookbooksSources StackCustomCookbooksSource[]
    When use_custom_cookbooks is set, provide this sub-object as described below.
    customJson string
    Custom JSON attributes to apply to the entire stack.
    defaultAvailabilityZone string
    Name of the availability zone where instances will be created by default. Cannot be set when vpc_id is set.
    defaultOs string
    Name of OS that will be installed on instances by default.
    defaultRootDeviceType string
    Name of the type of root device instances will have by default.
    defaultSshKeyName string
    Name of the SSH keypair that instances will have by default.
    defaultSubnetId string
    ID of the subnet in which instances will be created by default. Required if vpc_id is set to a VPC other than the default VPC, and forbidden if it isn't.
    hostnameTheme string
    Keyword representing the naming scheme that will be used for instance hostnames within this stack.
    manageBerkshelf boolean
    Boolean value controlling whether Opsworks will run Berkshelf for this stack.
    name string
    The name of the stack.
    tags {[key: string]: string}
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    useCustomCookbooks boolean
    Boolean value controlling whether the custom cookbook settings are enabled.
    useOpsworksSecurityGroups boolean
    Boolean value controlling whether the standard OpsWorks security groups apply to created instances.
    vpcId string
    ID of the VPC that this stack belongs to. Defaults to the region's default VPC.
    default_instance_profile_arn str
    The ARN of an IAM Instance Profile that created instances will have by default.
    region str
    The name of the region where the stack will exist.
    service_role_arn str
    The ARN of an IAM role that the OpsWorks service will act as.
    agent_version str
    If set to "LATEST", OpsWorks will automatically install the latest version.
    berkshelf_version str
    If manage_berkshelf is enabled, the version of Berkshelf to use.
    color str
    Color to paint next to the stack's resources in the OpsWorks console.
    configuration_manager_name str
    Name of the configuration manager to use. Defaults to "Chef".
    configuration_manager_version str
    Version of the configuration manager to use. Defaults to "11.4".
    custom_cookbooks_sources Sequence[StackCustomCookbooksSourceArgs]
    When use_custom_cookbooks is set, provide this sub-object as described below.
    custom_json str
    Custom JSON attributes to apply to the entire stack.
    default_availability_zone str
    Name of the availability zone where instances will be created by default. Cannot be set when vpc_id is set.
    default_os str
    Name of OS that will be installed on instances by default.
    default_root_device_type str
    Name of the type of root device instances will have by default.
    default_ssh_key_name str
    Name of the SSH keypair that instances will have by default.
    default_subnet_id str
    ID of the subnet in which instances will be created by default. Required if vpc_id is set to a VPC other than the default VPC, and forbidden if it isn't.
    hostname_theme str
    Keyword representing the naming scheme that will be used for instance hostnames within this stack.
    manage_berkshelf bool
    Boolean value controlling whether Opsworks will run Berkshelf for this stack.
    name str
    The name of the stack.
    tags Mapping[str, str]
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    use_custom_cookbooks bool
    Boolean value controlling whether the custom cookbook settings are enabled.
    use_opsworks_security_groups bool
    Boolean value controlling whether the standard OpsWorks security groups apply to created instances.
    vpc_id str
    ID of the VPC that this stack belongs to. Defaults to the region's default VPC.
    defaultInstanceProfileArn String
    The ARN of an IAM Instance Profile that created instances will have by default.
    region String
    The name of the region where the stack will exist.
    serviceRoleArn String
    The ARN of an IAM role that the OpsWorks service will act as.
    agentVersion String
    If set to "LATEST", OpsWorks will automatically install the latest version.
    berkshelfVersion String
    If manage_berkshelf is enabled, the version of Berkshelf to use.
    color String
    Color to paint next to the stack's resources in the OpsWorks console.
    configurationManagerName String
    Name of the configuration manager to use. Defaults to "Chef".
    configurationManagerVersion String
    Version of the configuration manager to use. Defaults to "11.4".
    customCookbooksSources List<Property Map>
    When use_custom_cookbooks is set, provide this sub-object as described below.
    customJson String
    Custom JSON attributes to apply to the entire stack.
    defaultAvailabilityZone String
    Name of the availability zone where instances will be created by default. Cannot be set when vpc_id is set.
    defaultOs String
    Name of OS that will be installed on instances by default.
    defaultRootDeviceType String
    Name of the type of root device instances will have by default.
    defaultSshKeyName String
    Name of the SSH keypair that instances will have by default.
    defaultSubnetId String
    ID of the subnet in which instances will be created by default. Required if vpc_id is set to a VPC other than the default VPC, and forbidden if it isn't.
    hostnameTheme String
    Keyword representing the naming scheme that will be used for instance hostnames within this stack.
    manageBerkshelf Boolean
    Boolean value controlling whether Opsworks will run Berkshelf for this stack.
    name String
    The name of the stack.
    tags Map<String>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    useCustomCookbooks Boolean
    Boolean value controlling whether the custom cookbook settings are enabled.
    useOpsworksSecurityGroups Boolean
    Boolean value controlling whether the standard OpsWorks security groups apply to created instances.
    vpcId String
    ID of the VPC that this stack belongs to. Defaults to the region's default VPC.

    Outputs

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

    Arn string
    Id string
    The provider-assigned unique ID for this managed resource.
    StackEndpoint string
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    Id string
    The provider-assigned unique ID for this managed resource.
    StackEndpoint string
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    id String
    The provider-assigned unique ID for this managed resource.
    stackEndpoint String
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    id string
    The provider-assigned unique ID for this managed resource.
    stackEndpoint string
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    id str
    The provider-assigned unique ID for this managed resource.
    stack_endpoint str
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    id String
    The provider-assigned unique ID for this managed resource.
    stackEndpoint String
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Look up Existing Stack Resource

    Get an existing Stack 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?: StackState, opts?: CustomResourceOptions): Stack
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            agent_version: Optional[str] = None,
            arn: Optional[str] = None,
            berkshelf_version: Optional[str] = None,
            color: Optional[str] = None,
            configuration_manager_name: Optional[str] = None,
            configuration_manager_version: Optional[str] = None,
            custom_cookbooks_sources: Optional[Sequence[StackCustomCookbooksSourceArgs]] = None,
            custom_json: Optional[str] = None,
            default_availability_zone: Optional[str] = None,
            default_instance_profile_arn: Optional[str] = None,
            default_os: Optional[str] = None,
            default_root_device_type: Optional[str] = None,
            default_ssh_key_name: Optional[str] = None,
            default_subnet_id: Optional[str] = None,
            hostname_theme: Optional[str] = None,
            manage_berkshelf: Optional[bool] = None,
            name: Optional[str] = None,
            region: Optional[str] = None,
            service_role_arn: Optional[str] = None,
            stack_endpoint: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            use_custom_cookbooks: Optional[bool] = None,
            use_opsworks_security_groups: Optional[bool] = None,
            vpc_id: Optional[str] = None) -> Stack
    func GetStack(ctx *Context, name string, id IDInput, state *StackState, opts ...ResourceOption) (*Stack, error)
    public static Stack Get(string name, Input<string> id, StackState? state, CustomResourceOptions? opts = null)
    public static Stack get(String name, Output<String> id, StackState 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:
    AgentVersion string
    If set to "LATEST", OpsWorks will automatically install the latest version.
    Arn string
    BerkshelfVersion string
    If manage_berkshelf is enabled, the version of Berkshelf to use.
    Color string
    Color to paint next to the stack's resources in the OpsWorks console.
    ConfigurationManagerName string
    Name of the configuration manager to use. Defaults to "Chef".
    ConfigurationManagerVersion string
    Version of the configuration manager to use. Defaults to "11.4".
    CustomCookbooksSources List<StackCustomCookbooksSource>
    When use_custom_cookbooks is set, provide this sub-object as described below.
    CustomJson string
    Custom JSON attributes to apply to the entire stack.
    DefaultAvailabilityZone string
    Name of the availability zone where instances will be created by default. Cannot be set when vpc_id is set.
    DefaultInstanceProfileArn string
    The ARN of an IAM Instance Profile that created instances will have by default.
    DefaultOs string
    Name of OS that will be installed on instances by default.
    DefaultRootDeviceType string
    Name of the type of root device instances will have by default.
    DefaultSshKeyName string
    Name of the SSH keypair that instances will have by default.
    DefaultSubnetId string
    ID of the subnet in which instances will be created by default. Required if vpc_id is set to a VPC other than the default VPC, and forbidden if it isn't.
    HostnameTheme string
    Keyword representing the naming scheme that will be used for instance hostnames within this stack.
    ManageBerkshelf bool
    Boolean value controlling whether Opsworks will run Berkshelf for this stack.
    Name string
    The name of the stack.
    Region string
    The name of the region where the stack will exist.
    ServiceRoleArn string
    The ARN of an IAM role that the OpsWorks service will act as.
    StackEndpoint string
    Tags Dictionary<string, string>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    UseCustomCookbooks bool
    Boolean value controlling whether the custom cookbook settings are enabled.
    UseOpsworksSecurityGroups bool
    Boolean value controlling whether the standard OpsWorks security groups apply to created instances.
    VpcId string
    ID of the VPC that this stack belongs to. Defaults to the region's default VPC.
    AgentVersion string
    If set to "LATEST", OpsWorks will automatically install the latest version.
    Arn string
    BerkshelfVersion string
    If manage_berkshelf is enabled, the version of Berkshelf to use.
    Color string
    Color to paint next to the stack's resources in the OpsWorks console.
    ConfigurationManagerName string
    Name of the configuration manager to use. Defaults to "Chef".
    ConfigurationManagerVersion string
    Version of the configuration manager to use. Defaults to "11.4".
    CustomCookbooksSources []StackCustomCookbooksSourceArgs
    When use_custom_cookbooks is set, provide this sub-object as described below.
    CustomJson string
    Custom JSON attributes to apply to the entire stack.
    DefaultAvailabilityZone string
    Name of the availability zone where instances will be created by default. Cannot be set when vpc_id is set.
    DefaultInstanceProfileArn string
    The ARN of an IAM Instance Profile that created instances will have by default.
    DefaultOs string
    Name of OS that will be installed on instances by default.
    DefaultRootDeviceType string
    Name of the type of root device instances will have by default.
    DefaultSshKeyName string
    Name of the SSH keypair that instances will have by default.
    DefaultSubnetId string
    ID of the subnet in which instances will be created by default. Required if vpc_id is set to a VPC other than the default VPC, and forbidden if it isn't.
    HostnameTheme string
    Keyword representing the naming scheme that will be used for instance hostnames within this stack.
    ManageBerkshelf bool
    Boolean value controlling whether Opsworks will run Berkshelf for this stack.
    Name string
    The name of the stack.
    Region string
    The name of the region where the stack will exist.
    ServiceRoleArn string
    The ARN of an IAM role that the OpsWorks service will act as.
    StackEndpoint string
    Tags map[string]string
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    UseCustomCookbooks bool
    Boolean value controlling whether the custom cookbook settings are enabled.
    UseOpsworksSecurityGroups bool
    Boolean value controlling whether the standard OpsWorks security groups apply to created instances.
    VpcId string
    ID of the VPC that this stack belongs to. Defaults to the region's default VPC.
    agentVersion String
    If set to "LATEST", OpsWorks will automatically install the latest version.
    arn String
    berkshelfVersion String
    If manage_berkshelf is enabled, the version of Berkshelf to use.
    color String
    Color to paint next to the stack's resources in the OpsWorks console.
    configurationManagerName String
    Name of the configuration manager to use. Defaults to "Chef".
    configurationManagerVersion String
    Version of the configuration manager to use. Defaults to "11.4".
    customCookbooksSources List<StackCustomCookbooksSource>
    When use_custom_cookbooks is set, provide this sub-object as described below.
    customJson String
    Custom JSON attributes to apply to the entire stack.
    defaultAvailabilityZone String
    Name of the availability zone where instances will be created by default. Cannot be set when vpc_id is set.
    defaultInstanceProfileArn String
    The ARN of an IAM Instance Profile that created instances will have by default.
    defaultOs String
    Name of OS that will be installed on instances by default.
    defaultRootDeviceType String
    Name of the type of root device instances will have by default.
    defaultSshKeyName String
    Name of the SSH keypair that instances will have by default.
    defaultSubnetId String
    ID of the subnet in which instances will be created by default. Required if vpc_id is set to a VPC other than the default VPC, and forbidden if it isn't.
    hostnameTheme String
    Keyword representing the naming scheme that will be used for instance hostnames within this stack.
    manageBerkshelf Boolean
    Boolean value controlling whether Opsworks will run Berkshelf for this stack.
    name String
    The name of the stack.
    region String
    The name of the region where the stack will exist.
    serviceRoleArn String
    The ARN of an IAM role that the OpsWorks service will act as.
    stackEndpoint String
    tags Map<String,String>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    useCustomCookbooks Boolean
    Boolean value controlling whether the custom cookbook settings are enabled.
    useOpsworksSecurityGroups Boolean
    Boolean value controlling whether the standard OpsWorks security groups apply to created instances.
    vpcId String
    ID of the VPC that this stack belongs to. Defaults to the region's default VPC.
    agentVersion string
    If set to "LATEST", OpsWorks will automatically install the latest version.
    arn string
    berkshelfVersion string
    If manage_berkshelf is enabled, the version of Berkshelf to use.
    color string
    Color to paint next to the stack's resources in the OpsWorks console.
    configurationManagerName string
    Name of the configuration manager to use. Defaults to "Chef".
    configurationManagerVersion string
    Version of the configuration manager to use. Defaults to "11.4".
    customCookbooksSources StackCustomCookbooksSource[]
    When use_custom_cookbooks is set, provide this sub-object as described below.
    customJson string
    Custom JSON attributes to apply to the entire stack.
    defaultAvailabilityZone string
    Name of the availability zone where instances will be created by default. Cannot be set when vpc_id is set.
    defaultInstanceProfileArn string
    The ARN of an IAM Instance Profile that created instances will have by default.
    defaultOs string
    Name of OS that will be installed on instances by default.
    defaultRootDeviceType string
    Name of the type of root device instances will have by default.
    defaultSshKeyName string
    Name of the SSH keypair that instances will have by default.
    defaultSubnetId string
    ID of the subnet in which instances will be created by default. Required if vpc_id is set to a VPC other than the default VPC, and forbidden if it isn't.
    hostnameTheme string
    Keyword representing the naming scheme that will be used for instance hostnames within this stack.
    manageBerkshelf boolean
    Boolean value controlling whether Opsworks will run Berkshelf for this stack.
    name string
    The name of the stack.
    region string
    The name of the region where the stack will exist.
    serviceRoleArn string
    The ARN of an IAM role that the OpsWorks service will act as.
    stackEndpoint string
    tags {[key: string]: string}
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    useCustomCookbooks boolean
    Boolean value controlling whether the custom cookbook settings are enabled.
    useOpsworksSecurityGroups boolean
    Boolean value controlling whether the standard OpsWorks security groups apply to created instances.
    vpcId string
    ID of the VPC that this stack belongs to. Defaults to the region's default VPC.
    agent_version str
    If set to "LATEST", OpsWorks will automatically install the latest version.
    arn str
    berkshelf_version str
    If manage_berkshelf is enabled, the version of Berkshelf to use.
    color str
    Color to paint next to the stack's resources in the OpsWorks console.
    configuration_manager_name str
    Name of the configuration manager to use. Defaults to "Chef".
    configuration_manager_version str
    Version of the configuration manager to use. Defaults to "11.4".
    custom_cookbooks_sources Sequence[StackCustomCookbooksSourceArgs]
    When use_custom_cookbooks is set, provide this sub-object as described below.
    custom_json str
    Custom JSON attributes to apply to the entire stack.
    default_availability_zone str
    Name of the availability zone where instances will be created by default. Cannot be set when vpc_id is set.
    default_instance_profile_arn str
    The ARN of an IAM Instance Profile that created instances will have by default.
    default_os str
    Name of OS that will be installed on instances by default.
    default_root_device_type str
    Name of the type of root device instances will have by default.
    default_ssh_key_name str
    Name of the SSH keypair that instances will have by default.
    default_subnet_id str
    ID of the subnet in which instances will be created by default. Required if vpc_id is set to a VPC other than the default VPC, and forbidden if it isn't.
    hostname_theme str
    Keyword representing the naming scheme that will be used for instance hostnames within this stack.
    manage_berkshelf bool
    Boolean value controlling whether Opsworks will run Berkshelf for this stack.
    name str
    The name of the stack.
    region str
    The name of the region where the stack will exist.
    service_role_arn str
    The ARN of an IAM role that the OpsWorks service will act as.
    stack_endpoint str
    tags Mapping[str, str]
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    use_custom_cookbooks bool
    Boolean value controlling whether the custom cookbook settings are enabled.
    use_opsworks_security_groups bool
    Boolean value controlling whether the standard OpsWorks security groups apply to created instances.
    vpc_id str
    ID of the VPC that this stack belongs to. Defaults to the region's default VPC.
    agentVersion String
    If set to "LATEST", OpsWorks will automatically install the latest version.
    arn String
    berkshelfVersion String
    If manage_berkshelf is enabled, the version of Berkshelf to use.
    color String
    Color to paint next to the stack's resources in the OpsWorks console.
    configurationManagerName String
    Name of the configuration manager to use. Defaults to "Chef".
    configurationManagerVersion String
    Version of the configuration manager to use. Defaults to "11.4".
    customCookbooksSources List<Property Map>
    When use_custom_cookbooks is set, provide this sub-object as described below.
    customJson String
    Custom JSON attributes to apply to the entire stack.
    defaultAvailabilityZone String
    Name of the availability zone where instances will be created by default. Cannot be set when vpc_id is set.
    defaultInstanceProfileArn String
    The ARN of an IAM Instance Profile that created instances will have by default.
    defaultOs String
    Name of OS that will be installed on instances by default.
    defaultRootDeviceType String
    Name of the type of root device instances will have by default.
    defaultSshKeyName String
    Name of the SSH keypair that instances will have by default.
    defaultSubnetId String
    ID of the subnet in which instances will be created by default. Required if vpc_id is set to a VPC other than the default VPC, and forbidden if it isn't.
    hostnameTheme String
    Keyword representing the naming scheme that will be used for instance hostnames within this stack.
    manageBerkshelf Boolean
    Boolean value controlling whether Opsworks will run Berkshelf for this stack.
    name String
    The name of the stack.
    region String
    The name of the region where the stack will exist.
    serviceRoleArn String
    The ARN of an IAM role that the OpsWorks service will act as.
    stackEndpoint String
    tags Map<String>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    useCustomCookbooks Boolean
    Boolean value controlling whether the custom cookbook settings are enabled.
    useOpsworksSecurityGroups Boolean
    Boolean value controlling whether the standard OpsWorks security groups apply to created instances.
    vpcId String
    ID of the VPC that this stack belongs to. Defaults to the region's default VPC.

    Supporting Types

    StackCustomCookbooksSource, StackCustomCookbooksSourceArgs

    Type string
    The type of source to use. For example, "archive".
    Url string
    The URL where the cookbooks resource can be found.
    Password string
    Password to use when authenticating to the source. The provider cannot perform drift detection of this configuration.
    Revision string
    For sources that are version-aware, the revision to use.
    SshKey string
    SSH key to use when authenticating to the source. This provider cannot perform drift detection of this configuration.
    Username string
    Username to use when authenticating to the source.
    Type string
    The type of source to use. For example, "archive".
    Url string
    The URL where the cookbooks resource can be found.
    Password string
    Password to use when authenticating to the source. The provider cannot perform drift detection of this configuration.
    Revision string
    For sources that are version-aware, the revision to use.
    SshKey string
    SSH key to use when authenticating to the source. This provider cannot perform drift detection of this configuration.
    Username string
    Username to use when authenticating to the source.
    type String
    The type of source to use. For example, "archive".
    url String
    The URL where the cookbooks resource can be found.
    password String
    Password to use when authenticating to the source. The provider cannot perform drift detection of this configuration.
    revision String
    For sources that are version-aware, the revision to use.
    sshKey String
    SSH key to use when authenticating to the source. This provider cannot perform drift detection of this configuration.
    username String
    Username to use when authenticating to the source.
    type string
    The type of source to use. For example, "archive".
    url string
    The URL where the cookbooks resource can be found.
    password string
    Password to use when authenticating to the source. The provider cannot perform drift detection of this configuration.
    revision string
    For sources that are version-aware, the revision to use.
    sshKey string
    SSH key to use when authenticating to the source. This provider cannot perform drift detection of this configuration.
    username string
    Username to use when authenticating to the source.
    type str
    The type of source to use. For example, "archive".
    url str
    The URL where the cookbooks resource can be found.
    password str
    Password to use when authenticating to the source. The provider cannot perform drift detection of this configuration.
    revision str
    For sources that are version-aware, the revision to use.
    ssh_key str
    SSH key to use when authenticating to the source. This provider cannot perform drift detection of this configuration.
    username str
    Username to use when authenticating to the source.
    type String
    The type of source to use. For example, "archive".
    url String
    The URL where the cookbooks resource can be found.
    password String
    Password to use when authenticating to the source. The provider cannot perform drift detection of this configuration.
    revision String
    For sources that are version-aware, the revision to use.
    sshKey String
    SSH key to use when authenticating to the source. This provider cannot perform drift detection of this configuration.
    username String
    Username to use when authenticating to the source.

    Import

    Using pulumi import, import OpsWorks stacks using the id. For example:

    $ pulumi import aws:opsworks/stack:Stack bar 00000000-0000-0000-0000-000000000000
    

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

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi