aws.opsworks.Stack
Explore with Pulumi AI
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)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:
- DefaultInstance stringProfile Arn 
- 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.
- ServiceRole stringArn 
- 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_berkshelfis enabled, the version of Berkshelf to use.
- Color string
- Color to paint next to the stack's resources in the OpsWorks console.
- ConfigurationManager stringName 
- Name of the configuration manager to use. Defaults to "Chef".
- ConfigurationManager stringVersion 
- Version of the configuration manager to use. Defaults to "11.4".
- CustomCookbooks List<StackSources Custom Cookbooks Source> 
- When use_custom_cookbooksis set, provide this sub-object as described below.
- CustomJson string
- Custom JSON attributes to apply to the entire stack.
- DefaultAvailability stringZone 
- Name of the availability zone where instances will be created by default.
Cannot be set when vpc_idis set.
- DefaultOs string
- Name of OS that will be installed on instances by default.
- DefaultRoot stringDevice Type 
- Name of the type of root device instances will have by default.
- DefaultSsh stringKey Name 
- Name of the SSH keypair that instances will have by default.
- DefaultSubnet stringId 
- ID of the subnet in which instances will be created by default.
Required if vpc_idis 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.
- Dictionary<string, string>
- A map of tags to assign to the resource.
If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- UseCustom boolCookbooks 
- Boolean value controlling whether the custom cookbook settings are enabled.
- UseOpsworks boolSecurity Groups 
- 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.
- DefaultInstance stringProfile Arn 
- 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.
- ServiceRole stringArn 
- 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_berkshelfis enabled, the version of Berkshelf to use.
- Color string
- Color to paint next to the stack's resources in the OpsWorks console.
- ConfigurationManager stringName 
- Name of the configuration manager to use. Defaults to "Chef".
- ConfigurationManager stringVersion 
- Version of the configuration manager to use. Defaults to "11.4".
- CustomCookbooks []StackSources Custom Cookbooks Source Args 
- When use_custom_cookbooksis set, provide this sub-object as described below.
- CustomJson string
- Custom JSON attributes to apply to the entire stack.
- DefaultAvailability stringZone 
- Name of the availability zone where instances will be created by default.
Cannot be set when vpc_idis set.
- DefaultOs string
- Name of OS that will be installed on instances by default.
- DefaultRoot stringDevice Type 
- Name of the type of root device instances will have by default.
- DefaultSsh stringKey Name 
- Name of the SSH keypair that instances will have by default.
- DefaultSubnet stringId 
- ID of the subnet in which instances will be created by default.
Required if vpc_idis 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.
- map[string]string
- A map of tags to assign to the resource.
If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- UseCustom boolCookbooks 
- Boolean value controlling whether the custom cookbook settings are enabled.
- UseOpsworks boolSecurity Groups 
- 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.
- defaultInstance StringProfile Arn 
- 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.
- serviceRole StringArn 
- 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_berkshelfis enabled, the version of Berkshelf to use.
- color String
- Color to paint next to the stack's resources in the OpsWorks console.
- configurationManager StringName 
- Name of the configuration manager to use. Defaults to "Chef".
- configurationManager StringVersion 
- Version of the configuration manager to use. Defaults to "11.4".
- customCookbooks List<StackSources Custom Cookbooks Source> 
- When use_custom_cookbooksis set, provide this sub-object as described below.
- customJson String
- Custom JSON attributes to apply to the entire stack.
- defaultAvailability StringZone 
- Name of the availability zone where instances will be created by default.
Cannot be set when vpc_idis set.
- defaultOs String
- Name of OS that will be installed on instances by default.
- defaultRoot StringDevice Type 
- Name of the type of root device instances will have by default.
- defaultSsh StringKey Name 
- Name of the SSH keypair that instances will have by default.
- defaultSubnet StringId 
- ID of the subnet in which instances will be created by default.
Required if vpc_idis 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.
- Map<String,String>
- A map of tags to assign to the resource.
If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- useCustom BooleanCookbooks 
- Boolean value controlling whether the custom cookbook settings are enabled.
- useOpsworks BooleanSecurity Groups 
- 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.
- defaultInstance stringProfile Arn 
- 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.
- serviceRole stringArn 
- 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_berkshelfis enabled, the version of Berkshelf to use.
- color string
- Color to paint next to the stack's resources in the OpsWorks console.
- configurationManager stringName 
- Name of the configuration manager to use. Defaults to "Chef".
- configurationManager stringVersion 
- Version of the configuration manager to use. Defaults to "11.4".
- customCookbooks StackSources Custom Cookbooks Source[] 
- When use_custom_cookbooksis set, provide this sub-object as described below.
- customJson string
- Custom JSON attributes to apply to the entire stack.
- defaultAvailability stringZone 
- Name of the availability zone where instances will be created by default.
Cannot be set when vpc_idis set.
- defaultOs string
- Name of OS that will be installed on instances by default.
- defaultRoot stringDevice Type 
- Name of the type of root device instances will have by default.
- defaultSsh stringKey Name 
- Name of the SSH keypair that instances will have by default.
- defaultSubnet stringId 
- ID of the subnet in which instances will be created by default.
Required if vpc_idis 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.
- {[key: string]: string}
- A map of tags to assign to the resource.
If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- useCustom booleanCookbooks 
- Boolean value controlling whether the custom cookbook settings are enabled.
- useOpsworks booleanSecurity Groups 
- 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_ strprofile_ arn 
- 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_ strarn 
- 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_berkshelfis enabled, the version of Berkshelf to use.
- color str
- Color to paint next to the stack's resources in the OpsWorks console.
- configuration_manager_ strname 
- Name of the configuration manager to use. Defaults to "Chef".
- configuration_manager_ strversion 
- Version of the configuration manager to use. Defaults to "11.4".
- custom_cookbooks_ Sequence[Stacksources Custom Cookbooks Source Args] 
- When use_custom_cookbooksis set, provide this sub-object as described below.
- custom_json str
- Custom JSON attributes to apply to the entire stack.
- default_availability_ strzone 
- Name of the availability zone where instances will be created by default.
Cannot be set when vpc_idis set.
- default_os str
- Name of OS that will be installed on instances by default.
- default_root_ strdevice_ type 
- Name of the type of root device instances will have by default.
- default_ssh_ strkey_ name 
- Name of the SSH keypair that instances will have by default.
- default_subnet_ strid 
- ID of the subnet in which instances will be created by default.
Required if vpc_idis 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.
- Mapping[str, str]
- A map of tags to assign to the resource.
If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- use_custom_ boolcookbooks 
- Boolean value controlling whether the custom cookbook settings are enabled.
- use_opsworks_ boolsecurity_ groups 
- 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.
- defaultInstance StringProfile Arn 
- 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.
- serviceRole StringArn 
- 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_berkshelfis enabled, the version of Berkshelf to use.
- color String
- Color to paint next to the stack's resources in the OpsWorks console.
- configurationManager StringName 
- Name of the configuration manager to use. Defaults to "Chef".
- configurationManager StringVersion 
- Version of the configuration manager to use. Defaults to "11.4".
- customCookbooks List<Property Map>Sources 
- When use_custom_cookbooksis set, provide this sub-object as described below.
- customJson String
- Custom JSON attributes to apply to the entire stack.
- defaultAvailability StringZone 
- Name of the availability zone where instances will be created by default.
Cannot be set when vpc_idis set.
- defaultOs String
- Name of OS that will be installed on instances by default.
- defaultRoot StringDevice Type 
- Name of the type of root device instances will have by default.
- defaultSsh StringKey Name 
- Name of the SSH keypair that instances will have by default.
- defaultSubnet StringId 
- ID of the subnet in which instances will be created by default.
Required if vpc_idis 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.
- Map<String>
- A map of tags to assign to the resource.
If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- useCustom BooleanCookbooks 
- Boolean value controlling whether the custom cookbook settings are enabled.
- useOpsworks BooleanSecurity Groups 
- 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
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- Arn string
- Id string
- The provider-assigned unique ID for this managed resource.
- StackEndpoint string
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- arn String
- id String
- The provider-assigned unique ID for this managed resource.
- stackEndpoint String
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- arn string
- id string
- The provider-assigned unique ID for this managed resource.
- stackEndpoint string
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- arn str
- id str
- The provider-assigned unique ID for this managed resource.
- stack_endpoint str
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- arn String
- id String
- The provider-assigned unique ID for this managed resource.
- stackEndpoint String
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
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) -> Stackfunc 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)resources:  _:    type: aws:opsworks:Stack    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.
- AgentVersion string
- If set to "LATEST", OpsWorks will automatically install the latest version.
- Arn string
- BerkshelfVersion string
- If manage_berkshelfis enabled, the version of Berkshelf to use.
- Color string
- Color to paint next to the stack's resources in the OpsWorks console.
- ConfigurationManager stringName 
- Name of the configuration manager to use. Defaults to "Chef".
- ConfigurationManager stringVersion 
- Version of the configuration manager to use. Defaults to "11.4".
- CustomCookbooks List<StackSources Custom Cookbooks Source> 
- When use_custom_cookbooksis set, provide this sub-object as described below.
- CustomJson string
- Custom JSON attributes to apply to the entire stack.
- DefaultAvailability stringZone 
- Name of the availability zone where instances will be created by default.
Cannot be set when vpc_idis set.
- DefaultInstance stringProfile Arn 
- 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.
- DefaultRoot stringDevice Type 
- Name of the type of root device instances will have by default.
- DefaultSsh stringKey Name 
- Name of the SSH keypair that instances will have by default.
- DefaultSubnet stringId 
- ID of the subnet in which instances will be created by default.
Required if vpc_idis 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.
- ServiceRole stringArn 
- The ARN of an IAM role that the OpsWorks service will act as.
- StackEndpoint string
- Dictionary<string, string>
- A map of tags to assign to the resource.
If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- UseCustom boolCookbooks 
- Boolean value controlling whether the custom cookbook settings are enabled.
- UseOpsworks boolSecurity Groups 
- 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_berkshelfis enabled, the version of Berkshelf to use.
- Color string
- Color to paint next to the stack's resources in the OpsWorks console.
- ConfigurationManager stringName 
- Name of the configuration manager to use. Defaults to "Chef".
- ConfigurationManager stringVersion 
- Version of the configuration manager to use. Defaults to "11.4".
- CustomCookbooks []StackSources Custom Cookbooks Source Args 
- When use_custom_cookbooksis set, provide this sub-object as described below.
- CustomJson string
- Custom JSON attributes to apply to the entire stack.
- DefaultAvailability stringZone 
- Name of the availability zone where instances will be created by default.
Cannot be set when vpc_idis set.
- DefaultInstance stringProfile Arn 
- 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.
- DefaultRoot stringDevice Type 
- Name of the type of root device instances will have by default.
- DefaultSsh stringKey Name 
- Name of the SSH keypair that instances will have by default.
- DefaultSubnet stringId 
- ID of the subnet in which instances will be created by default.
Required if vpc_idis 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.
- ServiceRole stringArn 
- The ARN of an IAM role that the OpsWorks service will act as.
- StackEndpoint string
- map[string]string
- A map of tags to assign to the resource.
If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- UseCustom boolCookbooks 
- Boolean value controlling whether the custom cookbook settings are enabled.
- UseOpsworks boolSecurity Groups 
- 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_berkshelfis enabled, the version of Berkshelf to use.
- color String
- Color to paint next to the stack's resources in the OpsWorks console.
- configurationManager StringName 
- Name of the configuration manager to use. Defaults to "Chef".
- configurationManager StringVersion 
- Version of the configuration manager to use. Defaults to "11.4".
- customCookbooks List<StackSources Custom Cookbooks Source> 
- When use_custom_cookbooksis set, provide this sub-object as described below.
- customJson String
- Custom JSON attributes to apply to the entire stack.
- defaultAvailability StringZone 
- Name of the availability zone where instances will be created by default.
Cannot be set when vpc_idis set.
- defaultInstance StringProfile Arn 
- 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.
- defaultRoot StringDevice Type 
- Name of the type of root device instances will have by default.
- defaultSsh StringKey Name 
- Name of the SSH keypair that instances will have by default.
- defaultSubnet StringId 
- ID of the subnet in which instances will be created by default.
Required if vpc_idis 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.
- serviceRole StringArn 
- The ARN of an IAM role that the OpsWorks service will act as.
- stackEndpoint String
- Map<String,String>
- A map of tags to assign to the resource.
If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- useCustom BooleanCookbooks 
- Boolean value controlling whether the custom cookbook settings are enabled.
- useOpsworks BooleanSecurity Groups 
- 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_berkshelfis enabled, the version of Berkshelf to use.
- color string
- Color to paint next to the stack's resources in the OpsWorks console.
- configurationManager stringName 
- Name of the configuration manager to use. Defaults to "Chef".
- configurationManager stringVersion 
- Version of the configuration manager to use. Defaults to "11.4".
- customCookbooks StackSources Custom Cookbooks Source[] 
- When use_custom_cookbooksis set, provide this sub-object as described below.
- customJson string
- Custom JSON attributes to apply to the entire stack.
- defaultAvailability stringZone 
- Name of the availability zone where instances will be created by default.
Cannot be set when vpc_idis set.
- defaultInstance stringProfile Arn 
- 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.
- defaultRoot stringDevice Type 
- Name of the type of root device instances will have by default.
- defaultSsh stringKey Name 
- Name of the SSH keypair that instances will have by default.
- defaultSubnet stringId 
- ID of the subnet in which instances will be created by default.
Required if vpc_idis 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.
- serviceRole stringArn 
- The ARN of an IAM role that the OpsWorks service will act as.
- stackEndpoint string
- {[key: string]: string}
- A map of tags to assign to the resource.
If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- useCustom booleanCookbooks 
- Boolean value controlling whether the custom cookbook settings are enabled.
- useOpsworks booleanSecurity Groups 
- 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_berkshelfis enabled, the version of Berkshelf to use.
- color str
- Color to paint next to the stack's resources in the OpsWorks console.
- configuration_manager_ strname 
- Name of the configuration manager to use. Defaults to "Chef".
- configuration_manager_ strversion 
- Version of the configuration manager to use. Defaults to "11.4".
- custom_cookbooks_ Sequence[Stacksources Custom Cookbooks Source Args] 
- When use_custom_cookbooksis set, provide this sub-object as described below.
- custom_json str
- Custom JSON attributes to apply to the entire stack.
- default_availability_ strzone 
- Name of the availability zone where instances will be created by default.
Cannot be set when vpc_idis set.
- default_instance_ strprofile_ arn 
- 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_ strdevice_ type 
- Name of the type of root device instances will have by default.
- default_ssh_ strkey_ name 
- Name of the SSH keypair that instances will have by default.
- default_subnet_ strid 
- ID of the subnet in which instances will be created by default.
Required if vpc_idis 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_ strarn 
- The ARN of an IAM role that the OpsWorks service will act as.
- stack_endpoint str
- Mapping[str, str]
- A map of tags to assign to the resource.
If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- use_custom_ boolcookbooks 
- Boolean value controlling whether the custom cookbook settings are enabled.
- use_opsworks_ boolsecurity_ groups 
- 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_berkshelfis enabled, the version of Berkshelf to use.
- color String
- Color to paint next to the stack's resources in the OpsWorks console.
- configurationManager StringName 
- Name of the configuration manager to use. Defaults to "Chef".
- configurationManager StringVersion 
- Version of the configuration manager to use. Defaults to "11.4".
- customCookbooks List<Property Map>Sources 
- When use_custom_cookbooksis set, provide this sub-object as described below.
- customJson String
- Custom JSON attributes to apply to the entire stack.
- defaultAvailability StringZone 
- Name of the availability zone where instances will be created by default.
Cannot be set when vpc_idis set.
- defaultInstance StringProfile Arn 
- 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.
- defaultRoot StringDevice Type 
- Name of the type of root device instances will have by default.
- defaultSsh StringKey Name 
- Name of the SSH keypair that instances will have by default.
- defaultSubnet StringId 
- ID of the subnet in which instances will be created by default.
Required if vpc_idis 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.
- serviceRole StringArn 
- The ARN of an IAM role that the OpsWorks service will act as.
- stackEndpoint String
- Map<String>
- A map of tags to assign to the resource.
If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- useCustom BooleanCookbooks 
- Boolean value controlling whether the custom cookbook settings are enabled.
- useOpsworks BooleanSecurity Groups 
- 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 awsTerraform Provider.