From 19eda36e13be3ab4459b82efc5e43363725925dc Mon Sep 17 00:00:00 2001 From: robertsweetman Date: Thu, 12 Oct 2023 08:33:16 +0100 Subject: [PATCH] add windows Server 2012 R2 SQL 2014 enterprise ami refer to our own Server 2012 R2 ami as parent --- commonimages/base/main.tf | 2 +- commonimages/base/windows_2012_r2/terraform.tfvars | 7 ++++--- .../base/windows_2012_r2_SQL_2014/terraform.tfvars | 8 ++++---- modules/imagebuilder/main.tf | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/commonimages/base/main.tf b/commonimages/base/main.tf index f3426cd5..bf1d5073 100644 --- a/commonimages/base/main.tf +++ b/commonimages/base/main.tf @@ -23,4 +23,4 @@ module "imagebuilder" { systems_manager_agent = var.systems_manager_agent branch = var.BRANCH_NAME gh_actor = var.GH_ACTOR_NAME -} \ No newline at end of file +} diff --git a/commonimages/base/windows_2012_r2/terraform.tfvars b/commonimages/base/windows_2012_r2/terraform.tfvars index 059135a9..1df9912b 100644 --- a/commonimages/base/windows_2012_r2/terraform.tfvars +++ b/commonimages/base/windows_2012_r2/terraform.tfvars @@ -4,7 +4,7 @@ region = "eu-west-2" ami_base_name = "windows_server_2012_r2" -configuration_version = "0.0.8" +configuration_version = "0.1.0" release_or_patch = "release" # or "patch", see nomis AMI image building strategy doc description = "Windows Server 2012 R2" @@ -13,9 +13,10 @@ tags = { } parent_image = { - owner = "801119661308" + owner = "374269020027" ami_search_filters = { - name = ["EC2LaunchV2-Windows_Server-2012_R2_RTM-English-Full-Base-*"] # specify as going EOL in 2023 + name = ["base_windows_server_2012_r2_release_2023-09-07T*"] # specify our own Windows Server 2012 R2 base image as this went EOL in 2023 + # based off the retired: EC2LaunchV2-Windows_Server-2012_R2_RTM-English-Full-Base-* } } diff --git a/commonimages/base/windows_2012_r2_SQL_2014/terraform.tfvars b/commonimages/base/windows_2012_r2_SQL_2014/terraform.tfvars index 5a2fcfd5..36b313e2 100644 --- a/commonimages/base/windows_2012_r2_SQL_2014/terraform.tfvars +++ b/commonimages/base/windows_2012_r2_SQL_2014/terraform.tfvars @@ -4,7 +4,7 @@ region = "eu-west-2" ami_base_name = "windows_server_2012_r2_SQL_2014_enterprise" -configuration_version = "0.0.2" +configuration_version = "0.0.4" release_or_patch = "release" # or "patch", see nomis AMI image building strategy doc description = "Windows Server 2012 R2 with SQL 2014 Enterprise" @@ -13,9 +13,9 @@ tags = { } parent_image = { - owner = "801119661308" + owner = "679593333241" ami_search_filters = { - name = ["Windows_Server-2012-R2_RTM-English-64Bit-SQL_2014_SP3_Enterprise-*"] # specify as going EOL in 2023 + name = ["sc-a-216-5d93057e-941a-4d1b-884f-ec900151c1d1-230-5d93057e-941a-4d1b-884f-ec900151c1d1"] # AWS image not available so taken from marketplace. NOTE: This may fail at the build step if there is some sort of licensing restriction } } @@ -39,7 +39,7 @@ components_aws = [ components_custom = [] infrastructure_configuration = { - instance_types = ["t3.xlarge"] # SQL 2014 Minimum requirements + instance_types = ["m4.xlarge"] # SQL 2014 Minimum requirements } image_pipeline = { diff --git a/modules/imagebuilder/main.tf b/modules/imagebuilder/main.tf index 3f8a7773..09cdd413 100644 --- a/modules/imagebuilder/main.tf +++ b/modules/imagebuilder/main.tf @@ -93,7 +93,7 @@ resource "aws_imagebuilder_infrastructure_configuration" "this" { instance_profile_name = local.core_shared_services.imagebuilder_mp_tfstate.image_builder_profile description = var.description instance_types = var.infrastructure_configuration.instance_types - security_group_ids = values(local.core_shared_services.repo_tfstate.image_builder_security_group_id) + security_group_ids = [local.core_shared_services.repo_tfstate.image_builder_security_group_id.non_live_data] subnet_id = local.core_shared_services.repo_tfstate.non_live_private_subnet_ids[0] terminate_instance_on_failure = true tags = local.tags