Try AWS Native preview for resources not in the classic version.
aws.opsworks.Stack
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
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",
"sshKey": "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
The Stack resource accepts the following input properties:
- Default
Instance 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.
- Service
Role stringArn - The ARN of an IAM role that the OpsWorks service will act as.
- Agent
Version string - If set to
"LATEST"
, OpsWorks will automatically install the latest version. - Berkshelf
Version 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.
- Configuration
Manager stringName - Name of the configuration manager to use. Defaults to "Chef".
- Configuration
Manager stringVersion - Version of the configuration manager to use. Defaults to "11.4".
- Custom
Cookbooks List<StackSources Custom Cookbooks Source> - When
use_custom_cookbooks
is set, provide this sub-object as described below. - Custom
Json string - Custom JSON attributes to apply to the entire stack.
- Default
Availability stringZone - Name of the availability zone where instances will be created by default.
Cannot be set when
vpc_id
is set. - Default
Os string - Name of OS that will be installed on instances by default.
- Default
Root stringDevice Type - Name of the type of root device instances will have by default.
- Default
Ssh stringKey Name - Name of the SSH keypair that instances will have by default.
- Default
Subnet stringId - 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 string - 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 string
- The name of the stack.
- 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. - 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 string - ID of the VPC that this stack belongs to. Defaults to the region's default VPC.
- Default
Instance 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.
- Service
Role stringArn - The ARN of an IAM role that the OpsWorks service will act as.
- Agent
Version string - If set to
"LATEST"
, OpsWorks will automatically install the latest version. - Berkshelf
Version 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.
- Configuration
Manager stringName - Name of the configuration manager to use. Defaults to "Chef".
- Configuration
Manager stringVersion - Version of the configuration manager to use. Defaults to "11.4".
- Custom
Cookbooks []StackSources Custom Cookbooks Source Args - When
use_custom_cookbooks
is set, provide this sub-object as described below. - Custom
Json string - Custom JSON attributes to apply to the entire stack.
- Default
Availability stringZone - Name of the availability zone where instances will be created by default.
Cannot be set when
vpc_id
is set. - Default
Os string - Name of OS that will be installed on instances by default.
- Default
Root stringDevice Type - Name of the type of root device instances will have by default.
- Default
Ssh stringKey Name - Name of the SSH keypair that instances will have by default.
- Default
Subnet stringId - 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 string - 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 string
- The name of the stack.
- 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. - 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 string - ID of the VPC that this stack belongs to. Defaults to the region's default VPC.
- default
Instance 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.
- service
Role StringArn - The ARN of an IAM role that the OpsWorks service will act as.
- agent
Version String - If set to
"LATEST"
, OpsWorks will automatically install the latest version. - berkshelf
Version 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.
- configuration
Manager StringName - Name of the configuration manager to use. Defaults to "Chef".
- configuration
Manager StringVersion - Version of the configuration manager to use. Defaults to "11.4".
- custom
Cookbooks List<StackSources Custom Cookbooks Source> - When
use_custom_cookbooks
is set, provide this sub-object as described below. - custom
Json String - Custom JSON attributes to apply to the entire stack.
- default
Availability StringZone - Name of the availability zone where instances will be created by default.
Cannot be set when
vpc_id
is set. - default
Os String - Name of OS that will be installed on instances by default.
- default
Root StringDevice Type - Name of the type of root device instances will have by default.
- default
Ssh StringKey Name - Name of the SSH keypair that instances will have by default.
- default
Subnet StringId - 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 String - Keyword representing the naming scheme that will be used for instance hostnames within this stack.
- manage
Berkshelf 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_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - use
Custom BooleanCookbooks - Boolean value controlling whether the custom cookbook settings are enabled.
- use
Opsworks BooleanSecurity Groups - Boolean value controlling whether the standard OpsWorks security groups apply to created instances.
- vpc
Id String - ID of the VPC that this stack belongs to. Defaults to the region's default VPC.
- default
Instance 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.
- service
Role stringArn - The ARN of an IAM role that the OpsWorks service will act as.
- agent
Version string - If set to
"LATEST"
, OpsWorks will automatically install the latest version. - berkshelf
Version 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.
- configuration
Manager stringName - Name of the configuration manager to use. Defaults to "Chef".
- configuration
Manager stringVersion - Version of the configuration manager to use. Defaults to "11.4".
- custom
Cookbooks StackSources Custom Cookbooks Source[] - When
use_custom_cookbooks
is set, provide this sub-object as described below. - custom
Json string - Custom JSON attributes to apply to the entire stack.
- default
Availability stringZone - Name of the availability zone where instances will be created by default.
Cannot be set when
vpc_id
is set. - default
Os string - Name of OS that will be installed on instances by default.
- default
Root stringDevice Type - Name of the type of root device instances will have by default.
- default
Ssh stringKey Name - Name of the SSH keypair that instances will have by default.
- default
Subnet stringId - 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 string - Keyword representing the naming scheme that will be used for instance hostnames within this stack.
- manage
Berkshelf 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_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - use
Custom booleanCookbooks - Boolean value controlling whether the custom cookbook settings are enabled.
- use
Opsworks booleanSecurity Groups - Boolean value controlling whether the standard OpsWorks security groups apply to created instances.
- vpc
Id 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_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_ 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_cookbooks
is 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_id
is 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_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.
- 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_ 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.
- default
Instance 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.
- service
Role StringArn - The ARN of an IAM role that the OpsWorks service will act as.
- agent
Version String - If set to
"LATEST"
, OpsWorks will automatically install the latest version. - berkshelf
Version 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.
- configuration
Manager StringName - Name of the configuration manager to use. Defaults to "Chef".
- configuration
Manager StringVersion - Version of the configuration manager to use. Defaults to "11.4".
- custom
Cookbooks List<Property Map>Sources - When
use_custom_cookbooks
is set, provide this sub-object as described below. - custom
Json String - Custom JSON attributes to apply to the entire stack.
- default
Availability StringZone - Name of the availability zone where instances will be created by default.
Cannot be set when
vpc_id
is set. - default
Os String - Name of OS that will be installed on instances by default.
- default
Root StringDevice Type - Name of the type of root device instances will have by default.
- default
Ssh StringKey Name - Name of the SSH keypair that instances will have by default.
- default
Subnet StringId - 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 String - Keyword representing the naming scheme that will be used for instance hostnames within this stack.
- manage
Berkshelf 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_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - use
Custom BooleanCookbooks - Boolean value controlling whether the custom cookbook settings are enabled.
- use
Opsworks BooleanSecurity Groups - Boolean value controlling whether the standard OpsWorks security groups apply to created instances.
- vpc
Id 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.
- Stack
Endpoint string - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Arn string
- Id string
- The provider-assigned unique ID for this managed resource.
- Stack
Endpoint string - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- id String
- The provider-assigned unique ID for this managed resource.
- stack
Endpoint String - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn string
- id string
- The provider-assigned unique ID for this managed resource.
- stack
Endpoint string - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration 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_tags
configuration block.
- arn String
- id String
- The provider-assigned unique ID for this managed resource.
- stack
Endpoint String - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration 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) -> 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.
- Agent
Version string - If set to
"LATEST"
, OpsWorks will automatically install the latest version. - Arn string
- Berkshelf
Version 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.
- Configuration
Manager stringName - Name of the configuration manager to use. Defaults to "Chef".
- Configuration
Manager stringVersion - Version of the configuration manager to use. Defaults to "11.4".
- Custom
Cookbooks List<StackSources Custom Cookbooks Source> - When
use_custom_cookbooks
is set, provide this sub-object as described below. - Custom
Json string - Custom JSON attributes to apply to the entire stack.
- Default
Availability stringZone - Name of the availability zone where instances will be created by default.
Cannot be set when
vpc_id
is set. - Default
Instance stringProfile Arn - The ARN of an IAM Instance Profile that created instances will have by default.
- Default
Os string - Name of OS that will be installed on instances by default.
- Default
Root stringDevice Type - Name of the type of root device instances will have by default.
- Default
Ssh stringKey Name - Name of the SSH keypair that instances will have by default.
- Default
Subnet stringId - 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 string - 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 string
- The name of the stack.
- Region string
- The name of the region where the stack will exist.
- Service
Role stringArn - The ARN of an IAM role that the OpsWorks service will act as.
- Stack
Endpoint string - 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. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration 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 string - ID of the VPC that this stack belongs to. Defaults to the region's default VPC.
- Agent
Version string - If set to
"LATEST"
, OpsWorks will automatically install the latest version. - Arn string
- Berkshelf
Version 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.
- Configuration
Manager stringName - Name of the configuration manager to use. Defaults to "Chef".
- Configuration
Manager stringVersion - Version of the configuration manager to use. Defaults to "11.4".
- Custom
Cookbooks []StackSources Custom Cookbooks Source Args - When
use_custom_cookbooks
is set, provide this sub-object as described below. - Custom
Json string - Custom JSON attributes to apply to the entire stack.
- Default
Availability stringZone - Name of the availability zone where instances will be created by default.
Cannot be set when
vpc_id
is set. - Default
Instance stringProfile Arn - The ARN of an IAM Instance Profile that created instances will have by default.
- Default
Os string - Name of OS that will be installed on instances by default.
- Default
Root stringDevice Type - Name of the type of root device instances will have by default.
- Default
Ssh stringKey Name - Name of the SSH keypair that instances will have by default.
- Default
Subnet stringId - 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 string - 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 string
- The name of the stack.
- Region string
- The name of the region where the stack will exist.
- Service
Role stringArn - The ARN of an IAM role that the OpsWorks service will act as.
- Stack
Endpoint string - 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. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration 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 string - ID of the VPC that this stack belongs to. Defaults to the region's default VPC.
- agent
Version String - If set to
"LATEST"
, OpsWorks will automatically install the latest version. - arn String
- berkshelf
Version 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.
- configuration
Manager StringName - Name of the configuration manager to use. Defaults to "Chef".
- configuration
Manager StringVersion - Version of the configuration manager to use. Defaults to "11.4".
- custom
Cookbooks List<StackSources Custom Cookbooks Source> - When
use_custom_cookbooks
is set, provide this sub-object as described below. - custom
Json String - Custom JSON attributes to apply to the entire stack.
- default
Availability StringZone - Name of the availability zone where instances will be created by default.
Cannot be set when
vpc_id
is set. - default
Instance StringProfile Arn - The ARN of an IAM Instance Profile that created instances will have by default.
- default
Os String - Name of OS that will be installed on instances by default.
- default
Root StringDevice Type - Name of the type of root device instances will have by default.
- default
Ssh StringKey Name - Name of the SSH keypair that instances will have by default.
- default
Subnet StringId - 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 String - Keyword representing the naming scheme that will be used for instance hostnames within this stack.
- manage
Berkshelf 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.
- service
Role StringArn - The ARN of an IAM role that the OpsWorks service will act as.
- stack
Endpoint String - 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. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - use
Custom BooleanCookbooks - Boolean value controlling whether the custom cookbook settings are enabled.
- use
Opsworks BooleanSecurity Groups - Boolean value controlling whether the standard OpsWorks security groups apply to created instances.
- vpc
Id String - ID of the VPC that this stack belongs to. Defaults to the region's default VPC.
- agent
Version string - If set to
"LATEST"
, OpsWorks will automatically install the latest version. - arn string
- berkshelf
Version 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.
- configuration
Manager stringName - Name of the configuration manager to use. Defaults to "Chef".
- configuration
Manager stringVersion - Version of the configuration manager to use. Defaults to "11.4".
- custom
Cookbooks StackSources Custom Cookbooks Source[] - When
use_custom_cookbooks
is set, provide this sub-object as described below. - custom
Json string - Custom JSON attributes to apply to the entire stack.
- default
Availability stringZone - Name of the availability zone where instances will be created by default.
Cannot be set when
vpc_id
is set. - default
Instance stringProfile Arn - The ARN of an IAM Instance Profile that created instances will have by default.
- default
Os string - Name of OS that will be installed on instances by default.
- default
Root stringDevice Type - Name of the type of root device instances will have by default.
- default
Ssh stringKey Name - Name of the SSH keypair that instances will have by default.
- default
Subnet stringId - 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 string - Keyword representing the naming scheme that will be used for instance hostnames within this stack.
- manage
Berkshelf 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.
- service
Role stringArn - The ARN of an IAM role that the OpsWorks service will act as.
- stack
Endpoint string - {[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. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - use
Custom booleanCookbooks - Boolean value controlling whether the custom cookbook settings are enabled.
- use
Opsworks booleanSecurity Groups - Boolean value controlling whether the standard OpsWorks security groups apply to created instances.
- vpc
Id 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_ 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_cookbooks
is 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_id
is 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_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_ 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_tags
configuration 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_tags
configuration 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.
- agent
Version String - If set to
"LATEST"
, OpsWorks will automatically install the latest version. - arn String
- berkshelf
Version 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.
- configuration
Manager StringName - Name of the configuration manager to use. Defaults to "Chef".
- configuration
Manager StringVersion - Version of the configuration manager to use. Defaults to "11.4".
- custom
Cookbooks List<Property Map>Sources - When
use_custom_cookbooks
is set, provide this sub-object as described below. - custom
Json String - Custom JSON attributes to apply to the entire stack.
- default
Availability StringZone - Name of the availability zone where instances will be created by default.
Cannot be set when
vpc_id
is set. - default
Instance StringProfile Arn - The ARN of an IAM Instance Profile that created instances will have by default.
- default
Os String - Name of OS that will be installed on instances by default.
- default
Root StringDevice Type - Name of the type of root device instances will have by default.
- default
Ssh StringKey Name - Name of the SSH keypair that instances will have by default.
- default
Subnet StringId - 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 String - Keyword representing the naming scheme that will be used for instance hostnames within this stack.
- manage
Berkshelf 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.
- service
Role StringArn - The ARN of an IAM role that the OpsWorks service will act as.
- stack
Endpoint String - 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. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - use
Custom BooleanCookbooks - Boolean value controlling whether the custom cookbook settings are enabled.
- use
Opsworks BooleanSecurity Groups - Boolean value controlling whether the standard OpsWorks security groups apply to created instances.
- vpc
Id 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.
- Ssh
Key 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.
- Ssh
Key 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.
- ssh
Key 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.
- ssh
Key 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.
- ssh
Key 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.
Try AWS Native preview for resources not in the classic version.