github.com/adrian-bl/terraform@v0.7.0-rc2.0.20160705220747-de0a34fc3517/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 * `agent_version` - (Optional) If set to `"LATEST"`, OpsWorks will automatically install the latest version. 41 * `berkshelf_version` - (Optional) If `manage_berkshelf` is enabled, the version of Berkshelf to use. 42 * `color` - (Optional) Color to paint next to the stack's resources in the OpsWorks console. 43 * `default_availability_zone` - (Optional) Name of the availability zone where instances will be created 44 by default. This is required unless you set `vpc_id`. 45 * `configuration_manager_name` - (Optional) Name of the configuration manager to use. Defaults to "Chef". 46 * `configuration_manager_version` - (Optional) Version of the configuratino manager to use. Defaults to "11.4". 47 * `custom_cookbooks_source` - (Optional) When `use_custom_cookbooks` is set, provide this sub-object as 48 described below. 49 * `custom_json` - (Optional) User defined JSON passed to "Chef". Use a "here doc" for multiline JSON. 50 * `default_os` - (Optional) Name of OS that will be installed on instances by default. 51 * `default_root_device_type` - (Optional) Name of the type of root device instances will have by default. 52 * `default_ssh_key_name` - (Optional) Name of the SSH keypair that instances will have by default. 53 * `default_subnet_id` - (Optional) Id of the subnet in which instances will be created by default. Mandatory 54 if `vpc_id` is set, and forbidden if it isn't. 55 * `hostname_theme` - (Optional) Keyword representing the naming scheme that will be used for instance hostnames 56 within this stack. 57 * `manage_berkshelf` - (Optional) Boolean value controlling whether Opsworks will run Berkshelf for this stack. 58 * `use_custom_cookbooks` - (Optional) Boolean value controlling whether the custom cookbook settings are 59 enabled. 60 * `use_opsworks_security_groups` - (Optional) Boolean value controlling whether the standard OpsWorks 61 security groups apply to created instances. 62 * `vpc_id` - (Optional) The id of the VPC that this stack belongs to. 63 * `custom_json` - (Optional) Custom JSON attributes to apply to the entire stack. 64 65 The `custom_cookbooks_source` block supports the following arguments: 66 67 * `type` - (Required) The type of source to use. For example, "archive". 68 * `url` - (Required) The URL where the cookbooks resource can be found. 69 * `username` - (Optional) Username to use when authenticating to the source. 70 * `password` - (Optional) Password to use when authenticating to the source. 71 * `ssh_key` - (Optional) SSH key to use when authenticating to the source. 72 * `revision` - (Optional) For sources that are version-aware, the revision to use. 73 74 ## Attributes Reference 75 76 The following attributes are exported: 77 78 * `id` - The id of the stack.