diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
new file mode 100644
index 0000000..6f64b5a
--- /dev/null
+++ b/.github/CODEOWNERS
@@ -0,0 +1,25 @@
+# Use this file to define individuals or teams that are responsible for code in a repository.
+# Read more:
+#
+# Order is important: the last matching pattern has the highest precedence
+
+# These owners will be the default owners for everything
+* @cloudposse/engineering @cloudposse/contributors
+
+# Cloud Posse must review any changes to Makefiles
+**/Makefile @cloudposse/engineering
+**/Makefile.* @cloudposse/engineering
+
+# Cloud Posse must review any changes to GitHub actions
+.github/* @cloudposse/engineering
+
+# Cloud Posse must review any changes to standard context definition,
+# but some changes can be rubber-stamped.
+**/*.tf @cloudposse/engineering @cloudposse/contributors @cloudposse/approvers
+README.yaml @cloudposse/engineering @cloudposse/contributors @cloudposse/approvers
+README.md @cloudposse/engineering @cloudposse/contributors @cloudposse/approvers
+docs/*.md @cloudposse/engineering @cloudposse/contributors @cloudposse/approvers
+
+# Cloud Posse Admins must review all changes to CODEOWNERS or the mergify configuration
+.github/mergify.yml @cloudposse/admins
+.github/CODEOWNERS @cloudposse/admins
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 0000000..f3df96b
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,37 @@
+---
+name: Bug report
+about: Create a report to help us improve
+title: ''
+labels: 'bug'
+assignees: ''
+
+---
+
+Found a bug? Maybe our [Slack Community](https://slack.cloudposse.com) can help.
+
+[](https://slack.cloudposse.com)
+
+## Describe the Bug
+A clear and concise description of what the bug is.
+
+## Expected Behavior
+A clear and concise description of what you expected to happen.
+
+## Steps to Reproduce
+Steps to reproduce the behavior:
+1. Go to '...'
+2. Run '....'
+3. Enter '....'
+4. See error
+
+## Screenshots
+If applicable, add screenshots or logs to help explain your problem.
+
+## Environment (please complete the following information):
+
+Anything that will help us triage the bug will help. Here are some ideas:
+ - OS: [e.g. Linux, OSX, WSL, etc]
+ - Version [e.g. 10.15]
+
+## Additional Context
+Add any other context about the problem here.
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
new file mode 100644
index 0000000..94d3246
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -0,0 +1,72 @@
+---
+name: Bug report
+description: Create a report to help us improve
+labels: ["bug"]
+assignees: [""]
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Found a bug?
+
+ Please checkout our [Slack Community](https://slack.cloudposse.com)
+ or visit our [Slack Archive](https://archive.sweetops.com/).
+
+ [](https://slack.cloudposse.com)
+
+ - type: textarea
+ id: concise-description
+ attributes:
+ label: Describe the Bug
+ description: A clear and concise description of what the bug is.
+ placeholder: What is the bug about?
+ validations:
+ required: true
+
+ - type: textarea
+ id: expected
+ attributes:
+ label: Expected Behavior
+ description: A clear and concise description of what you expected.
+ placeholder: What happened?
+ validations:
+ required: true
+
+ - type: textarea
+ id: reproduction-steps
+ attributes:
+ label: Steps to Reproduce
+ description: Steps to reproduce the behavior.
+ placeholder: How do we reproduce it?
+ validations:
+ required: true
+
+ - type: textarea
+ id: screenshots
+ attributes:
+ label: Screenshots
+ description: If applicable, add screenshots or logs to help explain.
+ validations:
+ required: false
+
+ - type: textarea
+ id: environment
+ attributes:
+ label: Environment
+ description: Anything that will help us triage the bug.
+ placeholder: |
+ - OS: [e.g. Linux, OSX, WSL, etc]
+ - Version [e.g. 10.15]
+ - Module version
+ - Terraform version
+ validations:
+ required: false
+
+ - type: textarea
+ id: additional
+ attributes:
+ label: Additional Context
+ description: |
+ Add any other context about the problem here.
+ validations:
+ required: false
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 0000000..76ae6d6
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,18 @@
+blank_issues_enabled: false
+
+contact_links:
+
+ - name: Community Slack Team
+ url: https://cloudposse.com/slack/
+ about: |-
+ Please ask and answer questions here.
+
+ - name: Office Hours
+ url: https://cloudposse.com/office-hours/
+ about: |-
+ Join us every Wednesday for FREE Office Hours (lunch & learn).
+
+ - name: DevOps Accelerator Program
+ url: https://cloudposse.com/accelerate/
+ about: |-
+ Own your infrastructure in record time. We build it. You drive it.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 0000000..39a8686
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,36 @@
+---
+name: Feature Request
+about: Suggest an idea for this project
+title: ''
+labels: 'feature request'
+assignees: ''
+
+---
+
+Have a question? Please checkout our [Slack Community](https://slack.cloudposse.com) or visit our [Slack Archive](https://archive.sweetops.com/).
+
+[](https://slack.cloudposse.com)
+
+## Describe the Feature
+
+A clear and concise description of what the bug is.
+
+## Expected Behavior
+
+A clear and concise description of what you expected to happen.
+
+## Use Case
+
+Is your feature request related to a problem/challenge you are trying to solve? Please provide some additional context of why this feature or capability will be valuable.
+
+## Describe Ideal Solution
+
+A clear and concise description of what you want to happen. If you don't know, that's okay.
+
+## Alternatives Considered
+
+Explain what alternative solutions or features you've considered.
+
+## Additional Context
+
+Add any other context or screenshots about the feature request here.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml
new file mode 100644
index 0000000..7b86672
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.yml
@@ -0,0 +1,71 @@
+---
+name: Feature Request
+description: Suggest an idea for this project
+labels: ["feature request"]
+assignees: [""]
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Have a question?
+
+ Please checkout our [Slack Community](https://slack.cloudposse.com)
+ or visit our [Slack Archive](https://archive.sweetops.com/).
+
+ [](https://slack.cloudposse.com)
+
+ - type: textarea
+ id: concise-description
+ attributes:
+ label: Describe the Feature
+ description: A clear and concise description of what the feature is.
+ placeholder: What is the feature about?
+ validations:
+ required: true
+
+ - type: textarea
+ id: expected
+ attributes:
+ label: Expected Behavior
+ description: A clear and concise description of what you expected.
+ placeholder: What happened?
+ validations:
+ required: true
+
+ - type: textarea
+ id: use-case
+ attributes:
+ label: Use Case
+ description: |
+ Is your feature request related to a problem/challenge you are trying
+ to solve?
+
+ Please provide some additional context of why this feature or
+ capability will be valuable.
+ validations:
+ required: true
+
+ - type: textarea
+ id: ideal-solution
+ attributes:
+ label: Describe Ideal Solution
+ description: A clear and concise description of what you want to happen.
+ validations:
+ required: true
+
+ - type: textarea
+ id: alternatives-considered
+ attributes:
+ label: Alternatives Considered
+ description: Explain alternative solutions or features considered.
+ validations:
+ required: false
+
+ - type: textarea
+ id: additional
+ attributes:
+ label: Additional Context
+ description: |
+ Add any other context about the problem here.
+ validations:
+ required: false
diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md
new file mode 100644
index 0000000..e69de29
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 0000000..8944933
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,21 @@
+## what
+
+
+
+## why
+
+
+
+## references
+
+
diff --git a/.github/banner.png b/.github/banner.png
new file mode 100644
index 0000000..e72d21a
Binary files /dev/null and b/.github/banner.png differ
diff --git a/.github/mergify.yml b/.github/mergify.yml
new file mode 100644
index 0000000..526045d
--- /dev/null
+++ b/.github/mergify.yml
@@ -0,0 +1 @@
+extends: .github
diff --git a/.github/renovate.json b/.github/renovate.json
new file mode 100644
index 0000000..b61ed24
--- /dev/null
+++ b/.github/renovate.json
@@ -0,0 +1,13 @@
+{
+ "extends": [
+ "config:base",
+ ":preserveSemverRanges"
+ ],
+ "baseBranches": ["main", "master", "/^release\\/v\\d{1,2}$/"],
+ "labels": ["auto-update"],
+ "dependencyDashboardAutoclose": true,
+ "enabledManagers": ["terraform"],
+ "terraform": {
+ "ignorePaths": ["**/context.tf", "examples/**"]
+ }
+}
diff --git a/.github/settings.yml b/.github/settings.yml
new file mode 100644
index 0000000..b85e9cf
--- /dev/null
+++ b/.github/settings.yml
@@ -0,0 +1,11 @@
+# Upstream changes from _extends are only recognized when modifications are made to this file in the default branch.
+_extends: .github
+repository:
+ name: terraform-aws-ec2-instance-group
+ description: Terraform Module for provisioning multiple general purpose EC2 hosts for stateful applications.
+ homepage: https://cloudposse.com/accelerate
+ topics: terraform, terraform-module, instance-group, stateful-set, cluster, ec2, instances, aws, hcl2
+
+
+
+
diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml
new file mode 100644
index 0000000..fd64cd8
--- /dev/null
+++ b/.github/workflows/branch.yml
@@ -0,0 +1,25 @@
+---
+name: Branch
+on:
+ pull_request:
+ branches:
+ - main
+ - release/**
+ types: [opened, synchronize, reopened, labeled, unlabeled]
+ push:
+ branches:
+ - main
+ - release/v*
+ paths-ignore:
+ - '.github/**'
+ - 'docs/**'
+ - 'examples/**'
+ - 'test/**'
+ - 'README.md'
+
+permissions: {}
+
+jobs:
+ terraform-module:
+ uses: cloudposse/.github/.github/workflows/shared-terraform-module.yml@main
+ secrets: inherit
diff --git a/.github/workflows/chatops.yml b/.github/workflows/chatops.yml
new file mode 100644
index 0000000..793a7a6
--- /dev/null
+++ b/.github/workflows/chatops.yml
@@ -0,0 +1,17 @@
+---
+name: chatops
+on:
+ issue_comment:
+ types: [created]
+
+permissions:
+ pull-requests: write
+ id-token: write
+ contents: write
+ statuses: write
+
+jobs:
+ test:
+ uses: cloudposse/.github/.github/workflows/shared-terraform-chatops.yml@main
+ if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/terratest') }}
+ secrets: inherit
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..dc8a750
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,16 @@
+---
+name: release
+on:
+ release:
+ types:
+ - published
+
+permissions:
+ id-token: write
+ contents: write
+ pull-requests: write
+
+jobs:
+ terraform-module:
+ uses: cloudposse/.github/.github/workflows/shared-release-branches.yml@main
+ secrets: inherit
diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml
new file mode 100644
index 0000000..a79e949
--- /dev/null
+++ b/.github/workflows/scheduled.yml
@@ -0,0 +1,16 @@
+---
+name: scheduled
+on:
+ workflow_dispatch: { } # Allows manually trigger this workflow
+ schedule:
+ - cron: "0 3 * * *"
+
+permissions:
+ pull-requests: write
+ id-token: write
+ contents: write
+
+jobs:
+ scheduled:
+ uses: cloudposse/.github/.github/workflows/shared-terraform-scheduled.yml@main
+ secrets: inherit
diff --git a/.gitignore b/.gitignore
index a507c7b..99a463f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,9 +4,10 @@
*.iml
**/terraform.tfstate
**/terraform.tfstate.backup
-**/terraform.tfvars
+**/.terraform.lock.hcl
+
**/*.pem
**/*.pub
.build-harness
-build-harness
\ No newline at end of file
+build-harness
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index b7cf901..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-addons:
- apt:
- packages:
- - git
- - make
- - curl
-
-install:
- - make init
-
-script:
- - make terraform/install
- - make terraform/get-plugins
- - make terraform/get-modules
- - make terraform/lint
- - make terraform/validate
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
index 261eeb9..eb114f2 100644
--- a/LICENSE
+++ b/LICENSE
@@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
- Copyright [yyyy] [name of copyright owner]
+ Copyright 2018-2019 Cloud Posse, LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/README.md b/README.md
index 3c4bc78..98f69a7 100644
--- a/README.md
+++ b/README.md
@@ -1,51 +1,56 @@
-
-[![README Header][readme_header_img]][readme_header_link]
-[![Cloud Posse][logo]](https://cpco.io/homepage)
-# terraform-aws-ec2-instance-group [](https://travis-ci.org/cloudposse/terraform-aws-ec2-instance-group) [](https://github.com/cloudposse/terraform-aws-ec2-instance-group/releases/latest) [](https://slack.cloudposse.com)
+
+
+
+


+
+
+Terraform Module for providing N general purpose EC2 hosts.
+If you only need to provision a single EC2 instance, consider using the [terraform-aws-ec2-instance](https://github.com/cloudposse/terraform-aws-ec2-instance) module instead.
+**IMPORTANT** This module by-design does not provision an AutoScaling group. It was designed to provision a discrete number of instances suitable for running stateful services such as databases (e.g. Kafka, Redis, etc).
-We literally have [*hundreds of terraform modules*][terraform_modules] that are Open Source and well-maintained. Check them out!
+Included features:
+* Automatically create a Security Group
+* Option to switch EIP attachment
+* CloudWatch monitoring and automatic reboot if instance hangs
+* Assume Role capability
+> [!TIP]
+> #### π½ Use Atmos with Terraform
+> Cloud Posse uses [`atmos`](https://atmos.tools) to easily orchestrate multiple environments using Terraform.
+> Works with [Github Actions](https://atmos.tools/integrations/github-actions/), [Atlantis](https://atmos.tools/integrations/atlantis), or [Spacelift](https://atmos.tools/integrations/spacelift).
+>
+>
+> Watch demo of using Atmos with Terraform
+> 
+> Example of running atmos
to manage infrastructure from our Quick Start tutorial.
+>
@@ -53,11 +58,6 @@ We literally have [*hundreds of terraform modules*][terraform_modules] that are
## Usage
-
-**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.
-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-group/releases).
-
-
Note: add `${var.ssh_key_pair}` private key to the `ssh agent`.
Include this repository as a module in your existing terraform code.
@@ -67,19 +67,20 @@ Include this repository as a module in your existing terraform code.
```hcl
module "instance" {
- source = "git::https://github.com/cloudposse/terraform-aws-ec2-instance-group.git?ref=master"
- namespace = "cp"
+ source = "cloudposse/ec2-instance-group/aws"
+ # Cloud Posse recommends pinning every module to a specific version
+ # version = "x.x.x"
+ namespace = "eg"
stage = "prod"
name = "app"
ami = "ami-a4dc46db"
ami_owner = "099720109477"
- ssh_key_pair = "${var.ssh_key_pair}"
- instance_type = "${var.instance_type}"
- vpc_id = "${var.vpc_id}"
- security_groups = ["${var.security_groups}"]
- subnet = "${var.subnet}"
-
- instance_count = "3"
+ ssh_key_pair = var.ssh_key_pair
+ instance_type = var.instance_type
+ vpc_id = var.vpc_id
+ security_groups = var.security_groups
+ subnet = var.subnet
+ instance_count = 3
}
```
@@ -87,22 +88,54 @@ module "instance" {
```hcl
module "kafka_instance" {
- source = "git::https://github.com/cloudposse/terraform-aws-ec2-instance-group.git?ref=master"
- namespace = "cp"
+ source = "cloudposse/ec2-instance-group/aws"
+ # Cloud Posse recommends pinning every module to a specific version
+ # version = "x.x.x"
+
+ namespace = "eg"
stage = "prod"
name = "app"
ami = "ami-a4dc46db"
ami_owner = "099720109477"
- ssh_key_pair = "${var.ssh_key_pair}"
- vpc_id = "${var.vpc_id}"
- security_groups = ["${var.security_groups}"]
- subnet = "${var.subnet}"
- associate_public_ip_address = "true"
- additional_ips_count = "1"
- ebs_volume_count = "2"
- allowed_ports = ["22", "80", "443"]
-
- instance_count = "3"
+ ssh_key_pair = var.ssh_key_pair
+ vpc_id = var.vpc_id
+ security_groups = var.security_groups
+ subnet = var.subnet
+ associate_public_ip_address = true
+ additional_ips_count = 1
+ ebs_volume_count = 2
+ instance_count = 3
+
+ security_group_rules = [
+ {
+ type = "egress"
+ from_port = 0
+ to_port = 65535
+ protocol = "-1"
+ cidr_blocks = ["0.0.0.0/0"]
+ },
+ {
+ type = "ingress"
+ from_port = 22
+ to_port = 22
+ protocol = "tcp"
+ cidr_blocks = ["0.0.0.0/0"]
+ },
+ {
+ type = "ingress"
+ from_port = 80
+ to_port = 80
+ protocol = "tcp"
+ cidr_blocks = ["0.0.0.0/0"]
+ },
+ {
+ type = "ingress"
+ from_port = 443
+ to_port = 443
+ protocol = "tcp"
+ cidr_blocks = ["0.0.0.0/0"]
+ }
+ ]
}
```
@@ -116,21 +149,31 @@ This module depends on these modules:
It is necessary to run `terraform get` or `terraform init` to download this module.
Now reference the label when creating an instance (for example):
+
```hcl
resource "aws_ami_from_instance" "example" {
- count = "${length(module.instance.*.id)}"
- name = "terraform-example"
- source_instance_id = "${element(module.instance.*.id, count.index)}"
+ count = length(module.instance.*.id)
+ name = "app"
+ source_instance_id = element(module.instance.*.id, count.index)
}
```
+> [!IMPORTANT]
+> In Cloud Posse's examples, we avoid pinning modules to specific versions to prevent discrepancies between the documentation
+> and the latest released versions. However, for your own projects, we strongly advise pinning each module to the exact version
+> you're using. This practice ensures the stability of your infrastructure. Additionally, we recommend implementing a systematic
+> approach for updating versions to avoid unexpected changes.
+
+
+
+
## Makefile Targets
-```
+```text
Available targets:
help Help screen
@@ -139,91 +182,147 @@ Available targets:
lint Lint terraform code
```
+
+
+## Requirements
+
+| Name | Version |
+|------|---------|
+| [terraform](#requirement\_terraform) | >= 1.0 |
+| [aws](#requirement\_aws) | >= 2.0 |
+
+## Providers
+
+| Name | Version |
+|------|---------|
+| [aws](#provider\_aws) | >= 2.0 |
+
+## Modules
+
+| Name | Source | Version |
+|------|--------|---------|
+| [label](#module\_label) | cloudposse/label/null | 0.25.0 |
+| [security\_group](#module\_security\_group) | cloudposse/security-group/aws | 2.2.0 |
+| [ssh\_key\_pair](#module\_ssh\_key\_pair) | cloudposse/key-pair/aws | 0.19.0 |
+| [this](#module\_this) | cloudposse/label/null | 0.25.0 |
+
+## Resources
+
+| Name | Type |
+|------|------|
+| [aws_cloudwatch_metric_alarm.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm) | resource |
+| [aws_ebs_volume.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ebs_volume) | resource |
+| [aws_eip.additional](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eip) | resource |
+| [aws_eip.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eip) | resource |
+| [aws_iam_instance_profile.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_instance_profile) | resource |
+| [aws_iam_role.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
+| [aws_instance.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance) | resource |
+| [aws_network_interface.additional](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/network_interface) | resource |
+| [aws_network_interface_attachment.additional](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/network_interface_attachment) | resource |
+| [aws_volume_attachment.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/volume_attachment) | resource |
+| [aws_ami.info](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami) | data source |
+| [aws_caller_identity.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |
+| [aws_iam_policy_document.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
+| [aws_region.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |
+
## Inputs
| Name | Description | Type | Default | Required |
-|------|-------------|:----:|:-----:|:-----:|
-| additional_ips_count | Count of additional EIPs | string | `0` | no |
-| allowed_ports | List of allowed ingress ports | list | `` | no |
-| ami | The AMI to use for the instance. | string | - | yes |
-| ami_owner | Owner of the given AMI | string | - | yes |
-| applying_period | The period in seconds over which the specified statistic is applied | string | `60` | no |
-| assign_eip_address | Assign an Elastic IP address to the instance | string | `true` | no |
-| associate_public_ip_address | Associate a public IP address with the instance | string | `true` | no |
-| attributes | Additional attributes (e.g. `policy` or `role`) | list | `` | no |
-| availability_zone | Availability Zone the instance is launched in. If not set, will be launched in the first AZ of the region | string | `` | no |
-| comparison_operator | The arithmetic operation to use when comparing the specified Statistic and Threshold. Possible values are: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, LessThanOrEqualToThreshold. | string | `GreaterThanOrEqualToThreshold` | no |
-| create_default_security_group | Create default Security Group with only Egress traffic allowed | string | `true` | no |
-| default_alarm_action | - | string | `action/actions/AWS_EC2.InstanceId.Reboot/1.0` | no |
-| delete_on_termination | Whether the volume should be destroyed on instance termination | string | `true` | no |
-| delimiter | - | string | `-` | no |
-| disable_api_termination | Enable EC2 Instance Termination Protection | string | `false` | no |
-| ebs_device_names | Name of the EBS device to mount | list | `` | no |
-| ebs_iops | Amount of provisioned IOPS. This must be set with a volume_type of io1 | string | `0` | no |
-| ebs_optimized | Launched EC2 instance will be EBS-optimized | string | `false` | no |
-| ebs_volume_count | Count of EBS volumes that will be attached to the instance | string | `0` | no |
-| ebs_volume_size | Size of the EBS volume in gigabytes | string | `10` | no |
-| ebs_volume_type | The type of EBS volume. Can be standard, gp2 or io1 | string | `gp2` | no |
-| evaluation_periods | The number of periods over which data is compared to the specified threshold. | string | `5` | no |
-| generate_ssh_key_pair | If true, create a new key pair and save the pem for it to the current working directory | string | `false` | no |
-| instance_count | Count of ec2 instances to create | string | `1` | no |
-| instance_enabled | Flag to control the instance creation. Set to false if it is necessary to skip instance creation | string | `true` | no |
-| instance_type | The type of the instance | string | `t2.micro` | no |
-| 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 |
-| ipv6_addresses | List of IPv6 addresses from the range of the subnet to associate with the primary network interface | list | `` | no |
-| 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 |
-| 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 |
-| metric_threshold | The value against which the specified statistic is compared | string | `1` | no |
-| monitoring | Launched EC2 instance will have detailed monitoring enabled | string | `true` | no |
-| name | Name (e.g. `bastion` or `db`) - required for `terraform-terraform-label` module | string | - | yes |
-| namespace | Namespace (e.g. `cp` or `cloudposse`) - required for `terraform-terraform-label` module | string | - | yes |
-| private_ips | Private IP address to associate with the instances in the VPC | list | `` | no |
-| region | AWS Region the instance is launched in | string | `` | no |
-| root_iops | Amount of provisioned IOPS. This must be set if root_volume_type is set to `io1` | string | `0` | no |
-| root_volume_size | Size of the root volume in gigabytes | string | `10` | no |
-| root_volume_type | Type of root volume. Can be standard, gp2 or io1 | string | `gp2` | no |
-| security_groups | List of Security Group IDs allowed to connect to the instance | list | `` | no |
-| 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 |
-| ssh_key_pair | SSH key pair to be provisioned on the instance | string | `` | no |
-| ssh_key_pair_path | Path to where the generated key pairs will be created. Defaults to $${path.cwd} | string | `` | no |
-| stage | Stage (e.g. `prod`, `dev`, `staging` - required for `terraform-terraform-label` module | 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 |
-| subnet | VPC Subnet ID the instance is launched in | string | - | yes |
-| tags | Additional tags | map | `