ecs-cluster

dod-iac/ecs-cluster/aws

Terraform Module HCL AWS

An AWS ECS Cluster

Install
module "ecs-cluster" {
source = "dod-iac/ecs-cluster/aws"
version = "1.3.2"
}
plain text: /constructs/tfmod-dod-iac-ecs-cluster-aws/install.txt
⭐ Source on GitHub 📦 Registry page
README

Usage Creates an ECS cluster backed by EC2 instances. ``hcl module "ecs_instance_role" { source = "dod-iac/ecs-instance-role/aws" name = format("app-%s-ecs-instance-role-%s", var.application, var.environment) tags = { Application = var.application Environment = var.environment Automation = "Terraform" } } resource "aws_iam_instance_profile" "ecs_instance_role" { name = module.ecs_instance_role.name role = module.ecs_instance_role.name } module "ecs_cluster" { source = "dod-iac/ecs-cluster/aws" iam_instance_profile = aws_iam_instance_profile.ecs_instance_role.arn name = format("app-%s-%s", var.application, var.environment) subnet_ids = var.subnet_ids vpc_id = var.vpc_id tags = { Application = var.application Environment = var.environment Automation = "Terraform" } } ` By default, the ECS Cl

Inputs (19)
NameTypeDescriptionDefault
subnet_idslist(string)The ids of the VPC subnets used by the EC2 instances in the ECS cluster. required
vpc_idstringThe id of the VPC used by the EC2 instances in the ECS cluster. required
iam_instance_profilestring required
namestringThe name of the cluster (up to 255 letters, numbers, hyphens, and underscores). required
key_namestringName of EC2 key pair used to connect to the instances.""
min_sizenumberThe minimum size of the Auto Scaling Group.1
tagsmap(string)Tags applied to resources part of the ECS Cluster.{}
target_capacitynumberThe target utilization for the capacity provider. A number between 1 and 100.50
security_groupslist(string)Additional security groups to add to the launch configuration[]
autoscaling_protect_from_scale_inboolAllows setting instance protection. The Auto Scaling Group will not select instatrue
instance_typestring"m5.large"
autoscaling_enabled_metricslist(string)Metrics enabled by default for the autoscaling group[ "GroupAndWarmPoolDesiredCapacity",
max_sizenumberThe maximum size of the Auto Scaling Group.1
aws_launch_configuration_name_prefixstringThe prefix of the name of the AWS Launch configuration. If not specified, defaul""
image_idstringThe EC2 image ID to launch. If using AWS GovCloud, "ami-b1e0dad0" is equivalent"ami-0e999cbd62129e3b1"
root_block_device_volume_sizenumberSize of the root block device volume in gibibytes (GiB) used by the EC2 instance32
desired_capacitynumberThe number of Amazon EC2 instances that should be running in the group.1
user_datastringThe user data provided when launching instances. If not defined, the userdata.t""
associate_public_ip_addressboolAssociate a public ip address with an instance in a VPCfalse
Outputs (8)
ecs_cluster_arn — The Amazon Resource Name (ARN) of the AWS ECS cluster.
ecs_cluster_name — The name of the AWS ECS cluster.
security_group_id — The id of the AWS Security Group for the AWS ECS cluster.
aws_kms_alias_arn_exec_command — The Amazon Resource Name (ARN) of the Execute Command key alias.
aws_kms_alias_name_exec_command — The display name of the Execute Command alias.
aws_kms_key_arn_exec_command — The Amazon Resource Name (ARN) of the Execute Command key.
autoscaling_group_arn — The ARN of the EC2 Auto Scaling group.
autoscaling_group_name — The name of the EC2 Auto Scaling group.
Resources (8)
aws_autoscaling_groupaws_ecs_capacity_provideraws_ecs_clusteraws_ecs_cluster_capacity_providersaws_kms_aliasaws_kms_keyaws_launch_configurationaws_security_group
Details
FrameworkTerraform Module
LanguageHCL
Version1.3.2
Cloud AWS
★ Stars2
Forks4
Total downloads6.1k
Inputs19
Outputs8
Resources8
Examples1
LicenseMIT
Namespacedod-iac
Updated