parent | title | nav_exclude |
---|---|---|
Infrastructure Components |
AWS EC2 |
false |
source = "git::https://github.com/slalom-ggp/dataops-infra/tree/main/components/aws/ec2?ref=main"
EC2 is the virtual machine layer of the AWS platform. This module allows you to pass your own startup scripts, and it streamlines the creation and usage of credentials (passwords and/or SSH keypairs) needed to connect to the instances.
No requirements.
The following providers are used by this module:
-
http
-
aws
The following input variables are required:
Description: Standard name_prefix
module input. (Prefix counts towards 64-character max length for certain resource types.)
Type: string
Description: Standard environment
module input.
Type:
object({
vpc_id = string
aws_region = string
public_subnets = list(string)
private_subnets = list(string)
})
Description: Standard resource_tags
module input.
Type: map(string)
Description: A name filter used when searching for the EC2 AMI ('*' used as wildcard).
Type: string
Description: The desired EC2 instance type.
Type: string
Description: The name of a SSH key pair which has been uploaded to AWS. This is used to access Linux instances remotely.
Type: string
Description: The local private key file for the SSH key pair which has been uploaded to AWS. This is used to access Linux instances remotely.
Type: string
The following input variables are optional (have default values):
Description: Optional. The IP address range(s) which should have access to the admin on the instance(s). By default this will default to only allow connections from the terraform user's current IP address.
Type: list
Default: []
Description: A map defining the admin ports which should be goverened by admin_cidr
. Single ports
(e.g. '22') and port ranges (e.g. '0:65535') and both supported.
Type: map
Default:
{
"SSH": "22"
}
Description: Optional. The IP address range(s) which should have access to the non-admin ports (such as end-user http portal). If not set, this will default to allow incoming connections from any IP address (['0.0.0.0/0']). In general, this should be omitted unless the site has a VPN or other internal list of IP whitelist ranges.
Type: list
Default:
[
"0.0.0.0/0"
]
Description: A map defining the end-user ports which should be goverened by app_cidr
. Single ports
(e.g. '22') and port ranges (e.g. '0:65535') and both supported.
Type: map
Default: {}
Description: A map defining which ports should be openen for instances to talk with one another.
Type: map
Default: {}
Description: The name or account number of the owner who publishes the AMI.
Type: string
Default: "amazon"
Description: The desired EC2 instance storage, in GB.
Type: number
Default: 100
Description: True to launch a Windows instance, otherwise False.
Type: bool
Default: false
Description: List of files to needed on the instance (e.g. 'http://url/to/remote/file', '/path/to/local/file', '/path/to/local/file:renamed')
Type: list
Default: []
Description: If use_https
= True, the https domain for secure web traffic.
Type: string
Default: ""
Description: The number of EC2 instances to launch.
Type: number
Default: 1
Description: True to enable https traffic on the instance.
Type: bool
Default: false
Description: If True, EC2 will use a private subnets and will require a NAT gateway to pull the docker image, and for any outbound traffic. If False, tasks will use a public subnet and will not require a NAT gateway. Note: a load balancer configuration may also be required in order for EC2 instances to receive incoming traffic.
Type: bool
Default: false
The following outputs are exported:
Description: The SSH key name for EC2 remote access.
Description: The local path to the private key file used for EC2 remote access.
Description: The instance ID (if num_instances
== 1).
Description: The list of instance ID created.
Description: The public IP address (if applicable, and if num_instances
== 1)
Description: A map of EC2 instance IDs to public IP addresses (if applicable).
Description: The private IP address (if num_instances
== 1)
Description: A map of EC2 instance IDs to private IP addresses.
Description: The state of the instance at time of apply (if num_instances
== 1).
Description: A map of instance IDs to the state of each instance at time of apply.
Description: A map of instance IDs to Windows passwords (if applicable).
Description: A map of instance IDs to command-line strings which can be used to connect to each instance.
Source code for this module is available using the links below.
NOTE: This documentation was auto-generated using
terraform-docs
and s-infra
from slalom.dataops
.
Please do not attempt to manually update this file.