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
We eat, drink, sleep and most importantly love **DevOps**. We are working towards strategies for standardizing architecture while ensuring security for the infrastructure. We are strong believer of the philosophy <b>Bigger problems are always solved by breaking them into smaller manageable problems</b>. Resonating with microservices architecture, it is considered best-practice to run database, cluster, storage in smaller <b>connected yet manageable pieces</b> within the infrastructure.
41
+
We eat, drink, sleep and most importantly love **DevOps**. We are working towards strategies for standardizing architecture while ensuring security for the infrastructure. We are strong believer of the philosophy <b>Bigger problems are always solved by breaking them into smaller manageable problems</b>. Resonating with microservices architecture, it is considered best-practice to run database, cluster, storage in smaller <b>connected yet manageable pieces</b> within the infrastructure.
42
42
43
43
This module is basically combination of [Terraform open source](https://www.terraform.io/) and includes automatation tests and examples. It also helps to create and improve your infrastructure with minimalistic code instead of maintaining the whole infrastructure code yourself.
44
44
@@ -49,9 +49,9 @@ We have [*fifty plus terraform modules*][terraform_modules]. A few of them are c
| ami | The AMI to use for the instance. |`string`| n/a | yes |
144
+
| application | Application (e.g. `cd` or `clouddrove`). |`string`|`""`| no |
145
+
| assign\_eip\_address | Assign an Elastic IP address to the instance. |`bool`|`false`| no |
146
+
| associate\_public\_ip\_address | Associate a public IP address with the instance. |`bool`|`true`| no |
147
+
| attributes | Additional attributes (e.g. `1`). |`list`|`[]`| no |
148
+
| availability\_zone | Availability Zone the instance is launched in. If not set, will be launched in the first AZ of the region. |`list`|`[]`| no |
149
+
| cpu\_core\_count | Sets the number of CPU cores for an instance. |`string`|`null`| no |
150
+
| cpu\_credits | The credit option for CPU usage. Can be `standard` or `unlimited`. T3 instances are launched as unlimited by default. T2 instances are launched as standard by default. |`string`|`"standard"`| no |
151
+
| delimiter | Delimiter to be used between `organization`, `environment`, `name` and `attributes`. |`string`|`"-"`| no |
152
+
| disable\_api\_termination | If true, enables EC2 Instance Termination Protection. |`bool`|`false`| no |
153
+
| disk\_size | Size of the root volume in gigabytes. |`number`|`8`| no |
154
+
| dns\_enabled | Flag to control the dns\_enable. |`bool`|`false`| no |
155
+
| dns\_zone\_id | The Zone ID of Route53. |`string`|`""`| no |
156
+
| ebs\_block\_device | Additional EBS block devices to attach to the instance. |`list`|`[]`| no |
157
+
| ebs\_device\_name | Name of the EBS device to mount. |`list(string)`| <pre>[<br> "/dev/xvdb",<br> "/dev/xvdc",<br> "/dev/xvdd",<br> "/dev/xvde",<br> "/dev/xvdf",<br> "/dev/xvdg",<br> "/dev/xvdh",<br> "/dev/xvdi",<br> "/dev/xvdj",<br> "/dev/xvdk",<br> "/dev/xvdl",<br> "/dev/xvdm",<br> "/dev/xvdn",<br> "/dev/xvdo",<br> "/dev/xvdp",<br> "/dev/xvdq",<br> "/dev/xvdr",<br> "/dev/xvds",<br> "/dev/xvdt",<br> "/dev/xvdu",<br> "/dev/xvdv",<br> "/dev/xvdw",<br> "/dev/xvdx",<br> "/dev/xvdy",<br> "/dev/xvdz"<br>]</pre> | no |
158
+
| ebs\_iops | Amount of provisioned IOPS. This must be set with a volume\_type of io1. |`number`|`0`| no |
159
+
| ebs\_optimized | If true, the launched EC2 instance will be EBS-optimized. |`bool`|`false`| no |
160
+
| ebs\_volume\_enabled | Flag to control the ebs creation. |`bool`|`false`| no |
161
+
| ebs\_volume\_size | Size of the EBS volume in gigabytes. |`number`|`30`| no |
162
+
| ebs\_volume\_type | The type of EBS volume. Can be standard, gp2 or io1. |`string`|`"gp2"`| no |
163
+
| encrypted | If true, the disk will be encrypted. |`bool`|`false`| no |
| ephemeral\_block\_device | Customize Ephemeral (also known as Instance Store) volumes on the instance. |`list`|`[]`| no |
166
+
| host\_id | The Id of a dedicated host that the instance will be assigned to. Use when an instance is to be launched on a specific dedicated host. |`string`|`null`| no |
167
+
| hostname | DNS records to create. |`string`|`""`| no |
168
+
| iam\_instance\_profile | The IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. |`string`|`""`| no |
169
+
| instance\_count | Number of instances to launch. |`number`|`1`| no |
170
+
| instance\_enabled | Flag to control the instance creation. |`bool`|`true`| no |
171
+
| instance\_initiated\_shutdown\_behavior | Shutdown behavior for the instance. |`string`|`""`| no |
172
+
| instance\_profile\_enabled | Flag to control the instance profile creation. |`bool`|`false`| no |
173
+
| instance\_tags | Instance tags. |`map`|`{}`| no |
174
+
| instance\_type | The type of instance to start. Updates to this field will trigger a stop/start of the EC2 instance. |`string`| n/a | yes |
175
+
| 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 |
176
+
| ipv6\_addresses | List of IPv6 addresses from the range of the subnet to associate with the primary network interface. |`list`|`[]`| no |
177
+
| key\_name | The key name to use for the instance. |`string`|`""`| no |
178
+
| kms\_key\_id | The ARN for the KMS encryption key. When specifying kms\_key\_id, encrypted needs to be set to true. |`string`|`""`| no |
179
+
| label\_order | Label order, e.g. `name`,`application`. |`list`|`[]`| no |
180
+
| managedby | ManagedBy, eg 'CloudDrove' or 'AnmolNagpal'. |`string`|`"[email protected]"`| no |
181
+
| monitoring | If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0). |`bool`|`false`| no |
182
+
| name | Name (e.g. `app` or `cluster`). |`string`|`""`| no |
183
+
| network\_interface | Customize network interfaces to be attached at instance boot time. |`list(map(string))`|`[]`| no |
184
+
| placement\_group | The Placement Group to start the instance in. |`string`|`""`| no |
185
+
| root\_block\_device | Customize details about the root block device of the instance. See Block Devices below for details. |`list`|`[]`| no |
186
+
| 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 |
187
+
| subnet | VPC Subnet ID the instance is launched in. |`string`|`null`| no |
188
+
| subnet\_ids | A list of VPC Subnet IDs to launch in. |`list(string)`|`[]`| no |
189
+
| tags | Additional tags (e.g. map(`BusinessUnit`,`XYZ`). |`map`|`{}`| no |
190
+
| tenancy | The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the import-instance command. |`string`|`""`| no |
191
+
| ttl | The TTL of the record to add to the DNS zone to complete certificate validation. |`string`|`"300"`| no |
192
+
| type | Type of DNS records to create. |`string`|`"CNAME"`| no |
193
+
| user\_data | The Base64-encoded user data to provide when launching the instances. |`string`|`""`| no |
194
+
| vpc\_security\_group\_ids\_list | A list of security group IDs to associate with. |`list(string)`|`[]`| no |
195
+
139
196
## Outputs
140
197
141
198
| Name | Description |
@@ -148,15 +205,15 @@ Here is examples of how you can use this module in your inventory structure:
148
205
| key\_name | The key name of the instance. |
149
206
| placement\_group | The placement group of the instance. |
150
207
| private\_ip | Private IP of instance. |
151
-
| public\_ip | Public IP of instance \(or EIP\). |
208
+
| public\_ip | Public IP of instance (or EIP). |
152
209
| subnet\_id | The EC2 subnet ID. |
153
210
| vpc\_security\_group\_ids | The associated security groups in non-default VPC. |
154
211
155
212
156
213
157
214
158
215
## Testing
159
-
In this module testing is performed with [terratest](https://github.com/gruntwork-io/terratest) and it creates a small piece of infrastructure, matches the output like ARN, ID and Tags name etc and destroy infrastructure in your AWS account. This testing is written in GO, so you need a [GO environment](https://golang.org/doc/install) in your system.
216
+
In this module testing is performed with [terratest](https://github.com/gruntwork-io/terratest) and it creates a small piece of infrastructure, matches the output like ARN, ID and Tags name etc and destroy infrastructure in your AWS account. This testing is written in GO, so you need a [GO environment](https://golang.org/doc/install) in your system.
160
217
161
218
You need to run the following command in the testing folder:
162
219
```hcl
@@ -165,7 +222,7 @@ You need to run the following command in the testing folder:
165
222
166
223
167
224
168
-
## Feedback
225
+
## Feedback
169
226
If you come accross a bug or have any feedback, please log it in our [issue tracker](https://github.com/clouddrove/terraform-aws-ec2/issues), or feel free to drop us an email at [[email protected]](mailto:[email protected]).
170
227
171
228
If you have found it worth your time, go ahead and give us a ★ on [our GitHub](https://github.com/clouddrove/terraform-aws-ec2)!
0 commit comments