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

Wrong error being processed (404 -> 503) #134

Merged
merged 3 commits into from
Aug 13, 2024
Merged

Wrong error being processed (404 -> 503) #134

merged 3 commits into from
Aug 13, 2024

Conversation

chrisbloe
Copy link
Contributor

No description provided.

Copy link

Report for environment: dev

Terraform Format and Style 🖌success

Format Output


Terraform Initialization ⚙️success

Initialization Output

Initializing the backend...

Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.
Initializing provider plugins...
- Finding hashicorp/aws versions matching "5.60.0"...
- Installing hashicorp/aws v5.60.0...
- Installed hashicorp/aws v5.60.0 (signed by HashiCorp)
Terraform has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that Terraform can guarantee to make the same selections by default when
you run "terraform init" in the future.

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

Terraform Validation 🤖success

Validation Output

Success! The configuration is valid.


Terraform Plan 📖success

Show Plan (no changes)


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

Report for environment: test

Terraform Format and Style 🖌success

Format Output


Terraform Initialization ⚙️success

Initialization Output

Initializing the backend...

Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.
Initializing provider plugins...
- Finding hashicorp/aws versions matching "5.60.0"...
- Installing hashicorp/aws v5.60.0...
- Installed hashicorp/aws v5.60.0 (signed by HashiCorp)
Terraform has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that Terraform can guarantee to make the same selections by default when
you run "terraform init" in the future.

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

Terraform Validation 🤖success

Validation Output

Success! The configuration is valid.


Terraform Plan 📖success

Show Plan (no changes)


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

Report for environment: pre-prod

Terraform Format and Style 🖌success

Format Output


Terraform Initialization ⚙️success

Initialization Output

Initializing the backend...

Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.
Initializing provider plugins...
- Finding hashicorp/aws versions matching "5.60.0"...
- Installing hashicorp/aws v5.60.0...
- Installed hashicorp/aws v5.60.0 (signed by HashiCorp)
Terraform has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that Terraform can guarantee to make the same selections by default when
you run "terraform init" in the future.

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

Terraform Validation 🤖success

Validation Output

Success! The configuration is valid.


Terraform Plan 📖success

Show Plan (no changes)


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

Report for environment: prod

Terraform Format and Style 🖌success

Format Output


Terraform Initialization ⚙️success

Initialization Output

Initializing the backend...

Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.
Initializing provider plugins...
- Finding hashicorp/aws versions matching "5.60.0"...
- Installing hashicorp/aws v5.60.0...
- Installed hashicorp/aws v5.60.0 (signed by HashiCorp)
Terraform has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that Terraform can guarantee to make the same selections by default when
you run "terraform init" in the future.

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

Terraform Validation 🤖success

Validation Output

Success! The configuration is valid.


Terraform Plan 📖success

Show Plan (6 to add, 7 to change, 15 to destroy)


Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place
  - destroy
-/+ destroy and then create replacement
 <= read (data resources)

Terraform will perform the following actions:

  # data.aws_iam_policy_document.ehr_out_service_incoming_policy_doc will be read during apply
  # (depends on a resource or a module with changes pending)
 <= data "aws_iam_policy_document" "ehr_out_service_incoming_policy_doc" {
      + id            = (known after apply)
      + json          = (known after apply)
      + minified_json = (known after apply)

      + statement {
          + actions   = [
              + "sqs:SendMessage",
            ]
          + effect    = "Allow"
          + resources = [
              + "arn:aws:sqs:eu-west-2:535760944720:prod-ehr-out-service-incoming",
            ]

          + condition {
              # At least one attribute in this block is (or was) sensitive,
              # so its contents will not be displayed.
            }

          + principals {
              + identifiers = [
                  + "sns.amazonaws.com",
                ]
              + type        = "Service"
            }
        }
    }

  # data.aws_iam_policy_document.sqs_policy_doc will be read during apply
  # (depends on a resource or a module with changes pending)
 <= data "aws_iam_policy_document" "sqs_policy_doc" {
      + id            = (known after apply)
      + json          = (known after apply)
      + minified_json = (known after apply)

      + statement {
          + actions   = [
              + "sqs:ChangeMessageVisibility",
              + "sqs:DeleteMessage",
              + "sqs:GetQueue*",
              + "sqs:ReceiveMessage",
            ]
          + resources = [
              + "arn:aws:sqs:eu-west-2:535760944720:prod-ehr-out-service-incoming",
            ]
        }
    }

  # aws_db_subnet_group.ehr_out_service_db will be destroyed
  # (because aws_db_subnet_group.ehr_out_service_db is not in configuration)
  - resource "aws_db_subnet_group" "ehr_out_service_db" {
      - arn                     = "arn:aws:rds:eu-west-2:535760944720:subgrp:prod-ehr-out-service-db-subnet-group" -> null
      - description             = "Managed by Terraform" -> null
      - id                      = "prod-ehr-out-service-db-subnet-group" -> null
      - name                    = "prod-ehr-out-service-db-subnet-group" -> null
      - subnet_ids              = (sensitive value) -> null
      - supported_network_types = [
          - "IPV4",
        ] -> null
      - tags                    = {
          - "CreatedBy"   = "prm-repo-ehr-out-service"
          - "Environment" = "prod"
          - "Name"        = "prod-ehr-out-service-db-subnet-group"
        } -> null
      - tags_all                = {
          - "CreatedBy"   = "prm-repo-ehr-out-service"
          - "Environment" = "prod"
          - "Name"        = "prod-ehr-out-service-db-subnet-group"
        } -> null
        # (1 unchanged attribute hidden)
    }

  # aws_ecs_service.ecs_service will be updated in-place
  ~ resource "aws_ecs_service" "ecs_service" {
        id                                 = "arn:aws:ecs:eu-west-2:535760944720:service/prod-ehr-out-service/prod-ehr-out-service"
        name                               = "prod-ehr-out-service"
        tags                               = {}
      ~ task_definition                    = "arn:aws:ecs:eu-west-2:535760944720:task-definition/ehr-out-service:2" -> (known after apply)
        # (15 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

  # aws_ecs_task_definition.task must be replaced
-/+ resource "aws_ecs_task_definition" "task" {
      ~ arn                      = "arn:aws:ecs:eu-west-2:535760944720:task-definition/ehr-out-service:2" -> (known after apply)
      ~ arn_without_revision     = "arn:aws:ecs:eu-west-2:535760944720:task-definition/ehr-out-service" -> (known after apply)
      # Warning: this attribute value will be marked as sensitive and will not
      # display in UI output after applying this change.
      ~ container_definitions    = (sensitive value) # forces replacement
      ~ cpu                      = "256" -> "512" # forces replacement
      ~ id                       = "ehr-out-service" -> (known after apply)
      ~ memory                   = "512" -> "1024" # forces replacement
      ~ revision                 = 2 -> (known after apply)
        tags                     = {
            "CreatedBy"   = "prm-repo-ehr-out-service"
            "Environment" = "prod"
        }
        # (10 unchanged attributes hidden)
    }

  # aws_iam_policy.dynamodb_policy will be created
  + resource "aws_iam_policy" "dynamodb_policy" {
      + arn              = (known after apply)
      + attachment_count = (known after apply)
      + id               = (known after apply)
      + name             = "prod-ehr-out-service-dynamodb"
      + name_prefix      = (known after apply)
      + path             = "/"
      + policy           = jsonencode(
            {
              + Statement = [
                  + {
                      + Action   = [
                          + "dynamodb:UpdateItem",
                          + "dynamodb:Query",
                          + "dynamodb:PutItem",
                          + "dynamodb:GetItem",
                        ]
                      + Effect   = "Allow"
                      + Resource = "arn:aws:dynamodb:eu-west-2:535760944720:table/prod-ehr-transfer-tracker"
                    },
                ]
              + Version   = "2012-10-17"
            }
        )
      + policy_id        = (known after apply)
      + tags_all         = (known after apply)
    }

  # aws_iam_policy.sqs_policy will be updated in-place
  ~ resource "aws_iam_policy" "sqs_policy" {
        id               = "arn:aws:iam::535760944720:policy/prod-ehr-out-service-sqs"
        name             = "prod-ehr-out-service-sqs"
      ~ policy           = jsonencode(
            {
              - Statement = [
                  - {
                      - Action   = [
                          - "sqs:ReceiveMessage",
                          - "sqs:GetQueue*",
                          - "sqs:DeleteMessage",
                          - "sqs:ChangeMessageVisibility",
                        ]
                      - Effect   = "Allow"
                      - Resource = "arn:aws:sqs:eu-west-2:535760944720:prod-ehr-out-service-incoming"
                      - Sid      = ""
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> (known after apply)
        tags             = {}
        # (7 unchanged attributes hidden)
    }

  # aws_iam_policy.ssm_policy will be updated in-place
  ~ resource "aws_iam_policy" "ssm_policy" {
        id               = "arn:aws:iam::535760944720:policy/prod-ehr-out-service-ssm"
        name             = "prod-ehr-out-service-ssm"
      ~ policy           = jsonencode(
          ~ {
              ~ Statement = [
                  ~ {
                      ~ Resource = [
                            # (7 unchanged elements hidden)
                            "arn:aws:ssm:eu-west-2:535760944720:parameter/repo/prod/user-input/api-keys/ehr-out-service/*",
                          - "arn:aws:ssm:eu-west-2:535760944720:parameter/repo/prod/output/prm-deductions-gp2gp-messenger/service-url",
                        ]
                      - Sid      = ""
                        # (2 unchanged attributes hidden)
                    },
                ]
                # (1 unchanged attribute hidden)
            }
        )
        tags             = {}
        # (7 unchanged attributes hidden)
    }

  # aws_iam_policy.transfer_tracker_indexes_access will be created
  + resource "aws_iam_policy" "transfer_tracker_indexes_access" {
      + arn              = (known after apply)
      + attachment_count = (known after apply)
      + id               = (known after apply)
      + name             = "prod-ehr-out-service-transfer-tracker-indexes-access"
      + name_prefix      = (known after apply)
      + path             = "/"
      + policy           = jsonencode(
            {
              + Statement = [
                  + {
                      + Action   = "dynamodb:Query"
                      + Effect   = "Allow"
                      + Resource = "arn:aws:dynamodb:eu-west-2:535760944720:table/prod-ehr-transfer-tracker/index/*"
                    },
                ]
              + Version   = "2012-10-17"
            }
        )
      + policy_id        = (known after apply)
      + tags_all         = (known after apply)
    }

  # aws_iam_role_policy_attachment.dynamodb_policy_attach will be created
  + resource "aws_iam_role_policy_attachment" "dynamodb_policy_attach" {
      + id         = (known after apply)
      + policy_arn = (known after apply)
      + role       = "prod-ehr-out-service-EcsTaskRole"
    }

  # aws_iam_role_policy_attachment.ecs_dynamo_indexes will be created
  + resource "aws_iam_role_policy_attachment" "ecs_dynamo_indexes" {
      + id         = (known after apply)
      + policy_arn = (known after apply)
      + role       = "prod-ehr-out-service-EcsTaskRole"
    }

  # aws_kms_alias.ehr_out_service_db_key will be destroyed
  # (because aws_kms_alias.ehr_out_service_db_key is not in configuration)
  - resource "aws_kms_alias" "ehr_out_service_db_key" {
      - arn            = "arn:aws:kms:eu-west-2:535760944720:alias/ehr-out-service-db-key" -> null
      - id             = "alias/ehr-out-service-db-key" -> null
      - name           = "alias/ehr-out-service-db-key" -> null
      - target_key_arn = "arn:aws:kms:eu-west-2:535760944720:key/bff26a73-7696-404d-abc1-4b9c189a1bed" -> null
      - target_key_id  = "bff26a73-7696-404d-abc1-4b9c189a1bed" -> null
        # (1 unchanged attribute hidden)
    }

  # aws_kms_key.ehr_out_service_db_key will be destroyed
  # (because aws_kms_key.ehr_out_service_db_key is not in configuration)
  - resource "aws_kms_key" "ehr_out_service_db_key" {
      - arn                                = "arn:aws:kms:eu-west-2:535760944720:key/bff26a73-7696-404d-abc1-4b9c189a1bed" -> null
      - bypass_policy_lockout_safety_check = false -> null
      - customer_master_key_spec           = "SYMMETRIC_DEFAULT" -> null
      - description                        = "ehr-out-service DB KMS key in prod environment" -> null
      - enable_key_rotation                = false -> null
      - id                                 = "bff26a73-7696-404d-abc1-4b9c189a1bed" -> null
      - is_enabled                         = true -> null
      - key_id                             = "bff26a73-7696-404d-abc1-4b9c189a1bed" -> null
      - key_usage                          = "ENCRYPT_DECRYPT" -> null
      - multi_region                       = false -> null
      - policy                             = jsonencode(
            {
              - Id        = "key-default-1"
              - Statement = [
                  - {
                      - Action    = "kms:*"
                      - Effect    = "Allow"
                      - Principal = {
                          - AWS = "arn:aws:iam::535760944720:root"
                        }
                      - Resource  = "*"
                      - Sid       = "Enable IAM User Permissions"
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
      - tags                               = {
          - "CreatedBy"   = "prm-repo-ehr-out-service"
          - "Environment" = "prod"
          - "Name"        = "prod-ehr-out-service-db-key"
        } -> null
      - tags_all                           = {
          - "CreatedBy"   = "prm-repo-ehr-out-service"
          - "Environment" = "prod"
          - "Name"        = "prod-ehr-out-service-db-key"
        } -> null
        # (1 unchanged attribute hidden)
    }

  # aws_rds_cluster.ehr_out_service will be destroyed
  # (because aws_rds_cluster.ehr_out_service is not in configuration)
  - resource "aws_rds_cluster" "ehr_out_service" {
      - allocated_storage                   = 1 -> null
      - apply_immediately                   = true -> null
      - arn                                 = "arn:aws:rds:eu-west-2:535760944720:cluster:prod-ehr-out-service-cluster" -> null
      - availability_zones                  = [
          - "eu-west-2a",
          - "eu-west-2b",
          - "eu-west-2c",
        ] -> null
      - backtrack_window                    = 0 -> null
      - backup_retention_period             = 5 -> null
      - cluster_identifier                  = "prod-ehr-out-service-cluster" -> null
      - cluster_members                     = [
          - "prod-ehr-out-service-db-instance-0",
          - "prod-ehr-out-service-db-instance-1",
          - "prod-ehr-out-service-db-instance-2",
        ] -> null
      - cluster_resource_id                 = "cluster-WWCI6QVOMXP352FV67MP7SLHJU" -> null
      - copy_tags_to_snapshot               = false -> null
      - database_name                       = "ehroutdb" -> null
      - db_cluster_parameter_group_name     = (sensitive value) -> null
      - db_subnet_group_name                = "prod-ehr-out-service-db-subnet-group" -> null
      - delete_automated_backups            = true -> null
      - deletion_protection                 = true -> null
      - enable_global_write_forwarding      = false -> null
      - enable_http_endpoint                = false -> null
      - enabled_cloudwatch_logs_exports     = [] -> null
      - endpoint                            = "prod-ehr-out-service-cluster.cluster-cyniu6lsek4i.eu-west-2.rds.amazonaws.com" -> null
      - engine                              = "aurora-postgresql" -> null
      - engine_mode                         = "provisioned" -> null
      - engine_version                      = "11.16" -> null
      - engine_version_actual               = "11.16" -> null
      - final_snapshot_identifier           = "ehr-out-service-db-final" -> null
      - hosted_zone_id                      = "Z1TTGA775OQIYO" -> null
      - iam_database_authentication_enabled = true -> null
      - iam_roles                           = [] -> null
      - id                                  = "prod-ehr-out-service-cluster" -> null
      - iops                                = 0 -> null
      - kms_key_id                          = "arn:aws:kms:eu-west-2:535760944720:key/bff26a73-7696-404d-abc1-4b9c189a1bed" -> null
      - master_password                     = (sensitive value) -> null
      - master_username                     = (sensitive value) -> null
      - network_type                        = "IPV4" -> null
      - port                                = 5432 -> null
      - preferred_backup_window             = "07:00-09:00" -> null
      - preferred_maintenance_window        = "wed:02:16-wed:02:46" -> null
      - reader_endpoint                     = "prod-ehr-out-service-cluster.cluster-ro-cyniu6lsek4i.eu-west-2.rds.amazonaws.com" -> null
      - skip_final_snapshot                 = false -> null
      - storage_encrypted                   = true -> null
      - tags                                = {
          - "CreatedBy"   = "prm-repo-ehr-out-service"
          - "Environment" = "prod"
        } -> null
      - tags_all                            = {
          - "CreatedBy"   = "prm-repo-ehr-out-service"
          - "Environment" = "prod"
        } -> null
      - vpc_security_group_ids              = [
          - "sg-00eb5a853d344a9d9",
          - "sg-09ae87c66f1831b1e",
          - "sg-0e692308c08c8b7af",
        ] -> null
        # (4 unchanged attributes hidden)
    }

  # aws_rds_cluster_instance.ehr_out_service_db_instances[0] will be destroyed
  # (because aws_rds_cluster_instance.ehr_out_service_db_instances is not in configuration)
  - resource "aws_rds_cluster_instance" "ehr_out_service_db_instances" {
      - arn                                   = "arn:aws:rds:eu-west-2:535760944720:db:prod-ehr-out-service-db-instance-0" -> null
      - auto_minor_version_upgrade            = true -> null
      - availability_zone                     = "eu-west-2c" -> null
      - ca_cert_identifier                    = "rds-ca-2019" -> null
      - cluster_identifier                    = "prod-ehr-out-service-cluster" -> null
      - copy_tags_to_snapshot                 = false -> null
      - db_parameter_group_name               = "default.aurora-postgresql11" -> null
      - db_subnet_group_name                  = "prod-ehr-out-service-db-subnet-group" -> null
      - dbi_resource_id                       = "db-XRFWYXGNFY5AYKDGNR7XZZR6XI" -> null
      - endpoint                              = "prod-ehr-out-service-db-instance-0.cyniu6lsek4i.eu-west-2.rds.amazonaws.com" -> null
      - engine                                = "aurora-postgresql" -> null
      - engine_version                        = "11.16" -> null
      - engine_version_actual                 = "11.16" -> null
      - id                                    = "prod-ehr-out-service-db-instance-0" -> null
      - identifier                            = "prod-ehr-out-service-db-instance-0" -> null
      - instance_class                        = "db.t3.medium" -> null
      - kms_key_id                            = "arn:aws:kms:eu-west-2:535760944720:key/bff26a73-7696-404d-abc1-4b9c189a1bed" -> null
      - monitoring_interval                   = 0 -> null
      - network_type                          = "IPV4" -> null
      - performance_insights_enabled          = false -> null
      - performance_insights_retention_period = 0 -> null
      - port                                  = 5432 -> null
      - preferred_backup_window               = "07:00-09:00" -> null
      - preferred_maintenance_window          = "wed:01:45-wed:02:15" -> null
      - promotion_tier                        = 0 -> null
      - publicly_accessible                   = false -> null
      - storage_encrypted                     = true -> null
      - tags                                  = {
          - "CreatedBy"   = "prm-repo-ehr-out-service"
          - "Environment" = "prod"
        } -> null
      - tags_all                              = {
          - "CreatedBy"   = "prm-repo-ehr-out-service"
          - "Environment" = "prod"
        } -> null
      - writer                                = true -> null
        # (2 unchanged attributes hidden)
    }

  # aws_rds_cluster_instance.ehr_out_service_db_instances[1] will be destroyed
  # (because aws_rds_cluster_instance.ehr_out_service_db_instances is not in configuration)
  - resource "aws_rds_cluster_instance" "ehr_out_service_db_instances" {
      - arn                                   = "arn:aws:rds:eu-west-2:535760944720:db:prod-ehr-out-service-db-instance-1" -> null
      - auto_minor_version_upgrade            = true -> null
      - availability_zone                     = "eu-west-2a" -> null
      - ca_cert_identifier                    = "rds-ca-2019" -> null
      - cluster_identifier                    = "prod-ehr-out-service-cluster" -> null
      - copy_tags_to_snapshot                 = false -> null
      - db_parameter_group_name               = "default.aurora-postgresql11" -> null
      - db_subnet_group_name                  = "prod-ehr-out-service-db-subnet-group" -> null
      - dbi_resource_id                       = "db-TOY4GITJSCUIDQ3M3RLIT5BPWE" -> null
      - endpoint                              = "prod-ehr-out-service-db-instance-1.cyniu6lsek4i.eu-west-2.rds.amazonaws.com" -> null
      - engine                                = "aurora-postgresql" -> null
      - engine_version                        = "11.16" -> null
      - engine_version_actual                 = "11.16" -> null
      - id                                    = "prod-ehr-out-service-db-instance-1" -> null
      - identifier                            = "prod-ehr-out-service-db-instance-1" -> null
      - instance_class                        = "db.t3.medium" -> null
      - kms_key_id                            = "arn:aws:kms:eu-west-2:535760944720:key/bff26a73-7696-404d-abc1-4b9c189a1bed" -> null
      - monitoring_interval                   = 0 -> null
      - network_type                          = "IPV4" -> null
      - performance_insights_enabled          = false -> null
      - performance_insights_retention_period = 0 -> null
      - port                                  = 5432 -> null
      - preferred_backup_window               = "07:00-09:00" -> null
      - preferred_maintenance_window          = "mon:00:07-mon:00:37" -> null
      - promotion_tier                        = 0 -> null
      - publicly_accessible                   = false -> null
      - storage_encrypted                     = true -> null
      - tags                                  = {
          - "CreatedBy"   = "prm-repo-ehr-out-service"
          - "Environment" = "prod"
        } -> null
      - tags_all                              = {
          - "CreatedBy"   = "prm-repo-ehr-out-service"
          - "Environment" = "prod"
        } -> null
      - writer                                = false -> null
        # (2 unchanged attributes hidden)
    }

  # aws_rds_cluster_instance.ehr_out_service_db_instances[2] will be destroyed
  # (because aws_rds_cluster_instance.ehr_out_service_db_instances is not in configuration)
  - resource "aws_rds_cluster_instance" "ehr_out_service_db_instances" {
      - arn                                   = "arn:aws:rds:eu-west-2:535760944720:db:prod-ehr-out-service-db-instance-2" -> null
      - auto_minor_version_upgrade            = true -> null
      - availability_zone                     = "eu-west-2a" -> null
      - ca_cert_identifier                    = "rds-ca-2019" -> null
      - cluster_identifier                    = "prod-ehr-out-service-cluster" -> null
      - copy_tags_to_snapshot                 = false -> null
      - db_parameter_group_name               = "default.aurora-postgresql11" -> null
      - db_subnet_group_name                  = "prod-ehr-out-service-db-subnet-group" -> null
      - dbi_resource_id                       = "db-II2IIFPCSS6OIWUEUEBRKVWBVE" -> null
      - endpoint                              = "prod-ehr-out-service-db-instance-2.cyniu6lsek4i.eu-west-2.rds.amazonaws.com" -> null
      - engine                                = "aurora-postgresql" -> null
      - engine_version                        = "11.16" -> null
      - engine_version_actual                 = "11.16" -> null
      - id                                    = "prod-ehr-out-service-db-instance-2" -> null
      - identifier                            = "prod-ehr-out-service-db-instance-2" -> null
      - instance_class                        = "db.t3.medium" -> null
      - kms_key_id                            = "arn:aws:kms:eu-west-2:535760944720:key/bff26a73-7696-404d-abc1-4b9c189a1bed" -> null
      - monitoring_interval                   = 0 -> null
      - network_type                          = "IPV4" -> null
      - performance_insights_enabled          = false -> null
      - performance_insights_retention_period = 0 -> null
      - port                                  = 5432 -> null
      - preferred_backup_window               = "07:00-09:00" -> null
      - preferred_maintenance_window          = "wed:05:02-wed:05:32" -> null
      - promotion_tier                        = 0 -> null
      - publicly_accessible                   = false -> null
      - storage_encrypted                     = true -> null
      - tags                                  = {
          - "CreatedBy"   = "prm-repo-ehr-out-service"
          - "Environment" = "prod"
        } -> null
      - tags_all                              = {
          - "CreatedBy"   = "prm-repo-ehr-out-service"
          - "Environment" = "prod"
        } -> null
      - writer                                = false -> null
        # (2 unchanged attributes hidden)
    }

  # aws_security_group.ecs_tasks_sg will be updated in-place
  ~ resource "aws_security_group" "ecs_tasks_sg" {
      # Warning: this attribute value will be marked as sensitive and will not
      # display in UI output after applying this change.
      ~ egress                 = (sensitive value)
        id                     = "sg-0da5787a08c9d95cd"
        name                   = "prod-ehr-out-service-ecs-tasks-sg"
        tags                   = {
            "CreatedBy"   = "prm-repo-ehr-out-service"
            "Environment" = "prod"
            "Name"        = "prod-ehr-out-service-ecs-tasks-sg"
        }
        # (8 unchanged attributes hidden)
    }

  # aws_security_group.ehr_out_service_db_sg will be destroyed
  # (because aws_security_group.ehr_out_service_db_sg is not in configuration)
  - resource "aws_security_group" "ehr_out_service_db_sg" {
      - arn                    = "arn:aws:ec2:eu-west-2:535760944720:security-group/sg-0e692308c08c8b7af" -> null
      - description            = "Managed by Terraform" -> null
      - egress                 = [] -> null
      - id                     = "sg-0e692308c08c8b7af" -> null
      - ingress                = [
          - {
              - cidr_blocks      = []
              - description      = "Allow traffic from ehr-out-service to the db"
              - from_port        = 5432
              - ipv6_cidr_blocks = []
              - prefix_list_ids  = []
              - protocol         = "tcp"
              - security_groups  = [
                  - "sg-0da5787a08c9d95cd",
                ]
              - self             = false
              - to_port          = 5432
            },
        ] -> null
      - name                   = "prod-ehr-out-service-db-sg" -> null
      - owner_id               = "535760944720" -> null
      - revoke_rules_on_delete = false -> null
      - tags                   = {
          - "CreatedBy"   = "prm-repo-ehr-out-service"
          - "Environment" = "prod"
          - "Name"        = "prod-ehr-out-service-db-sg"
        } -> null
      - tags_all               = {
          - "CreatedBy"   = "prm-repo-ehr-out-service"
          - "Environment" = "prod"
          - "Name"        = "prod-ehr-out-service-db-sg"
        } -> null
      - vpc_id                 = (sensitive value) -> null
        # (1 unchanged attribute hidden)
    }

  # aws_security_group.gocd_to_db_sg will be destroyed
  # (because aws_security_group.gocd_to_db_sg is not in configuration)
  - resource "aws_security_group" "gocd_to_db_sg" {
      - arn                    = "arn:aws:ec2:eu-west-2:535760944720:security-group/sg-09ae87c66f1831b1e" -> null
      - description            = "Managed by Terraform" -> null
      - egress                 = [] -> null
      - id                     = "sg-09ae87c66f1831b1e" -> null
      - ingress                = (sensitive value) -> null
      - name                   = "prod-gocd-to-ehr-out-service-db-sg" -> null
      - owner_id               = "535760944720" -> null
      - revoke_rules_on_delete = false -> null
      - tags                   = {
          - "CreatedBy"   = "prm-repo-ehr-out-service"
          - "Environment" = "prod"
          - "Name"        = "prod-gocd-to-ehr-out-service-db-sg"
        } -> null
      - tags_all               = {
          - "CreatedBy"   = "prm-repo-ehr-out-service"
          - "Environment" = "prod"
          - "Name"        = "prod-gocd-to-ehr-out-service-db-sg"
        } -> null
      - vpc_id                 = (sensitive value) -> null
        # (1 unchanged attribute hidden)
    }

  # aws_security_group.gocd_to_service_alb will be updated in-place
  ~ resource "aws_security_group" "gocd_to_service_alb" {
        id                     = "sg-06495eda1ee3414ff"
      ~ ingress                = (sensitive value)
        name                   = "prod-gocd-to-ehr-out-service"
        tags                   = {
            "CreatedBy"   = "prm-repo-ehr-out-service"
            "Environment" = "prod"
            "Name"        = "prod-gocd-to-ehr-out-service-sg"
        }
        # (8 unchanged attributes hidden)
    }

  # aws_security_group.vpn_to_db_sg will be destroyed
  # (because aws_security_group.vpn_to_db_sg is not in configuration)
  - resource "aws_security_group" "vpn_to_db_sg" {
      - arn                    = "arn:aws:ec2:eu-west-2:535760944720:security-group/sg-00eb5a853d344a9d9" -> null
      - description            = "Managed by Terraform" -> null
      - egress                 = [] -> null
      - id                     = "sg-00eb5a853d344a9d9" -> null
      - ingress                = [] -> null
      - name                   = "prod-vpn-to-ehr-out-service-db-sg" -> null
      - owner_id               = "535760944720" -> null
      - revoke_rules_on_delete = false -> null
      - tags                   = {
          - "CreatedBy"   = "prm-repo-ehr-out-service"
          - "Environment" = "prod"
          - "Name"        = "prod-vpn-to-ehr-out-service-db-sg"
        } -> null
      - tags_all               = {
          - "CreatedBy"   = "prm-repo-ehr-out-service"
          - "Environment" = "prod"
          - "Name"        = "prod-vpn-to-ehr-out-service-db-sg"
        } -> null
      - vpc_id                 = (sensitive value) -> null
        # (1 unchanged attribute hidden)
    }

  # aws_sqs_queue.ehr-out-service-incoming-dlq will be created
  + resource "aws_sqs_queue" "ehr-out-service-incoming-dlq" {
      + arn                               = (known after apply)
      + content_based_deduplication       = false
      + deduplication_scope               = (known after apply)
      + delay_seconds                     = 0
      + fifo_queue                        = false
      + fifo_throughput_limit             = (known after apply)
      + id                                = (known after apply)
      + kms_data_key_reuse_period_seconds = (known after apply)
      + kms_master_key_id                 = "c48be3ca-1ac9-46df-8a10-29ffb77cd9cf"
      + max_message_size                  = 262144
      + message_retention_seconds         = 1209600
      + name                              = "prod-ehr-out-service-incoming-dlq"
      + name_prefix                       = (known after apply)
      + policy                            = (known after apply)
      + receive_wait_time_seconds         = 20
      + redrive_allow_policy              = (known after apply)
      + redrive_policy                    = (known after apply)
      + sqs_managed_sse_enabled           = (known after apply)
      + tags                              = {
          + "CreatedBy"   = "prm-repo-ehr-out-service"
          + "Environment" = "prod"
          + "Name"        = "prod-ehr-out-service-incoming-dlq"
        }
      + tags_all                          = {
          + "CreatedBy"   = "prm-repo-ehr-out-service"
          + "Environment" = "prod"
          + "Name"        = "prod-ehr-out-service-incoming-dlq"
        }
      + url                               = (known after apply)
      + visibility_timeout_seconds        = 240
    }

  # aws_sqs_queue.service_incoming will be updated in-place
  ~ resource "aws_sqs_queue" "service_incoming" {
        id                                = "https://sqs.eu-west-2.amazonaws.com/535760944720/prod-ehr-out-service-incoming"
        name                              = "prod-ehr-out-service-incoming"
      + redrive_policy                    = (known after apply)
        tags                              = {
            "CreatedBy"   = "prm-repo-ehr-out-service"
            "Environment" = "prod"
            "Name"        = "prod-ehr-out-service-incoming"
        }
      ~ visibility_timeout_seconds        = 240 -> 900
        # (17 unchanged attributes hidden)
    }

  # aws_sqs_queue_policy.ehr_out_service_incoming will be updated in-place
  ~ resource "aws_sqs_queue_policy" "ehr_out_service_incoming" {
        id        = "https://sqs.eu-west-2.amazonaws.com/535760944720/prod-ehr-out-service-incoming"
      ~ policy    = jsonencode(
            {
              - Statement = [
                  - {
                      - Action    = "sqs:SendMessage"
                      - Condition = {
                          - ArnEquals = {
                              - "aws:SourceArn" = "arn:aws:sns:eu-west-2:535760944720:prod-ehr-transfer-service-unhandled-sns-topic"
                            }
                        }
                      - Effect    = "Allow"
                      - Principal = {
                          - Service = "sns.amazonaws.com"
                        }
                      - Resource  = "arn:aws:sqs:eu-west-2:535760944720:prod-ehr-out-service-incoming"
                      - Sid       = ""
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> (known after apply)
        # (1 unchanged attribute hidden)
    }

  # aws_ssm_parameter.db_host will be destroyed
  # (because aws_ssm_parameter.db_host is not in configuration)
  - resource "aws_ssm_parameter" "db_host" {
      - arn             = "arn:aws:ssm:eu-west-2:535760944720:parameter/repo/prod/output/prm-repo-ehr-out-service/db-host" -> null
      - data_type       = "text" -> null
      - id              = "/repo/prod/output/prm-repo-ehr-out-service/db-host" -> null
      - name            = "/repo/prod/output/prm-repo-ehr-out-service/db-host" -> null
      - tags            = {
          - "CreatedBy"   = "prm-repo-ehr-out-service"
          - "Environment" = "prod"
        } -> null
      - tags_all        = {
          - "CreatedBy"   = "prm-repo-ehr-out-service"
          - "Environment" = "prod"
        } -> null
      - tier            = "Standard" -> null
      - type            = "String" -> null
      - value           = (sensitive value) -> null
      - version         = 1 -> null
        # (3 unchanged attributes hidden)
    }

  # aws_ssm_parameter.db_name will be destroyed
  # (because aws_ssm_parameter.db_name is not in configuration)
  - resource "aws_ssm_parameter" "db_name" {
      - arn             = "arn:aws:ssm:eu-west-2:535760944720:parameter/repo/prod/output/prm-repo-ehr-out-service/db-name" -> null
      - data_type       = "text" -> null
      - id              = "/repo/prod/output/prm-repo-ehr-out-service/db-name" -> null
      - name            = "/repo/prod/output/prm-repo-ehr-out-service/db-name" -> null
      - tags            = {} -> null
      - tags_all        = {} -> null
      - tier            = "Standard" -> null
      - type            = "String" -> null
      - value           = (sensitive value) -> null
      - version         = 1 -> null
        # (3 unchanged attributes hidden)
    }

  # aws_ssm_parameter.db_resource_cluster_id will be destroyed
  # (because aws_ssm_parameter.db_resource_cluster_id is not in configuration)
  - resource "aws_ssm_parameter" "db_resource_cluster_id" {
      - arn             = "arn:aws:ssm:eu-west-2:535760944720:parameter/repo/prod/output/prm-repo-ehr-out-service/db-resource-cluster-id" -> null
      - data_type       = "text" -> null
      - id              = "/repo/prod/output/prm-repo-ehr-out-service/db-resource-cluster-id" -> null
      - name            = "/repo/prod/output/prm-repo-ehr-out-service/db-resource-cluster-id" -> null
      - tags            = {
          - "CreatedBy"   = "prm-repo-ehr-out-service"
          - "Environment" = "prod"
        } -> null
      - tags_all        = {
          - "CreatedBy"   = "prm-repo-ehr-out-service"
          - "Environment" = "prod"
        } -> null
      - tier            = "Standard" -> null
      - type            = "String" -> null
      - value           = (sensitive value) -> null
      - version         = 1 -> null
        # (3 unchanged attributes hidden)
    }

  # aws_ssm_parameter.service_url will be destroyed
  # (because aws_ssm_parameter.service_url is not in configuration)
  - resource "aws_ssm_parameter" "service_url" {
      - arn             = "arn:aws:ssm:eu-west-2:535760944720:parameter/repo/prod/output/prm-repo-ehr-out-service/ehr-out-service-service-url" -> null
      - data_type       = "text" -> null
      - id              = "/repo/prod/output/prm-repo-ehr-out-service/ehr-out-service-service-url" -> null
      - name            = "/repo/prod/output/prm-repo-ehr-out-service/ehr-out-service-service-url" -> null
      - tags            = {} -> null
      - tags_all        = {} -> null
      - tier            = "Standard" -> null
      - type            = "String" -> null
      - value           = (sensitive value) -> null
      - version         = 1 -> null
        # (3 unchanged attributes hidden)
    }

Plan: 6 to add, 7 to change, 15 to destroy.

@AndyFlintNHS AndyFlintNHS merged commit f9813e0 into main Aug 13, 2024
5 of 6 checks passed
@AndyFlintNHS AndyFlintNHS deleted the PRMP-723 branch August 13, 2024 12:56
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.

3 participants