Skip to content

Conversation

@here
Copy link
Member

@here here commented Aug 21, 2025

Fixes #66

What changes did you make?

  • Add job to terraform-plan.yaml automate terraform-docs
  • Configure terraform-docs to search for all *.tf files in the terraform directory and update README.md

Why did you make the changes (we will use this info to test)?

@github-actions
Copy link
Contributor

github-actions bot commented Aug 25, 2025

Terraform plan in terraform
With backend config files: terraform/prod.backend.tfvars

Plan: 15 to add, 3 to change, 15 to destroy.
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
!~  update in-place
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # module.civic-tech-index.module.backend_prod_service.aws_ecs_service.fargate[0] must be replaced
-/+ resource "aws_ecs_service" "fargate" {
!~      arn                                = "arn:aws:ecs:us-west-2:035866691871:service/incubator-prod/cti-backend-prod" -> (known after apply)
!~      availability_zone_rebalancing      = "ENABLED" -> (known after apply)
-       health_check_grace_period_seconds  = 0 -> null
!~      iam_role                           = "/aws-service-role/ecs.amazonaws.com/AWSServiceRoleForECS" -> (known after apply)
!~      id                                 = "**************************************************************************" -> (known after apply)
!~      launch_type                        = "EC2" -> "FARGATE" # forces replacement
        name                               = "cti-backend-prod"
+       platform_version                   = (known after apply)
-       propagate_tags                     = "NONE" -> null
-       tags                               = {} -> null
!~      tags_all                           = {} -> (known after apply)
!~      task_definition                    = "arn:aws:ecs:us-west-2:035866691871:task-definition/cti-backend-prod:4" -> (known after apply)
!~      triggers                           = {} -> (known after apply)
#        (9 unchanged attributes hidden)

-       deployment_circuit_breaker {
-           enable   = false -> null
-           rollback = false -> null
        }

!~      deployment_configuration (known after apply)
-       deployment_configuration {
-           bake_time_in_minutes = "0" -> null
-           strategy             = "ROLLING" -> null
        }

-       deployment_controller {
-           type = "ECS" -> null
        }

#        (2 unchanged blocks hidden)
    }

  # module.civic-tech-index.module.backend_prod_service.aws_ecs_task_definition.task must be replaced
-/+ resource "aws_ecs_task_definition" "task" {
!~      arn                      = "arn:aws:ecs:us-west-2:035866691871:task-definition/cti-backend-prod:4" -> (known after apply)
!~      arn_without_revision     = "arn:aws:ecs:us-west-2:035866691871:task-definition/cti-backend-prod" -> (known after apply)
!~      container_definitions    = jsonencode(
!~          [
!~              {
!~                  cpu                    = 256 -> 512
-                   mountPoints            = []
                    name                   = "cti-backend-prod"
!~                  portMappings           = [
!~                      {
-                           protocol      = "tcp"
#                            (2 unchanged attributes hidden)
                        },
                    ]
-                   systemControls         = []
-                   volumesFrom            = []
#                    (7 unchanged attributes hidden)
                },
            ] # forces replacement
        )
!~      cpu                      = "256" -> "512" # forces replacement
!~      enable_fault_injection   = false -> (known after apply)
!~      id                       = "****************" -> (known after apply)
!~      requires_compatibilities = [ # forces replacement
-           "EC2",
+           "FARGATE",
        ]
!~      revision                 = 4 -> (known after apply)
-       tags                     = {} -> null
!~      tags_all                 = {} -> (known after apply)
#        (10 unchanged attributes hidden)
    }

  # module.civic-tech-index.module.backend_stage_service.aws_ecs_service.fargate[0] must be replaced
