ECS
Terraform module to create AWS ECS resources
Inputs
40 / 60
capacity_providersoptionalmap(object({ auto_scaling_group_provider = optional(object({ auto_scaling_group_…Map of capacity provider definitions to create for the cluster
nullcloudwatch_log_group_classoptionalstringSpecified the log class of the log group. Possible values are: `STANDARD` or `INFREQUENT_ACCESS`
nullcloudwatch_log_group_kms_key_idoptionalstringIf a KMS Key ARN is set, this key will be used to encrypt the corresponding log group. Please be sure that the KMS Key has an appropriate key policy (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/encrypt-log-data-kms.html)
nullcloudwatch_log_group_nameoptionalstringCustom name of CloudWatch Log Group for ECS cluster
nullcloudwatch_log_group_retention_in_daysoptionalnumberNumber of days to retain log events
90cloudwatch_log_group_tagsoptionalmap(string)A map of additional tags to add to the log group created
{}cluster_capacity_providersoptionallist(string)List of capacity provider names to associate with the ECS cluster. Note: any capacity providers created by this module will be automatically added
[]cluster_configurationoptionalobject({ execute_command_configuration = optional(object({ kms_key_id = optional…The execute command configuration for the cluster
{…}cluster_nameoptionalstringName of the cluster (up to 255 letters, numbers, hyphens, and underscores)
""cluster_service_connect_defaultsoptionalobject({ namespace = string })Configures a default Service Connect namespace
nullcluster_settingoptionallist(object({ name = string value = string }))List of configuration block(s) with cluster settings. For example, this can be used to enable CloudWatch Container Insights for a cluster
[…]cluster_tagsoptionalmap(string)A map of additional tags to add to the cluster
{}createoptionalboolDetermines whether resources will be created (affects all resources)
truecreate_cloudwatch_log_groupoptionalboolDetermines whether a log group is created by this module for the cluster logs. If not, AWS will automatically create one if logging is enabled
truecreate_infrastructure_iam_roleoptionalboolDetermines whether the ECS infrastructure IAM role should be created
truecreate_node_iam_instance_profileoptionalboolDetermines whether an IAM instance profile is created or to use an existing IAM instance profile
truecreate_security_groupoptionalboolDetermines if a security group is created
truecreate_task_exec_iam_roleoptionalboolDetermines whether the ECS task definition IAM role should be created
falsecreate_task_exec_policyoptionalboolDetermines whether the ECS task definition IAM policy should be created. This includes permissions included in AmazonECSTaskExecutionRolePolicy as well as access to secrets and SSM parameters
truedefault_capacity_provider_strategyoptionalmap(object({ base = optional(number) name = optional(string) # Will fall back to…Map of default capacity provider strategy definitions to use for the cluster
nulldisable_v7_default_name_descriptionoptionalbool[DEPRECATED - will be removed in v8.0] Determines whether to disable the default postfix added to resource names and descriptions added in v7.0
falseinfrastructure_iam_role_descriptionoptionalstringDescription of the role
nullinfrastructure_iam_role_nameoptionalstringName to use on IAM role created
nullinfrastructure_iam_role_override_policy_documentsoptionallist(string)List of IAM policy documents that are merged together into the exported document. In merging, statements with non-blank `sid`s will override statements with the same `sid`
[]infrastructure_iam_role_pathoptionalstringIAM role path
nullinfrastructure_iam_role_permissions_boundaryoptionalstringARN of the policy that is used to set the permissions boundary for the IAM role
nullinfrastructure_iam_role_source_policy_documentsoptionallist(string)List of IAM policy documents that are merged together into the exported document. Statements must have unique `sid`s
[]infrastructure_iam_role_statementsoptionalmap(object({ sid = optional(string) actions = optional(list(string)) not_actions…A map of IAM policy [statements](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document#statement) for custom permission usage
nullinfrastructure_iam_role_tagsoptionalmap(string)A map of additional tags to add to the IAM role created
{}infrastructure_iam_role_use_name_prefixoptionalboolDetermines whether the IAM role name (`iam_role_name`) is used as a prefix
truenode_iam_role_additional_policiesoptionalmap(string)Additional policies to be added to the IAM role
{}node_iam_role_descriptionoptionalstringDescription of the role
ECS Managed Instances node IAM rolenode_iam_role_nameoptionalstringName to use on IAM role/instance profile created
nullnode_iam_role_override_policy_documentsoptionallist(string)List of IAM policy documents that are merged together into the exported document. In merging, statements with non-blank `sid`s will override statements with the same `sid`
[]node_iam_role_pathoptionalstringIAM role/instance profile path
nullnode_iam_role_permissions_boundaryoptionalstringARN of the policy that is used to set the permissions boundary for the IAM role
nullnode_iam_role_source_policy_documentsoptionallist(string)List of IAM policy documents that are merged together into the exported document. Statements must have unique `sid`s
[]node_iam_role_statementsoptionalmap(object({ sid = optional(string) actions = optional(list(string)) not_actions…A map of IAM policy [statements](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document#statement) for custom permission usage
nullnode_iam_role_tagsoptionalmap(string)A map of additional tags to add to the IAM role/instance profile created
{}node_iam_role_use_name_prefixoptionalboolDetermines whether the IAM role/instance profile name (`node_iam_role_name`) is used as a prefix
trueAll 60 are optional — the module deploys with none of them set. Showing 40, so the site stays a static download — the remaining 20 are in the source.
Outputs
20
capacity_providersMap of autoscaling capacity providers created and their attributes
cloudwatch_log_group_arnARN of CloudWatch log group created
cloudwatch_log_group_nameName of CloudWatch log group created
cluster_arnARN that identifies the cluster
cluster_capacity_providersMap of cluster capacity providers attributes
cluster_idID that identifies the cluster
cluster_nameName that identifies the cluster
infrastructure_iam_role_arnThe Amazon Resource Name (ARN) specifying the IAM role
infrastructure_iam_role_nameIAM role name
infrastructure_iam_role_unique_idStable and unique string identifying the IAM role
node_iam_instance_profile_arnARN assigned by AWS to the instance profile
node_iam_instance_profile_idInstance profile's ID
node_iam_instance_profile_uniqueStable and unique string identifying the IAM instance profile
node_iam_role_arnThe Amazon Resource Name (ARN) specifying the IAM role
node_iam_role_nameIAM role name
node_iam_role_unique_idStable and unique string identifying the IAM role
servicesMap of services created and their attributes
task_exec_iam_role_arnTask execution IAM role ARN
task_exec_iam_role_nameTask execution IAM role name
task_exec_iam_role_unique_idStable and unique string identifying the task execution IAM role
What the agent wires into the next module. An edge on the architecture diagram is one of these consumed by something else.