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

create server 2019 ami for use by ONR #732

Merged
merged 2 commits into from
Mar 21, 2024

Conversation

robertsweetman
Copy link
Contributor

  • build shared windows server 2019 ami for ONR
  • will only be shared into ONR spaces at this point
  • uses windows components, git, pwsh_core, aws_cli and psreadline_fix

@robertsweetman robertsweetman requested review from a team as code owners March 18, 2024 10:17

This comment has been minimized.

@robertsweetman robertsweetman temporarily deployed to core-shared-services March 18, 2024 10:26 — with GitHub Actions Inactive
@robertsweetman robertsweetman force-pushed the onr/DSOS-2681/server-2019-ami-for-onr branch from 9f08d2a to 6e52107 Compare March 20, 2024 12:56
Copy link
Contributor

teams/hmpps/windows_server_2019 terragrunt plan on pull_request event #186

module.imagebuilder.data.terraform_remote_state.imagebuilder_mp: Reading...
module.imagebuilder.data.terraform_remote_state.core_shared_services_production: Reading...
module.imagebuilder.data.aws_secretsmanager_secret.environment_management: Reading...
module.imagebuilder.data.terraform_remote_state.imagebuilder_mp: Read complete after 1s
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.terraform_remote_state.core_shared_services_production: Read complete after 1s
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["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-2019"
        name         = "hmpps_windows_server_2019"
      ~ tags         = {
            "amazon-cloudwatch-agent-windows-version" = "1.0.0"
            "application"                             = "NOMIS"
          ~ "branch"                                  = "onr/DSOS-2681/server-2019-ami-for-onr" -> "main"
            "business-unit"                           = "HMPPS"
            "ec2launch-v2-windows-version"            = "1.0.0"
            "image-pipeline"                          = "hmpps_windows_server_2019"
          ~ "image-recipe"                            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "is-production"                           = "false" -> "true"
            "os-version"                              = "windows server 2019"
            "owner"                                   = "DSO: [email protected]"
          ~ "release-or-patch"                        = "test" -> "release"
            "source-code"                             = "https://github.com/ministryofjustice/modernisation-platform-ami-builds/tree/main/teams/nomis"
        }
      ~ tags_all     = {
          ~ "branch"                                  = "onr/DSOS-2681/server-2019-ami-for-onr" -> "main"
          ~ "image-recipe"                            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "is-production"                           = "false" -> "true"
          ~ "release-or-patch"                        = "test" -> "release"
            # (8 unchanged elements hidden)
        }
        # (3 unchanged attributes hidden)

      - distribution {
          # At least one attribute in this block is (or was) sensitive,
          # so its contents will not be displayed.
        }
      + 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-2019" -> (known after apply)
      ~ date_created                     = "2024-03-18T10:27:23.744Z" -> (known after apply)
      ~ date_last_run                    = "2024-03-18T10:37:20.815Z" -> (known after apply)
      ~ date_next_run                    = "2024-04-02T00:00:00.000Z" -> (known after apply)
      ~ date_updated                     = "2024-03-18T10:27:23.744Z" -> (known after apply)
      ~ id                               = "arn:aws:imagebuilder:eu-west-2:374269020027:image-pipeline/hmpps-windows-server-2019" -> (known after apply)
      ~ image_recipe_arn                 = "arn:aws:imagebuilder:eu-west-2:374269020027:image-recipe/hmpps-windows-server-2019/0.0.1" # forces replacement -> (known after apply) # forces replacement
      ~ infrastructure_configuration_arn = "arn:aws:imagebuilder:eu-west-2:374269020027:infrastructure-configuration/hmpps-windows-server-2019-0-0-1" -> (known after apply)
        name                             = "hmpps_windows_server_2019"
      ~ platform                         = "Windows" -> (known after apply)
      ~ tags                             = {
            "amazon-cloudwatch-agent-windows-version" = "1.0.0"
            "application"                             = "NOMIS"
          ~ "branch"                                  = "onr/DSOS-2681/server-2019-ami-for-onr" -> "main"
            "business-unit"                           = "HMPPS"
            "ec2launch-v2-windows-version"            = "1.0.0"
            "image-pipeline"                          = "hmpps_windows_server_2019"
          ~ "image-recipe"                            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "is-production"                           = "false" -> "true"
            "os-version"                              = "windows server 2019"
            "owner"                                   = "DSO: [email protected]"
          ~ "release-or-patch"                        = "test" -> "release"
            "source-code"                             = "https://github.com/ministryofjustice/modernisation-platform-ami-builds/tree/main/teams/nomis"
        }
      ~ tags_all                         = {
          ~ "branch"                                  = "onr/DSOS-2681/server-2019-ami-for-onr" -> "main"
          ~ "image-recipe"                            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "is-production"                           = "false" -> "true"
          ~ "release-or-patch"                        = "test" -> "release"
            # (8 unchanged elements hidden)
        }
        # (4 unchanged attributes hidden)

      ~ 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-2019/0.0.1" -> (known after apply)
      ~ date_created     = "2024-03-18T10:27:22.595Z" -> (known after apply)
      ~ id               = "arn:aws:imagebuilder:eu-west-2:374269020027:image-recipe/hmpps-windows-server-2019/0.0.1" -> (known after apply)
        name             = "hmpps_windows_server_2019"
      ~ owner            = "374269020027" -> (known after apply)
      ~ platform         = "Windows" -> (known after apply)
      ~ tags             = {
            "amazon-cloudwatch-agent-windows-version" = "1.0.0"
            "application"                             = "NOMIS"
          ~ "branch"                                  = "onr/DSOS-2681/server-2019-ami-for-onr" -> "main"
            "business-unit"                           = "HMPPS"
            "ec2launch-v2-windows-version"            = "1.0.0"
            "image-pipeline"                          = "hmpps_windows_server_2019"
          ~ "image-recipe"                            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "is-production"                           = "false" -> "true"
            "os-version"                              = "windows server 2019"
            "owner"                                   = "DSO: [email protected]"
          ~ "release-or-patch"                        = "test" -> "release"
            "source-code"                             = "https://github.com/ministryofjustice/modernisation-platform-ami-builds/tree/main/teams/nomis"
        }
      ~ tags_all         = {
          ~ "branch"                                  = "onr/DSOS-2681/server-2019-ami-for-onr" -> "main"
          ~ "image-recipe"                            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "is-production"                           = "false" -> "true"
          ~ "release-or-patch"                        = "test" -> "release"
            # (8 unchanged elements hidden)
        }
      + user_data_base64 = (known after apply)
      ~ version          = "0.0.1" -> "0.0.2" # forces replacement
        # (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"
            }
        }

        # (6 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-2019-0-0-1" -> (known after apply)
      ~ date_created                  = "2024-03-18T10:27:21.937Z" -> (known after apply)
      + date_updated                  = (known after apply)
      ~ id                            = "arn:aws:imagebuilder:eu-west-2:374269020027:infrastructure-configuration/hmpps-windows-server-2019-0-0-1" -> (known after apply)
      ~ name                          = "hmpps_windows_server_2019_0_0_1" -> "hmpps_windows_server_2019_0_0_2" # forces replacement
      ~ resource_tags                 = {
          ~ "branch"                                  = "onr/DSOS-2681/server-2019-ami-for-onr" -> "main"
          ~ "image-recipe"                            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "is-production"                           = "false" -> "true"
          ~ "release-or-patch"                        = "test" -> "release"
            # (8 unchanged elements hidden)
        }
      ~ tags                          = {
            "amazon-cloudwatch-agent-windows-version" = "1.0.0"
            "application"                             = "NOMIS"
          ~ "branch"                                  = "onr/DSOS-2681/server-2019-ami-for-onr" -> "main"
            "business-unit"                           = "HMPPS"
            "ec2launch-v2-windows-version"            = "1.0.0"
            "image-pipeline"                          = "hmpps_windows_server_2019"
          ~ "image-recipe"                            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "is-production"                           = "false" -> "true"
            "os-version"                              = "windows server 2019"
            "owner"                                   = "DSO: [email protected]"
          ~ "release-or-patch"                        = "test" -> "release"
            "source-code"                             = "https://github.com/ministryofjustice/modernisation-platform-ami-builds/tree/main/teams/nomis"
        }
      ~ tags_all                      = {
          ~ "branch"                                  = "onr/DSOS-2681/server-2019-ami-for-onr" -> "main"
          ~ "image-recipe"                            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "is-production"                           = "false" -> "true"
          ~ "release-or-patch"                        = "test" -> "release"
            # (8 unchanged elements hidden)
        }
        # (6 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

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

