Skip to content

Commit bf2dbf1

Browse files
committed
feat: Add support of suspended_state block in aws_appautoscaling_target of ECS service
1 parent e442fa4 commit bf2dbf1

File tree

9 files changed

+89
-60
lines changed

9 files changed

+89
-60
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Large diffs are not rendered by default.

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ module "service" {
171171
autoscaling_max_capacity = each.value.autoscaling_max_capacity
172172
autoscaling_policies = each.value.autoscaling_policies
173173
autoscaling_scheduled_actions = each.value.autoscaling_scheduled_actions
174+
autoscaling_suspended_state = each.value.autoscaling_suspended_state
174175

175176
# Security Group
176177
create_security_group = each.value.create_security_group

modules/cluster/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,22 +166,22 @@ No modules.
166166

167167
| Name | Description | Type | Default | Required |
168168
|------|-------------|------|---------|:--------:|
169-
| <a name="input_autoscaling_capacity_providers"></a> [autoscaling\_capacity\_providers](#input\_autoscaling\_capacity\_providers) | Map of autoscaling capacity provider definitions to create for the cluster | <pre>map(object({<br/> auto_scaling_group_arn = string<br/> managed_draining = optional(string, "ENABLED")<br/> managed_scaling = optional(object({<br/> instance_warmup_period = optional(number)<br/> maximum_scaling_step_size = optional(number)<br/> minimum_scaling_step_size = optional(number)<br/> status = optional(string)<br/> target_capacity = optional(number)<br/> }))<br/> managed_termination_protection = optional(string)<br/> name = optional(string) # Will fall back to use map key if not set<br/> tags = optional(map(string), {})<br/> }))</pre> | `null` | no |
169+
| <a name="input_autoscaling_capacity_providers"></a> [autoscaling\_capacity\_providers](#input\_autoscaling\_capacity\_providers) | Map of autoscaling capacity provider definitions to create for the cluster | <pre>map(object({<br> auto_scaling_group_arn = string<br> managed_draining = optional(string, "ENABLED")<br> managed_scaling = optional(object({<br> instance_warmup_period = optional(number)<br> maximum_scaling_step_size = optional(number)<br> minimum_scaling_step_size = optional(number)<br> status = optional(string)<br> target_capacity = optional(number)<br> }))<br> managed_termination_protection = optional(string)<br> name = optional(string) # Will fall back to use map key if not set<br> tags = optional(map(string), {})<br> }))</pre> | `null` | no |
170170
| <a name="input_cloudwatch_log_group_class"></a> [cloudwatch\_log\_group\_class](#input\_cloudwatch\_log\_group\_class) | Specified the log class of the log group. Possible values are: `STANDARD` or `INFREQUENT_ACCESS` | `string` | `null` | no |
171171
| <a name="input_cloudwatch_log_group_kms_key_id"></a> [cloudwatch\_log\_group\_kms\_key\_id](#input\_cloudwatch\_log\_group\_kms\_key\_id) | If 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) | `string` | `null` | no |
172172
| <a name="input_cloudwatch_log_group_name"></a> [cloudwatch\_log\_group\_name](#input\_cloudwatch\_log\_group\_name) | Custom name of CloudWatch Log Group for ECS cluster | `string` | `null` | no |
173173
| <a name="input_cloudwatch_log_group_retention_in_days"></a> [cloudwatch\_log\_group\_retention\_in\_days](#input\_cloudwatch\_log\_group\_retention\_in\_days) | Number of days to retain log events | `number` | `90` | no |
174174
| <a name="input_cloudwatch_log_group_tags"></a> [cloudwatch\_log\_group\_tags](#input\_cloudwatch\_log\_group\_tags) | A map of additional tags to add to the log group created | `map(string)` | `{}` | no |
175-
| <a name="input_configuration"></a> [configuration](#input\_configuration) | The execute command configuration for the cluster | <pre>object({<br/> execute_command_configuration = optional(object({<br/> kms_key_id = optional(string)<br/> log_configuration = optional(object({<br/> cloud_watch_encryption_enabled = optional(bool)<br/> cloud_watch_log_group_name = optional(string)<br/> s3_bucket_encryption_enabled = optional(bool)<br/> s3_bucket_name = optional(string)<br/> s3_kms_key_id = optional(string)<br/> s3_key_prefix = optional(string)<br/> }))<br/> logging = optional(string, "OVERRIDE")<br/> }))<br/> managed_storage_configuration = optional(object({<br/> fargate_ephemeral_storage_kms_key_id = optional(string)<br/> kms_key_id = optional(string)<br/> }))<br/> })</pre> | <pre>{<br/> "execute_command_configuration": {<br/> "log_configuration": {<br/> "cloud_watch_log_group_name": "placeholder"<br/> }<br/> }<br/>}</pre> | no |
175+
| <a name="input_configuration"></a> [configuration](#input\_configuration) | The execute command configuration for the cluster | <pre>object({<br> execute_command_configuration = optional(object({<br> kms_key_id = optional(string)<br> log_configuration = optional(object({<br> cloud_watch_encryption_enabled = optional(bool)<br> cloud_watch_log_group_name = optional(string)<br> s3_bucket_encryption_enabled = optional(bool)<br> s3_bucket_name = optional(string)<br> s3_kms_key_id = optional(string)<br> s3_key_prefix = optional(string)<br> }))<br> logging = optional(string, "OVERRIDE")<br> }))<br> managed_storage_configuration = optional(object({<br> fargate_ephemeral_storage_kms_key_id = optional(string)<br> kms_key_id = optional(string)<br> }))<br> })</pre> | <pre>{<br> "execute_command_configuration": {<br> "log_configuration": {<br> "cloud_watch_log_group_name": "placeholder"<br> }<br> }<br>}</pre> | no |
176176
| <a name="input_create"></a> [create](#input\_create) | Determines whether resources will be created (affects all resources) | `bool` | `true` | no |
177177
| <a name="input_create_cloudwatch_log_group"></a> [create\_cloudwatch\_log\_group](#input\_create\_cloudwatch\_log\_group) | Determines whether a log group is created by this module for the cluster logs. If not, AWS will automatically create one if logging is enabled | `bool` | `true` | no |
178178
| <a name="input_create_task_exec_iam_role"></a> [create\_task\_exec\_iam\_role](#input\_create\_task\_exec\_iam\_role) | Determines whether the ECS task definition IAM role should be created | `bool` | `false` | no |
179179
| <a name="input_create_task_exec_policy"></a> [create\_task\_exec\_policy](#input\_create\_task\_exec\_policy) | Determines 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 | `bool` | `true` | no |
180-
| <a name="input_default_capacity_provider_strategy"></a> [default\_capacity\_provider\_strategy](#input\_default\_capacity\_provider\_strategy) | Map of default capacity provider strategy definitions to use for the cluster | <pre>map(object({<br/> base = optional(number)<br/> name = optional(string) # Will fall back to use map key if not set<br/> weight = optional(number)<br/> }))</pre> | `{}` | no |
180+
| <a name="input_default_capacity_provider_strategy"></a> [default\_capacity\_provider\_strategy](#input\_default\_capacity\_provider\_strategy) | Map of default capacity provider strategy definitions to use for the cluster | <pre>map(object({<br> base = optional(number)<br> name = optional(string) # Will fall back to use map key if not set<br> weight = optional(number)<br> }))</pre> | `{}` | no |
181181
| <a name="input_name"></a> [name](#input\_name) | Name of the cluster (up to 255 letters, numbers, hyphens, and underscores) | `string` | `""` | no |
182182
| <a name="input_region"></a> [region](#input\_region) | Region where the resource(s) will be managed. Defaults to the Region set in the provider configuration | `string` | `null` | no |
183-
| <a name="input_service_connect_defaults"></a> [service\_connect\_defaults](#input\_service\_connect\_defaults) | Configures a default Service Connect namespace | <pre>object({<br/> namespace = string<br/> })</pre> | `null` | no |
184-
| <a name="input_setting"></a> [setting](#input\_setting) | List of configuration block(s) with cluster settings. For example, this can be used to enable CloudWatch Container Insights for a cluster | <pre>list(object({<br/> name = string<br/> value = string<br/> }))</pre> | <pre>[<br/> {<br/> "name": "containerInsights",<br/> "value": "enabled"<br/> }<br/>]</pre> | no |
183+
| <a name="input_service_connect_defaults"></a> [service\_connect\_defaults](#input\_service\_connect\_defaults) | Configures a default Service Connect namespace | <pre>object({<br> namespace = string<br> })</pre> | `null` | no |
184+
| <a name="input_setting"></a> [setting](#input\_setting) | List of configuration block(s) with cluster settings. For example, this can be used to enable CloudWatch Container Insights for a cluster | <pre>list(object({<br> name = string<br> value = string<br> }))</pre> | <pre>[<br> {<br> "name": "containerInsights",<br> "value": "enabled"<br> }<br>]</pre> | no |
185185
| <a name="input_tags"></a> [tags](#input\_tags) | A map of tags to add to all resources | `map(string)` | `{}` | no |
186186
| <a name="input_task_exec_iam_role_description"></a> [task\_exec\_iam\_role\_description](#input\_task\_exec\_iam\_role\_description) | Description of the role | `string` | `null` | no |
187187
| <a name="input_task_exec_iam_role_name"></a> [task\_exec\_iam\_role\_name](#input\_task\_exec\_iam\_role\_name) | Name to use on IAM role created | `string` | `null` | no |
@@ -190,7 +190,7 @@ No modules.
190190
| <a name="input_task_exec_iam_role_policies"></a> [task\_exec\_iam\_role\_policies](#input\_task\_exec\_iam\_role\_policies) | Map of IAM role policy ARNs to attach to the IAM role | `map(string)` | `{}` | no |
191191
| <a name="input_task_exec_iam_role_tags"></a> [task\_exec\_iam\_role\_tags](#input\_task\_exec\_iam\_role\_tags) | A map of additional tags to add to the IAM role created | `map(string)` | `{}` | no |
192192
| <a name="input_task_exec_iam_role_use_name_prefix"></a> [task\_exec\_iam\_role\_use\_name\_prefix](#input\_task\_exec\_iam\_role\_use\_name\_prefix) | Determines whether the IAM role name (`task_exec_iam_role_name`) is used as a prefix | `bool` | `true` | no |
193-
| <a name="input_task_exec_iam_statements"></a> [task\_exec\_iam\_statements](#input\_task\_exec\_iam\_statements) | 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 | <pre>map(object({<br/> sid = optional(string)<br/> actions = optional(list(string))<br/> not_actions = optional(list(string))<br/> effect = optional(string, "Allow")<br/> resources = optional(list(string))<br/> not_resources = optional(list(string))<br/> principals = optional(list(object({<br/> type = string<br/> identifiers = list(string)<br/> })))<br/> not_principals = optional(list(object({<br/> type = string<br/> identifiers = list(string)<br/> })))<br/> condition = optional(list(object({<br/> test = string<br/> variable = string<br/> values = list(string)<br/> })))<br/> }))</pre> | `null` | no |
193+
| <a name="input_task_exec_iam_statements"></a> [task\_exec\_iam\_statements](#input\_task\_exec\_iam\_statements) | 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 | <pre>map(object({<br> sid = optional(string)<br> actions = optional(list(string))<br> not_actions = optional(list(string))<br> effect = optional(string, "Allow")<br> resources = optional(list(string))<br> not_resources = optional(list(string))<br> principals = optional(list(object({<br> type = string<br> identifiers = list(string)<br> })))<br> not_principals = optional(list(object({<br> type = string<br> identifiers = list(string)<br> })))<br> condition = optional(list(object({<br> test = string<br> variable = string<br> values = list(string)<br> })))<br> }))</pre> | `null` | no |
194194
| <a name="input_task_exec_secret_arns"></a> [task\_exec\_secret\_arns](#input\_task\_exec\_secret\_arns) | List of SecretsManager secret ARNs the task execution role will be permitted to get/read | `list(string)` | `[]` | no |
195195
| <a name="input_task_exec_ssm_param_arns"></a> [task\_exec\_ssm\_param\_arns](#input\_task\_exec\_ssm\_param\_arns) | List of SSM parameter ARNs the task execution role will be permitted to get/read | `list(string)` | `[]` | no |
196196

0 commit comments

Comments
 (0)