github.com/andresvia/terraform@v0.6.15-0.20160412045437-d51c75946785/website/source/docs/providers/aws/r/opsworks_stack.html.markdown (about) 1 --- 2 layout: "aws" 3 page_title: "AWS: aws_opsworks_stack" 4 sidebar_current: "docs-aws-resource-opsworks-stack" 5 description: |- 6 Provides an OpsWorks stack resource. 7 --- 8 9 # aws\_opsworks\_stack 10 11 Provides an OpsWorks stack resource. 12 13 ## Example Usage 14 15 ``` 16 resource "aws_opsworks_stack" "main" { 17 name = "awesome-stack" 18 region = "us-west-1" 19 service_role_arn = "${aws_iam_role.opsworks.arn}" 20 default_instance_profile_arn = "${aws_iam_instance_profile.opsworks.arn}" 21 custom_json = <<EOT 22 { 23 "foobar": { 24 "version": "1.0.0" 25 } 26 } 27 EOT 28 } 29 ``` 30 31 ## Argument Reference 32 33 The following arguments are supported: 34 35 * `name` - (Required) The name of the stack. 36 * `region` - (Required) The name of the region where the stack will exist. 37 * `service_role_arn` - (Required) The ARN of an IAM role that the OpsWorks service will act as. 38 * `default_instance_profile_arn` - (Required) The ARN of an IAM Instance Profile that created instances 39 will have by default. 40 * `berkshelf_version` - (Optional) If `manage_berkshelf` is enabled, the version of Berkshelf to use. 41 * `color` - (Optional) Color to paint next to the stack's resources in the OpsWorks console. 42 * `default_availability_zone` - (Optional) Name of the availability zone where instances will be created 43 by default. This is required unless you set `vpc_id`. 44 * `configuration_manager_name` - (Optional) Name of the configuration manager to use. Defaults to "Chef". 45 * `configuration_manager_version` - (Optional) Version of the configuratino manager to use. Defaults to "11.4". 46 * `custom_cookbooks_source` - (Optional) When `use_custom_cookbooks` is set, provide this sub-object as 47 described below. 48 * `custom_json` - (Optional) User defined JSON passed to "Chef". Use a "here doc" for multiline JSON. 49 * `default_os` - (Optional) Name of OS that will be installed on instances by default. 50 * `default_root_device_type` - (Optional) Name of the type of root device instances will have by default. 51 * `default_ssh_key_name` - (Optional) Name of the SSH keypair that instances will have by default. 52 * `default_subnet_id` - (Optional) Id of the subnet in which instances will be created by default. Mandatory 53 if `vpc_id` is set, and forbidden if it isn't. 54 * `hostname_theme` - (Optional) Keyword representing the naming scheme that will be used for instance hostnames 55 within this stack. 56 * `manage_berkshelf` - (Optional) Boolean value controlling whether Opsworks will run Berkshelf for this stack. 57 * `use_custom_cookbooks` - (Optional) Boolean value controlling whether the custom cookbook settings are 58 enabled. 59 * `use_opsworks_security_groups` - (Optional) Boolean value controlling whether the standard OpsWorks 60 security groups apply to created instances. 61 * `vpc_id` - (Optional) The id of the VPC that this stack belongs to. 62 63 The `custom_cookbooks_source` block supports the following arguments: 64 65 * `type` - (Required) The type of source to use. For example, "archive". 66 * `url` - (Required) The URL where the cookbooks resource can be found. 67 * `username` - (Optional) Username to use when authenticating to the source. 68 * `password` - (Optional) Password to use when authenticating to the source. 69 * `ssh_key` - (Optional) SSH key to use when authenticating to the source. 70 * `revision` - (Optional) For sources that are version-aware, the revision to use. 71 72 ## Attributes Reference 73 74 The following attributes are exported: 75 76 * `id` - The id of the stack.