-/+ resource "aws_ecs_service" "fargate" {
!~      arn                                = "arn:aws:ecs:us-west-2:035866691871:service/incubator-prod/cti-backend-stage" -> (known after apply)
!~      availability_zone_rebalancing      = "ENABLED" -> (known after apply)
-       health_check_grace_period_seconds  = 0 -> null
!~      iam_role                           = "/aws-service-role/ecs.amazonaws.com/AWSServiceRoleForECS" -> (known after apply)
!~      id                                 = "***************************************************************************" -> (known after apply)
!~      launch_type                        = "EC2" -> "FARGATE" # forces replacement
        name                               = "cti-backend-stage"
+       platform_version                   = (known after apply)
-       propagate_tags                     = "NONE" -> null
-       tags                               = {} -> null
!~      tags_all                           = {} -> (known after apply)
!~      task_definition                    = "arn:aws:ecs:us-west-2:035866691871:task-definition/cti-backend-stage:4" -> (known after apply)
!~      triggers                           = {} -> (known after apply)
#        (9 unchanged attributes hidden)

-       deployment_circuit_breaker {
-           enable   = false -> null
-           rollback = false -> null
        }

!~      deployment_configuration (known after apply)
-       deployment_configuration {
-           bake_time_in_minutes = "0" -> null
-           strategy             = "ROLLING" -> null
        }

-       deployment_controller {
-           type = "ECS" -> null
        }

#        (2 unchanged blocks hidden)
    }

  # module.civic-tech-index.module.backend_stage_service.aws_ecs_task_definition.task must be replaced
-/+ resource "aws_ecs_task_definition" "task" {
!~      arn                      = "arn:aws:ecs:us-west-2:035866691871:task-definition/cti-backend-stage:4" -> (known after apply)
!~      arn_without_revision     = "arn:aws:ecs:us-west-2:035866691871:task-definition/cti-backend-stage" -> (known after apply)
!~      container_definitions    = jsonencode(
!~          [
!~              {
!~                  cpu                    = 256 -> 512
-                   mountPoints            = []
                    name                   = "cti-backend-stage"
!~                  portMappings           = [
!~                      {
-                           protocol      = "tcp"
#                            (2 unchanged attributes hidden)
                        },
                    ]
-                   systemControls         = []
-                   volumesFrom            = []
#                    (7 unchanged attributes hidden)
                },
            ] # forces replacement
        )
!~      cpu                      = "256" -> "512" # forces replacement
!~      enable_fault_injection   = false -> (known after apply)
!~      id                       = "*****************" -> (known after apply)
!~      requires_compatibilities = [ # forces replacement
-           "EC2",
+           "FARGATE",
        ]
!~      revision                 = 4 -> (known after apply)
-       tags                     = {} -> null
!~      tags_all                 = {} -> (known after apply)
#        (10 unchanged attributes hidden)
    }

  # module.civic-tech-jobs.module.civic_tech_jobs_fullstack_stage_service.aws_ecs_service.fargate[0] will be updated in-place
!~  resource "aws_ecs_service" "fargate" {
        id                                 = "arn:aws:ecs:us-west-2:035866691871:service/incubator-prod/civic-tech-jobs-fs-stage"
        name                               = "civic-tech-jobs-fs-stage"
        tags                               = {}
!~      task_definition                    = "arn:aws:ecs:us-west-2:035866691871:task-definition/civic-tech-jobs-fs-stage:5" -> (known after apply)
#        (18 unchanged attributes hidden)

#        (5 unchanged blocks hidden)
    }

  # module.civic-tech-jobs.module.civic_tech_jobs_fullstack_stage_service.aws_ecs_task_definition.task must be replaced
-/+ resource "aws_ecs_task_definition" "task" {
!~      arn                      = "arn:aws:ecs:us-west-2:035866691871:task-definition/civic-tech-jobs-fs-stage:5" -> (known after apply)
!~      arn_without_revision     = "arn:aws:ecs:us-west-2:035866691871:task-definition/civic-tech-jobs-fs-stage" -> (known after apply)
!~      container_definitions    = (sensitive value) # forces replacement
!~      cpu                      = "256" -> "512" # forces replacement
!~      enable_fault_injection   = false -> (known after apply)
!~      id                       = "************************" -> (known after apply)
!~      revision                 = 5 -> (known after apply)
-       tags                     = {} -> null
!~      tags_all                 = {} -> (known after apply)
#        (11 unchanged attributes hidden)
    }

  # module.home-unite-us.module.qa_service.aws_ecs_service.fargate[0] will be updated in-place