@robertsweetman robertsweetman merged commit 50ca024 into main Mar 21, 2024
4 checks passed
@robertsweetman robertsweetman deleted the onr/DSOS-2681/server-2019-ami-for-onr branch March 21, 2024 11:57
Copy link
Contributor

teams/hmpps/windows_server_2019 terragrunt plan on push event #187

module.imagebuilder.data.terraform_remote_state.imagebuilder_mp: Reading...
module.imagebuilder.data.terraform_remote_state.core_shared_services_production: Reading...
module.imagebuilder.data.aws_secretsmanager_secret.environment_management: Reading...
module.imagebuilder.data.terraform_remote_state.imagebuilder_mp: Read complete after 2s
module.imagebuilder.data.aws_secretsmanager_secret.environment_management: Read complete after 1s [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.terraform_remote_state.core_shared_services_production: Read complete after 2s
module.imagebuilder.data.aws_caller_identity.current: Reading...
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: 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["amazon-cloudwatch-agent-windows"]: Read complete after 0s [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-2019"
        name         = "hmpps_windows_server_2019"
      ~ tags         = {
            "amazon-cloudwatch-agent-windows-version" = "1.0.0"
            "application"                             = "NOMIS"
          ~ "branch"                                  = "onr/DSOS-2681/server-2019-ami-for-onr" -> "main"
            "business-unit"                           = "HMPPS"
            "ec2launch-v2-windows-version"            = "1.0.0"
            "image-pipeline"                          = "hmpps_windows_server_2019"
          ~ "image-recipe"                            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "is-production"                           = "false" -> "true"
            "os-version"                              = "windows server 2019"
            "owner"                                   = "DSO: [email protected]"
          ~ "release-or-patch"                        = "test" -> "release"
            "source-code"                             = "https://github.com/ministryofjustice/modernisation-platform-ami-builds/tree/main/teams/nomis"
        }
      ~ tags_all     = {
          ~ "branch"                                  = "onr/DSOS-2681/server-2019-ami-for-onr" -> "main"
          ~ "image-recipe"                            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "is-production"                           = "false" -> "true"
          ~ "release-or-patch"                        = "test" -> "release"
            # (8 unchanged elements hidden)
        }
        # (3 unchanged attributes hidden)

      - distribution {
          # At least one attribute in this block is (or was) sensitive,
          # so its contents will not be displayed.
        }
      + 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-2019" -> (known after apply)
      ~ date_created                     = "2024-03-18T10:27:23.744Z" -> (known after apply)
      ~ date_last_run                    = "2024-03-18T10:37:20.815Z" -> (known after apply)
      ~ date_next_run                    = "2024-04-02T00:00:00.000Z" -> (known after apply)
      ~ date_updated                     = "2024-03-18T10:27:23.744Z" -> (known after apply)
      ~ id                               = "arn:aws:imagebuilder:eu-west-2:374269020027:image-pipeline/hmpps-windows-server-2019" -> (known after apply)
      ~ image_recipe_arn                 = "arn:aws:imagebuilder:eu-west-2:374269020027:image-recipe/hmpps-windows-server-2019/0.0.1" # forces replacement -> (known after apply) # forces replacement
      ~ infrastructure_configuration_arn = "arn:aws:imagebuilder:eu-west-2:374269020027:infrastructure-configuration/hmpps-windows-server-2019-0-0-1" -> (known after apply)
        name                             = "hmpps_windows_server_2019"
      ~ platform                         = "Windows" -> (known after apply)
      ~ tags                             = {
            "amazon-cloudwatch-agent-windows-version" = "1.0.0"
            "application"                             = "NOMIS"
          ~ "branch"                                  = "onr/DSOS-2681/server-2019-ami-for-onr" -> "main"
            "business-unit"                           = "HMPPS"
            "ec2launch-v2-windows-version"            = "1.0.0"
            "image-pipeline"                          = "hmpps_windows_server_2019"
          ~ "image-recipe"                            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "is-production"                           = "false" -> "true"
            "os-version"                              = "windows server 2019"
            "owner"                                   = "DSO: [email protected]"
          ~ "release-or-patch"                        = "test" -> "release"
            "source-code"                             = "https://github.com/ministryofjustice/modernisation-platform-ami-builds/tree/main/teams/nomis"
        }
      ~ tags_all                         = {
          ~ "branch"                                  = "onr/DSOS-2681/server-2019-ami-for-onr" -> "main"
          ~ "image-recipe"                            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "is-production"                           = "false" -> "true"
          ~ "release-or-patch"                        = "test" -> "release"
            # (8 unchanged elements hidden)
        }
        # (4 unchanged attributes hidden)

      ~ 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-2019/0.0.1" -> (known after apply)
      ~ date_created     = "2024-03-18T10:27:22.595Z" -> (known after apply)
      ~ id               = "arn:aws:imagebuilder:eu-west-2:374269020027:image-recipe/hmpps-windows-server-2019/0.0.1" -> (known after apply)
        name             = "hmpps_windows_server_2019"
      ~ owner            = "374269020027" -> (known after apply)
      ~ platform         = "Windows" -> (known after apply)
      ~ tags             = {
            "amazon-cloudwatch-agent-windows-version" = "1.0.0"
            "application"                             = "NOMIS"
          ~ "branch"                                  = "onr/DSOS-2681/server-2019-ami-for-onr" -> "main"
            "business-unit"                           = "HMPPS"
            "ec2launch-v2-windows-version"            = "1.0.0"
            "image-pipeline"                          = "hmpps_windows_server_2019"
          ~ "image-recipe"                            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "is-production"                           = "false" -> "true"
            "os-version"                              = "windows server 2019"
            "owner"                                   = "DSO: [email protected]"
          ~ "release-or-patch"                        = "test" -> "release"
            "source-code"                             = "https://github.com/ministryofjustice/modernisation-platform-ami-builds/tree/main/teams/nomis"
        }
      ~ tags_all         = {
          ~ "branch"                                  = "onr/DSOS-2681/server-2019-ami-for-onr" -> "main"
          ~ "image-recipe"                            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "is-production"                           = "false" -> "true"
          ~ "release-or-patch"                        = "test" -> "release"
            # (8 unchanged elements hidden)
        }
      + user_data_base64 = (known after apply)
      ~ version          = "0.0.1" -> "0.0.2" # forces replacement
        # (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"
            }
        }

        # (6 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-2019-0-0-1" -> (known after apply)
      ~ date_created                  = "2024-03-18T10:27:21.937Z" -> (known after apply)
      + date_updated                  = (known after apply)
      ~ id                            = "arn:aws:imagebuilder:eu-west-2:374269020027:infrastructure-configuration/hmpps-windows-server-2019-0-0-1" -> (known after apply)
      ~ name                          = "hmpps_windows_server_2019_0_0_1" -> "hmpps_windows_server_2019_0_0_2" # forces replacement
      ~ resource_tags                 = {
          ~ "branch"                                  = "onr/DSOS-2681/server-2019-ami-for-onr" -> "main"
          ~ "image-recipe"                            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "is-production"                           = "false" -> "true"
          ~ "release-or-patch"                        = "test" -> "release"
            # (8 unchanged elements hidden)
        }
      ~ tags                          = {
            "amazon-cloudwatch-agent-windows-version" = "1.0.0"
            "application"                             = "NOMIS"
          ~ "branch"                                  = "onr/DSOS-2681/server-2019-ami-for-onr" -> "main"
            "business-unit"                           = "HMPPS"
            "ec2launch-v2-windows-version"            = "1.0.0"
            "image-pipeline"                          = "hmpps_windows_server_2019"
          ~ "image-recipe"                            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "is-production"                           = "false" -> "true"
            "os-version"                              = "windows server 2019"
            "owner"                                   = "DSO: [email protected]"
          ~ "release-or-patch"                        = "test" -> "release"
            "source-code"                             = "https://github.com/ministryofjustice/modernisation-platform-ami-builds/tree/main/teams/nomis"
        }
      ~ tags_all                      = {
          ~ "branch"                                  = "onr/DSOS-2681/server-2019-ami-for-onr" -> "main"
          ~ "image-recipe"                            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "infrastructure-configuration"            = "hmpps_windows_server_2019/0.0.1" -> "hmpps_windows_server_2019/0.0.2"
          ~ "is-production"                           = "false" -> "true"
          ~ "release-or-patch"                        = "test" -> "release"
            # (8 unchanged elements hidden)
        }
        # (6 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

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

Copy link
Contributor

teams/hmpps/windows_server_2019 terraform apply on push event #187

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 2s [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 a8fd9bc5): Destroying... [id=<REDACTED>]
module.imagebuilder.aws_imagebuilder_image_recipe.this: Destruction complete after 0s

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

@robertsweetman robertsweetman restored the onr/DSOS-2681/server-2019-ami-for-onr branch March 25, 2024 16:04
@dms1981 dms1981 deleted the onr/DSOS-2681/server-2019-ami-for-onr branch May 14, 2024 09:11
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