Skip to content

Commit 6af5ff8

Browse files
authored
Add wait_for_steady_state option (#114)
Signed-off-by: Timo Sand <[email protected]>
1 parent fd63d0f commit 6af5ff8

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ In order to run all checks at any point run the following command:
6060

6161
| Name | Version |
6262
|------|---------|
63-
| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.93.0 |
63+
| <a name="provider_aws"></a> [aws](#provider\_aws) | 6.19.0 |
6464

6565
## Modules
6666

6767
| Name | Source | Version |
6868
|------|--------|---------|
69-
| <a name="module_ecs-alb"></a> [ecs-alb](#module\_ecs-alb) | cn-terraform/ecs-alb/aws | 1.0.36 |
70-
| <a name="module_ecs-autoscaling"></a> [ecs-autoscaling](#module\_ecs-autoscaling) | cn-terraform/ecs-service-autoscaling/aws | 1.0.10 |
69+
| <a name="module_ecs-alb"></a> [ecs-alb](#module\_ecs-alb) | cn-terraform/ecs-alb/aws | 1.0.37 |
70+
| <a name="module_ecs-autoscaling"></a> [ecs-autoscaling](#module\_ecs-autoscaling) | cn-terraform/ecs-service-autoscaling/aws | 1.0.12 |
7171

7272
## Resources
7373

@@ -158,6 +158,7 @@ In order to run all checks at any point run the following command:
158158
| <a name="input_task_definition_arn"></a> [task\_definition\_arn](#input\_task\_definition\_arn) | (Optional) The full ARN of the task definition that you want to run in your service. | `string` | `""` | no |
159159
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | ID of the VPC | `any` | n/a | yes |
160160
| <a name="input_waf_web_acl_arn"></a> [waf\_web\_acl\_arn](#input\_waf\_web\_acl\_arn) | ARN of a WAFV2 to associate with the ALB | `string` | `""` | no |
161+
| <a name="input_wait_for_ready_state"></a> [wait\_for\_ready\_state](#input\_wait\_for\_ready\_state) | (Optional) If true, Terraform will wait for the service to reach a steady state (like aws ecs wait services-stable) before continuing. Default false. | `bool` | `false` | no |
161162

162163
## Outputs
163164

main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ resource "aws_ecs_service" "service" {
148148
#When deployment_controller is EXTERNAL, task_definition must not be used
149149
task_definition = lookup(one(var.deployment_controller[*]), "type", "ECS") != "EXTERNAL" ? var.task_definition_arn : null
150150

151+
wait_for_steady_state = var.wait_for_ready_state
152+
151153
tags = merge(
152154
var.tags,
153155
{

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@ variable "enable_execute_command" {
128128
default = false
129129
}
130130

131+
variable "wait_for_ready_state" {
132+
description = "(Optional) If true, Terraform will wait for the service to reach a steady state (like aws ecs wait services-stable) before continuing. Default false."
133+
type = bool
134+
default = false
135+
}
136+
131137
#------------------------------------------------------------------------------
132138
# AWS ECS SERVICE network_configuration BLOCK
133139
#------------------------------------------------------------------------------

0 commit comments

Comments
 (0)