!~  resource "aws_ecs_service" "fargate" {
        id                                 = "arn:aws:ecs:us-west-2:035866691871:service/incubator-prod/home-unite-us-fullstack-qa"
        name                               = "home-unite-us-fullstack-qa"
        tags                               = {}
!~      task_definition                    = "arn:aws:ecs:us-west-2:035866691871:task-definition/home-unite-us-fullstack-qa:6" -> (known after apply)
#        (18 unchanged attributes hidden)

#        (5 unchanged blocks hidden)
    }

  # module.home-unite-us.module.qa_service.aws_ecs_task_definition.task must be replaced
-/+ resource "aws_ecs_task_definition" "task" {
!~      arn                      = "arn:aws:ecs:us-west-2:035866691871:task-definition/home-unite-us-fullstack-qa:6" -> (known after apply)
!~      arn_without_revision     = "arn:aws:ecs:us-west-2:035866691871:task-definition/home-unite-us-fullstack-qa" -> (known after apply)
!~      container_definitions    = (sensitive value) # forces replacement
!~      cpu                      = "256" -> "512" # forces replacement
!~      enable_fault_injection   = false -> (known after apply)
!~      id                       = "**************************" -> (known after apply)
!~      revision                 = 6 -> (known after apply)
-       tags                     = {} -> null
!~      tags_all                 = {} -> (known after apply)
#        (11 unchanged attributes hidden)
    }

  # module.people-depot.module.backend_dev_service.aws_ecs_service.fargate[0] will be updated in-place
!~  resource "aws_ecs_service" "fargate" {
        id                                 = "arn:aws:ecs:us-west-2:035866691871:service/incubator-prod/people-depot-backend-dev"
        name                               = "people-depot-backend-dev"
        tags                               = {}
!~      task_definition                    = "arn:aws:ecs:us-west-2:035866691871:task-definition/people-depot-backend-dev:20" -> (known after apply)
#        (18 unchanged attributes hidden)

#        (5 unchanged blocks hidden)
    }

  # module.people-depot.module.backend_dev_service.aws_ecs_task_definition.task must be replaced
-/+ resource "aws_ecs_task_definition" "task" {
!~      arn                      = "arn:aws:ecs:us-west-2:035866691871:task-definition/people-depot-backend-dev:20" -> (known after apply)
!~      arn_without_revision     = "arn:aws:ecs:us-west-2:035866691871:task-definition/people-depot-backend-dev" -> (known after apply)
!~      container_definitions    = (sensitive value) # forces replacement
!~      cpu                      = "256" -> "512" # forces replacement
!~      enable_fault_injection   = false -> (known after apply)
!~      id                       = "************************" -> (known after apply)
!~      revision                 = 20 -> (known after apply)
-       tags                     = {} -> null
!~      tags_all                 = {} -> (known after apply)
#        (11 unchanged attributes hidden)
    }

  # module.vrms.module.backend_dev_service.aws_ecs_service.fargate[0] must be replaced
-/+ resource "aws_ecs_service" "fargate" {
!~      arn                                = "arn:aws:ecs:us-west-2:035866691871:service/incubator-prod/vrms-backend-dev" -> (known after apply)
!~      availability_zone_rebalancing      = "ENABLED" -> (known after apply)
-       health_check_grace_period_seconds  = 0 -> null
!~      iam_role                           = "/aws-service-role/ecs.amazonaws.com/AWSServiceRoleForECS" -> (known after apply)
!~      id                                 = "**************************************************************************" -> (known after apply)
!~      launch_type                        = "EC2" -> "FARGATE" # forces replacement
        name                               = "vrms-backend-dev"
+       platform_version                   = (known after apply)
-       propagate_tags                     = "NONE" -> null
-       tags                               = {} -> null
!~      tags_all                           = {} -> (known after apply)
!~      task_definition                    = "arn:aws:ecs:us-west-2:035866691871:task-definition/vrms-backend-dev:53" -> (known after apply)
!~      triggers                           = {} -> (known after apply)
#        (9 unchanged attributes hidden)

-       deployment_circuit_breaker {
-           enable   = false -> null
-           rollback = false -> null
        }

!~      deployment_configuration (known after apply)
-       deployment_configuration {
-           bake_time_in_minutes = "0" -> null
-           strategy             = "ROLLING" -> null
        }

-       deployment_controller {
-           type = "ECS" -> null
        }

#        (2 unchanged blocks hidden)
    }

  # module.vrms.module.backend_dev_service.aws_ecs_task_definition.task must be replaced
-/+ resource "aws_ecs_task_definition" "task" {
!~      arn                      = "arn:aws:ecs:us-west-2:035866691871:task-definition/vrms-backend-dev:53" -> (known after apply)
!~      arn_without_revision     = "arn:aws:ecs:us-west-2:035866691871:task-definition/vrms-backend-dev" -> (known after apply)
!~      container_definitions    = jsonencode(
!~          [
!~              {
!~                  cpu                    = 256 -> 512
-                   mountPoints            = []
                    name                   = "vrms-backend-dev"
!~                  portMappings           = [
!~                      {
-                           protocol      = "tcp"
#                            (2 unchanged attributes hidden)
                        },
                    ]
-                   systemControls         = []
-                   volumesFrom            = []
#                    (7 unchanged attributes hidden)
                },
            ] # forces replacement
        )
!~      cpu                      = "256" -> "512" # forces replacement
!~      enable_fault_injection   = false -> (known after apply)
!~      id                       = "****************" -> (known after apply)
!~      requires_compatibilities = [ # forces replacement
-           "EC2",
+           "FARGATE",
        ]
!~      revision                 = 53 -> (known after apply)
-       tags                     = {} -> null
!~      tags_all                 = {} -> (known after apply)
#        (10 unchanged attributes hidden)
    }

  # module.vrms.module.backend_prod_service.aws_ecs_service.fargate[0] must be replaced
-/+ resource "aws_ecs_service" "fargate" {
!~      arn                                = "arn:aws:ecs:us-west-2:035866691871:service/incubator-prod/vrms-backend-prod" -> (known after apply)
!~      availability_zone_rebalancing      = "ENABLED" -> (known after apply)
-       health_check_grace_period_seconds  = 0 -> null
!~      iam_role                           = "/aws-service-role/ecs.amazonaws.com/AWSServiceRoleForECS" -> (known after apply)
!~      id                                 = "***************************************************************************" -> (known after apply)
!~      launch_type                        = "EC2" -> "FARGATE" # forces replacement
        name                               = "vrms-backend-prod"
+       platform_version                   = (known after apply)
-       propagate_tags                     = "NONE" -> null
-       tags                               = {} -> null
!~      tags_all                           = {} -> (known after apply)
!~      task_definition                    = "arn:aws:ecs:us-west-2:035866691871:task-definition/vrms-backend-prod:15" -> (known after apply)
!~      triggers                           = {} -> (known after apply)
#        (9 unchanged attributes hidden)

-       deployment_circuit_breaker {
-           enable   = false -> null
-           rollback = false -> null
        }

!~      deployment_configuration (known after apply)
-       deployment_configuration {
-           bake_time_in_minutes = "0" -> null
-           strategy             = "ROLLING" -> null
        }

-       deployment_controller {
-           type = "ECS" -> null
        }

#        (2 unchanged blocks hidden)
    }

  # module.vrms.module.backend_prod_service.aws_ecs_task_definition.task must be replaced
-/+ resource "aws_ecs_task_definition" "task" {
!~      arn                      = "arn:aws:ecs:us-west-2:035866691871:task-definition/vrms-backend-prod:15" -> (known after apply)
!~      arn_without_revision     = "arn:aws:ecs:us-west-2:035866691871:task-definition/vrms-backend-prod" -> (known after apply)
!~      container_definitions    = jsonencode(
!~          [
!~              {
!~                  cpu                    = 256 -> 512
-                   mountPoints            = []
                    name                   = "vrms-backend-prod"
!~                  portMappings           = [
!~                      {
-                           protocol      = "tcp"
#                            (2 unchanged attributes hidden)
                        },
                    ]
-                   systemControls         = []
-                   volumesFrom            = []
#                    (7 unchanged attributes hidden)
                },
            ] # forces replacement
        )
!~      cpu                      = "256" -> "512" # forces replacement
!~      enable_fault_injection   = false -> (known after apply)
!~      id                       = "*****************" -> (known after apply)
!~      requires_compatibilities = [ # forces replacement
-           "EC2",
+           "FARGATE",
        ]
!~      revision                 = 15 -> (known after apply)
-       tags                     = {} -> null
!~      tags_all                 = {} -> (known after apply)
#        (10 unchanged attributes hidden)
    }

  # module.vrms.module.frontend_dev_service.aws_ecs_service.fargate[0] must be replaced
-/+ resource "aws_ecs_service" "fargate" {
!~      arn                                = "arn:aws:ecs:us-west-2:035866691871:service/incubator-prod/vrms-frontend-dev" -> (known after apply)
!~      availability_zone_rebalancing      = "ENABLED" -> (known after apply)
-       health_check_grace_period_seconds  = 0 -> null
!~      iam_role                           = "/aws-service-role/ecs.amazonaws.com/AWSServiceRoleForECS" -> (known after apply)
!~      id                                 = "***************************************************************************" -> (known after apply)
!~      launch_type                        = "EC2" -> "FARGATE" # forces replacement
        name                               = "vrms-frontend-dev"
+       platform_version                   = (known after apply)
-       propagate_tags                     = "NONE" -> null
-       tags                               = {} -> null
!~      tags_all                           = {} -> (known after apply)
!~      task_definition                    = "arn:aws:ecs:us-west-2:035866691871:task-definition/vrms-frontend-dev:4" -> (known after apply)
!~      triggers                           = {} -> (known after apply)
#        (9 unchanged attributes hidden)

-       deployment_circuit_breaker {
-           enable   = false -> null
-           rollback = false -> null
        }

!~      deployment_configuration (known after apply)
-       deployment_configuration {
-           bake_time_in_minutes = "0" -> null
-           strategy             = "ROLLING" -> null
        }

-       deployment_controller {
-           type = "ECS" -> null
        }

#        (2 unchanged blocks hidden)
    }

  # module.vrms.module.frontend_dev_service.aws_ecs_task_definition.task must be replaced
-/+ resource "aws_ecs_task_definition" "task" {
!~      arn                      = "arn:aws:ecs:us-west-2:035866691871:task-definition/vrms-frontend-dev:4" -> (known after apply)
!~      arn_without_revision     = "arn:aws:ecs:us-west-2:035866691871:task-definition/vrms-frontend-dev" -> (known after apply)
!~      container_definitions    = jsonencode(
!~          [
!~              {
!~                  cpu                    = 256 -> 512
-                   mountPoints            = []
                    name                   = "vrms-frontend-dev"
!~                  portMappings           = [
!~                      {
-                           protocol      = "tcp"
#                            (2 unchanged attributes hidden)
                        },
                    ]
-                   systemControls         = []
-                   volumesFrom            = []
#                    (7 unchanged attributes hidden)
                },
            ] # forces replacement
        )
!~      cpu                      = "256" -> "512" # forces replacement
!~      enable_fault_injection   = false -> (known after apply)
!~      id                       = "*****************" -> (known after apply)
!~      requires_compatibilities = [ # forces replacement
-           "EC2",
+           "FARGATE",
        ]
!~      revision                 = 4 -> (known after apply)
-       tags                     = {} -> null
!~      tags_all                 = {} -> (known after apply)
#        (10 unchanged attributes hidden)
    }

  # module.vrms.module.frontend_prod_service.aws_ecs_service.fargate[0] must be replaced
