From 060ad9618423e8566019af2b2034700e595c7bb3 Mon Sep 17 00:00:00 2001 From: robertsweetman Date: Thu, 5 Oct 2023 14:55:39 +0100 Subject: [PATCH] build server 2012 r2 with SQL 2014 Standard baked in --- .../base/windows_2012_r2_SQL_2014/locals.tf | 16 ++++++ .../windows_2012_r2_SQL_2014/terraform.tfvars | 52 +++++++++++++++++++ .../windows_2012_r2_SQL_2014/terragrunt.hcl | 6 +++ 3 files changed, 74 insertions(+) create mode 100644 commonimages/base/windows_2012_r2_SQL_2014/locals.tf create mode 100644 commonimages/base/windows_2012_r2_SQL_2014/terraform.tfvars create mode 100644 commonimages/base/windows_2012_r2_SQL_2014/terragrunt.hcl diff --git a/commonimages/base/windows_2012_r2_SQL_2014/locals.tf b/commonimages/base/windows_2012_r2_SQL_2014/locals.tf new file mode 100644 index 000000000..e4f3c3ed8 --- /dev/null +++ b/commonimages/base/windows_2012_r2_SQL_2014/locals.tf @@ -0,0 +1,16 @@ +locals { + components_common = [ + { + name = "powershell_core" + version = "0.3.0" + parameters = [] + }, + { + name = "aws_cli" + version = "0.0.3" + parameters = [] + }, + ] + + component_template_args = {} +} \ No newline at end of file diff --git a/commonimages/base/windows_2012_r2_SQL_2014/terraform.tfvars b/commonimages/base/windows_2012_r2_SQL_2014/terraform.tfvars new file mode 100644 index 000000000..e61bd5bbf --- /dev/null +++ b/commonimages/base/windows_2012_r2_SQL_2014/terraform.tfvars @@ -0,0 +1,52 @@ +# following are passed in via pipeline +# BRANCH_NAME = +# GH_ACTOR_NAME = + +region = "eu-west-2" +ami_base_name = "windows_server_2012_r2_SQL_2014_standard" +configuration_version = "0.0.1" +release_or_patch = "release" # or "patch", see nomis AMI image building strategy doc +description = "Windows Server 2012 R2 with SQL 2014 Standard" + +tags = { + os-version = "windows server 2012 r2 with SQL 2014 Standard" +} + +parent_image = { + owner = "801119661308" + ami_search_filters = { + name = ["Windows_Server-2012-R2_RTM-English-64Bit-SQL_2014_SP3_Standard-*"] # specify as going EOL in 2023 + } +} + +block_device_mappings_ebs = [ + { + device_name = "/dev/sda1" # root volume + volume_size = 128 + volume_type = "gp3" + }, + { + device_name = "/dev/sdb" # new volume created + volume_size = 100 + volume_type = "gp3" + } +] + +components_aws = [ + "amazon-cloudwatch-agent-windows" + "ec2launch-v2-windows" +] + +components_custom = [] + +infrastructure_configuration = { + instance_types = ["t3.xlarge"] # SQL 2014 Minimum requirements +} + +image_pipeline = { + schedule = { + schedule_expression = "cron(0 0 2 * ? *)" + } +} + +launch_template_exists = false diff --git a/commonimages/base/windows_2012_r2_SQL_2014/terragrunt.hcl b/commonimages/base/windows_2012_r2_SQL_2014/terragrunt.hcl new file mode 100644 index 000000000..b2fe94d1c --- /dev/null +++ b/commonimages/base/windows_2012_r2_SQL_2014/terragrunt.hcl @@ -0,0 +1,6 @@ +include { + path = find_in_parent_folders() +} +terraform { + source = "../../..//commonimages/base" +} \ No newline at end of file