Skip to content
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

feat: Add var service_tags #159

Merged

Conversation

leonardobiffi
Copy link
Contributor

Description

Add the variable service_tags in the service module to configure individually when using the module directly

Motivation and Context

When using the service module directly, there is no option to set a specific tag for the service

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
  # module.ecs_service.aws_ecs_service.this[0] will be created
  + resource "aws_ecs_service" "this" {
      + cluster                            = (known after apply)
      + deployment_maximum_percent         = 200
      + deployment_minimum_healthy_percent = 66
      + desired_count                      = 1
      + enable_ecs_managed_tags            = true
      + enable_execute_command             = true
      + force_new_deployment               = true
      + iam_role                           = (known after apply)
      + id                                 = (known after apply)
      + launch_type                        = "FARGATE"
      + name                               = "ex-fargate"
      + platform_version                   = (known after apply)
      + scheduling_strategy                = "REPLICA"
      + tags                               = {
          + "Example"    = "ex-fargate"
          + "Name"       = "ex-fargate"
          + "Repository" = "https://github.com/terraform-aws-modules/terraform-aws-ecs"
          + "ServiceTag" = "Tag on service level"
        }
      + tags_all                           = {
          + "Example"    = "ex-fargate"
          + "Name"       = "ex-fargate"
          + "Repository" = "https://github.com/terraform-aws-modules/terraform-aws-ecs"
          + "ServiceTag" = "Tag on service level"
        }
      + 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)
        }

      + 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 {}
    }
  • I have executed pre-commit run -a on my pull request
git commit -m "add var service_tags"
Terraform fmt............................................................Passed
Terraform wrapper with for_each in module................................Passed
Terraform validate.......................................................Passed
Terraform docs...........................................................Passed
Terraform validate with tflint...........................................Passed
check for merge conflicts................................................Passed
fix end of files.........................................................Passed
[feat/service_tags da688aa] add var service_tags
 4 files changed, 9 insertions(+), 1 deletion(-)

@leonardobiffi leonardobiffi changed the title add var service_tags feat: add var service_tags Jan 27, 2024
@leonardobiffi leonardobiffi changed the title feat: add var service_tags feat: Add var service_tags Jan 27, 2024
Copy link
Member

@bryantbiggs bryantbiggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@bryantbiggs bryantbiggs merged commit 1290240 into terraform-aws-modules:master Jan 29, 2024
12 of 14 checks passed
antonbabenko pushed a commit that referenced this pull request Jan 29, 2024
## [5.8.0](v5.7.4...v5.8.0) (2024-01-29)

### Features

* Add var service_tags ([#159](#159)) ([1290240](1290240))
@antonbabenko
Copy link
Member

This PR is included in version 5.8.0 🎉

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants