You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Terraform Module for provisioning a general purpose EC2 host.
@@ -48,6 +48,11 @@ We literally have [*hundreds of terraform modules*][terraform_modules] that are
48
48
49
49
## Usage
50
50
51
+
52
+
**IMPORTANT:** The `master` branch is used in `source` just as an example. In your code, do not pin to `master` because there may be breaking changes between releases.
53
+
Instead pin to the release tag (e.g. `?ref=tags/x.y.z`) of one of our [latest releases](https://github.com/cloudposse/terraform-aws-ec2-instance/releases).
54
+
55
+
51
56
Note: add `${var.ssh_key_pair}` private key to the `ssh agent`.
52
57
53
58
Include this repository as a module in your existing terraform code.
@@ -57,14 +62,14 @@ Include this repository as a module in your existing terraform code.
| availability_zone | Availability Zone the instance is launched in. If not set, will be launched in the first AZ of the region | string | `` | no |
118
123
| comparison_operator | The arithmetic operation to use when comparing the specified Statistic and Threshold. Possible values are: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, LessThanOrEqualToThreshold. | string |`GreaterThanOrEqualToThreshold`| no |
119
-
| create_default_security_group | Create default Security Group with only Egress traffic allowed |string|`true`| no |
120
-
| default_alarm_action |-| string |`action/actions/AWS_EC2.InstanceId.Reboot/1.0`| no |
121
-
| delete_on_termination | Whether the volume should be destroyed on instance termination |string|`true`| no |
124
+
| create_default_security_group | Create default Security Group with only Egress traffic allowed |bool|`true`| no |
125
+
| default_alarm_action |Default alerm action| string |`action/actions/AWS_EC2.InstanceId.Reboot/1.0`| no |
126
+
| delete_on_termination | Whether the volume should be destroyed on instance termination |bool|`true`| no |
122
127
| delimiter | Delimiter to be used between `name`, `namespace`, `stage`, etc. | string |`-`| no |
| ebs_device_name | Name of the EBS device to mount | list(string)|`<list>`| no |
130
+
| ebs_iops | Amount of provisioned IOPS. This must be set with a volume_type of io1 |number|`0`| no |
131
+
| ebs_optimized | Launched EC2 instance will be EBS-optimized |bool|`false`| no |
132
+
| ebs_volume_count | Count of EBS volumes that will be attached to the instance |number|`0`| no |
133
+
| ebs_volume_size | Size of the EBS volume in gigabytes |number|`10`| no |
129
134
| ebs_volume_type | The type of EBS volume. Can be standard, gp2 or io1 | string |`gp2`| no |
130
-
| evaluation_periods | The number of periods over which data is compared to the specified threshold. |string|`5`| no |
131
-
| instance_enabled | Flag to control the instance creation. Set to false if it is necessary to skip instance creation |string|`true`| no |
135
+
| evaluation_periods | The number of periods over which data is compared to the specified threshold. |number|`5`| no |
136
+
| instance_enabled | Flag to control the instance creation. Set to false if it is necessary to skip instance creation |bool|`true`| no |
132
137
| instance_type | The type of the instance | string |`t2.micro`| no |
133
-
| ipv6_address_count | Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet |string|`0`| no |
134
-
| ipv6_addresses | List of IPv6 addresses from the range of the subnet to associate with the primary network interface | list |`<list>`| no |
138
+
| ipv6_address_count | Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet |number|`0`| no |
139
+
| ipv6_addresses | List of IPv6 addresses from the range of the subnet to associate with the primary network interface | list(string)|`<list>`| no |
135
140
| metric_name | The name for the alarm's associated metric. Allowed values can be found in https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ec2-metricscollected.html| string |`StatusCheckFailed_Instance`| no |
136
141
| metric_namespace | The namespace for the alarm's associated metric. Allowed values can be found in https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-namespaces.html| string |`AWS/EC2`| no |
137
-
| metric_threshold | The value against which the specified statistic is compared |string|`1`| no |
138
-
| monitoring | Launched EC2 instance will have detailed monitoring enabled |string|`true`| no |
142
+
| metric_threshold | The value against which the specified statistic is compared |number|`1`| no |
143
+
| monitoring | Launched EC2 instance will have detailed monitoring enabled |bool|`true`| no |
139
144
| name | Name (e.g. `bastion` or `db`) | string | - | yes |
| private_ip | Private IP address to associate with the instance in the VPC | string | `` | no |
142
147
| region | AWS Region the instance is launched in | string | `` | no |
143
-
| root_iops | Amount of provisioned IOPS. This must be set if root_volume_type is set to `io1`|string|`0`| no |
144
-
| root_volume_size | Size of the root volume in gigabytes |string|`10`| no |
148
+
| root_iops | Amount of provisioned IOPS. This must be set if root_volume_type is set to `io1`|number|`0`| no |
149
+
| root_volume_size | Size of the root volume in gigabytes |number|`10`| no |
145
150
| root_volume_type | Type of root volume. Can be standard, gp2 or io1 | string |`gp2`| no |
146
-
| security_groups | List of Security Group IDs allowed to connect to the instance | list |`<list>`| no |
147
-
| source_dest_check | Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs |string|`true`| no |
151
+
| security_groups | List of Security Group IDs allowed to connect to the instance | list(string)|`<list>`| no |
152
+
| source_dest_check | Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs |bool|`true`| no |
148
153
| ssh_key_pair | SSH key pair to be provisioned on the instance | string | - | yes |
| statistic_level | The statistic to apply to the alarm's associated metric. Allowed values are: SampleCount, Average, Sum, Minimum, Maximum | string |`Maximum`| no |
151
156
| subnet | VPC Subnet ID the instance is launched in | string | - | yes |
152
-
| tags | Additional tags | map |`<map>`| no |
157
+
| tags | Additional tags | map(string)|`<map>`| no |
153
158
| user_data | Instance user data. Do not pass gzip-compressed data via this argument | string | `` | no |
154
159
| vpc_id | The ID of the VPC that the instance security group belongs to | string | - | yes |
155
-
| welcome_message |-| string | `` | no |
160
+
| welcome_message |Welcome message| string | `` | no |
0 commit comments