Skip to content

Latest commit

 

History

History
107 lines (103 loc) · 13.1 KB

io.md

File metadata and controls

107 lines (103 loc) · 13.1 KB

Inputs

Name Description Type Default Required
algorithm Name of the algorithm to use when generating the private key. Currently-supported values are: RSA, ECDSA, ED25519. string "RSA" no
alias The display name of the alias. The name must start with the word alias followed by a forward slash. string "alias/ec2-test" no
allowed_ip List of allowed ip. list(any)
[
"0.0.0.0/0"
]
no
allowed_ports List of allowed ingress ports list(any)
[
80,
443
]
no
assign_eip_address Assign an Elastic IP address to the instance. bool true no
capacity_reservation_specification Describes an instance's Capacity Reservation targeting option any {} no
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
cpu_options Defines CPU options to apply to the instance at launch time. any {} no
customer_master_key_spec Specifies whether the key contains a symmetric key or an asymmetric key pair and the encryption algorithms or signing algorithms that the key supports. Valid values: SYMMETRIC_DEFAULT, RSA_2048, RSA_3072, RSA_4096, ECC_NIST_P256, ECC_NIST_P384, ECC_NIST_P521, or ECC_SECG_P256K1. Defaults to SYMMETRIC_DEFAULT. string "SYMMETRIC_DEFAULT" no
default_instance_enabled Flag to control the instance creation. bool true no
deletion_window_in_days Duration in days after which the key is deleted after destruction of the resource. number 7 no
delimiter Delimiter to be used between organization, environment, name and attributes. string "-" no
dns_enabled Flag to control the dns_enable. bool false no
dns_zone_id The Zone ID of Route53. string "Z1XJD7SSBKXLC1" no
ebs_block_device Additional EBS block devices to attach to the instance list(any) [] no
ebs_device_name Name of the EBS device to mount. list(string)
[
"/dev/xvdb",
"/dev/xvdc",
"/dev/xvdd",
"/dev/xvde",
"/dev/xvdf",
"/dev/xvdg",
"/dev/xvdh",
"/dev/xvdi",
"/dev/xvdj",
"/dev/xvdk",
"/dev/xvdl",
"/dev/xvdm",
"/dev/xvdn",
"/dev/xvdo",
"/dev/xvdp",
"/dev/xvdq",
"/dev/xvdr",
"/dev/xvds",
"/dev/xvdt",
"/dev/xvdu",
"/dev/xvdv",
"/dev/xvdw",
"/dev/xvdx",
"/dev/xvdy",
"/dev/xvdz"
]
no
ebs_iops Amount of provisioned IOPS. This must be set with a volume_type of io1. number 0 no
ebs_volume_enabled Flag to control the ebs creation. bool false no
ebs_volume_size Size of the EBS volume in gigabytes. number 30 no
ebs_volume_type The type of EBS volume. Can be standard, gp3 or io1. string "gp3" no
egress_ipv4_cidr_block List of CIDR blocks. Cannot be specified with source_security_group_id or self. list(string)
[
"0.0.0.0/0"
]
no
egress_ipv4_from_port Egress Start port (or ICMP type number if protocol is icmp or icmpv6). number 0 no
egress_ipv4_protocol Protocol. If not icmp, icmpv6, tcp, udp, or all use the protocol number string "-1" no
egress_ipv4_to_port Egress end port (or ICMP code if protocol is icmp). number 65535 no
egress_ipv6_cidr_block List of CIDR blocks. Cannot be specified with source_security_group_id or self. list(string)
[
"::/0"
]
no
egress_ipv6_from_port Egress Start port (or ICMP type number if protocol is icmp or icmpv6). number 0 no
egress_ipv6_protocol Protocol. If not icmp, icmpv6, tcp, udp, or all use the protocol number string "-1" no
egress_ipv6_to_port Egress end port (or ICMP code if protocol is icmp). number 65535 no
egress_rule Enable to create egress rule bool true no
enable Flag to control module creation. bool true no
enable_key_pair A boolean flag to enable/disable key pair. bool true no
enable_key_rotation Specifies whether key rotation is enabled. string true no
enable_security_group Enable default Security Group with only Egress traffic allowed. bool true no
enclave_options_enabled Whether Nitro Enclaves will be enabled on the instance. Defaults to false bool null no
environment Environment (e.g. prod, dev, staging). string "" no
hostname DNS records to create. string "ec2" no
iam_instance_profile The IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. string null no
instance_configuration Configuration options for the EC2 instance
object({
ami = optional(string, "")
ebs_optimized = optional(bool, false)
instance_type = string
monitoring = optional(bool, false)
associate_public_ip_address = optional(bool, true)
disable_api_termination = optional(bool, false)
instance_initiated_shutdown_behavior = optional(string, "stop")
placement_group = optional(string, "")
tenancy = optional(string, "default")
host_id = optional(string, null)
cpu_core_count = optional(number, null)
cpu_threads_per_core = optional(number, null)
user_data = optional(string, "")
user_data_base64 = optional(string, null)
user_data_replace_on_change = optional(bool, null)
availability_zone = optional(string, null)
get_password_data = optional(bool, null)
private_ip = optional(string, null)
secondary_private_ips = optional(list(string), null)
source_dest_check = optional(bool, true)
ipv6_address_count = optional(number, null)
ipv6_addresses = optional(list(string), null)
hibernation = optional(bool, false)
root_block_device = optional(list(any), [])
ephemeral_block_device = optional(list(any), [])
})
{
"instance_type": "t4g.small"
}
no
instance_count Number of instances to launch. number 0 no
instance_metadata_tags_enabled Whether the metadata tag is available. Valid values include enabled or disabled. Defaults to enabled. string "disabled" no
instance_profile_enabled Flag to control the instance profile creation. bool true no
instance_tags Instance tags. map(any) {} no
is_enabled Specifies whether the key is enabled. bool true no
is_external enable to udated existing security Group bool false no
key_name Key name of the Key Pair to use for the instance; which can be managed using the aws_key_pair resource. string "" no
key_usage Specifies the intended use of the key. Defaults to ENCRYPT_DECRYPT, and only symmetric encryption and decryption are supported. string "ENCRYPT_DECRYPT" no
kms_description The description of the key as viewed in AWS console. string "Parameter Store KMS master key" no
kms_key_enabled Specifies whether the kms is enabled or disabled. bool true no
kms_key_id The ARN of the key that you wish to use if encrypting at rest. If not supplied, uses service managed encryption. Can be specified only if at_rest_encryption_enabled = true. string "" no
kms_multi_region Indicates whether the KMS key is a multi-Region (true) or regional (false) key. bool false no
label_order Label order, e.g. name,application. list(any)
[
"name",
"environment"
]
no
launch_template Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template map(string) {} no
managedby ManagedBy, eg 'CloudDrove'. string "[email protected]" no
metadata_http_endpoint_enabled Whether the metadata service is available. Valid values include enabled or disabled. Defaults to enabled. string "enabled" no
metadata_http_put_response_hop_limit The desired HTTP PUT response hop limit (between 1 and 64) for instance metadata requests. number 2 no
metadata_http_tokens_required Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2 (IMDSv2). Valid values include optional or required. Defaults to optional. string "optional" no
multi_attach_enabled Specifies whether to enable Amazon EBS Multi-Attach. Multi-Attach is supported on io1 and io2 volumes. bool false no
name Name (e.g. app or cluster). string "" no
network_interface Customize network interfaces to be attached at instance boot time list(map(string)) [] no
protocol The protocol. If not icmp, tcp, udp, or all use the. string "tcp" no
public_key Name (e.g. ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD3F6tyPEFEzV0LX3X8BsXdMsQ). string "" no
repository Terraform current module repo string "https://github.com/clouddrove/terraform-aws-ec2" no
rsa_bits When algorithm is RSA, the size of the generated RSA key, in bits (default: 2048). number 4096 no
sg_description The security group description. string "Instance default security group (only egress access is allowed)." no
sg_egress_description Description of the egress and ingress rule string "Description of the rule." no
sg_egress_ipv6_description Description of the egress_ipv6 rule string "Description of the rule." no
sg_ids of the security group id. list(any) [] no
sg_ingress_description Description of the ingress rule string "Description of the ingress rule use elasticache." no
spot_configuration Configuration options for the EC2 spot instance
object({
spot_price = optional(string, null)
wait_for_fulfillment = optional(bool, false)
spot_type = optional(string, null)
launch_group = optional(string, null)
block_duration_minutes = optional(number, null)
instance_interruption_behavior = optional(string, null)
valid_until = optional(string, null)
valid_from = optional(string, null)
})
{} no
spot_instance_count Number of instances to launch. number 0 no
spot_instance_enabled Flag to control the instance creation. bool true no
spot_instance_tags Instance tags. map(any) {} no
ssh_allowed_ip List of allowed ip. list(any) [] no
ssh_allowed_ports List of allowed ingress ports list(any) [] no
ssh_protocol The protocol. If not icmp, tcp, udp, or all use the. string "tcp" no
ssh_sg_ingress_description Description of the ingress rule string "Description of the ingress rule use elasticache." no
subnet_ids A list of VPC Subnet IDs to launch in. list(string) [] no
tags Additional tags (e.g. map(BusinessUnit,XYZ). map(any) {} no
timeouts Define maximum timeout for creating, updating, and deleting EC2 instance resources map(string) {} no
ttl The TTL of the record to add to the DNS zone to complete certificate validation. string "300" no
type Type of DNS records to create. string "CNAME" no
vpc_id The ID of the VPC that the instance security group belongs to. string "" no

Outputs

Name Description
arn The ARN of the instance.
az The availability zone of the instance.
instance_count The count of instances.
instance_id The instance ID.
ipv6_addresses A list of assigned IPv6 addresses.
key_name The key name of the instance.
name Name of SSH key.
placement_group The placement group of the instance.
private_ip Private IP of instance.
public_ip Public IP of instance (or EIP).
spot_bid_status The current bid status of the Spot Instance Request
spot_instance_id The instance ID.
subnet_id The EC2 subnet ID.
tags The instance ID.
vpc_security_group_ids The associated security groups in non-default VPC.