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

Increment versions to prevent ResourceAlreadyExistsException #549

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

pavmoj
Copy link
Contributor

@pavmoj pavmoj commented Aug 31, 2023

Incrementing versions to prevent

Error: creating Image Builder Image Recipe: ResourceAlreadyExistsException: The following resource 'ImageRecipe' already exists: 'arn:aws:imagebuilder:eu-west-2:374269020027:image-recipe/base-windows-server-2012/0.0.2'.

@pavmoj pavmoj requested review from a team as code owners August 31, 2023 15:06
@github-actions
Copy link
Contributor

teams/hmpps/windows_server_2022 terragrunt plan on pull_request event #30

module.imagebuilder.data.terraform_remote_state.imagebuilder_mp: Reading...
module.imagebuilder.data.terraform_remote_state.core_shared_services_production: Reading...
module.imagebuilder.data.terraform_remote_state.imagebuilder_mp: Read complete after 1s
module.imagebuilder.data.terraform_remote_state.core_shared_services_production: Read complete after 1s
module.imagebuilder.data.aws_secretsmanager_secret.environment_management: Reading...
module.imagebuilder.data.aws_secretsmanager_secret.environment_management: Read complete after 0s [id=<REDACTED>]
module.imagebuilder.data.aws_secretsmanager_secret_version.environment_management: Reading...
module.imagebuilder.data.aws_secretsmanager_secret_version.environment_management: Read complete after 0s [id=<REDACTED>]
module.imagebuilder.data.aws_imagebuilder_component.this["amazon-cloudwatch-agent-windows"]: Reading...
module.imagebuilder.data.aws_imagebuilder_component.this["ec2launch-v2-windows"]: Reading...
module.imagebuilder.data.aws_caller_identity.current: Reading...
module.imagebuilder.data.aws_caller_identity.current: Read complete after 0s [id=<REDACTED>]
module.imagebuilder.data.aws_kms_key.hmpps_ebs_encryption_cmk: Reading...
module.imagebuilder.data.aws_kms_key.hmpps_ebs_encryption_cmk: Read complete after 1s [id=<REDACTED>]
module.imagebuilder.data.aws_imagebuilder_component.this["amazon-cloudwatch-agent-windows"]: Read complete after 1s [id=<REDACTED>]
module.imagebuilder.data.aws_imagebuilder_component.this["ec2launch-v2-windows"]: Read complete after 1s [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_infrastructure_configuration.this: Refreshing state... [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_image_recipe.this: Refreshing state... [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_distribution_configuration.this: Refreshing state... [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_image_pipeline.this: Refreshing state... [id=<REDACTED>]

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
+/- create replacement and then destroy

Terraform will perform the following actions:

  # module.imagebuilder.aws_imagebuilder_distribution_configuration.this will be updated in-place
  ~ resource "aws_imagebuilder_distribution_configuration" "this" {
        id           = "arn:aws:imagebuilder:eu-west-2:374269020027:distribution-configuration/hmpps-windows-server-2022"
        name         = "hmpps_windows_server_2022"
      ~ tags         = {
          ~ "image-recipe"                            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
            # (11 unchanged elements hidden)
        }
      ~ tags_all     = {
          ~ "image-recipe"                            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
            # (11 unchanged elements hidden)
        }
        # (4 unchanged attributes hidden)

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

  # module.imagebuilder.aws_imagebuilder_image_pipeline.this must be replaced
-/+ resource "aws_imagebuilder_image_pipeline" "this" {
      ~ arn                              = "arn:aws:imagebuilder:eu-west-2:374269020027:image-pipeline/hmpps-windows-server-2022" -> (known after apply)
      ~ date_created                     = "2023-07-21T09:26:12.724Z" -> (known after apply)
      ~ date_last_run                    = "2023-08-30T14:20:21.789Z" -> (known after apply)
      ~ date_next_run                    = "2023-09-02T00:00:00.000Z" -> (known after apply)
      ~ date_updated                     = "2023-07-21T09:26:12.724Z" -> (known after apply)
      ~ id                               = "arn:aws:imagebuilder:eu-west-2:374269020027:image-pipeline/hmpps-windows-server-2022" -> (known after apply)
      ~ image_recipe_arn                 = "arn:aws:imagebuilder:eu-west-2:374269020027:image-recipe/hmpps-windows-server-2022/0.0.2" -> (known after apply) # forces replacement
      ~ infrastructure_configuration_arn = "arn:aws:imagebuilder:eu-west-2:374269020027:infrastructure-configuration/hmpps-windows-server-2022-0-0-2" -> (known after apply)
        name                             = "hmpps_windows_server_2022"
      ~ platform                         = "Windows" -> (known after apply)
      ~ tags                             = {
          ~ "image-recipe"                            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
            # (11 unchanged elements hidden)
        }
      ~ tags_all                         = {
          ~ "image-recipe"                            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
            # (11 unchanged elements hidden)
        }
        # (4 unchanged attributes hidden)

      + image_scanning_configuration {
          + image_scanning_enabled = (known after apply)

          + ecr_configuration {
              + container_tags  = (known after apply)
              + repository_name = (known after apply)
            }
        }

      ~ schedule {
          + timezone                           = (known after apply)
            # (2 unchanged attributes hidden)
        }

        # (1 unchanged block hidden)
    }

  # module.imagebuilder.aws_imagebuilder_image_recipe.this must be replaced
+/- resource "aws_imagebuilder_image_recipe" "this" {
      ~ arn               = "arn:aws:imagebuilder:eu-west-2:374269020027:image-recipe/hmpps-windows-server-2022/0.0.2" -> (known after apply)
      ~ date_created      = "2023-07-21T09:26:11.683Z" -> (known after apply)
      ~ id                = "arn:aws:imagebuilder:eu-west-2:374269020027:image-recipe/hmpps-windows-server-2022/0.0.2" -> (known after apply)
        name              = "hmpps_windows_server_2022"
      ~ owner             = "374269020027" -> (known after apply)
      ~ platform          = "Windows" -> (known after apply)
      ~ tags              = {
          ~ "image-recipe"                            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
            # (11 unchanged elements hidden)
        }
      ~ tags_all          = {
          ~ "image-recipe"                            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
            # (11 unchanged elements hidden)
        }
      + user_data_base64  = (known after apply)
      ~ version           = "0.0.2" -> "0.0.3" # forces replacement
      - working_directory = "" -> null
        # (2 unchanged attributes hidden)

      - block_device_mapping {
          - device_name = "/dev/sda1" -> null
          - no_device   = false -> null

          - ebs {
              - delete_on_termination = "true" -> null
              - encrypted             = "true" -> null
              - iops                  = 0 -> null
              - kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691" -> null
              - throughput            = 0 -> null
              - volume_size           = 30 -> null
              - volume_type           = "gp3" -> null
            }
        }
      + block_device_mapping {
          + device_name = "/dev/sda1"

          + ebs {
              + delete_on_termination = "true"
              + encrypted             = "true"
              + kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691"
              + volume_size           = 30
              + volume_type           = "gp3"
            }
        }

      + systems_manager_agent {
          + uninstall_after_build = (known after apply)
        }

        # (4 unchanged blocks hidden)
    }

  # module.imagebuilder.aws_imagebuilder_infrastructure_configuration.this must be replaced
-/+ resource "aws_imagebuilder_infrastructure_configuration" "this" {
      ~ arn                           = "arn:aws:imagebuilder:eu-west-2:374269020027:infrastructure-configuration/hmpps-windows-server-2022-0-0-2" -> (known after apply)
      ~ date_created                  = "2023-07-21T09:26:11.626Z" -> (known after apply)
      + date_updated                  = (known after apply)
      ~ id                            = "arn:aws:imagebuilder:eu-west-2:374269020027:infrastructure-configuration/hmpps-windows-server-2022-0-0-2" -> (known after apply)
      ~ name                          = "hmpps_windows_server_2022_0_0_2" -> "hmpps_windows_server_2022_0_0_3" # forces replacement
      ~ resource_tags                 = {
          ~ "image-recipe"                            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
            # (11 unchanged elements hidden)
        }
      ~ tags                          = {
          ~ "image-recipe"                            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
            # (11 unchanged elements hidden)
        }
      ~ tags_all                      = {
          ~ "image-recipe"                            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
            # (11 unchanged elements hidden)
        }
        # (6 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

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

@github-actions
Copy link
Contributor

teams/hmpps/ol_8_5_oracledb_19c terragrunt plan on pull_request event #30

module.imagebuilder.data.terraform_remote_state.core_shared_services_production: Reading...
module.imagebuilder.data.terraform_remote_state.imagebuilder_mp: Reading...
module.imagebuilder.data.terraform_remote_state.core_shared_services_production: Read complete after 1s
module.imagebuilder.data.terraform_remote_state.imagebuilder_mp: Read complete after 1s
module.imagebuilder.data.aws_secretsmanager_secret.environment_management: Reading...
module.imagebuilder.data.aws_secretsmanager_secret.environment_management: Read complete after 0s [id=<REDACTED>]
module.imagebuilder.data.aws_secretsmanager_secret_version.environment_management: Reading...
module.imagebuilder.data.aws_secretsmanager_secret_version.environment_management: Read complete after 0s [id=<REDACTED>]
module.imagebuilder.data.aws_caller_identity.current: Reading...
module.imagebuilder.aws_imagebuilder_infrastructure_configuration.this: Refreshing state... [id=<REDACTED>]
module.imagebuilder.data.aws_caller_identity.current: Read complete after 0s [id=<REDACTED>]
module.imagebuilder.data.aws_kms_key.hmpps_ebs_encryption_cmk: Reading...
module.imagebuilder.data.aws_kms_key.hmpps_ebs_encryption_cmk: Read complete after 0s [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_distribution_configuration.this: Refreshing state... [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_image_recipe.this: Refreshing state... [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_image_pipeline.this: Refreshing state... [id=<REDACTED>]

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
+/- create replacement and then destroy

Terraform will perform the following actions:

  # module.imagebuilder.aws_imagebuilder_distribution_configuration.this will be updated in-place
  ~ resource "aws_imagebuilder_distribution_configuration" "this" {
        id           = "arn:aws:imagebuilder:eu-west-2:374269020027:distribution-configuration/hmpps-ol-8-5-oracledb-19c"
        name         = "hmpps_ol_8_5_oracledb_19c"
      ~ tags         = {
          ~ "image-recipe"                 = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
          ~ "infrastructure-configuration" = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
            # (9 unchanged elements hidden)
        }
      ~ tags_all     = {
          ~ "image-recipe"                 = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
          ~ "infrastructure-configuration" = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
            # (9 unchanged elements hidden)
        }
        # (4 unchanged attributes hidden)

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

  # module.imagebuilder.aws_imagebuilder_image_pipeline.this must be replaced
-/+ resource "aws_imagebuilder_image_pipeline" "this" {
      ~ arn                              = "arn:aws:imagebuilder:eu-west-2:374269020027:image-pipeline/hmpps-ol-8-5-oracledb-19c" -> (known after apply)
      ~ date_created                     = "2023-08-08T13:44:07.495Z" -> (known after apply)
      ~ date_last_run                    = "2023-08-08T13:49:56.295Z" -> (known after apply)
      ~ date_next_run                    = "2023-09-02T00:00:00.000Z" -> (known after apply)
      ~ date_updated                     = "2023-08-08T13:44:07.495Z" -> (known after apply)
      ~ id                               = "arn:aws:imagebuilder:eu-west-2:374269020027:image-pipeline/hmpps-ol-8-5-oracledb-19c" -> (known after apply)
      ~ image_recipe_arn                 = "arn:aws:imagebuilder:eu-west-2:374269020027:image-recipe/hmpps-ol-8-5-oracledb-19c/0.0.3" -> (known after apply) # forces replacement
      ~ infrastructure_configuration_arn = "arn:aws:imagebuilder:eu-west-2:374269020027:infrastructure-configuration/hmpps-ol-8-5-oracledb-19c-0-0-3" -> (known after apply)
        name                             = "hmpps_ol_8_5_oracledb_19c"
      ~ platform                         = "Linux" -> (known after apply)
      ~ tags                             = {
          ~ "image-recipe"                 = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
          ~ "infrastructure-configuration" = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
            # (9 unchanged elements hidden)
        }
      ~ tags_all                         = {
          ~ "image-recipe"                 = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
          ~ "infrastructure-configuration" = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
            # (9 unchanged elements hidden)
        }
        # (4 unchanged attributes hidden)

      + image_scanning_configuration {
          + image_scanning_enabled = (known after apply)

          + ecr_configuration {
              + container_tags  = (known after apply)
              + repository_name = (known after apply)
            }
        }

      ~ schedule {
          + timezone                           = (known after apply)
            # (2 unchanged attributes hidden)
        }

        # (1 unchanged block hidden)
    }

  # module.imagebuilder.aws_imagebuilder_image_recipe.this must be replaced
+/- resource "aws_imagebuilder_image_recipe" "this" {
      ~ arn               = "arn:aws:imagebuilder:eu-west-2:374269020027:image-recipe/hmpps-ol-8-5-oracledb-19c/0.0.3" -> (known after apply)
      ~ date_created      = "2023-08-08T13:44:06.321Z" -> (known after apply)
      ~ id                = "arn:aws:imagebuilder:eu-west-2:374269020027:image-recipe/hmpps-ol-8-5-oracledb-19c/0.0.3" -> (known after apply)
        name              = "hmpps_ol_8_5_oracledb_19c"
      ~ owner             = "374269020027" -> (known after apply)
      ~ platform          = "Linux" -> (known after apply)
      ~ tags              = {
          ~ "image-recipe"                 = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
          ~ "infrastructure-configuration" = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
            # (9 unchanged elements hidden)
        }
      ~ tags_all          = {
          ~ "image-recipe"                 = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
          ~ "infrastructure-configuration" = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
            # (9 unchanged elements hidden)
        }
      ~ user_data_base64  = "" -> (known after apply)
      ~ version           = "0.0.3" -> "0.0.4" # forces replacement
      - working_directory = "" -> null
        # (2 unchanged attributes hidden)

      - block_device_mapping {
          - device_name = "/dev/sda1" -> null
          - no_device   = false -> null

          - ebs {
              - delete_on_termination = "true" -> null
              - encrypted             = "true" -> null
              - iops                  = 0 -> null
              - kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691" -> null
              - throughput            = 0 -> null
              - volume_size           = 30 -> null
              - volume_type           = "gp3" -> null
            }
        }
      + block_device_mapping {
          + device_name = "/dev/sda1"

          + ebs {
              + delete_on_termination = "true"
              + encrypted             = "true"
              + kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691"
              + volume_size           = 30
              + volume_type           = "gp3"
            }
        }
      - block_device_mapping {
          - device_name = "/dev/sdb" -> null
          - no_device   = false -> null

          - ebs {
              - delete_on_termination = "true" -> null
              - encrypted             = "true" -> null
              - iops                  = 0 -> null
              - kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691" -> null
              - throughput            = 0 -> null
              - volume_size           = 100 -> null
              - volume_type           = "gp3" -> null
            }
        }
      + block_device_mapping {
          + device_name = "/dev/sdb"

          + ebs {
              + delete_on_termination = "true"
              + encrypted             = "true"
              + kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691"
              + volume_size           = 100
              + volume_type           = "gp3"
            }
        }
      - block_device_mapping {
          - device_name = "/dev/sdc" -> null
          - no_device   = false -> null

          - ebs {
              - delete_on_termination = "true" -> null
              - encrypted             = "true" -> null
              - iops                  = 0 -> null
              - kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691" -> null
              - throughput            = 0 -> null
              - volume_size           = 100 -> null
              - volume_type           = "gp3" -> null
            }
        }
      + block_device_mapping {
          + device_name = "/dev/sdc"

          + ebs {
              + delete_on_termination = "true"
              + encrypted             = "true"
              + kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691"
              + volume_size           = 100
              + volume_type           = "gp3"
            }
        }
      - block_device_mapping {
          - device_name = "/dev/sde" -> null
          - no_device   = false -> null

          - ebs {
              - delete_on_termination = "true" -> null
              - encrypted             = "true" -> null
              - iops                  = 0 -> null
              - kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691" -> null
              - throughput            = 0 -> null
              - volume_size           = 1 -> null
              - volume_type           = "gp3" -> null
            }
        }
      + block_device_mapping {
          + device_name = "/dev/sde"

          + ebs {
              + delete_on_termination = "true"
              + encrypted             = "true"
              + kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691"
              + volume_size           = 1
              + volume_type           = "gp3"
            }
        }
      - block_device_mapping {
          - device_name = "/dev/sdf" -> null
          - no_device   = false -> null

          - ebs {
              - delete_on_termination = "true" -> null
              - encrypted             = "true" -> null
              - iops                  = 0 -> null
              - kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691" -> null
              - throughput            = 0 -> null
              - volume_size           = 1 -> null
              - volume_type           = "gp3" -> null
            }
        }
      + block_device_mapping {
          + device_name = "/dev/sdf"

          + ebs {
              + delete_on_termination = "true"
              + encrypted             = "true"
              + kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691"
              + volume_size           = 1
              + volume_type           = "gp3"
            }
        }
      - block_device_mapping {
          - device_name = "/dev/sdg" -> null
          - no_device   = false -> null

          - ebs {
              - delete_on_termination = "true" -> null
              - encrypted             = "true" -> null
              - iops                  = 0 -> null
              - kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691" -> null
              - throughput            = 0 -> null
              - volume_size           = 1 -> null
              - volume_type           = "gp3" -> null
            }
        }
      + block_device_mapping {
          + device_name = "/dev/sdg"

          + ebs {
              + delete_on_termination = "true"
              + encrypted             = "true"
              + kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691"
              + volume_size           = 1
              + volume_type           = "gp3"
            }
        }
      - block_device_mapping {
          - device_name = "/dev/sdh" -> null
          - no_device   = false -> null

          - ebs {
              - delete_on_termination = "true" -> null
              - encrypted             = "true" -> null
              - iops                  = 0 -> null
              - kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691" -> null
              - throughput            = 0 -> null
              - volume_size           = 1 -> null
              - volume_type           = "gp3" -> null
            }
        }
      + block_device_mapping {
          + device_name = "/dev/sdh"

          + ebs {
              + delete_on_termination = "true"
              + encrypted             = "true"
              + kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691"
              + volume_size           = 1
              + volume_type           = "gp3"
            }
        }
      - block_device_mapping {
          - device_name = "/dev/sdi" -> null
          - no_device   = false -> null

          - ebs {
              - delete_on_termination = "true" -> null
              - encrypted             = "true" -> null
              - iops                  = 0 -> null
              - kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691" -> null
              - throughput            = 0 -> null
              - volume_size           = 1 -> null
              - volume_type           = "gp3" -> null
            }
        }
      + block_device_mapping {
          + device_name = "/dev/sdi"

          + ebs {
              + delete_on_termination = "true"
              + encrypted             = "true"
              + kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691"
              + volume_size           = 1
              + volume_type           = "gp3"
            }
        }
      - block_device_mapping {
          - device_name = "/dev/sdj" -> null
          - no_device   = false -> null

          - ebs {
              - delete_on_termination = "true" -> null
              - encrypted             = "true" -> null
              - iops                  = 0 -> null
              - kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691" -> null
              - throughput            = 0 -> null
              - volume_size           = 1 -> null
              - volume_type           = "gp3" -> null
            }
        }
      + block_device_mapping {
          + device_name = "/dev/sdj"

          + ebs {
              + delete_on_termination = "true"
              + encrypted             = "true"
              + kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691"
              + volume_size           = 1
              + volume_type           = "gp3"
            }
        }
      - block_device_mapping {
          - device_name = "/dev/sdk" -> null
          - no_device   = false -> null

          - ebs {
              - delete_on_termination = "true" -> null
              - encrypted             = "true" -> null
              - iops                  = 0 -> null
              - kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691" -> null
              - throughput            = 0 -> null
              - volume_size           = 1 -> null
              - volume_type           = "gp3" -> null
            }
        }
      + block_device_mapping {
          + device_name = "/dev/sdk"

          + ebs {
              + delete_on_termination = "true"
              + encrypted             = "true"
              + kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691"
              + volume_size           = 1
              + volume_type           = "gp3"
            }
        }
      - block_device_mapping {
          - device_name = "/dev/sds" -> null
          - no_device   = false -> null

          - ebs {
              - delete_on_termination = "true" -> null
              - encrypted             = "true" -> null
              - iops                  = 0 -> null
              - kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691" -> null
              - throughput            = 0 -> null
              - volume_size           = 4 -> null
              - volume_type           = "gp3" -> null
            }
        }
      + block_device_mapping {
          + device_name = "/dev/sds"

          + ebs {
              + delete_on_termination = "true"
              + encrypted             = "true"
              + kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691"
              + volume_size           = 4
              + volume_type           = "gp3"
            }
        }

        # (2 unchanged blocks hidden)
    }

  # module.imagebuilder.aws_imagebuilder_infrastructure_configuration.this must be replaced
-/+ resource "aws_imagebuilder_infrastructure_configuration" "this" {
      ~ arn                           = "arn:aws:imagebuilder:eu-west-2:374269020027:infrastructure-configuration/hmpps-ol-8-5-oracledb-19c-0-0-3" -> (known after apply)
      ~ date_created                  = "2023-08-08T13:44:06.532Z" -> (known after apply)
      + date_updated                  = (known after apply)
      ~ id                            = "arn:aws:imagebuilder:eu-west-2:374269020027:infrastructure-configuration/hmpps-ol-8-5-oracledb-19c-0-0-3" -> (known after apply)
      ~ name                          = "hmpps_ol_8_5_oracledb_19c_0_0_3" -> "hmpps_ol_8_5_oracledb_19c_0_0_4" # forces replacement
      ~ resource_tags                 = {
          ~ "image-recipe"                 = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
          ~ "infrastructure-configuration" = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
            # (9 unchanged elements hidden)
        }
      ~ tags                          = {
          ~ "image-recipe"                 = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
          ~ "infrastructure-configuration" = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
            # (9 unchanged elements hidden)
        }
      ~ tags_all                      = {
          ~ "image-recipe"                 = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
          ~ "infrastructure-configuration" = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
            # (9 unchanged elements hidden)
        }
        # (6 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

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

@pavmoj pavmoj merged commit 7d6922f into main Aug 31, 2023
5 checks passed
@pavmoj pavmoj deleted the feature/DSO-2115/Add_rhel_8_to_hmpps branch August 31, 2023 15:16
@github-actions
Copy link
Contributor

teams/hmpps/windows_server_2022 terragrunt plan on push event #31

module.imagebuilder.data.terraform_remote_state.core_shared_services_production: Reading...
module.imagebuilder.data.terraform_remote_state.imagebuilder_mp: Reading...
module.imagebuilder.data.terraform_remote_state.imagebuilder_mp: Read complete after 1s
module.imagebuilder.data.terraform_remote_state.core_shared_services_production: Read complete after 1s
module.imagebuilder.data.aws_secretsmanager_secret.environment_management: Reading...
module.imagebuilder.data.aws_secretsmanager_secret.environment_management: Read complete after 0s [id=<REDACTED>]
module.imagebuilder.data.aws_secretsmanager_secret_version.environment_management: Reading...
module.imagebuilder.data.aws_secretsmanager_secret_version.environment_management: Read complete after 0s [id=<REDACTED>]
module.imagebuilder.data.aws_caller_identity.current: Reading...
module.imagebuilder.data.aws_imagebuilder_component.this["ec2launch-v2-windows"]: Reading...
module.imagebuilder.data.aws_imagebuilder_component.this["amazon-cloudwatch-agent-windows"]: Reading...
module.imagebuilder.data.aws_caller_identity.current: Read complete after 0s [id=<REDACTED>]
module.imagebuilder.data.aws_kms_key.hmpps_ebs_encryption_cmk: Reading...
module.imagebuilder.data.aws_kms_key.hmpps_ebs_encryption_cmk: Read complete after 0s [id=<REDACTED>]
module.imagebuilder.data.aws_imagebuilder_component.this["ec2launch-v2-windows"]: Read complete after 0s [id=<REDACTED>]
module.imagebuilder.data.aws_imagebuilder_component.this["amazon-cloudwatch-agent-windows"]: Read complete after 0s [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_image_recipe.this: Refreshing state... [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_infrastructure_configuration.this: Refreshing state... [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_distribution_configuration.this: Refreshing state... [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_image_pipeline.this: Refreshing state... [id=<REDACTED>]

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
+/- create replacement and then destroy

Terraform will perform the following actions:

  # module.imagebuilder.aws_imagebuilder_distribution_configuration.this will be updated in-place
  ~ resource "aws_imagebuilder_distribution_configuration" "this" {
        id           = "arn:aws:imagebuilder:eu-west-2:374269020027:distribution-configuration/hmpps-windows-server-2022"
        name         = "hmpps_windows_server_2022"
      ~ tags         = {
          ~ "image-recipe"                            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
            # (11 unchanged elements hidden)
        }
      ~ tags_all     = {
          ~ "image-recipe"                            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
            # (11 unchanged elements hidden)
        }
        # (4 unchanged attributes hidden)

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

  # module.imagebuilder.aws_imagebuilder_image_pipeline.this must be replaced
-/+ resource "aws_imagebuilder_image_pipeline" "this" {
      ~ arn                              = "arn:aws:imagebuilder:eu-west-2:374269020027:image-pipeline/hmpps-windows-server-2022" -> (known after apply)
      ~ date_created                     = "2023-07-21T09:26:12.724Z" -> (known after apply)
      ~ date_last_run                    = "2023-08-30T14:20:21.789Z" -> (known after apply)
      ~ date_next_run                    = "2023-09-02T00:00:00.000Z" -> (known after apply)
      ~ date_updated                     = "2023-07-21T09:26:12.724Z" -> (known after apply)
      ~ id                               = "arn:aws:imagebuilder:eu-west-2:374269020027:image-pipeline/hmpps-windows-server-2022" -> (known after apply)
      ~ image_recipe_arn                 = "arn:aws:imagebuilder:eu-west-2:374269020027:image-recipe/hmpps-windows-server-2022/0.0.2" -> (known after apply) # forces replacement
      ~ infrastructure_configuration_arn = "arn:aws:imagebuilder:eu-west-2:374269020027:infrastructure-configuration/hmpps-windows-server-2022-0-0-2" -> (known after apply)
        name                             = "hmpps_windows_server_2022"
      ~ platform                         = "Windows" -> (known after apply)
      ~ tags                             = {
          ~ "image-recipe"                            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
            # (11 unchanged elements hidden)
        }
      ~ tags_all                         = {
          ~ "image-recipe"                            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
            # (11 unchanged elements hidden)
        }
        # (4 unchanged attributes hidden)

      + image_scanning_configuration {
          + image_scanning_enabled = (known after apply)

          + ecr_configuration {
              + container_tags  = (known after apply)
              + repository_name = (known after apply)
            }
        }

      ~ schedule {
          + timezone                           = (known after apply)
            # (2 unchanged attributes hidden)
        }

        # (1 unchanged block hidden)
    }

  # module.imagebuilder.aws_imagebuilder_image_recipe.this must be replaced
+/- resource "aws_imagebuilder_image_recipe" "this" {
      ~ arn               = "arn:aws:imagebuilder:eu-west-2:374269020027:image-recipe/hmpps-windows-server-2022/0.0.2" -> (known after apply)
      ~ date_created      = "2023-07-21T09:26:11.683Z" -> (known after apply)
      ~ id                = "arn:aws:imagebuilder:eu-west-2:374269020027:image-recipe/hmpps-windows-server-2022/0.0.2" -> (known after apply)
        name              = "hmpps_windows_server_2022"
      ~ owner             = "374269020027" -> (known after apply)
      ~ platform          = "Windows" -> (known after apply)
      ~ tags              = {
          ~ "image-recipe"                            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
            # (11 unchanged elements hidden)
        }
      ~ tags_all          = {
          ~ "image-recipe"                            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
            # (11 unchanged elements hidden)
        }
      + user_data_base64  = (known after apply)
      ~ version           = "0.0.2" -> "0.0.3" # forces replacement
      - working_directory = "" -> null
        # (2 unchanged attributes hidden)

      - block_device_mapping {
          - device_name = "/dev/sda1" -> null
          - no_device   = false -> null

          - ebs {
              - delete_on_termination = "true" -> null
              - encrypted             = "true" -> null
              - iops                  = 0 -> null
              - kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691" -> null
              - throughput            = 0 -> null
              - volume_size           = 30 -> null
              - volume_type           = "gp3" -> null
            }
        }
      + block_device_mapping {
          + device_name = "/dev/sda1"

          + ebs {
              + delete_on_termination = "true"
              + encrypted             = "true"
              + kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691"
              + volume_size           = 30
              + volume_type           = "gp3"
            }
        }

      + systems_manager_agent {
          + uninstall_after_build = (known after apply)
        }

        # (4 unchanged blocks hidden)
    }

  # module.imagebuilder.aws_imagebuilder_infrastructure_configuration.this must be replaced
-/+ resource "aws_imagebuilder_infrastructure_configuration" "this" {
      ~ arn                           = "arn:aws:imagebuilder:eu-west-2:374269020027:infrastructure-configuration/hmpps-windows-server-2022-0-0-2" -> (known after apply)
      ~ date_created                  = "2023-07-21T09:26:11.626Z" -> (known after apply)
      + date_updated                  = (known after apply)
      ~ id                            = "arn:aws:imagebuilder:eu-west-2:374269020027:infrastructure-configuration/hmpps-windows-server-2022-0-0-2" -> (known after apply)
      ~ name                          = "hmpps_windows_server_2022_0_0_2" -> "hmpps_windows_server_2022_0_0_3" # forces replacement
      ~ resource_tags                 = {
          ~ "image-recipe"                            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
            # (11 unchanged elements hidden)
        }
      ~ tags                          = {
          ~ "image-recipe"                            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
            # (11 unchanged elements hidden)
        }
      ~ tags_all                      = {
          ~ "image-recipe"                            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2022/0.0.2" -> "hmpps_windows_server_2022/0.0.3"
            # (11 unchanged elements hidden)
        }
        # (6 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

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

@github-actions
Copy link
Contributor

teams/hmpps/ol_8_5_oracledb_19c terragrunt plan on push event #31

module.imagebuilder.data.terraform_remote_state.core_shared_services_production: Reading...
module.imagebuilder.data.terraform_remote_state.imagebuilder_mp: Reading...
module.imagebuilder.data.terraform_remote_state.imagebuilder_mp: Read complete after 1s
module.imagebuilder.data.terraform_remote_state.core_shared_services_production: Read complete after 2s
module.imagebuilder.data.aws_secretsmanager_secret.environment_management: Reading...
module.imagebuilder.data.aws_secretsmanager_secret.environment_management: Read complete after 0s [id=<REDACTED>]
module.imagebuilder.data.aws_secretsmanager_secret_version.environment_management: Reading...
module.imagebuilder.data.aws_secretsmanager_secret_version.environment_management: Read complete after 1s [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_infrastructure_configuration.this: Refreshing state... [id=<REDACTED>]
module.imagebuilder.data.aws_caller_identity.current: Reading...
module.imagebuilder.data.aws_caller_identity.current: Read complete after 0s [id=<REDACTED>]
module.imagebuilder.data.aws_kms_key.hmpps_ebs_encryption_cmk: Reading...
module.imagebuilder.data.aws_kms_key.hmpps_ebs_encryption_cmk: Read complete after 0s [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_distribution_configuration.this: Refreshing state... [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_image_recipe.this: Refreshing state... [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_image_pipeline.this: Refreshing state... [id=<REDACTED>]

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
+/- create replacement and then destroy

Terraform will perform the following actions:

  # module.imagebuilder.aws_imagebuilder_distribution_configuration.this will be updated in-place
  ~ resource "aws_imagebuilder_distribution_configuration" "this" {
        id           = "arn:aws:imagebuilder:eu-west-2:374269020027:distribution-configuration/hmpps-ol-8-5-oracledb-19c"
        name         = "hmpps_ol_8_5_oracledb_19c"
      ~ tags         = {
          ~ "image-recipe"                 = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
          ~ "infrastructure-configuration" = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
            # (9 unchanged elements hidden)
        }
      ~ tags_all     = {
          ~ "image-recipe"                 = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
          ~ "infrastructure-configuration" = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
            # (9 unchanged elements hidden)
        }
        # (4 unchanged attributes hidden)

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

  # module.imagebuilder.aws_imagebuilder_image_pipeline.this must be replaced
-/+ resource "aws_imagebuilder_image_pipeline" "this" {
      ~ arn                              = "arn:aws:imagebuilder:eu-west-2:374269020027:image-pipeline/hmpps-ol-8-5-oracledb-19c" -> (known after apply)
      ~ date_created                     = "2023-08-08T13:44:07.495Z" -> (known after apply)
      ~ date_last_run                    = "2023-08-08T13:49:56.295Z" -> (known after apply)
      ~ date_next_run                    = "2023-09-02T00:00:00.000Z" -> (known after apply)
      ~ date_updated                     = "2023-08-08T13:44:07.495Z" -> (known after apply)
      ~ id                               = "arn:aws:imagebuilder:eu-west-2:374269020027:image-pipeline/hmpps-ol-8-5-oracledb-19c" -> (known after apply)
      ~ image_recipe_arn                 = "arn:aws:imagebuilder:eu-west-2:374269020027:image-recipe/hmpps-ol-8-5-oracledb-19c/0.0.3" -> (known after apply) # forces replacement
      ~ infrastructure_configuration_arn = "arn:aws:imagebuilder:eu-west-2:374269020027:infrastructure-configuration/hmpps-ol-8-5-oracledb-19c-0-0-3" -> (known after apply)
        name                             = "hmpps_ol_8_5_oracledb_19c"
      ~ platform                         = "Linux" -> (known after apply)
      ~ tags                             = {
          ~ "image-recipe"                 = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
          ~ "infrastructure-configuration" = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
            # (9 unchanged elements hidden)
        }
      ~ tags_all                         = {
          ~ "image-recipe"                 = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
          ~ "infrastructure-configuration" = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
            # (9 unchanged elements hidden)
        }
        # (4 unchanged attributes hidden)

      + image_scanning_configuration {
          + image_scanning_enabled = (known after apply)

          + ecr_configuration {
              + container_tags  = (known after apply)
              + repository_name = (known after apply)
            }
        }

      ~ schedule {
          + timezone                           = (known after apply)
            # (2 unchanged attributes hidden)
        }

        # (1 unchanged block hidden)
    }

  # module.imagebuilder.aws_imagebuilder_image_recipe.this must be replaced
+/- resource "aws_imagebuilder_image_recipe" "this" {
      ~ arn               = "arn:aws:imagebuilder:eu-west-2:374269020027:image-recipe/hmpps-ol-8-5-oracledb-19c/0.0.3" -> (known after apply)
      ~ date_created      = "2023-08-08T13:44:06.321Z" -> (known after apply)
      ~ id                = "arn:aws:imagebuilder:eu-west-2:374269020027:image-recipe/hmpps-ol-8-5-oracledb-19c/0.0.3" -> (known after apply)
        name              = "hmpps_ol_8_5_oracledb_19c"
      ~ owner             = "374269020027" -> (known after apply)
      ~ platform          = "Linux" -> (known after apply)
      ~ tags              = {
          ~ "image-recipe"                 = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
          ~ "infrastructure-configuration" = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
            # (9 unchanged elements hidden)
        }
      ~ tags_all          = {
          ~ "image-recipe"                 = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
          ~ "infrastructure-configuration" = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
            # (9 unchanged elements hidden)
        }
      ~ user_data_base64  = "" -> (known after apply)
      ~ version           = "0.0.3" -> "0.0.4" # forces replacement
      - working_directory = "" -> null
        # (2 unchanged attributes hidden)

      - block_device_mapping {
          - device_name = "/dev/sda1" -> null
          - no_device   = false -> null

          - ebs {
              - delete_on_termination = "true" -> null
              - encrypted             = "true" -> null
              - iops                  = 0 -> null
              - kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691" -> null
              - throughput            = 0 -> null
              - volume_size           = 30 -> null
              - volume_type           = "gp3" -> null
            }
        }
      + block_device_mapping {
          + device_name = "/dev/sda1"

          + ebs {
              + delete_on_termination = "true"
              + encrypted             = "true"
              + kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691"
              + volume_size           = 30
              + volume_type           = "gp3"
            }
        }
      - block_device_mapping {
          - device_name = "/dev/sdb" -> null
          - no_device   = false -> null

          - ebs {
              - delete_on_termination = "true" -> null
              - encrypted             = "true" -> null
              - iops                  = 0 -> null
              - kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691" -> null
              - throughput            = 0 -> null
              - volume_size           = 100 -> null
              - volume_type           = "gp3" -> null
            }
        }
      + block_device_mapping {
          + device_name = "/dev/sdb"

          + ebs {
              + delete_on_termination = "true"
              + encrypted             = "true"
              + kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691"
              + volume_size           = 100
              + volume_type           = "gp3"
            }
        }
      - block_device_mapping {
          - device_name = "/dev/sdc" -> null
          - no_device   = false -> null

          - ebs {
              - delete_on_termination = "true" -> null
              - encrypted             = "true" -> null
              - iops                  = 0 -> null
              - kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691" -> null
              - throughput            = 0 -> null
              - volume_size           = 100 -> null
              - volume_type           = "gp3" -> null
            }
        }
      + block_device_mapping {
          + device_name = "/dev/sdc"

          + ebs {
              + delete_on_termination = "true"
              + encrypted             = "true"
              + kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691"
              + volume_size           = 100
              + volume_type           = "gp3"
            }
        }
      - block_device_mapping {
          - device_name = "/dev/sde" -> null
          - no_device   = false -> null

          - ebs {
              - delete_on_termination = "true" -> null
              - encrypted             = "true" -> null
              - iops                  = 0 -> null
              - kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691" -> null
              - throughput            = 0 -> null
              - volume_size           = 1 -> null
              - volume_type           = "gp3" -> null
            }
        }
      + block_device_mapping {
          + device_name = "/dev/sde"

          + ebs {
              + delete_on_termination = "true"
              + encrypted             = "true"
              + kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691"
              + volume_size           = 1
              + volume_type           = "gp3"
            }
        }
      - block_device_mapping {
          - device_name = "/dev/sdf" -> null
          - no_device   = false -> null

          - ebs {
              - delete_on_termination = "true" -> null
              - encrypted             = "true" -> null
              - iops                  = 0 -> null
              - kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691" -> null
              - throughput            = 0 -> null
              - volume_size           = 1 -> null
              - volume_type           = "gp3" -> null
            }
        }
      + block_device_mapping {
          + device_name = "/dev/sdf"

          + ebs {
              + delete_on_termination = "true"
              + encrypted             = "true"
              + kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691"
              + volume_size           = 1
              + volume_type           = "gp3"
            }
        }
      - block_device_mapping {
          - device_name = "/dev/sdg" -> null
          - no_device   = false -> null

          - ebs {
              - delete_on_termination = "true" -> null
              - encrypted             = "true" -> null
              - iops                  = 0 -> null
              - kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691" -> null
              - throughput            = 0 -> null
              - volume_size           = 1 -> null
              - volume_type           = "gp3" -> null
            }
        }
      + block_device_mapping {
          + device_name = "/dev/sdg"

          + ebs {
              + delete_on_termination = "true"
              + encrypted             = "true"
              + kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691"
              + volume_size           = 1
              + volume_type           = "gp3"
            }
        }
      - block_device_mapping {
          - device_name = "/dev/sdh" -> null
          - no_device   = false -> null

          - ebs {
              - delete_on_termination = "true" -> null
              - encrypted             = "true" -> null
              - iops                  = 0 -> null
              - kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691" -> null
              - throughput            = 0 -> null
              - volume_size           = 1 -> null
              - volume_type           = "gp3" -> null
            }
        }
      + block_device_mapping {
          + device_name = "/dev/sdh"

          + ebs {
              + delete_on_termination = "true"
              + encrypted             = "true"
              + kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691"
              + volume_size           = 1
              + volume_type           = "gp3"
            }
        }
      - block_device_mapping {
          - device_name = "/dev/sdi" -> null
          - no_device   = false -> null

          - ebs {
              - delete_on_termination = "true" -> null
              - encrypted             = "true" -> null
              - iops                  = 0 -> null
              - kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691" -> null
              - throughput            = 0 -> null
              - volume_size           = 1 -> null
              - volume_type           = "gp3" -> null
            }
        }
      + block_device_mapping {
          + device_name = "/dev/sdi"

          + ebs {
              + delete_on_termination = "true"
              + encrypted             = "true"
              + kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691"
              + volume_size           = 1
              + volume_type           = "gp3"
            }
        }
      - block_device_mapping {
          - device_name = "/dev/sdj" -> null
          - no_device   = false -> null

          - ebs {
              - delete_on_termination = "true" -> null
              - encrypted             = "true" -> null
              - iops                  = 0 -> null
              - kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691" -> null
              - throughput            = 0 -> null
              - volume_size           = 1 -> null
              - volume_type           = "gp3" -> null
            }
        }
      + block_device_mapping {
          + device_name = "/dev/sdj"

          + ebs {
              + delete_on_termination = "true"
              + encrypted             = "true"
              + kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691"
              + volume_size           = 1
              + volume_type           = "gp3"
            }
        }
      - block_device_mapping {
          - device_name = "/dev/sdk" -> null
          - no_device   = false -> null

          - ebs {
              - delete_on_termination = "true" -> null
              - encrypted             = "true" -> null
              - iops                  = 0 -> null
              - kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691" -> null
              - throughput            = 0 -> null
              - volume_size           = 1 -> null
              - volume_type           = "gp3" -> null
            }
        }
      + block_device_mapping {
          + device_name = "/dev/sdk"

          + ebs {
              + delete_on_termination = "true"
              + encrypted             = "true"
              + kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691"
              + volume_size           = 1
              + volume_type           = "gp3"
            }
        }
      - block_device_mapping {
          - device_name = "/dev/sds" -> null
          - no_device   = false -> null

          - ebs {
              - delete_on_termination = "true" -> null
              - encrypted             = "true" -> null
              - iops                  = 0 -> null
              - kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691" -> null
              - throughput            = 0 -> null
              - volume_size           = 4 -> null
              - volume_type           = "gp3" -> null
            }
        }
      + block_device_mapping {
          + device_name = "/dev/sds"

          + ebs {
              + delete_on_termination = "true"
              + encrypted             = "true"
              + kms_key_id            = "arn:aws:kms:eu-west-2:374269020027:key/12984197-3371-4c21-8e43-a88a1581e691"
              + volume_size           = 4
              + volume_type           = "gp3"
            }
        }

        # (2 unchanged blocks hidden)
    }

  # module.imagebuilder.aws_imagebuilder_infrastructure_configuration.this must be replaced
-/+ resource "aws_imagebuilder_infrastructure_configuration" "this" {
      ~ arn                           = "arn:aws:imagebuilder:eu-west-2:374269020027:infrastructure-configuration/hmpps-ol-8-5-oracledb-19c-0-0-3" -> (known after apply)
      ~ date_created                  = "2023-08-08T13:44:06.532Z" -> (known after apply)
      + date_updated                  = (known after apply)
      ~ id                            = "arn:aws:imagebuilder:eu-west-2:374269020027:infrastructure-configuration/hmpps-ol-8-5-oracledb-19c-0-0-3" -> (known after apply)
      ~ name                          = "hmpps_ol_8_5_oracledb_19c_0_0_3" -> "hmpps_ol_8_5_oracledb_19c_0_0_4" # forces replacement
      ~ resource_tags                 = {
          ~ "image-recipe"                 = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
          ~ "infrastructure-configuration" = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
            # (9 unchanged elements hidden)
        }
      ~ tags                          = {
          ~ "image-recipe"                 = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
          ~ "infrastructure-configuration" = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
            # (9 unchanged elements hidden)
        }
      ~ tags_all                      = {
          ~ "image-recipe"                 = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
          ~ "infrastructure-configuration" = "hmpps_ol_8_5_oracledb_19c/0.0.3" -> "hmpps_ol_8_5_oracledb_19c/0.0.4"
            # (9 unchanged elements hidden)
        }
        # (6 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

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

@github-actions
Copy link
Contributor

teams/hmpps/windows_server_2022 terraform apply on push event #31

module.imagebuilder.aws_imagebuilder_image_pipeline.this: Destroying... [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_image_pipeline.this: Destruction complete after 1s
module.imagebuilder.aws_imagebuilder_infrastructure_configuration.this: Destroying... [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_image_recipe.this: Creating...
module.imagebuilder.aws_imagebuilder_distribution_configuration.this: Modifying... [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_infrastructure_configuration.this: Destruction complete after 0s
module.imagebuilder.aws_imagebuilder_infrastructure_configuration.this: Creating...
module.imagebuilder.aws_imagebuilder_distribution_configuration.this: Modifications complete after 1s [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_infrastructure_configuration.this: Creation complete after 1s [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_image_recipe.this: Creation complete after 1s [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_image_pipeline.this: Creating...
module.imagebuilder.aws_imagebuilder_image_pipeline.this: Creation complete after 1s [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_image_recipe.this (deposed object 514d67a7): Destroying... [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_image_recipe.this: Destruction complete after 1s

Apply complete! Resources: 3 added, 1 changed, 3 destroyed.

Outputs:

parent_ami = {}

@github-actions
Copy link
Contributor

teams/hmpps/ol_8_5_oracledb_19c terraform apply on push event #31

module.imagebuilder.aws_imagebuilder_image_pipeline.this: Destroying... [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_image_pipeline.this: Destruction complete after 0s
module.imagebuilder.aws_imagebuilder_infrastructure_configuration.this: Destroying... [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_distribution_configuration.this: Modifying... [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_image_recipe.this: Creating...
module.imagebuilder.aws_imagebuilder_infrastructure_configuration.this: Destruction complete after 0s
module.imagebuilder.aws_imagebuilder_infrastructure_configuration.this: Creating...
module.imagebuilder.aws_imagebuilder_distribution_configuration.this: Modifications complete after 0s [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_infrastructure_configuration.this: Creation complete after 1s [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_image_recipe.this: Creation complete after 1s [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_image_pipeline.this: Creating...
module.imagebuilder.aws_imagebuilder_image_pipeline.this: Creation complete after 1s [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_image_recipe.this (deposed object 452da026): Destroying... [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_image_recipe.this: Destruction complete after 1s

Apply complete! Resources: 3 added, 1 changed, 3 destroyed.

Outputs:

parent_ami = {}

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.

2 participants