github.com/hobbeswalsh/terraform@v0.3.7-0.20150619183303-ad17cf55a0fa/website/source/docs/providers/aws/r/launch_configuration.html.markdown (about) 1 --- 2 layout: "aws" 3 page_title: "AWS: aws_launch_configuration" 4 sidebar_current: "docs-aws-resource-launch-configuration" 5 description: |- 6 Provides a resource to create a new launch configuration, used for autoscaling groups. 7 --- 8 9 # aws\_launch\_configuration 10 11 Provides a resource to create a new launch configuration, used for autoscaling groups. 12 13 ## Example Usage 14 15 ``` 16 resource "aws_launch_configuration" "as_conf" { 17 name = "web_config" 18 image_id = "ami-1234" 19 instance_type = "m1.small" 20 } 21 ``` 22 23 ## Argument Reference 24 25 The following arguments are supported: 26 27 * `name` - (Optional) The name of the launch configuration. If you leave 28 this blank, Terraform will auto-generate it. 29 * `image_id` - (Required) The EC2 image ID to launch. 30 * `instance_type` - (Required) The size of instance to launch. 31 * `iam_instance_profile` - (Optional) The IAM instance profile to associate 32 with launched instances. 33 * `key_name` - (Optional) The key name that should be used for the instance. 34 * `security_groups` - (Optional) A list of associated security group IDS. 35 * `associate_public_ip_address` - (Optional) Associate a public ip address with an instance in a VPC. 36 * `user_data` - (Optional) The user data to provide when launching the instance. 37 * `block_device_mapping` - (Optional) A list of block devices to add. Their keys are documented below. 38 39 <a id="block-devices"></a> 40 ## Block devices 41 42 Each of the `*_block_device` attributes controls a portion of the AWS 43 Launch Configuration's "Block Device Mapping". It's a good idea to familiarize yourself with [AWS's Block Device 44 Mapping docs](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html) 45 to understand the implications of using these attributes. 46 47 The `root_block_device` mapping supports the following: 48 49 * `volume_type` - (Optional) The type of volume. Can be `"standard"`, `"gp2"`, 50 or `"io1"`. (Default: `"standard"`). 51 * `volume_size` - (Optional) The size of the volume in gigabytes. 52 * `iops` - (Optional) The amount of provisioned 53 [IOPS](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-io-characteristics.html). 54 This must be set with a `volume_type` of `"io1"`. 55 * `delete_on_termination` - (Optional) Whether the volume should be destroyed 56 on instance termination (Default: `true`). 57 58 Modifying any of the `root_block_device` settings requires resource 59 replacement. 60 61 Each `ebs_block_device` supports the following: 62 63 * `device_name` - The name of the device to mount. 64 * `snapshot_id` - (Optional) The Snapshot ID to mount. 65 * `volume_type` - (Optional) The type of volume. Can be `"standard"`, `"gp2"`, 66 or `"io1"`. (Default: `"standard"`). 67 * `volume_size` - (Optional) The size of the volume in gigabytes. 68 * `iops` - (Optional) The amount of provisioned 69 [IOPS](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-io-characteristics.html). 70 This must be set with a `volume_type` of `"io1"`. 71 * `delete_on_termination` - (Optional) Whether the volume should be destroyed 72 on instance termination (Default: `true`). 73 74 Modifying any `ebs_block_device` currently requires resource replacement. 75 76 Each `ephemeral_block_device` supports the following: 77 78 * `device_name` - The name of the block device to mount on the instance. 79 * `virtual_name` - The [Instance Store Device 80 Name](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html#InstanceStoreDeviceNames) 81 (e.g. `"ephemeral0"`) 82 83 Each AWS Instance type has a different set of Instance Store block devices 84 available for attachment. AWS [publishes a 85 list](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html#StorageOnInstanceTypes) 86 of which ephemeral devices are available on each type. The devices are always 87 identified by the `virtual_name` in the format `"ephemeral{0..N}"`. 88 89 ~> **NOTE:** Changes to `*_block_device` configuration of _existing_ resources 90 cannot currently be detected by Terraform. After updating to block device 91 configuration, resource recreation can be manually triggered by using the 92 [`taint` command](/docs/commands/taint.html). 93 94 ## Attributes Reference 95 96 The following attributes are exported: 97 98 * `id` - The ID of the launch configuration.