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(terraform): add default tags to resources #146

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

JoshuaLicense
Copy link
Contributor

Description

Adds default tags to resources created by this repository. As this is a shared AWS account this will be useful to see what repository created resources.

Before submitting (or marking as "ready for review")

  • Does the pull request title follow the conventional commit specification?
  • Have you performed a self-review of the code
  • Have you have added tests that prove the fix or feature is effective and working
  • Did you make sure to update any documentation relating to this change?

@JoshuaLicense JoshuaLicense self-assigned this Jun 19, 2024
Copy link
Contributor

Terraform plan for environment: int

Commit: ac5cad8

API version: 988f85a
Selfserve version: 988f85a
Internal version: 988f85a

Plan summary

0 to add, 0 to change, 0 to destroy


Show full plan
No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration
and found no differences, so no changes are needed.

Copy link
Contributor

Terraform plan for environment: dev

Commit: ac5cad8

API version: 988f85a
Selfserve version: 988f85a
Internal version: 988f85a

Plan summary

0 to add, 41 to change, 0 to destroy

📖 Reads

module.service.module.ecs_service["api"].data.aws_ecs_task_definition.this[0]
module.service.module.ecs_service["internal"].data.aws_ecs_task_definition.this[0]
module.service.module.ecs_service["selfserve"].data.aws_ecs_task_definition.this[0]

🔄 Updates

module.service.aws_lb_listener_rule.this["api"]
module.service.aws_lb_listener_rule.this["internal"]
module.service.aws_lb_listener_rule.this["selfserve"]
module.service.aws_lb_target_group.this["api"]
module.service.aws_lb_target_group.this["internal"]
module.service.aws_lb_target_group.this["selfserve"]
module.service.module.cloudfront.aws_cloudfront_distribution.this[0]
module.service.module.ecs_cluster["api"].aws_cloudwatch_log_group.this[0]
module.service.module.ecs_cluster["api"].aws_ecs_cluster.this[0]
module.service.module.ecs_cluster["api"].aws_iam_policy.task_exec[0]
module.service.module.ecs_cluster["api"].aws_iam_role.task_exec[0]
module.service.module.ecs_cluster["internal"].aws_cloudwatch_log_group.this[0]
module.service.module.ecs_cluster["internal"].aws_ecs_cluster.this[0]
module.service.module.ecs_cluster["internal"].aws_iam_policy.task_exec[0]
module.service.module.ecs_cluster["internal"].aws_iam_role.task_exec[0]
module.service.module.ecs_cluster["selfserve"].aws_cloudwatch_log_group.this[0]
module.service.module.ecs_cluster["selfserve"].aws_ecs_cluster.this[0]
module.service.module.ecs_cluster["selfserve"].aws_iam_policy.task_exec[0]
module.service.module.ecs_cluster["selfserve"].aws_iam_role.task_exec[0]
module.service.module.ecs_service["api"].aws_appautoscaling_target.this[0]
module.service.module.ecs_service["api"].aws_ecs_service.this[0]
module.service.module.ecs_service["api"].aws_ecs_task_definition.this[0]
module.service.module.ecs_service["api"].aws_iam_policy.task_exec[0]
module.service.module.ecs_service["api"].aws_iam_role.task_exec[0]
module.service.module.ecs_service["api"].aws_iam_role.tasks[0]
module.service.module.ecs_service["internal"].aws_appautoscaling_target.this[0]
module.service.module.ecs_service["internal"].aws_ecs_service.this[0]
module.service.module.ecs_service["internal"].aws_ecs_task_definition.this[0]
module.service.module.ecs_service["internal"].aws_iam_policy.task_exec[0]
module.service.module.ecs_service["internal"].aws_iam_role.task_exec[0]
module.service.module.ecs_service["internal"].aws_iam_role.tasks[0]
module.service.module.ecs_service["selfserve"].aws_appautoscaling_target.this[0]
module.service.module.ecs_service["selfserve"].aws_ecs_service.this[0]
module.service.module.ecs_service["selfserve"].aws_ecs_task_definition.this[0]
module.service.module.ecs_service["selfserve"].aws_iam_policy.task_exec[0]
module.service.module.ecs_service["selfserve"].aws_iam_role.task_exec[0]
module.service.module.ecs_service["selfserve"].aws_iam_role.tasks[0]
module.service.module.log_bucket.aws_s3_bucket.this[0]
module.service.module.ecs_service["api"].module.container_definition["api"].aws_cloudwatch_log_group.this[0]
module.service.module.ecs_service["internal"].module.container_definition["internal"].aws_cloudwatch_log_group.this[0]
module.service.module.ecs_service["selfserve"].module.container_definition["selfserve"].aws_cloudwatch_log_group.this[0]

