Skip to content

feat: Add support for availability zone rebalancing (terraform-aws-mo… #279

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

sebastianarca
Copy link

Description

This PR aims to add support for availability zone rebalancing in the services.
(This PR is a rework of the following pull request : #269)

I wish if it is possible to incorporate it as a minor version instead of incorporating it as a major version.

Motivation and Context

Fixes : #262

Breaking Changes

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

Example of the terraform plan in module example.

# module.ecs.module.service["ecsdemo-frontend"].aws_ecs_service.this[0] will be created
  + resource "aws_ecs_service" "this" {
      + availability_zone_rebalancing      = "ENABLED"
      + cluster                            = (known after apply)
      + deployment_maximum_percent         = 200
      + deployment_minimum_healthy_percent = 66
      + desired_count                      = 1
      + enable_ecs_managed_tags            = true
      + enable_execute_command             = false
      + force_new_deployment               = true
      + iam_role                           = (known after apply)
      + id                                 = (known after apply)
      + launch_type                        = "FARGATE"
      + name                               = "ecsdemo-frontend"
      + platform_version                   = (known after apply)
      + scheduling_strategy                = "REPLICA"
      + tags                               = {
          + "Example"    = "ex-complete"
          + "Name"       = "ex-complete"
          + "Repository" = "https://github.com/terraform-aws-modules/terraform-aws-ecs"
        }
      + tags_all                           = {
          + "Example"    = "ex-complete"
          + "Name"       = "ex-complete"
          + "Repository" = "https://github.com/terraform-aws-modules/terraform-aws-ecs"
        }
      + task_definition                    = (known after apply)
      + triggers                           = (known after apply)
      + wait_for_steady_state              = false

      + load_balancer {
          + container_name   = "ecsdemo-frontend"
          + container_port   = 3000
          + target_group_arn = (known after apply)
            # (1 unchanged attribute hidden)
        }

      + network_configuration {
          + assign_public_ip = false
          + security_groups  = (known after apply)
          + subnets          = (known after apply)
        }

      + service_connect_configuration {
          + enabled   = true
          + namespace = (known after apply)

          + service {
              + discovery_name = "ecsdemo-frontend"
              + port_name      = "ecsdemo-frontend"

              + client_alias {
                  + dns_name = "ecsdemo-frontend"
                  + port     = 3000
                }
            }
        }

      + timeouts {}
    }

@bryantbiggs
Copy link
Member

this must be implemented within/after the breaking change because it requires v5.77 of the AWS provider (current module is on 4.x)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Availability Zone Rebalancing Input
2 participants