Skip to content

Commit 5ad9547

Browse files
committed
init
1 parent 8cd4ca1 commit 5ad9547

File tree

3 files changed

+54
-50
lines changed

3 files changed

+54
-50
lines changed

README.md

Lines changed: 49 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Included features:
66
* Automatically create a Security Group
77
* Option to switch EIP attachment
88
* CloudWatch monitoring and automatic reboot if instance hangs
9-
* [Github Authorized Keys](https://github.com/cloudposse/terraform-template-user-data-github-authorized-keys)
9+
* [Github Authorized Keys](https://github.com/cloudposse/terraform-template-User Data-github-authorized-keys)
1010
* Assume Role capability
1111

1212
## Usage
@@ -56,7 +56,7 @@ module "kafka_instance" {
5656
This module depends on these modules:
5757

5858
* [terraform-null-label](https://github.com/cloudposse/terraform-null-label)
59-
* [terraform-template-user-data-github-authorized-keys](https://github.com/cloudposse/terraform-template-user-data-github-authorized-keys)
59+
* [terraform-template-User Data-github-authorized-keys](https://github.com/cloudposse/terraform-template-User Data-github-authorized-keys)
6060

6161
It is necessary to run `terraform get` to download those modules.
6262

@@ -70,48 +70,51 @@ resource "aws_ami_from_instance" "example" {
7070

7171
## Variables
7272

73-
| Name | Default | Description | Required |
74-
|:--------------------------------|:----------------------------------------------:|:-------------------------------------------------------------------------------------------------------|:--------:|
75-
| `namespace` | `` | Namespace (e.g. `cp` or `cloudposse`) | Yes |
76-
| `stage` | `` | Stage (e.g. `prod`, `dev`, `staging` | Yes |
77-
| `name` | `` | Name (e.g. `bastion` or `db`) | Yes |
78-
| `attributes` | `[]` | Additional attributes (e.g. `policy` or `role`) | No |
79-
| `tags` | `{}` | Additional tags (e.g. `map("BusinessUnit","XYZ")` | No |
80-
| `ami` | `` | By default it is an AMI provided by Amazon with Ubuntu 16.04 | No |
81-
| `instance_enabled` | `true` | Flag for creating an instance. Set to false if it is necessary to skip instance creation | No |
82-
| `create_default_security_group` | `true` | Flag for creation default Security Group with Egress traffic allowed only | No |
83-
| `ssh_key_pair` | `` | SSH key pair to be provisioned on instance | Yes |
84-
| `github_api_token` | `` | GitHub API token | No |
85-
| `github_organization` | `` | GitHub organization name | No |
86-
| `github_team` | `` | GitHub team | No |
87-
| `instance_type` | `t2.micro` | The type of the creating instance (e.g. `t2.micro`) | No |
88-
| `vpc_id` | `` | The ID of the VPC that the creating instance security group belongs to | Yes |
89-
| `security_groups` | `[]` | List of Security Group IDs allowed to connect to creating instance | Yes |
90-
| `allowed_ports` | `[]` | List of allowed ingress ports e.g. ["22", "80", "443"] | No |
91-
| `subnet` | `` | VPC Subnet ID creating instance launched in | Yes |
92-
| `associate_public_ip_address` | `true` | Associate a public ip address with the creating instance. Boolean value | No |
93-
| `additional_ips_count` | `0` | Count of additional EIPs | No |
94-
| `private_ip` | `` | Private IP address to associate with the instance in a VPC | No |
95-
| `source_dest_check` | `true` | Controls if traffic is routed to the instance when the destination address does not match the instance | No |
96-
| `ipv6_address_count` | `0` | Number of IPv6 addresses to associate with the primary network interface | No |
97-
| `ipv6_addresses` | `[]` | List of IPv6 addresses from the range of the subnet to associate with the primary network interface | No |
98-
| `root_volume_type` | `gp2` | Type of root volume. Can be `standard`, `gp2` or `io1` | No |
99-
| `root_volume_size` | `10` | Size of the root volume in gigabytes | No |
100-
| `root_iops` | `0` | Amount of provisioned IOPS. This must be set with a `root_volume_type` of `io1` | No |
101-
| `ebs_device_name` | `[/dev/xvdb]` | Name of the ebs device to mount | No |
102-
| `ebs_volume_type` | `gp2` | Type of EBS volume. Can be standard, `gp2` or `io1` | No |
103-
| `ebs_volume_size` | `10` | Size of the EBS volume in gigabytes | No |
104-
| `ebs_iops` | `0` | Amount of provisioned IOPS. This must be set with a `ebs_volume_type` of `io1` | No |
105-
| `ebs_volume_count` | `0` | Count of EBS which will be attched to instance | No |
106-
| `delete_on_termination` | `true` | Whether the volume should be destroyed on instance termination | No |
107-
| `comparison_operator` | `GreaterThanOrEqualToThreshold` | Arithmetic operation to use when comparing the specified Statistic and Threshold | No |
108-
| `metric_name` | `StatusCheckFailed_Instance` | Name for the alarm's associated metric | No |
109-
| `evaluation_periods` | `5` | Number of periods over which data is compared to the specified threshold | No |
110-
| `metric_namespace` | `AWS/EC2` | Namespace for the alarm's associated metric | No |
111-
| `applying_period` | `60` | Period in seconds over which the specified statistic is applied | No |
112-
| `statistic_level` | `Maximum` | Statistic to apply to the alarm's associated metric | No |
113-
| `metric_threshold` | `1` | Value against which the specified statistic is compared | No |
114-
| `default_alarm_action` | `action/actions/AWS_EC2.InstanceId.Reboot/1.0` | String of action to execute when this alarm transitions into an ALARM state | No |
73+
| Name | Default | Description | Required |
74+
|:--------------------------------|:----------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------|:--------:|
75+
| `namespace` | `` | Namespace (e.g. `cp` or `cloudposse`) | Yes |
76+
| `stage` | `` | Stage (e.g. `prod`, `dev`, `staging` | Yes |
77+
| `name` | `` | Name (e.g. `bastion` or `db`) | Yes |
78+
| `attributes` | `[]` | Additional attributes (e.g. `policy` or `role`) | No |
79+
| `tags` | `{}` | Additional tags (e.g. `map("BusinessUnit","XYZ")` | No |
80+
| `ami` | `` | By default it is an AMI provided by Amazon with Ubuntu 16.04 | No |
81+
| `instance_enabled` | `true` | Flag for creating an instance. Set to false if it is necessary to skip instance creation | No |
82+
| `create_default_security_group` | `true` | Flag for creation default Security Group with Egress traffic allowed only | No |
83+
| `ssh_key_pair` | `` | SSH key pair to be provisioned on instance | Yes |
84+
| `github_api_token` | `` | GitHub API token | No |
85+
| `github_organization` | `` | GitHub organization name | No |
86+
| `github_team` | `` | GitHub team | No |
87+
| `instance_type` | `t2.micro` | The type of the creating instance (e.g. `t2.micro`) | No |
88+
| `vpc_id` | `` | The ID of the VPC that the creating instance security group belongs to | Yes |
89+
| `security_groups` | `[]` | List of Security Group IDs allowed to connect to creating instance | Yes |
90+
| `allowed_ports` | `[]` | List of allowed ingress ports e.g. ["22", "80", "443"] | No |
91+
| `subnet` | `` | VPC Subnet ID creating instance launched in | Yes |
92+
| `associate_public_ip_address` | `true` | Associate a public ip address with the creating instance. Boolean value | No |
93+
| `additional_ips_count` | `0` | Count of additional EIPs | No |
94+
| `private_ip` | `` | Private IP address to associate with the instance in a VPC | No |
95+
| `source_dest_check` | `true` | Controls if traffic is routed to the instance when the destination address does not match the instance | No |
96+
| `ipv6_address_count` | `0` | Number of IPv6 addresses to associate with the primary network interface | No |
97+
| `ipv6_addresses` | `[]` | List of IPv6 addresses from the range of the subnet to associate with the primary network interface | No |
98+
| `root_volume_type` | `gp2` | Type of root volume. Can be `standard`, `gp2` or `io1` | No |
99+
| `root_volume_size` | `10` | Size of the root volume in gigabytes | No |
100+
| `root_iops` | `0` | Amount of provisioned IOPS. This must be set with a `root_volume_type` of `io1` | No |
101+
| `ebs_device_name` | `[/dev/xvdb]` | Name of the ebs device to mount | No |
102+
| `ebs_volume_type` | `gp2` | Type of EBS volume. Can be standard, `gp2` or `io1` | No |
103+
| `ebs_volume_size` | `10` | Size of the EBS volume in gigabytes | No |
104+
| `ebs_iops` | `0` | Amount of provisioned IOPS. This must be set with a `ebs_volume_type` of `io1` | No |
105+
| `ebs_volume_count` | `0` | Count of EBS which will be attched to instance | No |
106+
| `delete_on_termination` | `true` | Whether the volume should be destroyed on instance termination | No |
107+
| `comparison_operator` | `GreaterThanOrEqualToThreshold` | Arithmetic operation to use when comparing the specified Statistic and Threshold | No |
108+
| `metric_name` | `StatusCheckFailed_Instance` | Name for the alarm's associated metric | No |
109+
| `evaluation_periods` | `5` | Number of periods over which data is compared to the specified threshold | No |
110+
| `metric_namespace` | `AWS/EC2` | Namespace for the alarm's associated metric | No |
111+
| `applying_period` | `60` | Period in seconds over which the specified statistic is applied | No |
112+
| `statistic_level` | `Maximum` | Statistic to apply to the alarm's associated metric | No |
113+
| `metric_threshold` | `1` | Value against which the specified statistic is compared | No |
114+
| `default_alarm_action` | `action/actions/AWS_EC2.InstanceId.Reboot/1.0` | String of action to execute when this alarm transitions into an ALARM state | No |
115+
| `user_data` | `[]` | `User Data` which be concated with `terraform-template-User Data-github-authorized-keys`. Conflicts with `custom_user_data` | No |
116+
| `custom_user_data` | `[]` | Specific `User Data`, for example pfsense `AMI` doesn't support classic `User Data`. Conflicts with `user_data` | No |
117+
115118

116119
## Outputs
117120

@@ -126,7 +129,8 @@ resource "aws_ami_from_instance" "example" {
126129
| `security_group_id` | ID on the new AWS Security Group associated with creating instance |
127130
| `role` | Name of AWS IAM Role associated with creating instance |
128131
| `alarm` | CloudWatch Alarm ID |
129-
| `additional_eni_ids` | Map of ENI with EIP |
132+
| `additional_eni_private` | Map IDs of ENI with private IPs |
133+
| `additional_eni_public` | Map IDs of ENI with public IPs |
130134
| `ebs_ids` | ID of EBSs |
131135
| `primary_network_interface_id` | ID of the instance's primary network interface |
132136
| `network_interface_id` | ID of the network interface that was created with the instance |

0 commit comments

Comments
 (0)