Show full plan
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place
 <= read (data resources)

Terraform will perform the following actions:

  # module.service.aws_lb_listener_rule.this["api"] will be updated in-place
  ~ resource "aws_lb_listener_rule" "this" {
        id           = "arn:aws:elasticloadbalancing:eu-west-1:054614622558:listener-rule/app/DEVAPPDEV-OLCS-PRI-SVCS-ALB/969f6a43be729deb/30d522f0a3bbd8cf/066e53502be5755f"
        tags         = {}
      ~ tags_all     = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (3 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # module.service.aws_lb_listener_rule.this["internal"] will be updated in-place
  ~ resource "aws_lb_listener_rule" "this" {
        id           = "arn:aws:elasticloadbalancing:eu-west-1:054614622558:listener-rule/app/DEVAPPDEV-OLCS-PRI-IUWEB-ALB/f055044d3e0b33e1/76fdae57abb438ec/8a6cff26019d04a5"
        tags         = {}
      ~ tags_all     = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (3 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # module.service.aws_lb_listener_rule.this["selfserve"] will be updated in-place
  ~ resource "aws_lb_listener_rule" "this" {
        id           = "arn:aws:elasticloadbalancing:eu-west-1:054614622558:listener-rule/app/DEVAPPDEV-OLCS-PRI-SSWEB-ALB/bda9d84e0cb62326/8469ff24b88ffe8f/4282bb4c4229a662"
        tags         = {}
      ~ tags_all     = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (3 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # module.service.aws_lb_target_group.this["api"] will be updated in-place
  ~ resource "aws_lb_target_group" "this" {
        id                                 = "arn:aws:elasticloadbalancing:eu-west-1:054614622558:targetgroup/vol-app-dev-api-tg/f9967db6732405cd"
        name                               = "vol-app-dev-api-tg"
        tags                               = {}
      ~ tags_all                           = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (17 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

  # module.service.aws_lb_target_group.this["internal"] will be updated in-place
  ~ resource "aws_lb_target_group" "this" {
        id                                 = "arn:aws:elasticloadbalancing:eu-west-1:054614622558:targetgroup/vol-app-dev-internal-tg/767847038d999a29"
        name                               = "vol-app-dev-internal-tg"
        tags                               = {}
      ~ tags_all                           = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (17 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

  # module.service.aws_lb_target_group.this["selfserve"] will be updated in-place
  ~ resource "aws_lb_target_group" "this" {
        id                                 = "arn:aws:elasticloadbalancing:eu-west-1:054614622558:targetgroup/vol-app-dev-selfserve-tg/74bc8c2683f55278"
        name                               = "vol-app-dev-selfserve-tg"
        tags                               = {}
      ~ tags_all                           = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (17 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

  # module.service.module.cloudfront.aws_cloudfront_distribution.this[0] will be updated in-place
  ~ resource "aws_cloudfront_distribution" "this" {
        id                              = "E3R9S2AKJG4ZTR"
        tags                            = {}
      ~ tags_all                        = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (21 unchanged attributes hidden)

        # (6 unchanged blocks hidden)
    }

  # module.service.module.ecs_cluster["api"].aws_cloudwatch_log_group.this[0] will be updated in-place
  ~ resource "aws_cloudwatch_log_group" "this" {
        id                = "/aws/ecs/vol-app-dev-api-cluster"
        name              = "/aws/ecs/vol-app-dev-api-cluster"
        tags              = {}
      ~ tags_all          = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (6 unchanged attributes hidden)
    }

  # module.service.module.ecs_cluster["api"].aws_ecs_cluster.this[0] will be updated in-place
  ~ resource "aws_ecs_cluster" "this" {
        id       = "arn:aws:ecs:eu-west-1:054614622558:cluster/vol-app-dev-api-cluster"
        name     = "vol-app-dev-api-cluster"
        tags     = {}
      ~ tags_all = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (1 unchanged attribute hidden)

        # (2 unchanged blocks hidden)
    }

  # module.service.module.ecs_cluster["api"].aws_iam_policy.task_exec[0] will be updated in-place
  ~ resource "aws_iam_policy" "task_exec" {
        id               = "arn:aws:iam::054614622558:policy/vol-app-dev-api-cluster-20240418150301369500000004"
        name             = "vol-app-dev-api-cluster-20240418150301369500000004"
        tags             = {}
      ~ tags_all         = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (7 unchanged attributes hidden)
    }

  # module.service.module.ecs_cluster["api"].aws_iam_role.task_exec[0] will be updated in-place
  ~ resource "aws_iam_role" "task_exec" {
        id                    = "vol-app-dev-api-cluster-20240418150301364500000002"
        name                  = "vol-app-dev-api-cluster-20240418150301364500000002"
        tags                  = {}
      ~ tags_all              = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (11 unchanged attributes hidden)
    }

  # module.service.module.ecs_cluster["internal"].aws_cloudwatch_log_group.this[0] will be updated in-place
  ~ resource "aws_cloudwatch_log_group" "this" {
        id                = "/aws/ecs/vol-app-dev-internal-cluster"
        name              = "/aws/ecs/vol-app-dev-internal-cluster"
        tags              = {}
      ~ tags_all          = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (6 unchanged attributes hidden)
    }

  # module.service.module.ecs_cluster["internal"].aws_ecs_cluster.this[0] will be updated in-place
  ~ resource "aws_ecs_cluster" "this" {
        id       = "arn:aws:ecs:eu-west-1:054614622558:cluster/vol-app-dev-internal-cluster"
        name     = "vol-app-dev-internal-cluster"
        tags     = {}
      ~ tags_all = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (1 unchanged attribute hidden)

        # (2 unchanged blocks hidden)
    }

  # module.service.module.ecs_cluster["internal"].aws_iam_policy.task_exec[0] will be updated in-place
  ~ resource "aws_iam_policy" "task_exec" {
        id               = "arn:aws:iam::054614622558:policy/vol-app-dev-internal-cluster-20240419132422656000000003"
        name             = "vol-app-dev-internal-cluster-20240419132422656000000003"
        tags             = {}
      ~ tags_all         = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (7 unchanged attributes hidden)
    }

  # module.service.module.ecs_cluster["internal"].aws_iam_role.task_exec[0] will be updated in-place
  ~ resource "aws_iam_role" "task_exec" {
        id                    = "vol-app-dev-internal-cluster-20240419132422648400000001"
        name                  = "vol-app-dev-internal-cluster-20240419132422648400000001"
        tags                  = {}
      ~ tags_all              = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (11 unchanged attributes hidden)
    }

  # module.service.module.ecs_cluster["selfserve"].aws_cloudwatch_log_group.this[0] will be updated in-place
  ~ resource "aws_cloudwatch_log_group" "this" {
        id                = "/aws/ecs/vol-app-dev-selfserve-cluster"
        name              = "/aws/ecs/vol-app-dev-selfserve-cluster"
        tags              = {}
      ~ tags_all          = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (6 unchanged attributes hidden)
    }

  # module.service.module.ecs_cluster["selfserve"].aws_ecs_cluster.this[0] will be updated in-place
  ~ resource "aws_ecs_cluster" "this" {
        id       = "arn:aws:ecs:eu-west-1:054614622558:cluster/vol-app-dev-selfserve-cluster"
        name     = "vol-app-dev-selfserve-cluster"
        tags     = {}
      ~ tags_all = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (1 unchanged attribute hidden)

        # (2 unchanged blocks hidden)
    }

  # module.service.module.ecs_cluster["selfserve"].aws_iam_policy.task_exec[0] will be updated in-place
  ~ resource "aws_iam_policy" "task_exec" {
        id               = "arn:aws:iam::054614622558:policy/vol-app-dev-selfserve-cluster-20240419132422651800000002"
        name             = "vol-app-dev-selfserve-cluster-20240419132422651800000002"
        tags             = {}
      ~ tags_all         = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (7 unchanged attributes hidden)
    }

  # module.service.module.ecs_cluster["selfserve"].aws_iam_role.task_exec[0] will be updated in-place
  ~ resource "aws_iam_role" "task_exec" {
        id                    = "vol-app-dev-selfserve-cluster-20240419132422660100000004"
        name                  = "vol-app-dev-selfserve-cluster-20240419132422660100000004"
        tags                  = {}
      ~ tags_all              = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (11 unchanged attributes hidden)
    }

  # module.service.module.ecs_service["api"].data.aws_ecs_task_definition.this[0] will be read during apply
  # (depends on a resource or a module with changes pending)
 <= data "aws_ecs_task_definition" "this" {
      + arn                  = (known after apply)
      + arn_without_revision = (known after apply)
      + execution_role_arn   = (known after apply)
      + family               = (known after apply)
      + id                   = (known after apply)
      + network_mode         = (known after apply)
      + revision             = (known after apply)
      + status               = (known after apply)
      + task_definition      = "vol-app-dev-api-service"
      + task_role_arn        = (known after apply)
    }

  # module.service.module.ecs_service["api"].aws_appautoscaling_target.this[0] will be updated in-place
  ~ resource "aws_appautoscaling_target" "this" {
        id                 = "service/vol-app-dev-api-cluster/vol-app-dev-api-service"
        tags               = {}
      ~ tags_all           = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (7 unchanged attributes hidden)
    }

  # module.service.module.ecs_service["api"].aws_ecs_service.this[0] will be updated in-place
  ~ resource "aws_ecs_service" "this" {
        id                                 = "arn:aws:ecs:eu-west-1:054614622558:service/vol-app-dev-api-cluster/vol-app-dev-api-service"
        name                               = "vol-app-dev-api-service"
        tags                               = {}
      ~ tags_all                           = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
      ~ task_definition                    = "vol-app-dev-api-service:23" -> (known after apply)
        # (15 unchanged attributes hidden)

        # (5 unchanged blocks hidden)
    }

  # module.service.module.ecs_service["api"].aws_ecs_task_definition.this[0] will be updated in-place
  ~ resource "aws_ecs_task_definition" "this" {
        id                       = "vol-app-dev-api-service"
        tags                     = {}
      ~ tags_all                 = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (15 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # module.service.module.ecs_service["api"].aws_iam_policy.task_exec[0] will be updated in-place
  ~ resource "aws_iam_policy" "task_exec" {
        id               = "arn:aws:iam::054614622558:policy/vol-app-dev-api-service-20240418150301361200000001"
        name             = "vol-app-dev-api-service-20240418150301361200000001"
        tags             = {}
      ~ tags_all         = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (7 unchanged attributes hidden)
    }

  # module.service.module.ecs_service["api"].aws_iam_role.task_exec[0] will be updated in-place
  ~ resource "aws_iam_role" "task_exec" {
        id                    = "vol-app-dev-api-service-20240418150301367500000003"
        name                  = "vol-app-dev-api-service-20240418150301367500000003"
        tags                  = {}
      ~ tags_all              = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (11 unchanged attributes hidden)
    }

  # module.service.module.ecs_service["api"].aws_iam_role.tasks[0] will be updated in-place
  ~ resource "aws_iam_role" "tasks" {
        id                    = "vol-app-dev-api-service-20240418150301374200000005"
        name                  = "vol-app-dev-api-service-20240418150301374200000005"
        tags                  = {}
      ~ tags_all              = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (11 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # module.service.module.ecs_service["internal"].data.aws_ecs_task_definition.this[0] will be read during apply
  # (depends on a resource or a module with changes pending)
 <= data "aws_ecs_task_definition" "this" {
      + arn                  = (known after apply)
      + arn_without_revision = (known after apply)
      + execution_role_arn   = (known after apply)
      + family               = (known after apply)
      + id                   = (known after apply)
      + network_mode         = (known after apply)
      + revision             = (known after apply)
      + status               = (known after apply)
      + task_definition      = "vol-app-dev-internal-service"
      + task_role_arn        = (known after apply)
    }

  # module.service.module.ecs_service["internal"].aws_appautoscaling_target.this[0] will be updated in-place
  ~ resource "aws_appautoscaling_target" "this" {
        id                 = "service/vol-app-dev-internal-cluster/vol-app-dev-internal-service"
        tags               = {}
      ~ tags_all           = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (7 unchanged attributes hidden)
    }

  # module.service.module.ecs_service["internal"].aws_ecs_service.this[0] will be updated in-place
  ~ resource "aws_ecs_service" "this" {
        id                                 = "arn:aws:ecs:eu-west-1:054614622558:service/vol-app-dev-internal-cluster/vol-app-dev-internal-service"
        name                               = "vol-app-dev-internal-service"
        tags                               = {}
      ~ tags_all                           = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
      ~ task_definition                    = "vol-app-dev-internal-service:17" -> (known after apply)
        # (15 unchanged attributes hidden)

        # (5 unchanged blocks hidden)
    }

  # module.service.module.ecs_service["internal"].aws_ecs_task_definition.this[0] will be updated in-place
  ~ resource "aws_ecs_task_definition" "this" {
        id                       = "vol-app-dev-internal-service"
        tags                     = {}
      ~ tags_all                 = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (15 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # module.service.module.ecs_service["internal"].aws_iam_policy.task_exec[0] will be updated in-place
  ~ resource "aws_iam_policy" "task_exec" {
        id               = "arn:aws:iam::054614622558:policy/vol-app-dev-internal-service-2024041913242289700000000a"
        name             = "vol-app-dev-internal-service-2024041913242289700000000a"
        tags             = {}
      ~ tags_all         = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (7 unchanged attributes hidden)
    }

  # module.service.module.ecs_service["internal"].aws_iam_role.task_exec[0] will be updated in-place
  ~ resource "aws_iam_role" "task_exec" {
        id                    = "vol-app-dev-internal-service-20240419132422673200000006"
        name                  = "vol-app-dev-internal-service-20240419132422673200000006"
        tags                  = {}
      ~ tags_all              = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (11 unchanged attributes hidden)
    }

  # module.service.module.ecs_service["internal"].aws_iam_role.tasks[0] will be updated in-place
  ~ resource "aws_iam_role" "tasks" {
        id                    = "vol-app-dev-internal-service-20240419132422667300000005"
        name                  = "vol-app-dev-internal-service-20240419132422667300000005"
        tags                  = {}
      ~ tags_all              = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (11 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # module.service.module.ecs_service["selfserve"].data.aws_ecs_task_definition.this[0] will be read during apply
  # (depends on a resource or a module with changes pending)
 <= data "aws_ecs_task_definition" "this" {
      + arn                  = (known after apply)
      + arn_without_revision = (known after apply)
      + execution_role_arn   = (known after apply)
      + family               = (known after apply)
      + id                   = (known after apply)
      + network_mode         = (known after apply)
      + revision             = (known after apply)
      + status               = (known after apply)
      + task_definition      = "vol-app-dev-selfserve-service"
      + task_role_arn        = (known after apply)
    }

  # module.service.module.ecs_service["selfserve"].aws_appautoscaling_target.this[0] will be updated in-place
  ~ resource "aws_appautoscaling_target" "this" {
        id                 = "service/vol-app-dev-selfserve-cluster/vol-app-dev-selfserve-service"
        tags               = {}
      ~ tags_all           = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (7 unchanged attributes hidden)
    }

  # module.service.module.ecs_service["selfserve"].aws_ecs_service.this[0] will be updated in-place
  ~ resource "aws_ecs_service" "this" {
        id                                 = "arn:aws:ecs:eu-west-1:054614622558:service/vol-app-dev-selfserve-cluster/vol-app-dev-selfserve-service"
        name                               = "vol-app-dev-selfserve-service"
        tags                               = {}
      ~ tags_all                           = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
      ~ task_definition                    = "vol-app-dev-selfserve-service:18" -> (known after apply)
        # (15 unchanged attributes hidden)

        # (5 unchanged blocks hidden)
    }

  # module.service.module.ecs_service["selfserve"].aws_ecs_task_definition.this[0] will be updated in-place
  ~ resource "aws_ecs_task_definition" "this" {
        id                       = "vol-app-dev-selfserve-service"
        tags                     = {}
      ~ tags_all                 = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (15 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # module.service.module.ecs_service["selfserve"].aws_iam_policy.task_exec[0] will be updated in-place
  ~ resource "aws_iam_policy" "task_exec" {
        id               = "arn:aws:iam::054614622558:policy/vol-app-dev-selfserve-service-20240419132422877300000009"
        name             = "vol-app-dev-selfserve-service-20240419132422877300000009"
        tags             = {}
      ~ tags_all         = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (7 unchanged attributes hidden)
    }

  # module.service.module.ecs_service["selfserve"].aws_iam_role.task_exec[0] will be updated in-place
  ~ resource "aws_iam_role" "task_exec" {
        id                    = "vol-app-dev-selfserve-service-20240419132422688000000007"
        name                  = "vol-app-dev-selfserve-service-20240419132422688000000007"
        tags                  = {}
      ~ tags_all              = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (11 unchanged attributes hidden)
    }

  # module.service.module.ecs_service["selfserve"].aws_iam_role.tasks[0] will be updated in-place
  ~ resource "aws_iam_role" "tasks" {
        id                    = "vol-app-dev-selfserve-service-20240419132422871500000008"
        name                  = "vol-app-dev-selfserve-service-20240419132422871500000008"
        tags                  = {}
      ~ tags_all              = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (11 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # module.service.module.log_bucket.aws_s3_bucket.this[0] will be updated in-place
  ~ resource "aws_s3_bucket" "this" {
        id                          = "vol-app-dev-assets-logs"
        tags                        = {}
      ~ tags_all                    = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (12 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

  # module.service.module.ecs_service["api"].module.container_definition["api"].aws_cloudwatch_log_group.this[0] will be updated in-place
  ~ resource "aws_cloudwatch_log_group" "this" {
        id                = "/aws/ecs/vol-app-dev-api-service/api"
        name              = "/aws/ecs/vol-app-dev-api-service/api"
        tags              = {}
      ~ tags_all          = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (6 unchanged attributes hidden)
    }

  # module.service.module.ecs_service["internal"].module.container_definition["internal"].aws_cloudwatch_log_group.this[0] will be updated in-place
  ~ resource "aws_cloudwatch_log_group" "this" {
        id                = "/aws/ecs/vol-app-dev-internal-service/internal"
        name              = "/aws/ecs/vol-app-dev-internal-service/internal"
        tags              = {}
      ~ tags_all          = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (6 unchanged attributes hidden)
    }

  # module.service.module.ecs_service["selfserve"].module.container_definition["selfserve"].aws_cloudwatch_log_group.this[0] will be updated in-place
  ~ resource "aws_cloudwatch_log_group" "this" {
        id                = "/aws/ecs/vol-app-dev-selfserve-service/selfserve"
        name              = "/aws/ecs/vol-app-dev-selfserve-service/selfserve"
        tags              = {}
      ~ tags_all          = {
          + "Environment" = "dev"
          + "Repository"  = "https://github.com/dvsa/vol-app"
        }
        # (6 unchanged attributes hidden)
    }

Plan: 0 to add, 41 to change, 0 to destroy.

Copy link
Contributor

Terraform plan for account: nonprod

Commit: ac5cad8

Plan summary

0 to add, 16 to change, 0 to destroy

📖 Reads

module.account-remote-state.module.s3[0].data.aws_iam_policy_document.combined[0]
module.account-remote-state.module.s3[0].data.aws_iam_policy_document.deny_insecure_transport[0]

🔄 Updates

module.account.aws_signer_signing_profile.this
module.account.module.assets[0].aws_s3_bucket.this[0]
module.account.module.ecr["api"].aws_ecr_repository.this[0]
module.account.module.ecr["cli"].aws_ecr_repository.this[0]
module.account.module.ecr["internal"].aws_ecr_repository.this[0]
module.account.module.ecr["selfserve"].aws_ecr_repository.this[0]
module.account-remote-state.module.dynamodb_state_lock_policy[0].aws_iam_policy.policy[0]
module.account-remote-state.module.dynamodb_table.aws_dynamodb_table.this[0]
module.account-remote-state.module.s3[0].aws_s3_bucket.this[0]
module.account-remote-state.module.s3[0].aws_s3_bucket_policy.this[0]
module.account-remote-state.module.s3_state_policy[0].aws_iam_policy.policy[0]
module.environment-remote-state["dev"].module.dynamodb_state_lock_policy[0].aws_iam_policy.policy[0]
module.environment-remote-state["dev"].module.dynamodb_table.aws_dynamodb_table.this[0]
module.account.module.github[0].module.iam_github_oidc_provider[0].aws_iam_openid_connect_provider.this[0]
module.account.module.github[0].module.iam_github_oidc_readonly_role[0].aws_iam_role.this[0]
module.account.module.github[0].module.iam_github_oidc_role[0].aws_iam_role.this[0]

Show full plan
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place
 <= read (data resources)

Terraform will perform the following actions:

  # module.account.aws_signer_signing_profile.this will be updated in-place
  ~ resource "aws_signer_signing_profile" "this" {
        id                    = "vol_app_20240313124948142600000001"
        name                  = "vol_app_20240313124948142600000001"
        tags                  = {}
      ~ tags_all              = {
          + "Repository" = "https://github.com/dvsa/vol-app"
        }
        # (8 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # module.account.module.assets[0].aws_s3_bucket.this[0] will be updated in-place
  ~ resource "aws_s3_bucket" "this" {
        id                          = "vol-app-assets"
        tags                        = {}
      ~ tags_all                    = {
          + "Repository" = "https://github.com/dvsa/vol-app"
        }
        # (12 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # module.account.module.ecr["api"].aws_ecr_repository.this[0] will be updated in-place
  ~ resource "aws_ecr_repository" "this" {
        id                   = "vol-app/api"
        name                 = "vol-app/api"
        tags                 = {}
      ~ tags_all             = {
          + "Repository" = "https://github.com/dvsa/vol-app"
        }
        # (4 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # module.account.module.ecr["cli"].aws_ecr_repository.this[0] will be updated in-place
  ~ resource "aws_ecr_repository" "this" {
        id                   = "vol-app/cli"
        name                 = "vol-app/cli"
        tags                 = {}
      ~ tags_all             = {
          + "Repository" = "https://github.com/dvsa/vol-app"
        }
        # (4 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # module.account.module.ecr["internal"].aws_ecr_repository.this[0] will be updated in-place
  ~ resource "aws_ecr_repository" "this" {
        id                   = "vol-app/internal"
        name                 = "vol-app/internal"
        tags                 = {}
      ~ tags_all             = {
          + "Repository" = "https://github.com/dvsa/vol-app"
        }
        # (4 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # module.account.module.ecr["selfserve"].aws_ecr_repository.this[0] will be updated in-place
  ~ resource "aws_ecr_repository" "this" {
        id                   = "vol-app/selfserve"
        name                 = "vol-app/selfserve"
        tags                 = {}
      ~ tags_all             = {
          + "Repository" = "https://github.com/dvsa/vol-app"
        }
        # (4 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # module.account-remote-state.module.dynamodb_state_lock_policy[0].aws_iam_policy.policy[0] will be updated in-place
  ~ resource "aws_iam_policy" "policy" {
        id               = "arn:aws:iam::054614622558:policy/vol-app-054614622558-terraform-state-lock-policy"
        name             = "vol-app-054614622558-terraform-state-lock-policy"
        tags             = {}
      ~ tags_all         = {
          + "Repository" = "https://github.com/dvsa/vol-app"
        }
        # (7 unchanged attributes hidden)
    }

  # module.account-remote-state.module.dynamodb_table.aws_dynamodb_table.this[0] will be updated in-place
  ~ resource "aws_dynamodb_table" "this" {
        id                          = "vol-app-054614622558-terraform-state-lock"
        name                        = "vol-app-054614622558-terraform-state-lock"
        tags                        = {
            "Name" = "vol-app-054614622558-terraform-state-lock"
        }
      ~ tags_all                    = {
          + "Repository" = "https://github.com/dvsa/vol-app"
            # (1 unchanged element hidden)
        }
        # (11 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

  # module.account-remote-state.module.s3[0].data.aws_iam_policy_document.combined[0] will be read during apply
  # (config refers to values not yet known)
 <= data "aws_iam_policy_document" "combined" {
      + id                      = (known after apply)
      + json                    = (known after apply)
      + minified_json           = (known after apply)
      + source_policy_documents = (known after apply)
    }

  # module.account-remote-state.module.s3[0].data.aws_iam_policy_document.deny_insecure_transport[0] will be read during apply
  # (depends on a resource or a module with changes pending)
 <= data "aws_iam_policy_document" "deny_insecure_transport" {
      + id            = (known after apply)
      + json          = (known after apply)
      + minified_json = (known after apply)

      + statement {
          + actions   = [
              + "s3:*",
            ]
          + effect    = "Deny"
          + resources = [
              + "arn:aws:s3:::vol-app-054614622558-terraform-state",
              + "arn:aws:s3:::vol-app-054614622558-terraform-state/*",
            ]
          + sid       = "denyInsecureTransport"

          + condition {
              + test     = "Bool"
              + values   = [
                  + "false",
                ]
              + variable = "aws:SecureTransport"
            }

          + principals {
              + identifiers = [
                  + "*",
                ]
              + type        = "*"
            }
        }
    }

  # module.account-remote-state.module.s3[0].aws_s3_bucket.this[0] will be updated in-place
  ~ resource "aws_s3_bucket" "this" {
      + force_destroy               = false
        id                          = "vol-app-054614622558-terraform-state"
        tags                        = {}
      ~ tags_all                    = {
          + "Repository" = "https://github.com/dvsa/vol-app"
        }
        # (11 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

  # module.account-remote-state.module.s3[0].aws_s3_bucket_policy.this[0] will be updated in-place
  ~ resource "aws_s3_bucket_policy" "this" {
        id     = "vol-app-054614622558-terraform-state"
      ~ policy = jsonencode(
            {
              - Statement = [
                  - {
                      - Action    = "s3:*"
                      - Condition = {
                          - Bool = {
                              - "aws:SecureTransport" = "false"
                            }
                        }
                      - Effect    = "Deny"
                      - Principal = "*"
                      - Resource  = [
                          - "arn:aws:s3:::vol-app-054614622558-terraform-state/*",
                          - "arn:aws:s3:::vol-app-054614622558-terraform-state",
                        ]
                      - Sid       = "denyInsecureTransport"
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> (known after apply)
        # (1 unchanged attribute hidden)
    }

  # module.account-remote-state.module.s3_state_policy[0].aws_iam_policy.policy[0] will be updated in-place
  ~ resource "aws_iam_policy" "policy" {
        id               = "arn:aws:iam::054614622558:policy/vol-app-054614622558-terraform-state-policy"
        name             = "vol-app-054614622558-terraform-state-policy"
        tags             = {}
      ~ tags_all         = {
          + "Repository" = "https://github.com/dvsa/vol-app"
        }
        # (7 unchanged attributes hidden)
    }

  # module.environment-remote-state["dev"].module.dynamodb_state_lock_policy[0].aws_iam_policy.policy[0] will be updated in-place
  ~ resource "aws_iam_policy" "policy" {
        id               = "arn:aws:iam::054614622558:policy/vol-app-054614622558-dev-terraform-state-lock-policy"
        name             = "vol-app-054614622558-dev-terraform-state-lock-policy"
        tags             = {}
      ~ tags_all         = {
          + "Repository" = "https://github.com/dvsa/vol-app"
        }
        # (7 unchanged attributes hidden)
    }

  # module.environment-remote-state["dev"].module.dynamodb_table.aws_dynamodb_table.this[0] will be updated in-place
  ~ resource "aws_dynamodb_table" "this" {
        id                          = "vol-app-054614622558-dev-terraform-state-lock"
        name                        = "vol-app-054614622558-dev-terraform-state-lock"
        tags                        = {
            "Name" = "vol-app-054614622558-dev-terraform-state-lock"
        }
      ~ tags_all                    = {
          + "Repository" = "https://github.com/dvsa/vol-app"
            # (1 unchanged element hidden)
        }
        # (11 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

  # module.account.module.github[0].module.iam_github_oidc_provider[0].aws_iam_openid_connect_provider.this[0] will be updated in-place
  ~ resource "aws_iam_openid_connect_provider" "this" {
        id              = "arn:aws:iam::054614622558:oidc-provider/token.actions.githubusercontent.com"
        tags            = {}
      ~ tags_all        = {
          + "Repository" = "https://github.com/dvsa/vol-app"
        }
        # (4 unchanged attributes hidden)
    }

  # module.account.module.github[0].module.iam_github_oidc_readonly_role[0].aws_iam_role.this[0] will be updated in-place
  ~ resource "aws_iam_role" "this" {
        id                    = "vol-app-github-actions-readonly-role"
        name                  = "vol-app-github-actions-readonly-role"
        tags                  = {}
      ~ tags_all              = {
          + "Repository" = "https://github.com/dvsa/vol-app"
        }
        # (11 unchanged attributes hidden)
    }

  # module.account.module.github[0].module.iam_github_oidc_role[0].aws_iam_role.this[0] will be updated in-place
  ~ resource "aws_iam_role" "this" {
        id                    = "vol-app-github-actions-role"
        name                  = "vol-app-github-actions-role"
        tags                  = {}
      ~ tags_all              = {
          + "Repository" = "https://github.com/dvsa/vol-app"
        }
        # (11 unchanged attributes hidden)
    }

Plan: 0 to add, 16 to change, 0 to destroy.

@JoshuaLicense JoshuaLicense merged commit 72591c9 into main Jun 19, 2024
16 checks passed
@JoshuaLicense JoshuaLicense deleted the add-default-tags-1 branch June 19, 2024 14:52
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.

1 participant