From e543da18df9cbafd7ff90b242a200a2979a3f6cb Mon Sep 17 00:00:00 2001 From: sean-freeman <1815807+sean-freeman@users.noreply.github.com> Date: Sun, 24 Nov 2024 00:36:51 +0000 Subject: [PATCH] sap_vm_provision: update default map for os images --- .../tf_template/tf_template_input_vars.tf | 45 +++++----- .../tf_template/tf_template_input_vars.tf | 83 +++++-------------- .../tf_template/tf_template_input_vars.tf | 71 ++++++---------- .../tf_template/tf_template_input_vars.tf | 52 ++++++------ .../tf_template/tf_template_input_vars.tf | 83 ++++++++++--------- 5 files changed, 134 insertions(+), 200 deletions(-) diff --git a/roles/sap_vm_provision/tasks/platform_ansible_to_terraform/aws_ec2_vs/tf_template/tf_template_input_vars.tf b/roles/sap_vm_provision/tasks/platform_ansible_to_terraform/aws_ec2_vs/tf_template/tf_template_input_vars.tf index 98a41c4..61a0065 100644 --- a/roles/sap_vm_provision/tasks/platform_ansible_to_terraform/aws_ec2_vs/tf_template/tf_template_input_vars.tf +++ b/roles/sap_vm_provision/tasks/platform_ansible_to_terraform/aws_ec2_vs/tf_template/tf_template_input_vars.tf @@ -64,48 +64,51 @@ variable "sap_vm_provision_bastion_ssh_port" { variable "map_os_image_regex" { + description = "Map of operating systems OS Image regex, to identify latest OS Image for the OS major.minor version" + type = map(any) default = { rhel-8-1 = "*RHEL-8.1*_HVM*x86_64*" - - rhel-8-2 = "*RHEL-8.2*_HVM*x86_64*" - + # rhel-8-2 = "*RHEL-8.2*_HVM*x86_64*" // removed rhel-8-4 = "*RHEL-8.4*_HVM*x86_64*" - rhel-8-6 = "*RHEL-8.6*_HVM*x86_64*" - - rhel-7-7-sap-ha = "*RHEL-SAP-7.7*" - - rhel-7-9-sap-ha = "*RHEL-SAP-7.9*" - + rhel-8-8 = "*RHEL-8.8*_HVM*x86_64*" + rhel-8-10 = "*RHEL-8.10*_HVM*x86_64*" + rhel-9-0 = "*RHEL-9.0*_HVM*x86_64*" + rhel-9-1 = "*RHEL-9.1*_HVM*x86_64*" + rhel-9-2 = "*RHEL-9.2*_HVM*x86_64*" + rhel-9-3 = "*RHEL-9.3*_HVM*x86_64*" + rhel-9-4 = "*RHEL-9.4*_HVM*x86_64*" + + # rhel-7-7-sap-ha = "*RHEL-SAP-7.7*" // removed + # rhel-7-9-sap-ha = "*RHEL-SAP-7.9*" // removed rhel-8-1-sap-ha = "*RHEL-SAP-8.1.0*" - rhel-8-2-sap-ha = "*RHEL-SAP-8.2.0*" - rhel-8-4-sap-ha = "*RHEL-SAP-8.4.0*" - rhel-8-6-sap-ha = "*RHEL-SAP-8.6.0*" + rhel-8-8-sap-ha = "*RHEL-SAP-8.8.0*" + rhel-8-10-sap-ha = "*RHEL-SAP-8.10.0*" - sles-15-2 = "*suse-sles-15-sp2-v202*-hvm-ssd-x86_64*" - - sles-15-3 = "*suse-sles-15-sp3-v202*-hvm-ssd-x86_64*" - - sles-15-4 = "*suse-sles-15-sp4-v202*-hvm-ssd-x86_64*" + sles-12-5 = "*suse-sles-12-sp5-v202*-hvm-ssd-x86_64*" + # sles-15-2 = "*suse-sles-15-sp2-v202*-hvm-ssd-x86_64*" // removed + # sles-15-3 = "*suse-sles-15-sp3-v202*-hvm-ssd-x86_64*" // removed + # sles-15-4 = "*suse-sles-15-sp4-v202*-hvm-ssd-x86_64*" // removed + sles-15-5 = "*suse-sles-15-sp5-v202*-hvm-ssd-x86_64*" + sles-15-6 = "*suse-sles-15-sp6-v202*-hvm-ssd-x86_64*" sles-12-5-sap-ha = "*suse-sles-sap-12-sp5-v202*-hvm-ssd-x86_64*" - sles-15-1-sap-ha = "*suse-sles-sap-15-sp1-v202*-hvm-ssd-x86_64*" - sles-15-2-sap-ha = "*suse-sles-sap-15-sp2-v202*-hvm-ssd-x86_64*" - sles-15-3-sap-ha = "*suse-sles-sap-15-sp3-v202*-hvm-ssd-x86_64*" - sles-15-4-sap-ha = "*suse-sles-sap-15-sp4-v202*-hvm-ssd-x86_64*" + sles-15-5-sap-ha = "*suse-sles-sap-15-sp5-v202*-hvm-ssd-x86_64*" + sles-15-6-sap-ha = "*suse-sles-sap-15-sp6-v202*-hvm-ssd-x86_64*" } + } variable "sap_vm_provision_host_specification_plan" { diff --git a/roles/sap_vm_provision/tasks/platform_ansible_to_terraform/gcp_ce_vm/tf_template/tf_template_input_vars.tf b/roles/sap_vm_provision/tasks/platform_ansible_to_terraform/gcp_ce_vm/tf_template/tf_template_input_vars.tf index c9013d2..04f71b3 100644 --- a/roles/sap_vm_provision/tasks/platform_ansible_to_terraform/gcp_ce_vm/tf_template/tf_template_input_vars.tf +++ b/roles/sap_vm_provision/tasks/platform_ansible_to_terraform/gcp_ce_vm/tf_template/tf_template_input_vars.tf @@ -122,70 +122,25 @@ variable "map_os_image_regex" { default = { - rhel-8-latest = { - project = "rhel-cloud" - family = "rhel-8" - }, - - rhel-7-7-sap-ha = { - project = "rhel-sap-cloud" - family = "rhel-7-7-sap-ha" - }, - - rhel-7-9-sap-ha = { - project = "rhel-sap-cloud" - family = "rhel-7-9-sap-ha" - }, - - rhel-8-1-sap-ha = { - project = "rhel-sap-cloud" - family = "rhel-8-1-sap-ha" - }, - - rhel-8-2-sap-ha = { - project = "rhel-sap-cloud" - family = "rhel-8-2-sap-ha" - }, - - rhel-8-4-sap-ha = { - project = "rhel-sap-cloud" - family = "rhel-8-4-sap-ha" - }, - - rhel-8-6-sap-ha = { - project = "rhel-sap-cloud" - family = "rhel-8-6-sap-ha" - }, - - sles-15-latest = { - project = "suse-cloud" - family = "sles-15" - }, - - sles-12-sp5-sap = { - project = "suse-sap-cloud" - family = "sles-12-sp5-sap" - }, - - sles-15-sp1-sap = { - project = "suse-sap-cloud" - family = "sles-15-sp1-sap" - }, - - sles-15-sp2-sap = { - project = "suse-sap-cloud" - family = "sles-15-sp2-sap" - }, - - sles-15-sp3-sap = { - project = "suse-sap-cloud" - family = "sles-15-sp3-sap" - }, - - sles-15-sp4-sap = { - project = "suse-sap-cloud" - family = "sles-15-sp4-sap" - }, + rhel-8-latest = { project = "rhel-cloud" , family = "rhel-8" }, + rhel-9-latest = { project = "rhel-cloud" , family = "rhel-9" }, + + sles-12-latest = { project = "suse-cloud" , family = "sles-12" }, + sles-15-latest = { project = "suse-cloud" , family = "sles-15" }, + + # rhel-7-7-sap-ha = { project = "rhel-sap-cloud" , family = "rhel-7-7-sap-ha" }, // removed + rhel-7-9-sap-ha = { project = "rhel-sap-cloud" , family = "rhel-7-9-sap-ha" }, + # rhel-8-1-sap-ha = { project = "rhel-sap-cloud" , family = "rhel-8-1-sap-ha" }, // removed + rhel-8-2-sap-ha = { project = "rhel-sap-cloud" , family = "rhel-8-2-sap-ha" }, + rhel-8-4-sap-ha = { project = "rhel-sap-cloud" , family = "rhel-8-4-sap-ha" }, + rhel-8-6-sap-ha = { project = "rhel-sap-cloud" , family = "rhel-8-6-sap-ha" }, + + sles-12-sp5-sap = { project = "suse-sap-cloud" , family = "sles-12-sp5-sap" }, + # sles-15-sp1-sap = { project = "suse-sap-cloud" , family = "sles-15-sp1-sap" }, // removed + sles-15-sp2-sap = { project = "suse-sap-cloud" , family = "sles-15-sp2-sap" }, + sles-15-sp3-sap = { project = "suse-sap-cloud" , family = "sles-15-sp3-sap" }, + sles-15-sp4-sap = { project = "suse-sap-cloud" , family = "sles-15-sp4-sap" }, + sles-15-sp5-sap = { project = "suse-sap-cloud" , family = "sles-15-sp5-sap" } } diff --git a/roles/sap_vm_provision/tasks/platform_ansible_to_terraform/ibmcloud_powervs/tf_template/tf_template_input_vars.tf b/roles/sap_vm_provision/tasks/platform_ansible_to_terraform/ibmcloud_powervs/tf_template/tf_template_input_vars.tf index 6c0b73b..d200617 100644 --- a/roles/sap_vm_provision/tasks/platform_ansible_to_terraform/ibmcloud_powervs/tf_template/tf_template_input_vars.tf +++ b/roles/sap_vm_provision/tasks/platform_ansible_to_terraform/ibmcloud_powervs/tf_template/tf_template_input_vars.tf @@ -199,35 +199,13 @@ variable "map_os_image_regex_bastion" { default = { - rhel-7-6-sap-ha = ".*redhat.*7-6.*amd64.*hana.*" + rhel-8-8 = ".*redhat.*8-8.*minimal.*amd64.*" + rhel-8-10 = ".*redhat.*8-10.*minimal.*amd64.*" + rhel-9-2 = ".*redhat.*9-2.*minimal.*amd64.*" + rhel-9-4 = ".*redhat.*9-4.*minimal.*amd64.*" - rhel-8-1-sap-ha = ".*redhat.*8-1.*amd64.*hana.*" - - rhel-8-2-sap-ha = ".*redhat.*8-2.*amd64.*hana.*" - - rhel-8-4-sap-ha = ".*redhat.*8-4.*amd64.*hana.*" - - rhel-7-6-sap-applications = ".*redhat.*7-6.*amd64.*applications.*" - - rhel-8-1-sap-applications = ".*redhat.*8-1.*amd64.*applications.*" - - rhel-8-2-sap-applications = ".*redhat.*8-2.*amd64.*applications.*" - - rhel-8-4-sap-applications = ".*redhat.*8-4.*amd64.*applications.*" - - rhel-8-4 = ".*redhat.*8-4.*minimal.*amd64.*" - - sles-12-4-sap-ha = ".*sles.*12-4.*amd64.*hana.*" - - sles-15-1-sap-ha = ".*sles.*15-1.*amd64.*hana.*" - - sles-15-2-sap-ha = ".*sles.*15-2.*amd64.*hana.*" - - sles-12-4-sap-applications = ".*sles.*12-4.*amd64.*applications.*" - - sles-15-1-sap-applications = ".*sles.*15-1.*amd64.*applications.*" - - sles-15-2-sap-applications = ".*sles.*15-2.*amd64.*applications.*" + sles-15-5 = ".*sles.*15-5.*amd64-[0-9]" + sles-15-6 = ".*sles.*15-6.*amd64-[0-9]" } @@ -242,25 +220,24 @@ variable "map_os_image_regex" { default = { - rhel-8-4 = ".*RHEL.*8.*4" - - rhel-8-6 = ".*RHEL.*8.*6" - - rhel-9-2 = ".*RHEL.*9.*2" - - sles-15-3 = ".*SLES.*15.*3" - - sles-15-4 = ".*SLES.*15.*4" - - rhel-8-4-sap-ha = ".*RHEL.*8.*4.*SAP$" # ensure string suffix using $ - - rhel-8-6-sap-ha = ".*RHEL.*8.*6.*SAP$" # ensure string suffix using $ - - sles-15-2-sap = ".*SLES.*15.*2.*SAP$" # ensure string suffix using $ - - sles-15-3-sap = ".*SLES.*15.*3.*SAP$" # ensure string suffix using $ - - sles-15-4-sap = ".*SLES.*15.*4.*SAP$" # ensure string suffix using $ + # OS Image keys for IBM Power Virtual Server + rhel-8-4-sap-ha = "RHEL8-SP4-SAP" + rhel-8-4-sap-ha-byol = "RHEL8-SP4-SAP-BYOL" + rhel-8-6-sap-ha = "RHEL8-SP6-SAP" + rhel-8-6-sap-ha-byol = "RHEL8-SP6-SAP-BYOL" + rhel-8-8-sap-ha = "RHEL8-SP8-SAP" + rhel-8-8-sap-ha-byol = "RHEL8-SP8-SAP-BYOL" + rhel-9-2-sap-ha = "RHEL9-SP2-SAP" + rhel-9-2-sap-ha-byol = "RHEL9-SP2-SAP-BYOL" + + sles-15-2-sap-ha = "SLES15-SP2-SAP" + sles-15-2-sap-ha-byol = "SLES15-SP2-SAP-BYOL" + sles-15-3-sap-ha = "SLES15-SP3-SAP" + sles-15-3-sap-ha-byol = "SLES15-SP3-SAP-BYOL" + sles-15-4-sap-ha = "SLES15-SP4-SAP" + sles-15-4-sap-ha-byol = "SLES15-SP4-SAP-BYOL" + sles-15-5-sap-ha = "SLES15-SP5-SAP" + sles-15-5-sap-ha-byol = "SLES15-SP5-SAP-BYOL" } diff --git a/roles/sap_vm_provision/tasks/platform_ansible_to_terraform/ibmcloud_vs/tf_template/tf_template_input_vars.tf b/roles/sap_vm_provision/tasks/platform_ansible_to_terraform/ibmcloud_vs/tf_template/tf_template_input_vars.tf index 4cbf7d3..d5cd41b 100644 --- a/roles/sap_vm_provision/tasks/platform_ansible_to_terraform/ibmcloud_vs/tf_template/tf_template_input_vars.tf +++ b/roles/sap_vm_provision/tasks/platform_ansible_to_terraform/ibmcloud_vs/tf_template/tf_template_input_vars.tf @@ -99,35 +99,33 @@ variable "map_os_image_regex" { default = { - rhel-7-6-sap-ha = ".*redhat.*7-6.*amd64.*hana.*" - - rhel-8-1-sap-ha = ".*redhat.*8-1.*amd64.*hana.*" - - rhel-8-2-sap-ha = ".*redhat.*8-2.*amd64.*hana.*" - + rhel-8-8 = ".*redhat.*8-8.*minimal.*amd64.*" + rhel-8-10 = ".*redhat.*8-10.*minimal.*amd64.*" + rhel-9-2 = ".*redhat.*9-2.*minimal.*amd64.*" + rhel-9-4 = ".*redhat.*9-4.*minimal.*amd64.*" + sles-15-5 = ".*sles.*15-5.*amd64-[0-9]" + sles-15-6 = ".*sles.*15-6.*amd64-[0-9]" + + # rhel-7-6-sap-ha = ".*redhat.*7-6.*amd64.*hana.*" // retrievable from deprecated list + # rhel-7-9-sap-ha = ".*redhat.*7-9.*amd64.*hana.*" // retrievable from deprecated list + # rhel-8-1-sap-ha = ".*redhat.*8-1.*amd64.*hana.*" // retrievable from deprecated list + # rhel-8-2-sap-ha = ".*redhat.*8-2.*amd64.*hana.*" // retrievable from deprecated list rhel-8-4-sap-ha = ".*redhat.*8-4.*amd64.*hana.*" - - rhel-7-6-sap-applications = ".*redhat.*7-6.*amd64.*applications.*" - - rhel-8-1-sap-applications = ".*redhat.*8-1.*amd64.*applications.*" - - rhel-8-2-sap-applications = ".*redhat.*8-2.*amd64.*applications.*" - - rhel-8-4-sap-applications = ".*redhat.*8-4.*amd64.*applications.*" - - rhel-8-4 = ".*redhat.*8-4.*minimal.*amd64.*" - - sles-12-4-sap-ha = ".*sles.*12-4.*amd64.*hana.*" - - sles-15-1-sap-ha = ".*sles.*15-1.*amd64.*hana.*" - + rhel-8-6-sap-ha = ".*redhat.*8-6.*amd64.*hana.*" + rhel-8-8-sap-ha = ".*redhat.*8-8.*amd64.*hana.*" + rhel-8-10-sap-ha = ".*redhat.*8-10.*amd64.*hana.*" + rhel-9-0-sap-ha = ".*redhat.*9-0.*amd64.*hana.*" + rhel-9-2-sap-ha = ".*redhat.*9-2.*amd64.*hana.*" + rhel-9-4-sap-ha = ".*redhat.*9-4.*amd64.*hana.*" + + # sles-12-4-sap-ha = ".*sles.*12-4.*amd64.*hana.*" // retrievable from deprecated list + # sles-12-5-sap-ha = ".*sles.*12-5.*amd64.*hana.*" // retrievable from deprecated list + # sles-15-1-sap-ha = ".*sles.*15-1.*amd64.*hana.*" // retrievable from deprecated list sles-15-2-sap-ha = ".*sles.*15-2.*amd64.*hana.*" - - sles-12-4-sap-applications = ".*sles.*12-4.*amd64.*applications.*" - - sles-15-1-sap-applications = ".*sles.*15-1.*amd64.*applications.*" - - sles-15-2-sap-applications = ".*sles.*15-2.*amd64.*applications.*" + sles-15-3-sap-ha = ".*sles.*15-3.*amd64.*hana.*" + sles-15-4-sap-ha = ".*sles.*15-4.*amd64.*hana.*" + sles-15-5-sap-ha = ".*sles.*15-5.*amd64.*hana.*" + sles-15-6-sap-ha = ".*sles.*15-6.*amd64.*hana.*" } diff --git a/roles/sap_vm_provision/tasks/platform_ansible_to_terraform/msazure_vm/tf_template/tf_template_input_vars.tf b/roles/sap_vm_provision/tasks/platform_ansible_to_terraform/msazure_vm/tf_template/tf_template_input_vars.tf index ff236f2..fa6477d 100644 --- a/roles/sap_vm_provision/tasks/platform_ansible_to_terraform/msazure_vm/tf_template/tf_template_input_vars.tf +++ b/roles/sap_vm_provision/tasks/platform_ansible_to_terraform/msazure_vm/tf_template/tf_template_input_vars.tf @@ -142,47 +142,48 @@ variable "map_os_image_regex" { default = { - rhel-8-4 = { - publisher = "RedHat" - offer = "RHEL" - sku = "84-gen2" - }, - - rhel-8-1-sap-ha = { - publisher = "RedHat" - offer = "RHEL-SAP-HA" - sku = "81sapha-gen2" - }, - - rhel-8-2-sap-ha = { - publisher = "RedHat" - offer = "RHEL-SAP-HA" - sku = "82sapha-gen2" - }, - - rhel-8-4-sap-ha = { - publisher = "RedHat" - offer = "RHEL-SAP-HA" - sku = "84sapha-gen2" - }, - - rhel-8-1-sap-applications = { - publisher = "RedHat" - offer = "RHEL-SAP-APPS" - sku = "81sapapps-gen2" - }, - - rhel-8-2-sap-applications = { - publisher = "RedHat" - offer = "RHEL-SAP-APPS" - sku = "82sapapps-gen2" - }, - - rhel-8-4-sap-applications = { - publisher = "RedHat" - offer = "RHEL-SAP-APPS" - sku = "84sapapps-gen2" - } + rhel-8-0 = { publisher = "RedHat" , offer = "RHEL" , sku = "8-gen2" }, + rhel-8-1 = { publisher = "RedHat" , offer = "RHEL" , sku = "81gen2" }, + rhel-8-2 = { publisher = "RedHat" , offer = "RHEL" , sku = "82gen2" }, + rhel-8-3 = { publisher = "RedHat" , offer = "RHEL" , sku = "83-gen2" }, + rhel-8-4 = { publisher = "RedHat" , offer = "RHEL" , sku = "84-gen2" }, + rhel-8-5 = { publisher = "RedHat" , offer = "RHEL" , sku = "85-gen2" }, + rhel-8-6 = { publisher = "RedHat" , offer = "RHEL" , sku = "86-gen2" }, + rhel-8-7 = { publisher = "RedHat" , offer = "RHEL" , sku = "87-gen2" }, + rhel-8-8 = { publisher = "RedHat" , offer = "RHEL" , sku = "88-gen2" }, + rhel-8-9 = { publisher = "RedHat" , offer = "RHEL" , sku = "89-gen2" }, + rhel-8-10 = { publisher = "RedHat" , offer = "RHEL" , sku = "810-gen2" }, + rhel-9-0 = { publisher = "RedHat" , offer = "RHEL" , sku = "90-gen2" }, + rhel-9-1 = { publisher = "RedHat" , offer = "RHEL" , sku = "91-gen2" }, + rhel-9-2 = { publisher = "RedHat" , offer = "RHEL" , sku = "92-gen2" }, + rhel-9-3 = { publisher = "RedHat" , offer = "RHEL" , sku = "93-gen2" }, + rhel-9-4 = { publisher = "RedHat" , offer = "RHEL" , sku = "94-gen2" }, + + rhel-8-1-sap-ha = { publisher = "RedHat" , offer = "RHEL-SAP-HA" , sku = "81sapha-gen2" }, + rhel-8-2-sap-ha = { publisher = "RedHat" , offer = "RHEL-SAP-HA" , sku = "82sapha-gen2" }, + rhel-8-4-sap-ha = { publisher = "RedHat" , offer = "RHEL-SAP-HA" , sku = "84sapha-gen2" }, + rhel-8-6-sap-ha = { publisher = "RedHat" , offer = "RHEL-SAP-HA" , sku = "86sapha-gen2" }, + rhel-8-8-sap-ha = { publisher = "RedHat" , offer = "RHEL-SAP-HA" , sku = "88sapha-gen2" }, + rhel-8-10-sap-ha = { publisher = "RedHat" , offer = "RHEL-SAP-HA" , sku = "810sapha-gen2" }, + rhel-9-0-sap-ha = { publisher = "RedHat" , offer = "RHEL-SAP-HA" , sku = "90sapha-gen2" }, + rhel-9-2-sap-ha = { publisher = "RedHat" , offer = "RHEL-SAP-HA" , sku = "92sapha-gen2" }, + rhel-9-4-sap-ha = { publisher = "RedHat" , offer = "RHEL-SAP-HA" , sku = "94sapha-gen2" }, + + sles-12-5 = { publisher = "SUSE" , offer = "sles-12-sp5" , sku = "gen2" }, + sles-15-1 = { publisher = "SUSE" , offer = "sles-15-sp1" , sku = "gen2" }, + sles-15-2 = { publisher = "SUSE" , offer = "sles-15-sp2" , sku = "gen2" }, + sles-15-3 = { publisher = "SUSE" , offer = "sles-15-sp3" , sku = "gen2" }, + sles-15-4 = { publisher = "SUSE" , offer = "sles-15-sp4" , sku = "gen2" }, + sles-15-5 = { publisher = "SUSE" , offer = "sles-15-sp5" , sku = "gen2" }, + sles-15-6 = { publisher = "SUSE" , offer = "sles-15-sp6" , sku = "gen2" }, + + sles-12-5-sap-ha = { publisher = "SUSE" , offer = "sles-sap-12-sp5" , sku = "gen2" }, + sles-15-1-sap-ha = { publisher = "SUSE" , offer = "sles-sap-15-sp1" , sku = "gen2" }, + sles-15-2-sap-ha = { publisher = "SUSE" , offer = "sles-sap-15-sp2" , sku = "gen2" }, + sles-15-3-sap-ha = { publisher = "SUSE" , offer = "sles-sap-15-sp3" , sku = "gen2" }, + sles-15-4-sap-ha = { publisher = "SUSE" , offer = "sles-sap-15-sp4" , sku = "gen2" }, + sles-15-5-sap-ha = { publisher = "SUSE" , offer = "sles-sap-15-sp5" , sku = "gen2" }, + sles-15-6-sap-ha = { publisher = "SUSE" , offer = "sles-sap-15-sp6" , sku = "gen2" } }