github.com/econnell/terraform@v0.5.4-0.20150722160631-78eb236786a4/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 * `enable_monitoring` - (Optional) Enables/disables detailed monitoring. This is enabled by default. 38 * `ebs_optimized` - (Optional) If true, the launched EC2 instance will be EBS-optimized. 39 * `block_device_mapping` - (Optional) A list of block devices to add. Their keys are documented below. 40 41 <a id="block-devices"></a> 42 ## Block devices 43 44 Each of the `*_block_device` attributes controls a portion of the AWS 45 Launch Configuration's "Block Device Mapping". It's a good idea to familiarize yourself with [AWS's Block Device 46 Mapping docs](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html) 47 to understand the implications of using these attributes. 48 49 The `root_block_device` mapping supports the following: 50 51 * `volume_type` - (Optional) The type of volume. Can be `"standard"`, `"gp2"`, 52 or `"io1"`. (Default: `"standard"`). 53 * `volume_size` - (Optional) The size of the volume in gigabytes. 54 * `iops` - (Optional) The amount of provisioned 55 [IOPS](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-io-characteristics.html). 56 This must be set with a `volume_type` of `"io1"`. 57 * `delete_on_termination` - (Optional) Whether the volume should be destroyed 58 on instance termination (Default: `true`). 59 60 Modifying any of the `root_block_device` settings requires resource 61 replacement. 62 63 Each `ebs_block_device` supports the following: 64 65 * `device_name` - (Required) The name of the device to mount. 66 * `snapshot_id` - (Optional) The Snapshot ID to mount. 67 * `volume_type` - (Optional) The type of volume. Can be `"standard"`, `"gp2"`, 68 or `"io1"`. (Default: `"standard"`). 69 * `volume_size` - (Optional) The size of the volume in gigabytes. 70 * `iops` - (Optional) The amount of provisioned 71 [IOPS](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-io-characteristics.html). 72 This must be set with a `volume_type` of `"io1"`. 73 * `delete_on_termination` - (Optional) Whether the volume should be destroyed 74 on instance termination (Default: `true`). 75 76 Modifying any `ebs_block_device` currently requires resource replacement. 77 78 Each `ephemeral_block_device` supports the following: 79 80 * `device_name` - The name of the block device to mount on the instance. 81 * `virtual_name` - The [Instance Store Device 82 Name](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html#InstanceStoreDeviceNames) 83 (e.g. `"ephemeral0"`) 84 85 Each AWS Instance type has a different set of Instance Store block devices 86 available for attachment. AWS [publishes a 87 list](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html#StorageOnInstanceTypes) 88 of which ephemeral devices are available on each type. The devices are always 89 identified by the `virtual_name` in the format `"ephemeral{0..N}"`. 90 91 ~> **NOTE:** Changes to `*_block_device` configuration of _existing_ resources 92 cannot currently be detected by Terraform. After updating to block device 93 configuration, resource recreation can be manually triggered by using the 94 [`taint` command](/docs/commands/taint.html). 95 96 ## Attributes Reference 97 98 The following attributes are exported: 99 100 * `id` - The ID of the launch configuration.