Skip to content

Conversation

@juliareynolds-nava
Copy link
Contributor

@juliareynolds-nava juliareynolds-nava commented Sep 24, 2025

🎫 Ticket

https://jira.cms.gov/browse/PLT-1299

🛠 Changes

Expanded platform variable and edited readme

ℹ️ Context

These changes are for the ecs service module.

🧪 Validation

Tofu Plan Output
OpenTofu will perform the following actions:

  # aws_ecs_service.worker will be updated in-place
  ~ resource "aws_ecs_service" "worker" {
        id                                 = "arn:aws:ecs:us-east-1:***:service/ab2d-test-worker/ab2d-test-worker"
        name                               = "ab2d-test-worker"
        tags                               = {}
      ~ task_definition                    = "arn:aws:ecs:us-east-1:***:task-definition/ab2d-test-worker:227" -> (known after apply)
        # (17 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # aws_ecs_task_definition.worker must be replaced
-/+ resource "aws_ecs_task_definition" "worker" {
      ~ arn                      = "arn:aws:ecs:us-east-1:***:task-definition/ab2d-test-worker:227" -> (known after apply)
      ~ arn_without_revision     = "arn:aws:ecs:us-east-1:***:task-definition/ab2d-test-worker" -> (known after apply)
      ~ container_definitions    = jsonencode(
          ~ [
              ~ {
                  ~ environment            = [
                        # (12 unchanged elements hidden)
                        {
                            name  = "AWS_SQS_URL"
                            value = "https://sqs.us-east-1.amazonaws.com/***/ab2d-test-events"
                        },
                      ~ {
                            name  = "IMAGE_VERSION"
                          ~ value = "ab2d-worker-1626-merge-682775a" -> "ab2d-worker-1626-merge-37a4551"
                        },
                        {
                            name  = "MICROSERVICES_URL"
                            value = "http://internal-ab2d-test-microservices-87290984.us-east-1.elb.amazonaws.com/"
                        },
                        # (1 unchanged element hidden)
                    ]
                  ~ image                  = "***.dkr.ecr.us-east-1.amazonaws.com/ab2d-worker:ab2d-worker-1626-merge-682775a" -> "***.dkr.ecr.us-east-1.amazonaws.com/ab2d-worker:ab2d-worker-1626-merge-37a4551"
                    name                   = "worker"
                  - portMappings           = []
                  - systemControls         = []
                  - volumesFrom            = []
                    # (5 unchanged attributes hidden)
                },
            ] # forces replacement
        )
      ~ enable_fault_injection   = false -> (known after apply)
      ~ id                       = "ab2d-test-worker" -> (known after apply)
      ~ revision                 = 227 -> (known after apply)
      - tags                     = {} -> null
        # (10 unchanged attributes hidden)

      - volume {
          - configure_at_launch = false -> null
          - name                = "efs" -> null

          - efs_volume_configuration {
              - file_system_id          = "fs-06898a9a35a2a8959" -> null
              - root_directory          = "/" -> null
              - transit_encryption      = "ENABLED" -> null
              - transit_encryption_port = 0 -> null

              - authorization_config {
                  - access_point_id = "fsap-09a16152758024a89" -> null
                }
            }
        }
      - volume {
          - configure_at_launch = false -> null
          - name                = "newrelic_logs" -> null
        }
      - volume {
          - configure_at_launch = false -> null
          - name                = "tmp" -> null
        }
      - volume {
          - configure_at_launch = false -> null
          - name                = "var_logs" -> null
        }
      + volume {
          + configure_at_launch = (known after apply)
          + name                = "efs"

          + efs_volume_configuration {
              + file_system_id          = "fs-06898a9a35a2a8959"
              + root_directory          = "/"
              + transit_encryption      = "ENABLED"
              + transit_encryption_port = 0

              + authorization_config {
                  + access_point_id = "fsap-09a16152758024a89"
                }
            }
        }
      + volume {
          + configure_at_launch = (known after apply)
          + name                = "newrelic_logs"
        }
      + volume {
          + configure_at_launch = (known after apply)
          + name                = "tmp"
        }
      + volume {
          + configure_at_launch = (known after apply)
          + name                = "var_logs"
        }
    }

Plan: 1 to add, 1 to change, 1 to destroy.

@juliareynolds-nava juliareynolds-nava marked this pull request as ready for review September 24, 2025 21:05
@juliareynolds-nava juliareynolds-nava requested a review from a team as a code owner September 24, 2025 21:05
Copy link
Member

@gsf gsf left a comment

Choose a reason for hiding this comment

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

@juliareynolds-nava
Copy link
Contributor Author

For validation, you could run a plan with the ref updated to this branch at https://github.com/CMSgov/ab2d/blob/66206f254794fecac59f95a99e104ee24306a868/ops/services/20-microservices/main.tf#L52

@gsf I uploaded the plan results to the PR description.

@juliareynolds-nava juliareynolds-nava requested review from a team and gsf October 2, 2025 15:47
@juliareynolds-nava juliareynolds-nava merged commit d7822c0 into main Oct 7, 2025
@juliareynolds-nava juliareynolds-nava deleted the plt-1299_cluster_fixes branch October 7, 2025 13:39
juliareynolds-nava added a commit that referenced this pull request Oct 7, 2025
## 🎫 Ticket

https://jira.cms.gov/browse/PLT-1299

## 🛠 Changes

Expanded platform variable and edited readme

## ℹ️ Context

These changes are for the ecs service module.

## 🧪 Validation
<details>
<summary>Tofu Plan Output</summary>

```
OpenTofu will perform the following actions:

  # aws_ecs_service.worker will be updated in-place
  ~ resource "aws_ecs_service" "worker" {
        id                                 = "arn:aws:ecs:us-east-1:***:service/ab2d-test-worker/ab2d-test-worker"
        name                               = "ab2d-test-worker"
        tags                               = {}
      ~ task_definition                    = "arn:aws:ecs:us-east-1:***:task-definition/ab2d-test-worker:227" -> (known after apply)
        # (17 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

  # aws_ecs_task_definition.worker must be replaced
-/+ resource "aws_ecs_task_definition" "worker" {
      ~ arn                      = "arn:aws:ecs:us-east-1:***:task-definition/ab2d-test-worker:227" -> (known after apply)
      ~ arn_without_revision     = "arn:aws:ecs:us-east-1:***:task-definition/ab2d-test-worker" -> (known after apply)
      ~ container_definitions    = jsonencode(
          ~ [
              ~ {
                  ~ environment            = [
                        # (12 unchanged elements hidden)
                        {
                            name  = "AWS_SQS_URL"
                            value = "https://sqs.us-east-1.amazonaws.com/***/ab2d-test-events"
                        },
                      ~ {
                            name  = "IMAGE_VERSION"
                          ~ value = "ab2d-worker-1626-merge-682775a" -> "ab2d-worker-1626-merge-37a4551"
                        },
                        {
                            name  = "MICROSERVICES_URL"
                            value = "http://internal-ab2d-test-microservices-87290984.us-east-1.elb.amazonaws.com/"
                        },
                        # (1 unchanged element hidden)
                    ]
                  ~ image                  = "***.dkr.ecr.us-east-1.amazonaws.com/ab2d-worker:ab2d-worker-1626-merge-682775a" -> "***.dkr.ecr.us-east-1.amazonaws.com/ab2d-worker:ab2d-worker-1626-merge-37a4551"
                    name                   = "worker"
                  - portMappings           = []
                  - systemControls         = []
                  - volumesFrom            = []
                    # (5 unchanged attributes hidden)
                },
            ] # forces replacement
        )
      ~ enable_fault_injection   = false -> (known after apply)
      ~ id                       = "ab2d-test-worker" -> (known after apply)
      ~ revision                 = 227 -> (known after apply)
      - tags                     = {} -> null
        # (10 unchanged attributes hidden)

      - volume {
          - configure_at_launch = false -> null
          - name                = "efs" -> null

          - efs_volume_configuration {
              - file_system_id          = "fs-06898a9a35a2a8959" -> null
              - root_directory          = "/" -> null
              - transit_encryption      = "ENABLED" -> null
              - transit_encryption_port = 0 -> null

              - authorization_config {
                  - access_point_id = "fsap-09a16152758024a89" -> null
                }
            }
        }
      - volume {
          - configure_at_launch = false -> null
          - name                = "newrelic_logs" -> null
        }
      - volume {
          - configure_at_launch = false -> null
          - name                = "tmp" -> null
        }
      - volume {
          - configure_at_launch = false -> null
          - name                = "var_logs" -> null
        }
      + volume {
          + configure_at_launch = (known after apply)
          + name                = "efs"

          + efs_volume_configuration {
              + file_system_id          = "fs-06898a9a35a2a8959"
              + root_directory          = "/"
              + transit_encryption      = "ENABLED"
              + transit_encryption_port = 0

              + authorization_config {
                  + access_point_id = "fsap-09a16152758024a89"
                }
            }
        }
      + volume {
          + configure_at_launch = (known after apply)
          + name                = "newrelic_logs"
        }
      + volume {
          + configure_at_launch = (known after apply)
          + name                = "tmp"
        }
      + volume {
          + configure_at_launch = (known after apply)
          + name                = "var_logs"
        }
    }

Plan: 1 to add, 1 to change, 1 to destroy.
```
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.

4 participants