-/+ resource "aws_ecs_service" "fargate" {
!~      arn                                = "arn:aws:ecs:us-west-2:035866691871:service/incubator-prod/vrms-frontend-prod" -> (known after apply)
!~      availability_zone_rebalancing      = "ENABLED" -> (known after apply)
-       health_check_grace_period_seconds  = 0 -> null
!~      iam_role                           = "/aws-service-role/ecs.amazonaws.com/AWSServiceRoleForECS" -> (known after apply)
!~      id                                 = "****************************************************************************" -> (known after apply)
!~      launch_type                        = "EC2" -> "FARGATE" # forces replacement
        name                               = "vrms-frontend-prod"
+       platform_version                   = (known after apply)
-       propagate_tags                     = "NONE" -> null
-       tags                               = {} -> null
!~      tags_all                           = {} -> (known after apply)
!~      task_definition                    = "arn:aws:ecs:us-west-2:035866691871:task-definition/vrms-frontend-prod:5" -> (known after apply)
!~      triggers                           = {} -> (known after apply)
#        (9 unchanged attributes hidden)

-       deployment_circuit_breaker {
-           enable   = false -> null
-           rollback = false -> null
        }

!~      deployment_configuration (known after apply)
-       deployment_configuration {
-           bake_time_in_minutes = "0" -> null
-           strategy             = "ROLLING" -> null
        }

-       deployment_controller {
-           type = "ECS" -> null
        }

#        (2 unchanged blocks hidden)
    }

  # module.vrms.module.frontend_prod_service.aws_ecs_task_definition.task must be replaced
-/+ resource "aws_ecs_task_definition" "task" {
!~      arn                      = "arn:aws:ecs:us-west-2:035866691871:task-definition/vrms-frontend-prod:5" -> (known after apply)
!~      arn_without_revision     = "arn:aws:ecs:us-west-2:035866691871:task-definition/vrms-frontend-prod" -> (known after apply)
!~      container_definitions    = jsonencode(
!~          [
!~              {
!~                  cpu                    = 256 -> 512
-                   mountPoints            = []
                    name                   = "vrms-frontend-prod"
!~                  portMappings           = [
!~                      {
-                           protocol      = "tcp"
#                            (2 unchanged attributes hidden)
                        },
                    ]
-                   systemControls         = []
-                   volumesFrom            = []
#                    (7 unchanged attributes hidden)
                },
            ] # forces replacement
        )
!~      cpu                      = "256" -> "512" # forces replacement
!~      enable_fault_injection   = false -> (known after apply)
!~      id                       = "******************" -> (known after apply)
!~      requires_compatibilities = [ # forces replacement
-           "EC2",
+           "FARGATE",
        ]
!~      revision                 = 5 -> (known after apply)
-       tags                     = {} -> null
!~      tags_all                 = {} -> (known after apply)
#        (10 unchanged attributes hidden)
    }

Plan: 15 to add, 3 to change, 15 to destroy.

✅ Plan applied in Terraform apply (OIDC) #46

@ale210
Copy link
Member

ale210 commented Aug 28, 2025

@here in terraform-plan.yaml I believe you have to change line 26 to contents: write for this to work

@here here marked this pull request as ready for review September 25, 2025 02:03
@here
Copy link
Member Author

here commented Sep 25, 2025

Ready for review, thank you!

@ale210 ale210 closed this Oct 9, 2025
@ale210 ale210 reopened this Oct 16, 2025
@ale210 ale210 merged commit fe2fe90 into main Oct 16, 2025
2 checks passed
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.

Automate running Terraform Docs commands in CI/CD

3 participants