ec2-instance
cloudposse/ec2-instance/aws
Terraform module for provisioning a general purpose EC2 host
Terraform Module for provisioning a general purpose EC2 host. 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 to easily orchestrate multiple environments using Terraform. > Works with Github Actions, Atlantis, or Spacelift. > > > Watch demo of using Atmos with Terraform > > Example of running atmos to manage infrastructure from our Quick Start tutorial. > Usage Note: add ${var.ssh_key_pair} private key to the ssh agent. Include this repository as a module in your existing terraform code. Simple example: ``hcl module "instance" { source = "cloudposse/ec2-instance/aws" # Cloud Posse recommends pinning
| Name | Type | Description | Default |
|---|---|---|---|
| source_dest_check | bool | Controls if traffic is routed to the instance when the destination address does | true |
| root_block_device_kms_key_id | string | KMS key ID used to encrypt EBS volume. When specifying root_block_device_kms_key | null |
| metadata_http_endpoint_enabled | bool | Whether the metadata service is available | true |
| kms_key_id | string | KMS key ID used to encrypt EBS volume. When specifying kms_key_id, ebs_volume_en | null |
| enabled | bool | Set to false to prevent the module from creating any resources | null |
| additional_tag_map | map(string) | Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not add | {} |
| descriptor_formats | any | Describe additional descriptors to be output in the `descriptors` output map. Ma | {} |
| ssh_key_pair | string | SSH key pair to be provisioned on the instance | null |
| applying_period | number | The period in seconds over which the specified statistic is applied | 60 |
| tenancy | string | Tenancy of the instance (if the instance is running in a VPC). An instance with | "default" |
| availability_zone | string | Availability Zone the instance is launched in. If not set, will be launched in t | "" |
| metric_threshold | number | The value against which the specified statistic is compared | 1 |
| tenant | string | ID element _(Rarely used, not included by default)_. A customer identifier, indi | null |
| user_data_replace_on_change | bool | When used in combination with user_data or user_data_base64 will trigger a destr | false |
| instance_type | string | The type of the instance | "t2.micro" |
| root_iops | number | Amount of provisioned IOPS. This must be set if root_volume_type is set of `io1` | 0 |
| root_throughput | number | Amount of throughput. This must be set if root_volume_type is set to `gp3` | 0 |
| delimiter | string | Delimiter to be used between ID elements. Defaults to `-` (hyphen). Set to `""` | null |
| private_ip | string | Private IP address to associate with the instance in the VPC | null |
| ipv6_addresses | list(string) | List of IPv6 addresses from the range of the subnet to associate with the primar | [] |
| … and 10 more inputs | |||
role — Name of AWS IAM Role associated with the instancealarm — CloudWatch Alarm IDprimary_network_interface_id — ID of the instance's primary network interfaceinstance_profile — Name of the instance's profile (either built or supplied)security_group_id — EC2 instance Security Group IDpublic_dns — Public DNS of instance (or DNS of EIP)arn — ARN of the instancename — Instance nameadditional_eni_ids — Map of ENI to EIPsecurity_group_arn — EC2 instance Security Group ARNpublic_ip — Public IP of instance (or EIP)ssh_key_pair — Name of the SSH key pair provisioned on the instancesecurity_group_ids — IDs on the AWS Security Groups associated with the instanceebs_ids — IDs of EBSssecurity_group_name — EC2 instance Security Group nameprivate_ip — Private IP of instanceprivate_dns — Private DNS of instanceid — Disambiguated ID of the instancerole_arn — ARN of AWS IAM Role associated with the instanceAzure landing zones Terraform module
Terraform supermodule for the Terraform platform engineering for Azure
Terraform module to deploy landing zone subscriptions (and much more) in Azure
Terraform Module to define a consistent naming convention by (namespace, stage,