From 443ca466180715a49c282e3f524421d851747d62 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Fri, 30 Dec 2022 14:08:49 +0000 Subject: [PATCH 1/6] fix: remove redundant vars --- sap_bw4hana_single_node_install/ibmcloud_powervs/main.tf | 1 - sap_bw4hana_single_node_install/ibmcloud_vs/main.tf | 1 - .../ibmcloud_powervs/main.tf | 1 - .../ibmcloud_vs/main.tf | 1 - sap_ecc_ibmdb2_single_node_install/ibmcloud_vs/main.tf | 1 - sap_ecc_oracledb_single_node_install/ibmcloud_vs/main.tf | 1 - sap_ecc_sapase_single_node_install/ibmcloud_vs/main.tf | 1 - sap_ecc_sapmaxdb_single_node_install/ibmcloud_vs/main.tf | 1 - sap_hana_single_node_install/ibmcloud_powervs/main.tf | 1 - sap_hana_single_node_install/ibmcloud_vs/main.tf | 1 - sap_nwas_abap_hana_install/ibmcloud_powervs/main.tf | 1 - sap_nwas_abap_hana_install/ibmcloud_vs/main.tf | 1 - sap_nwas_abap_ibmdb2_install/ibmcloud_vs/main.tf | 1 - sap_nwas_abap_oracledb_install/ibmcloud_vs/main.tf | 1 - sap_nwas_abap_sapase_install/ibmcloud_vs/main.tf | 1 - sap_nwas_abap_sapmaxdb_install/ibmcloud_vs/main.tf | 1 - sap_nwas_java_ibmdb2_install/ibmcloud_vs/main.tf | 1 - sap_nwas_java_sapase_install/ibmcloud_vs/main.tf | 1 - sap_s4hana_single_node_install/ibmcloud_powervs/main.tf | 1 - sap_s4hana_single_node_install/ibmcloud_vs/main.tf | 1 - .../ibmcloud_powervs/main.tf | 1 - .../ibmcloud_vs/main.tf | 1 - .../ibmcloud_powervs/main.tf | 1 - .../ibmcloud_vs/main.tf | 1 - 24 files changed, 24 deletions(-) diff --git a/sap_bw4hana_single_node_install/ibmcloud_powervs/main.tf b/sap_bw4hana_single_node_install/ibmcloud_powervs/main.tf index e09c873..867c0c0 100644 --- a/sap_bw4hana_single_node_install/ibmcloud_powervs/main.tf +++ b/sap_bw4hana_single_node_install/ibmcloud_powervs/main.tf @@ -58,7 +58,6 @@ module "run_account_bootstrap_module" { module_var_resource_prefix = var.resource_prefix module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name - module_var_ibmcloud_vpc_subnet_create_boolean = local.ibmcloud_vpc_subnet_create_boolean module_var_ibmcloud_vpc_availability_zone = var.map_ibm_powervs_to_vpc_az[var.ibmcloud_powervs_location] module_var_dns_root_domain_name = var.dns_root_domain diff --git a/sap_bw4hana_single_node_install/ibmcloud_vs/main.tf b/sap_bw4hana_single_node_install/ibmcloud_vs/main.tf index faf630a..ed3413a 100644 --- a/sap_bw4hana_single_node_install/ibmcloud_vs/main.tf +++ b/sap_bw4hana_single_node_install/ibmcloud_vs/main.tf @@ -58,7 +58,6 @@ module "run_account_bootstrap_module" { module_var_resource_prefix = var.resource_prefix module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name - module_var_ibmcloud_vpc_subnet_create_boolean = local.ibmcloud_vpc_subnet_create_boolean module_var_ibmcloud_vpc_availability_zone = var.ibmcloud_vpc_availability_zone module_var_dns_root_domain_name = var.dns_root_domain diff --git a/sap_ecc_hana_single_node_system_copy_homogeneous_hdb/ibmcloud_powervs/main.tf b/sap_ecc_hana_single_node_system_copy_homogeneous_hdb/ibmcloud_powervs/main.tf index a411408..a8659bc 100644 --- a/sap_ecc_hana_single_node_system_copy_homogeneous_hdb/ibmcloud_powervs/main.tf +++ b/sap_ecc_hana_single_node_system_copy_homogeneous_hdb/ibmcloud_powervs/main.tf @@ -61,7 +61,6 @@ module "run_account_bootstrap_module" { module_var_resource_prefix = var.resource_prefix module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name - module_var_ibmcloud_vpc_subnet_create_boolean = local.ibmcloud_vpc_subnet_create_boolean module_var_ibmcloud_vpc_availability_zone = var.map_ibm_powervs_to_vpc_az[var.ibmcloud_powervs_location] module_var_dns_root_domain_name = var.dns_root_domain diff --git a/sap_ecc_hana_single_node_system_copy_homogeneous_hdb/ibmcloud_vs/main.tf b/sap_ecc_hana_single_node_system_copy_homogeneous_hdb/ibmcloud_vs/main.tf index 9073850..ad2b946 100644 --- a/sap_ecc_hana_single_node_system_copy_homogeneous_hdb/ibmcloud_vs/main.tf +++ b/sap_ecc_hana_single_node_system_copy_homogeneous_hdb/ibmcloud_vs/main.tf @@ -61,7 +61,6 @@ module "run_account_bootstrap_module" { module_var_resource_prefix = var.resource_prefix module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name - module_var_ibmcloud_vpc_subnet_create_boolean = local.ibmcloud_vpc_subnet_create_boolean module_var_ibmcloud_vpc_availability_zone = var.ibmcloud_vpc_availability_zone module_var_dns_root_domain_name = var.dns_root_domain diff --git a/sap_ecc_ibmdb2_single_node_install/ibmcloud_vs/main.tf b/sap_ecc_ibmdb2_single_node_install/ibmcloud_vs/main.tf index 3609d46..a6bb008 100644 --- a/sap_ecc_ibmdb2_single_node_install/ibmcloud_vs/main.tf +++ b/sap_ecc_ibmdb2_single_node_install/ibmcloud_vs/main.tf @@ -58,7 +58,6 @@ module "run_account_bootstrap_module" { module_var_resource_prefix = var.resource_prefix module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name - module_var_ibmcloud_vpc_subnet_create_boolean = local.ibmcloud_vpc_subnet_create_boolean module_var_ibmcloud_vpc_availability_zone = var.ibmcloud_vpc_availability_zone module_var_dns_root_domain_name = var.dns_root_domain diff --git a/sap_ecc_oracledb_single_node_install/ibmcloud_vs/main.tf b/sap_ecc_oracledb_single_node_install/ibmcloud_vs/main.tf index 812b305..6e7c9cb 100644 --- a/sap_ecc_oracledb_single_node_install/ibmcloud_vs/main.tf +++ b/sap_ecc_oracledb_single_node_install/ibmcloud_vs/main.tf @@ -58,7 +58,6 @@ module "run_account_bootstrap_module" { module_var_resource_prefix = var.resource_prefix module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name - module_var_ibmcloud_vpc_subnet_create_boolean = local.ibmcloud_vpc_subnet_create_boolean module_var_ibmcloud_vpc_availability_zone = var.ibmcloud_vpc_availability_zone module_var_dns_root_domain_name = var.dns_root_domain diff --git a/sap_ecc_sapase_single_node_install/ibmcloud_vs/main.tf b/sap_ecc_sapase_single_node_install/ibmcloud_vs/main.tf index f1f0815..3b96140 100644 --- a/sap_ecc_sapase_single_node_install/ibmcloud_vs/main.tf +++ b/sap_ecc_sapase_single_node_install/ibmcloud_vs/main.tf @@ -58,7 +58,6 @@ module "run_account_bootstrap_module" { module_var_resource_prefix = var.resource_prefix module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name - module_var_ibmcloud_vpc_subnet_create_boolean = local.ibmcloud_vpc_subnet_create_boolean module_var_ibmcloud_vpc_availability_zone = var.ibmcloud_vpc_availability_zone module_var_dns_root_domain_name = var.dns_root_domain diff --git a/sap_ecc_sapmaxdb_single_node_install/ibmcloud_vs/main.tf b/sap_ecc_sapmaxdb_single_node_install/ibmcloud_vs/main.tf index 6fc1104..a1bb502 100644 --- a/sap_ecc_sapmaxdb_single_node_install/ibmcloud_vs/main.tf +++ b/sap_ecc_sapmaxdb_single_node_install/ibmcloud_vs/main.tf @@ -58,7 +58,6 @@ module "run_account_bootstrap_module" { module_var_resource_prefix = var.resource_prefix module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name - module_var_ibmcloud_vpc_subnet_create_boolean = local.ibmcloud_vpc_subnet_create_boolean module_var_ibmcloud_vpc_availability_zone = var.ibmcloud_vpc_availability_zone module_var_dns_root_domain_name = var.dns_root_domain diff --git a/sap_hana_single_node_install/ibmcloud_powervs/main.tf b/sap_hana_single_node_install/ibmcloud_powervs/main.tf index 08243cf..bfa2988 100644 --- a/sap_hana_single_node_install/ibmcloud_powervs/main.tf +++ b/sap_hana_single_node_install/ibmcloud_powervs/main.tf @@ -55,7 +55,6 @@ module "run_account_bootstrap_module" { module_var_resource_prefix = var.resource_prefix module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name - module_var_ibmcloud_vpc_subnet_create_boolean = local.ibmcloud_vpc_subnet_create_boolean module_var_ibmcloud_vpc_availability_zone = var.map_ibm_powervs_to_vpc_az[var.ibmcloud_powervs_location] module_var_dns_root_domain_name = var.dns_root_domain diff --git a/sap_hana_single_node_install/ibmcloud_vs/main.tf b/sap_hana_single_node_install/ibmcloud_vs/main.tf index 35b1fa8..e17854a 100644 --- a/sap_hana_single_node_install/ibmcloud_vs/main.tf +++ b/sap_hana_single_node_install/ibmcloud_vs/main.tf @@ -55,7 +55,6 @@ module "run_account_bootstrap_module" { module_var_resource_prefix = var.resource_prefix module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name - module_var_ibmcloud_vpc_subnet_create_boolean = local.ibmcloud_vpc_subnet_create_boolean module_var_ibmcloud_vpc_availability_zone = var.ibmcloud_vpc_availability_zone module_var_dns_root_domain_name = var.dns_root_domain diff --git a/sap_nwas_abap_hana_install/ibmcloud_powervs/main.tf b/sap_nwas_abap_hana_install/ibmcloud_powervs/main.tf index 247c3e7..e8d2866 100644 --- a/sap_nwas_abap_hana_install/ibmcloud_powervs/main.tf +++ b/sap_nwas_abap_hana_install/ibmcloud_powervs/main.tf @@ -58,7 +58,6 @@ module "run_account_bootstrap_module" { module_var_resource_prefix = var.resource_prefix module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name - module_var_ibmcloud_vpc_subnet_create_boolean = local.ibmcloud_vpc_subnet_create_boolean module_var_ibmcloud_vpc_availability_zone = var.map_ibm_powervs_to_vpc_az[var.ibmcloud_powervs_location] module_var_dns_root_domain_name = var.dns_root_domain diff --git a/sap_nwas_abap_hana_install/ibmcloud_vs/main.tf b/sap_nwas_abap_hana_install/ibmcloud_vs/main.tf index 96d6dea..a4070a8 100644 --- a/sap_nwas_abap_hana_install/ibmcloud_vs/main.tf +++ b/sap_nwas_abap_hana_install/ibmcloud_vs/main.tf @@ -58,7 +58,6 @@ module "run_account_bootstrap_module" { module_var_resource_prefix = var.resource_prefix module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name - module_var_ibmcloud_vpc_subnet_create_boolean = local.ibmcloud_vpc_subnet_create_boolean module_var_ibmcloud_vpc_availability_zone = var.ibmcloud_vpc_availability_zone module_var_dns_root_domain_name = var.dns_root_domain diff --git a/sap_nwas_abap_ibmdb2_install/ibmcloud_vs/main.tf b/sap_nwas_abap_ibmdb2_install/ibmcloud_vs/main.tf index 286d4b9..60db60a 100644 --- a/sap_nwas_abap_ibmdb2_install/ibmcloud_vs/main.tf +++ b/sap_nwas_abap_ibmdb2_install/ibmcloud_vs/main.tf @@ -58,7 +58,6 @@ module "run_account_bootstrap_module" { module_var_resource_prefix = var.resource_prefix module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name - module_var_ibmcloud_vpc_subnet_create_boolean = local.ibmcloud_vpc_subnet_create_boolean module_var_ibmcloud_vpc_availability_zone = var.ibmcloud_vpc_availability_zone module_var_dns_root_domain_name = var.dns_root_domain diff --git a/sap_nwas_abap_oracledb_install/ibmcloud_vs/main.tf b/sap_nwas_abap_oracledb_install/ibmcloud_vs/main.tf index e01c312..7f20ffd 100644 --- a/sap_nwas_abap_oracledb_install/ibmcloud_vs/main.tf +++ b/sap_nwas_abap_oracledb_install/ibmcloud_vs/main.tf @@ -58,7 +58,6 @@ module "run_account_bootstrap_module" { module_var_resource_prefix = var.resource_prefix module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name - module_var_ibmcloud_vpc_subnet_create_boolean = local.ibmcloud_vpc_subnet_create_boolean module_var_ibmcloud_vpc_availability_zone = var.ibmcloud_vpc_availability_zone module_var_dns_root_domain_name = var.dns_root_domain diff --git a/sap_nwas_abap_sapase_install/ibmcloud_vs/main.tf b/sap_nwas_abap_sapase_install/ibmcloud_vs/main.tf index 7b7fd0e..304aedf 100644 --- a/sap_nwas_abap_sapase_install/ibmcloud_vs/main.tf +++ b/sap_nwas_abap_sapase_install/ibmcloud_vs/main.tf @@ -58,7 +58,6 @@ module "run_account_bootstrap_module" { module_var_resource_prefix = var.resource_prefix module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name - module_var_ibmcloud_vpc_subnet_create_boolean = local.ibmcloud_vpc_subnet_create_boolean module_var_ibmcloud_vpc_availability_zone = var.ibmcloud_vpc_availability_zone module_var_dns_root_domain_name = var.dns_root_domain diff --git a/sap_nwas_abap_sapmaxdb_install/ibmcloud_vs/main.tf b/sap_nwas_abap_sapmaxdb_install/ibmcloud_vs/main.tf index b49e0b1..6a5d163 100644 --- a/sap_nwas_abap_sapmaxdb_install/ibmcloud_vs/main.tf +++ b/sap_nwas_abap_sapmaxdb_install/ibmcloud_vs/main.tf @@ -58,7 +58,6 @@ module "run_account_bootstrap_module" { module_var_resource_prefix = var.resource_prefix module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name - module_var_ibmcloud_vpc_subnet_create_boolean = local.ibmcloud_vpc_subnet_create_boolean module_var_ibmcloud_vpc_availability_zone = var.ibmcloud_vpc_availability_zone module_var_dns_root_domain_name = var.dns_root_domain diff --git a/sap_nwas_java_ibmdb2_install/ibmcloud_vs/main.tf b/sap_nwas_java_ibmdb2_install/ibmcloud_vs/main.tf index 0ba7cf7..27418ce 100644 --- a/sap_nwas_java_ibmdb2_install/ibmcloud_vs/main.tf +++ b/sap_nwas_java_ibmdb2_install/ibmcloud_vs/main.tf @@ -58,7 +58,6 @@ module "run_account_bootstrap_module" { module_var_resource_prefix = var.resource_prefix module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name - module_var_ibmcloud_vpc_subnet_create_boolean = local.ibmcloud_vpc_subnet_create_boolean module_var_ibmcloud_vpc_availability_zone = var.ibmcloud_vpc_availability_zone module_var_dns_root_domain_name = var.dns_root_domain diff --git a/sap_nwas_java_sapase_install/ibmcloud_vs/main.tf b/sap_nwas_java_sapase_install/ibmcloud_vs/main.tf index acc0d70..0229973 100644 --- a/sap_nwas_java_sapase_install/ibmcloud_vs/main.tf +++ b/sap_nwas_java_sapase_install/ibmcloud_vs/main.tf @@ -58,7 +58,6 @@ module "run_account_bootstrap_module" { module_var_resource_prefix = var.resource_prefix module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name - module_var_ibmcloud_vpc_subnet_create_boolean = local.ibmcloud_vpc_subnet_create_boolean module_var_ibmcloud_vpc_availability_zone = var.ibmcloud_vpc_availability_zone module_var_dns_root_domain_name = var.dns_root_domain diff --git a/sap_s4hana_single_node_install/ibmcloud_powervs/main.tf b/sap_s4hana_single_node_install/ibmcloud_powervs/main.tf index b9bc9cc..f979444 100644 --- a/sap_s4hana_single_node_install/ibmcloud_powervs/main.tf +++ b/sap_s4hana_single_node_install/ibmcloud_powervs/main.tf @@ -58,7 +58,6 @@ module "run_account_bootstrap_module" { module_var_resource_prefix = var.resource_prefix module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name - module_var_ibmcloud_vpc_subnet_create_boolean = local.ibmcloud_vpc_subnet_create_boolean module_var_ibmcloud_vpc_availability_zone = var.map_ibm_powervs_to_vpc_az[var.ibmcloud_powervs_location] module_var_dns_root_domain_name = var.dns_root_domain diff --git a/sap_s4hana_single_node_install/ibmcloud_vs/main.tf b/sap_s4hana_single_node_install/ibmcloud_vs/main.tf index a7c9987..6b71fc2 100644 --- a/sap_s4hana_single_node_install/ibmcloud_vs/main.tf +++ b/sap_s4hana_single_node_install/ibmcloud_vs/main.tf @@ -58,7 +58,6 @@ module "run_account_bootstrap_module" { module_var_resource_prefix = var.resource_prefix module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name - module_var_ibmcloud_vpc_subnet_create_boolean = local.ibmcloud_vpc_subnet_create_boolean module_var_ibmcloud_vpc_availability_zone = var.ibmcloud_vpc_availability_zone module_var_dns_root_domain_name = var.dns_root_domain diff --git a/sap_s4hana_single_node_install_maintenance_plan/ibmcloud_powervs/main.tf b/sap_s4hana_single_node_install_maintenance_plan/ibmcloud_powervs/main.tf index 4d610bd..7d25845 100644 --- a/sap_s4hana_single_node_install_maintenance_plan/ibmcloud_powervs/main.tf +++ b/sap_s4hana_single_node_install_maintenance_plan/ibmcloud_powervs/main.tf @@ -59,7 +59,6 @@ module "run_account_bootstrap_module" { module_var_resource_prefix = var.resource_prefix module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name - module_var_ibmcloud_vpc_subnet_create_boolean = local.ibmcloud_vpc_subnet_create_boolean module_var_ibmcloud_vpc_availability_zone = var.map_ibm_powervs_to_vpc_az[var.ibmcloud_powervs_location] module_var_dns_root_domain_name = var.dns_root_domain diff --git a/sap_s4hana_single_node_install_maintenance_plan/ibmcloud_vs/main.tf b/sap_s4hana_single_node_install_maintenance_plan/ibmcloud_vs/main.tf index 887fb50..aafbf5a 100644 --- a/sap_s4hana_single_node_install_maintenance_plan/ibmcloud_vs/main.tf +++ b/sap_s4hana_single_node_install_maintenance_plan/ibmcloud_vs/main.tf @@ -59,7 +59,6 @@ module "run_account_bootstrap_module" { module_var_resource_prefix = var.resource_prefix module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name - module_var_ibmcloud_vpc_subnet_create_boolean = local.ibmcloud_vpc_subnet_create_boolean module_var_ibmcloud_vpc_availability_zone = var.ibmcloud_vpc_availability_zone module_var_dns_root_domain_name = var.dns_root_domain diff --git a/sap_s4hana_single_node_system_copy_homogeneous_hdb/ibmcloud_powervs/main.tf b/sap_s4hana_single_node_system_copy_homogeneous_hdb/ibmcloud_powervs/main.tf index 521f8a9..2ed8d3f 100644 --- a/sap_s4hana_single_node_system_copy_homogeneous_hdb/ibmcloud_powervs/main.tf +++ b/sap_s4hana_single_node_system_copy_homogeneous_hdb/ibmcloud_powervs/main.tf @@ -61,7 +61,6 @@ module "run_account_bootstrap_module" { module_var_resource_prefix = var.resource_prefix module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name - module_var_ibmcloud_vpc_subnet_create_boolean = local.ibmcloud_vpc_subnet_create_boolean module_var_ibmcloud_vpc_availability_zone = var.map_ibm_powervs_to_vpc_az[var.ibmcloud_powervs_location] module_var_dns_root_domain_name = var.dns_root_domain diff --git a/sap_s4hana_single_node_system_copy_homogeneous_hdb/ibmcloud_vs/main.tf b/sap_s4hana_single_node_system_copy_homogeneous_hdb/ibmcloud_vs/main.tf index b08b17a..a947ebb 100644 --- a/sap_s4hana_single_node_system_copy_homogeneous_hdb/ibmcloud_vs/main.tf +++ b/sap_s4hana_single_node_system_copy_homogeneous_hdb/ibmcloud_vs/main.tf @@ -61,7 +61,6 @@ module "run_account_bootstrap_module" { module_var_resource_prefix = var.resource_prefix module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name - module_var_ibmcloud_vpc_subnet_create_boolean = local.ibmcloud_vpc_subnet_create_boolean module_var_ibmcloud_vpc_availability_zone = var.ibmcloud_vpc_availability_zone module_var_dns_root_domain_name = var.dns_root_domain From e0e9cd774c4d6f4034251f9c94725efecf59bf6b Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Wed, 4 Jan 2023 21:03:44 +0000 Subject: [PATCH 2/6] fix: urls with .git standardise --- sap_bw4hana_single_node_install/aws_ec2_instance/main.tf | 4 ++-- sap_bw4hana_single_node_install/ibmcloud_powervs/main.tf | 4 ++-- sap_bw4hana_single_node_install/ibmcloud_vs/main.tf | 4 ++-- sap_bw4hana_single_node_install/ibmpowervc/main.tf | 4 ++-- sap_bw4hana_single_node_install/msazure_vm/main.tf | 4 ++-- sap_ecc_ibmdb2_single_node_install/aws_ec2_instance/main.tf | 4 ++-- sap_ecc_ibmdb2_single_node_install/ibmcloud_vs/main.tf | 4 ++-- sap_ecc_ibmdb2_single_node_install/msazure_vm/main.tf | 4 ++-- sap_ecc_oracledb_single_node_install/aws_ec2_instance/main.tf | 4 ++-- sap_ecc_oracledb_single_node_install/ibmcloud_vs/main.tf | 4 ++-- sap_ecc_oracledb_single_node_install/msazure_vm/main.tf | 4 ++-- sap_ecc_sapase_single_node_install/aws_ec2_instance/main.tf | 4 ++-- sap_ecc_sapase_single_node_install/ibmcloud_vs/main.tf | 4 ++-- sap_ecc_sapase_single_node_install/msazure_vm/main.tf | 4 ++-- sap_ecc_sapmaxdb_single_node_install/aws_ec2_instance/main.tf | 4 ++-- sap_ecc_sapmaxdb_single_node_install/ibmcloud_vs/main.tf | 4 ++-- sap_ecc_sapmaxdb_single_node_install/msazure_vm/main.tf | 4 ++-- sap_nwas_abap_hana_install/aws_ec2_instance/main.tf | 4 ++-- sap_nwas_abap_hana_install/ibmcloud_powervs/main.tf | 4 ++-- sap_nwas_abap_hana_install/ibmcloud_vs/main.tf | 4 ++-- sap_nwas_abap_hana_install/ibmpowervc/main.tf | 4 ++-- sap_nwas_abap_hana_install/msazure_vm/main.tf | 4 ++-- sap_s4hana_single_node_install/aws_ec2_instance/main.tf | 4 ++-- sap_s4hana_single_node_install/ibmcloud_powervs/main.tf | 4 ++-- sap_s4hana_single_node_install/ibmcloud_vs/main.tf | 4 ++-- sap_s4hana_single_node_install/ibmpowervc/main.tf | 4 ++-- sap_s4hana_single_node_install/msazure_vm/main.tf | 4 ++-- 27 files changed, 54 insertions(+), 54 deletions(-) diff --git a/sap_bw4hana_single_node_install/aws_ec2_instance/main.tf b/sap_bw4hana_single_node_install/aws_ec2_instance/main.tf index b2f451f..0323018 100644 --- a/sap_bw4hana_single_node_install/aws_ec2_instance/main.tf +++ b/sap_bw4hana_single_node_install/aws_ec2_instance/main.tf @@ -1,7 +1,7 @@ module "run_ansible_dry_run" { - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_bw4hana_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_bw4hana_install?ref=main" module_var_dry_run_test = "x86_64" // x86_64 or ppc64le @@ -251,7 +251,7 @@ module "run_ansible_sap_bw4hana_install" { depends_on = [module.run_host_provision_module] - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_bw4hana_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_bw4hana_install?ref=main" # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) module_var_bastion_boolean = true // required as true boolean for any Cloud Service Provider (CSP) diff --git a/sap_bw4hana_single_node_install/ibmcloud_powervs/main.tf b/sap_bw4hana_single_node_install/ibmcloud_powervs/main.tf index 867c0c0..4a30951 100644 --- a/sap_bw4hana_single_node_install/ibmcloud_powervs/main.tf +++ b/sap_bw4hana_single_node_install/ibmcloud_powervs/main.tf @@ -1,7 +1,7 @@ module "run_ansible_dry_run" { - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_bw4hana_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_bw4hana_install?ref=main" module_var_dry_run_test = "x86_64" // x86_64 or ppc64le @@ -328,7 +328,7 @@ module "run_ansible_sap_bw4hana_install" { depends_on = [module.run_host_provision_module] - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_bw4hana_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_bw4hana_install?ref=main" # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) module_var_bastion_boolean = true // required as true boolean for any Cloud Service Provider (CSP) diff --git a/sap_bw4hana_single_node_install/ibmcloud_vs/main.tf b/sap_bw4hana_single_node_install/ibmcloud_vs/main.tf index ed3413a..a6c2ac4 100644 --- a/sap_bw4hana_single_node_install/ibmcloud_vs/main.tf +++ b/sap_bw4hana_single_node_install/ibmcloud_vs/main.tf @@ -1,7 +1,7 @@ module "run_ansible_dry_run" { - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_bw4hana_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_bw4hana_install?ref=main" module_var_dry_run_test = "x86_64" // x86_64 or ppc64le @@ -271,7 +271,7 @@ module "run_ansible_sap_bw4hana_install" { depends_on = [module.run_host_provision_module] - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_bw4hana_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_bw4hana_install?ref=main" # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) module_var_bastion_boolean = true // required as true boolean for any Cloud Service Provider (CSP) diff --git a/sap_bw4hana_single_node_install/ibmpowervc/main.tf b/sap_bw4hana_single_node_install/ibmpowervc/main.tf index 48b653d..0b149d0 100644 --- a/sap_bw4hana_single_node_install/ibmpowervc/main.tf +++ b/sap_bw4hana_single_node_install/ibmpowervc/main.tf @@ -1,7 +1,7 @@ module "run_ansible_dry_run" { - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_bw4hana_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_bw4hana_install?ref=main" module_var_dry_run_test = "x86_64" // x86_64 or ppc64le @@ -148,7 +148,7 @@ module "run_ansible_sap_bw4hana_install" { depends_on = [module.run_host_provision_module] - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_bw4hana_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_bw4hana_install?ref=main" # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) module_var_bastion_boolean = var.bastion_boolean diff --git a/sap_bw4hana_single_node_install/msazure_vm/main.tf b/sap_bw4hana_single_node_install/msazure_vm/main.tf index 8822094..cf9bdf8 100644 --- a/sap_bw4hana_single_node_install/msazure_vm/main.tf +++ b/sap_bw4hana_single_node_install/msazure_vm/main.tf @@ -1,7 +1,7 @@ module "run_ansible_dry_run" { - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_bw4hana_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_bw4hana_install?ref=main" module_var_dry_run_test = "x86_64" // x86_64 or ppc64le @@ -285,7 +285,7 @@ module "run_ansible_sap_bw4hana_install" { depends_on = [module.run_host_provision_module] - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_bw4hana_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_bw4hana_install?ref=main" # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) module_var_bastion_boolean = true // required as true boolean for any Cloud Service Provider (CSP) diff --git a/sap_ecc_ibmdb2_single_node_install/aws_ec2_instance/main.tf b/sap_ecc_ibmdb2_single_node_install/aws_ec2_instance/main.tf index 1f9c712..11889a0 100644 --- a/sap_ecc_ibmdb2_single_node_install/aws_ec2_instance/main.tf +++ b/sap_ecc_ibmdb2_single_node_install/aws_ec2_instance/main.tf @@ -1,7 +1,7 @@ module "run_ansible_dry_run" { - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_ecc_ibmdb2_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_ibmdb2_install?ref=main" module_var_dry_run_test = "x86_64" // x86_64 or ppc64le @@ -253,7 +253,7 @@ module "run_ansible_sap_ecc_ibmdb2_install" { depends_on = [module.run_host_provision_module] - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_ecc_ibmdb2_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_ibmdb2_install?ref=main" # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) module_var_bastion_boolean = true // required as true boolean for any Cloud Service Provider (CSP) diff --git a/sap_ecc_ibmdb2_single_node_install/ibmcloud_vs/main.tf b/sap_ecc_ibmdb2_single_node_install/ibmcloud_vs/main.tf index a6bb008..a0fe62d 100644 --- a/sap_ecc_ibmdb2_single_node_install/ibmcloud_vs/main.tf +++ b/sap_ecc_ibmdb2_single_node_install/ibmcloud_vs/main.tf @@ -1,7 +1,7 @@ module "run_ansible_dry_run" { - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_ecc_ibmdb2_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_ibmdb2_install?ref=main" module_var_dry_run_test = "x86_64" // x86_64 or ppc64le @@ -271,7 +271,7 @@ module "run_ansible_sap_ecc_ibmdb2_install" { depends_on = [module.run_host_provision_module] - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_ecc_ibmdb2_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_ibmdb2_install?ref=main" # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) module_var_bastion_boolean = true // required as true boolean for any Cloud Service Provider (CSP) diff --git a/sap_ecc_ibmdb2_single_node_install/msazure_vm/main.tf b/sap_ecc_ibmdb2_single_node_install/msazure_vm/main.tf index 63bd69d..e1596da 100644 --- a/sap_ecc_ibmdb2_single_node_install/msazure_vm/main.tf +++ b/sap_ecc_ibmdb2_single_node_install/msazure_vm/main.tf @@ -1,7 +1,7 @@ module "run_ansible_dry_run" { - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_ecc_ibmdb2_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_ibmdb2_install?ref=main" module_var_dry_run_test = "x86_64" // x86_64 or ppc64le @@ -288,7 +288,7 @@ module "run_ansible_sap_ecc_ibmdb2_install" { depends_on = [module.run_host_provision_module] - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_ecc_ibmdb2_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_ibmdb2_install?ref=main" # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) module_var_bastion_boolean = true // required as true boolean for any Cloud Service Provider (CSP) diff --git a/sap_ecc_oracledb_single_node_install/aws_ec2_instance/main.tf b/sap_ecc_oracledb_single_node_install/aws_ec2_instance/main.tf index 5c35796..5122b75 100644 --- a/sap_ecc_oracledb_single_node_install/aws_ec2_instance/main.tf +++ b/sap_ecc_oracledb_single_node_install/aws_ec2_instance/main.tf @@ -1,7 +1,7 @@ module "run_ansible_dry_run" { - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_ecc_oracledb_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_oracledb_install?ref=main" module_var_dry_run_test = "x86_64" // x86_64 or ppc64le @@ -253,7 +253,7 @@ module "run_ansible_sap_ecc_oracledb_install" { depends_on = [module.run_host_provision_module] - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_ecc_oracledb_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_oracledb_install?ref=main" # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) module_var_bastion_boolean = true // required as true boolean for any Cloud Service Provider (CSP) diff --git a/sap_ecc_oracledb_single_node_install/ibmcloud_vs/main.tf b/sap_ecc_oracledb_single_node_install/ibmcloud_vs/main.tf index 6e7c9cb..93dfe9f 100644 --- a/sap_ecc_oracledb_single_node_install/ibmcloud_vs/main.tf +++ b/sap_ecc_oracledb_single_node_install/ibmcloud_vs/main.tf @@ -1,7 +1,7 @@ module "run_ansible_dry_run" { - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_ecc_oracledb_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_oracledb_install?ref=main" module_var_dry_run_test = "x86_64" // x86_64 or ppc64le @@ -271,7 +271,7 @@ module "run_ansible_sap_ecc_oracledb_install" { depends_on = [module.run_host_provision_module] - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_ecc_oracledb_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_oracledb_install?ref=main" # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) module_var_bastion_boolean = true // required as true boolean for any Cloud Service Provider (CSP) diff --git a/sap_ecc_oracledb_single_node_install/msazure_vm/main.tf b/sap_ecc_oracledb_single_node_install/msazure_vm/main.tf index 8203084..82da7af 100644 --- a/sap_ecc_oracledb_single_node_install/msazure_vm/main.tf +++ b/sap_ecc_oracledb_single_node_install/msazure_vm/main.tf @@ -1,7 +1,7 @@ module "run_ansible_dry_run" { - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_ecc_oracledb_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_oracledb_install?ref=main" module_var_dry_run_test = "x86_64" // x86_64 or ppc64le @@ -288,7 +288,7 @@ module "run_ansible_sap_ecc_oracledb_install" { depends_on = [module.run_host_provision_module] - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_ecc_oracledb_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_oracledb_install?ref=main" # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) module_var_bastion_boolean = true // required as true boolean for any Cloud Service Provider (CSP) diff --git a/sap_ecc_sapase_single_node_install/aws_ec2_instance/main.tf b/sap_ecc_sapase_single_node_install/aws_ec2_instance/main.tf index 2dc7958..0a0015d 100644 --- a/sap_ecc_sapase_single_node_install/aws_ec2_instance/main.tf +++ b/sap_ecc_sapase_single_node_install/aws_ec2_instance/main.tf @@ -1,7 +1,7 @@ module "run_ansible_dry_run" { - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_ecc_sapase_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_sapase_install?ref=main" module_var_dry_run_test = "x86_64" // x86_64 or ppc64le @@ -253,7 +253,7 @@ module "run_ansible_sap_ecc_sapase_install" { depends_on = [module.run_host_provision_module] - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_ecc_sapase_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_sapase_install?ref=main" # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) module_var_bastion_boolean = true // required as true boolean for any Cloud Service Provider (CSP) diff --git a/sap_ecc_sapase_single_node_install/ibmcloud_vs/main.tf b/sap_ecc_sapase_single_node_install/ibmcloud_vs/main.tf index 3b96140..2183f24 100644 --- a/sap_ecc_sapase_single_node_install/ibmcloud_vs/main.tf +++ b/sap_ecc_sapase_single_node_install/ibmcloud_vs/main.tf @@ -1,7 +1,7 @@ module "run_ansible_dry_run" { - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_ecc_sapase_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_sapase_install?ref=main" module_var_dry_run_test = "x86_64" // x86_64 or ppc64le @@ -271,7 +271,7 @@ module "run_ansible_sap_ecc_sapase_install" { depends_on = [module.run_host_provision_module] - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_ecc_sapase_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_sapase_install?ref=main" # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) module_var_bastion_boolean = true // required as true boolean for any Cloud Service Provider (CSP) diff --git a/sap_ecc_sapase_single_node_install/msazure_vm/main.tf b/sap_ecc_sapase_single_node_install/msazure_vm/main.tf index 2fdd317..b520a31 100644 --- a/sap_ecc_sapase_single_node_install/msazure_vm/main.tf +++ b/sap_ecc_sapase_single_node_install/msazure_vm/main.tf @@ -1,7 +1,7 @@ module "run_ansible_dry_run" { - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_ecc_sapase_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_sapase_install?ref=main" module_var_dry_run_test = "x86_64" // x86_64 or ppc64le @@ -288,7 +288,7 @@ module "run_ansible_sap_ecc_sapase_install" { depends_on = [module.run_host_provision_module] - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_ecc_sapase_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_sapase_install?ref=main" # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) module_var_bastion_boolean = true // required as true boolean for any Cloud Service Provider (CSP) diff --git a/sap_ecc_sapmaxdb_single_node_install/aws_ec2_instance/main.tf b/sap_ecc_sapmaxdb_single_node_install/aws_ec2_instance/main.tf index 7c59326..db94c64 100644 --- a/sap_ecc_sapmaxdb_single_node_install/aws_ec2_instance/main.tf +++ b/sap_ecc_sapmaxdb_single_node_install/aws_ec2_instance/main.tf @@ -1,7 +1,7 @@ module "run_ansible_dry_run" { - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_ecc_sapmaxdb_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_sapmaxdb_install?ref=main" module_var_dry_run_test = "x86_64" // x86_64 or ppc64le @@ -253,7 +253,7 @@ module "run_ansible_sap_ecc_sapmaxdb_install" { depends_on = [module.run_host_provision_module] - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_ecc_sapmaxdb_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_sapmaxdb_install?ref=main" # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) module_var_bastion_boolean = true // required as true boolean for any Cloud Service Provider (CSP) diff --git a/sap_ecc_sapmaxdb_single_node_install/ibmcloud_vs/main.tf b/sap_ecc_sapmaxdb_single_node_install/ibmcloud_vs/main.tf index a1bb502..3c4832a 100644 --- a/sap_ecc_sapmaxdb_single_node_install/ibmcloud_vs/main.tf +++ b/sap_ecc_sapmaxdb_single_node_install/ibmcloud_vs/main.tf @@ -1,7 +1,7 @@ module "run_ansible_dry_run" { - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_ecc_sapmaxdb_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_sapmaxdb_install?ref=main" module_var_dry_run_test = "x86_64" // x86_64 or ppc64le @@ -271,7 +271,7 @@ module "run_ansible_sap_ecc_sapmaxdb_install" { depends_on = [module.run_host_provision_module] - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_ecc_sapmaxdb_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_sapmaxdb_install?ref=main" # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) module_var_bastion_boolean = true // required as true boolean for any Cloud Service Provider (CSP) diff --git a/sap_ecc_sapmaxdb_single_node_install/msazure_vm/main.tf b/sap_ecc_sapmaxdb_single_node_install/msazure_vm/main.tf index 511f693..1d1f68c 100644 --- a/sap_ecc_sapmaxdb_single_node_install/msazure_vm/main.tf +++ b/sap_ecc_sapmaxdb_single_node_install/msazure_vm/main.tf @@ -1,7 +1,7 @@ module "run_ansible_dry_run" { - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_ecc_sapmaxdb_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_sapmaxdb_install?ref=main" module_var_dry_run_test = "x86_64" // x86_64 or ppc64le @@ -288,7 +288,7 @@ module "run_ansible_sap_ecc_sapmaxdb_install" { depends_on = [module.run_host_provision_module] - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_ecc_sapmaxdb_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_sapmaxdb_install?ref=main" # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) module_var_bastion_boolean = true // required as true boolean for any Cloud Service Provider (CSP) diff --git a/sap_nwas_abap_hana_install/aws_ec2_instance/main.tf b/sap_nwas_abap_hana_install/aws_ec2_instance/main.tf index 5e045cc..9668c8b 100644 --- a/sap_nwas_abap_hana_install/aws_ec2_instance/main.tf +++ b/sap_nwas_abap_hana_install/aws_ec2_instance/main.tf @@ -1,7 +1,7 @@ module "run_ansible_dry_run" { - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_nwas_abap_hana_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_nwas_abap_hana_install?ref=main" module_var_dry_run_test = "x86_64" // x86_64 or ppc64le @@ -251,7 +251,7 @@ module "run_ansible_sap_nwas_abap_hana_install" { depends_on = [module.run_host_provision_module] - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_nwas_abap_hana_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_nwas_abap_hana_install?ref=main" # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) diff --git a/sap_nwas_abap_hana_install/ibmcloud_powervs/main.tf b/sap_nwas_abap_hana_install/ibmcloud_powervs/main.tf index e8d2866..ebc89b3 100644 --- a/sap_nwas_abap_hana_install/ibmcloud_powervs/main.tf +++ b/sap_nwas_abap_hana_install/ibmcloud_powervs/main.tf @@ -1,7 +1,7 @@ module "run_ansible_dry_run" { - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_nwas_abap_hana_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_nwas_abap_hana_install?ref=main" module_var_dry_run_test = "x86_64" // x86_64 or ppc64le @@ -328,7 +328,7 @@ module "run_ansible_sap_nwas_abap_hana_install" { depends_on = [module.run_host_provision_module] - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_nwas_abap_hana_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_nwas_abap_hana_install?ref=main" # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) diff --git a/sap_nwas_abap_hana_install/ibmcloud_vs/main.tf b/sap_nwas_abap_hana_install/ibmcloud_vs/main.tf index a4070a8..bc8367c 100644 --- a/sap_nwas_abap_hana_install/ibmcloud_vs/main.tf +++ b/sap_nwas_abap_hana_install/ibmcloud_vs/main.tf @@ -1,7 +1,7 @@ module "run_ansible_dry_run" { - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_nwas_abap_hana_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_nwas_abap_hana_install?ref=main" module_var_dry_run_test = "x86_64" // x86_64 or ppc64le @@ -271,7 +271,7 @@ module "run_ansible_sap_nwas_abap_hana_install" { depends_on = [module.run_host_provision_module] - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_nwas_abap_hana_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_nwas_abap_hana_install?ref=main" # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) diff --git a/sap_nwas_abap_hana_install/ibmpowervc/main.tf b/sap_nwas_abap_hana_install/ibmpowervc/main.tf index 178abe2..c2d06fb 100644 --- a/sap_nwas_abap_hana_install/ibmpowervc/main.tf +++ b/sap_nwas_abap_hana_install/ibmpowervc/main.tf @@ -1,7 +1,7 @@ module "run_ansible_dry_run" { - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_nwas_abap_hana_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_nwas_abap_hana_install?ref=main" module_var_dry_run_test = "x86_64" // x86_64 or ppc64le @@ -148,7 +148,7 @@ module "run_ansible_sap_nwas_abap_hana_install" { depends_on = [module.run_host_provision_module] - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_nwas_abap_hana_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_nwas_abap_hana_install?ref=main" # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) diff --git a/sap_nwas_abap_hana_install/msazure_vm/main.tf b/sap_nwas_abap_hana_install/msazure_vm/main.tf index 18f8bc8..9b7cc6b 100644 --- a/sap_nwas_abap_hana_install/msazure_vm/main.tf +++ b/sap_nwas_abap_hana_install/msazure_vm/main.tf @@ -1,7 +1,7 @@ module "run_ansible_dry_run" { - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_nwas_abap_hana_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_nwas_abap_hana_install?ref=main" module_var_dry_run_test = "x86_64" // x86_64 or ppc64le @@ -288,7 +288,7 @@ module "run_ansible_sap_nwas_abap_hana_install" { depends_on = [module.run_host_provision_module] - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_nwas_abap_hana_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_nwas_abap_hana_install?ref=main" # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) diff --git a/sap_s4hana_single_node_install/aws_ec2_instance/main.tf b/sap_s4hana_single_node_install/aws_ec2_instance/main.tf index 52a9ccd..d3603f7 100644 --- a/sap_s4hana_single_node_install/aws_ec2_instance/main.tf +++ b/sap_s4hana_single_node_install/aws_ec2_instance/main.tf @@ -1,7 +1,7 @@ module "run_ansible_dry_run" { - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_s4hana_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_s4hana_install?ref=main" module_var_dry_run_test = "x86_64" // x86_64 or ppc64le @@ -251,7 +251,7 @@ module "run_ansible_sap_s4hana_install" { depends_on = [module.run_host_provision_module] - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_s4hana_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_s4hana_install?ref=main" # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) module_var_bastion_boolean = true // required as true boolean for any Cloud Service Provider (CSP) diff --git a/sap_s4hana_single_node_install/ibmcloud_powervs/main.tf b/sap_s4hana_single_node_install/ibmcloud_powervs/main.tf index f979444..782e884 100644 --- a/sap_s4hana_single_node_install/ibmcloud_powervs/main.tf +++ b/sap_s4hana_single_node_install/ibmcloud_powervs/main.tf @@ -1,7 +1,7 @@ module "run_ansible_dry_run" { - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_s4hana_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_s4hana_install?ref=main" module_var_dry_run_test = "x86_64" // x86_64 or ppc64le @@ -327,7 +327,7 @@ module "run_ansible_sap_s4hana_install" { depends_on = [module.run_host_provision_module] - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_s4hana_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_s4hana_install?ref=main" # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) module_var_bastion_boolean = true // required as true boolean for any Cloud Service Provider (CSP) diff --git a/sap_s4hana_single_node_install/ibmcloud_vs/main.tf b/sap_s4hana_single_node_install/ibmcloud_vs/main.tf index 6b71fc2..3d6f6ae 100644 --- a/sap_s4hana_single_node_install/ibmcloud_vs/main.tf +++ b/sap_s4hana_single_node_install/ibmcloud_vs/main.tf @@ -1,7 +1,7 @@ module "run_ansible_dry_run" { - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_s4hana_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_s4hana_install?ref=main" module_var_dry_run_test = "x86_64" // x86_64 or ppc64le @@ -271,7 +271,7 @@ module "run_ansible_sap_s4hana_install" { depends_on = [module.run_host_provision_module] - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_s4hana_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_s4hana_install?ref=main" # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) module_var_bastion_boolean = true // required as true boolean for any Cloud Service Provider (CSP) diff --git a/sap_s4hana_single_node_install/ibmpowervc/main.tf b/sap_s4hana_single_node_install/ibmpowervc/main.tf index bd42513..ef06c2f 100644 --- a/sap_s4hana_single_node_install/ibmpowervc/main.tf +++ b/sap_s4hana_single_node_install/ibmpowervc/main.tf @@ -1,7 +1,7 @@ module "run_ansible_dry_run" { - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_s4hana_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_s4hana_install?ref=main" module_var_dry_run_test = "x86_64" // x86_64 or ppc64le @@ -148,7 +148,7 @@ module "run_ansible_sap_s4hana_install" { depends_on = [module.run_host_provision_module] - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_s4hana_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_s4hana_install?ref=main" # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) module_var_bastion_boolean = var.bastion_boolean diff --git a/sap_s4hana_single_node_install/msazure_vm/main.tf b/sap_s4hana_single_node_install/msazure_vm/main.tf index 14fde4d..06067c7 100644 --- a/sap_s4hana_single_node_install/msazure_vm/main.tf +++ b/sap_s4hana_single_node_install/msazure_vm/main.tf @@ -1,7 +1,7 @@ module "run_ansible_dry_run" { - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_s4hana_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_s4hana_install?ref=main" module_var_dry_run_test = "x86_64" // x86_64 or ppc64le @@ -285,7 +285,7 @@ module "run_ansible_sap_s4hana_install" { depends_on = [module.run_host_provision_module] - source = "github.com/sap-linuxlab/terraform.modules_for_sap.git//all/ansible_sap_s4hana_install?ref=main" + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_s4hana_install?ref=main" # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) module_var_bastion_boolean = true // required as true boolean for any Cloud Service Provider (CSP) From c7d29b849b72c66b4d905b0a8183299a6f46842f Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Mon, 9 Jan 2023 12:31:05 +0000 Subject: [PATCH 3/6] feat: add ecc on hana and other fixes --- README.md | 3 +- .../variables_generic_for_cli.tfvars | 2 +- .../variables_generic_for_cli.tfvars | 2 +- .../variables_generic_for_cli.tfvars | 2 +- .../variables_generic_for_cli.tfvars | 2 +- .../msazure_vm/variables.tf | 2 +- .../variables_generic_for_cli.tfvars | 2 +- sap_ecc_hana_install/aws_ec2_instance/main.tf | 300 ++++++++++++++ .../aws_ec2_instance/outputs.tf | 234 +++++++++++ .../aws_ec2_instance/outputs_debug.tf | 4 + .../aws_ec2_instance/variable_locals.tf | 19 + .../aws_ec2_instance/variable_map_hosts.tf | 75 ++++ .../aws_ec2_instance/variable_map_os.tf | 48 +++ .../aws_ec2_instance/variables.tf | 125 ++++++ .../variables_generic_for_cli.tfvars | 31 ++ .../aws_ec2_instance/versions.tf | 29 ++ sap_ecc_hana_install/ibmcloud_powervs/main.tf | 377 ++++++++++++++++++ .../ibmcloud_powervs/outputs.tf | 235 +++++++++++ .../ibmcloud_powervs/outputs_debug.tf | 92 +++++ .../ibmcloud_powervs/variable_locals.tf | 29 ++ .../ibmcloud_powervs/variable_map_hosts.tf | 77 ++++ .../variable_map_locations.tf | 28 ++ .../ibmcloud_powervs/variable_map_os.tf | 18 + .../ibmcloud_powervs/variables.tf | 143 +++++++ .../variables_generic_for_cli.tfvars | 33 ++ .../ibmcloud_powervs/versions.tf | 34 ++ sap_ecc_hana_install/ibmcloud_vs/main.tf | 320 +++++++++++++++ sap_ecc_hana_install/ibmcloud_vs/outputs.tf | 235 +++++++++++ .../ibmcloud_vs/outputs_debug.tf | 92 +++++ .../ibmcloud_vs/variable_locals.tf | 28 ++ .../ibmcloud_vs/variable_map_hosts.tf | 80 ++++ .../ibmcloud_vs/variable_map_os.tf | 42 ++ sap_ecc_hana_install/ibmcloud_vs/variables.tf | 126 ++++++ .../variables_generic_for_cli.tfvars | 29 ++ sap_ecc_hana_install/ibmcloud_vs/versions.tf | 32 ++ sap_ecc_hana_install/ibmpowervc/main.tf | 197 +++++++++ sap_ecc_hana_install/ibmpowervc/outputs.tf | 89 +++++ .../ibmpowervc/variable_locals.tf | 19 + .../ibmpowervc/variable_map_hosts.tf | 70 ++++ sap_ecc_hana_install/ibmpowervc/variables.tf | 175 ++++++++ .../variables_generic_for_cli.tfvars | 21 + sap_ecc_hana_install/ibmpowervc/versions.tf | 26 ++ sap_ecc_hana_install/msazure_vm/main.tf | 337 ++++++++++++++++ sap_ecc_hana_install/msazure_vm/outputs.tf | 235 +++++++++++ .../msazure_vm/variable_locals.tf | 21 + .../msazure_vm/variable_map_hosts.tf | 76 ++++ .../msazure_vm/variable_map_os.tf | 59 +++ sap_ecc_hana_install/msazure_vm/variables.tf | 140 +++++++ .../variables_generic_for_cli.tfvars | 29 ++ sap_ecc_hana_install/msazure_vm/versions.tf | 28 ++ .../ibmcloud_powervs/variables.tf | 2 +- .../variables_generic_for_cli.tfvars | 2 +- .../ibmcloud_vs/variables.tf | 2 +- .../variables_generic_for_cli.tfvars | 2 +- .../aws_ec2_instance/variables.tf | 2 +- .../variables_generic_for_cli.tfvars | 2 +- .../ibmcloud_powervs/variables.tf | 2 +- .../variables_generic_for_cli.tfvars | 2 +- .../ibmcloud_vs/variables.tf | 2 +- .../variables_generic_for_cli.tfvars | 2 +- .../ibmpowervc/variables.tf | 2 +- .../variables_generic_for_cli.tfvars | 2 +- .../msazure_vm/variables.tf | 2 +- .../variables_generic_for_cli.tfvars | 2 +- .../aws_ec2_instance/variables.tf | 2 +- .../variables_generic_for_cli.tfvars | 2 +- .../variables_generic_for_cli.tfvars | 2 +- .../variables_generic_for_cli.tfvars | 2 +- .../variables_generic_for_cli.tfvars | 2 +- .../msazure_vm/variables.tf | 2 +- .../variables_generic_for_cli.tfvars | 2 +- .../aws_ec2_instance/variables.tf | 2 +- .../variables_generic_for_cli.tfvars | 2 +- .../variables_generic_for_cli.tfvars | 2 +- .../variables_generic_for_cli.tfvars | 2 +- .../variables_generic_for_cli.tfvars | 2 +- .../msazure_vm/variables.tf | 2 +- .../variables_generic_for_cli.tfvars | 2 +- .../aws_ec2_instance/variables.tf | 2 +- .../variables_generic_for_cli.tfvars | 2 +- .../ibmcloud_powervs/variables.tf | 2 +- .../variables_generic_for_cli.tfvars | 2 +- .../variables_generic_for_cli.tfvars | 2 +- .../ibmpowervc/variables.tf | 2 +- .../variables_generic_for_cli.tfvars | 2 +- .../msazure_vm/variables.tf | 2 +- .../variables_generic_for_cli.tfvars | 2 +- .../ibmcloud_powervs/variables.tf | 2 +- .../variables_generic_for_cli.tfvars | 2 +- .../ibmcloud_vs/variables.tf | 2 +- .../variables_generic_for_cli.tfvars | 2 +- 91 files changed, 4486 insertions(+), 48 deletions(-) create mode 100644 sap_ecc_hana_install/aws_ec2_instance/main.tf create mode 100644 sap_ecc_hana_install/aws_ec2_instance/outputs.tf create mode 100644 sap_ecc_hana_install/aws_ec2_instance/outputs_debug.tf create mode 100644 sap_ecc_hana_install/aws_ec2_instance/variable_locals.tf create mode 100644 sap_ecc_hana_install/aws_ec2_instance/variable_map_hosts.tf create mode 100644 sap_ecc_hana_install/aws_ec2_instance/variable_map_os.tf create mode 100644 sap_ecc_hana_install/aws_ec2_instance/variables.tf create mode 100644 sap_ecc_hana_install/aws_ec2_instance/variables_generic_for_cli.tfvars create mode 100644 sap_ecc_hana_install/aws_ec2_instance/versions.tf create mode 100644 sap_ecc_hana_install/ibmcloud_powervs/main.tf create mode 100644 sap_ecc_hana_install/ibmcloud_powervs/outputs.tf create mode 100644 sap_ecc_hana_install/ibmcloud_powervs/outputs_debug.tf create mode 100644 sap_ecc_hana_install/ibmcloud_powervs/variable_locals.tf create mode 100644 sap_ecc_hana_install/ibmcloud_powervs/variable_map_hosts.tf create mode 100644 sap_ecc_hana_install/ibmcloud_powervs/variable_map_locations.tf create mode 100644 sap_ecc_hana_install/ibmcloud_powervs/variable_map_os.tf create mode 100644 sap_ecc_hana_install/ibmcloud_powervs/variables.tf create mode 100644 sap_ecc_hana_install/ibmcloud_powervs/variables_generic_for_cli.tfvars create mode 100644 sap_ecc_hana_install/ibmcloud_powervs/versions.tf create mode 100644 sap_ecc_hana_install/ibmcloud_vs/main.tf create mode 100644 sap_ecc_hana_install/ibmcloud_vs/outputs.tf create mode 100644 sap_ecc_hana_install/ibmcloud_vs/outputs_debug.tf create mode 100644 sap_ecc_hana_install/ibmcloud_vs/variable_locals.tf create mode 100644 sap_ecc_hana_install/ibmcloud_vs/variable_map_hosts.tf create mode 100644 sap_ecc_hana_install/ibmcloud_vs/variable_map_os.tf create mode 100644 sap_ecc_hana_install/ibmcloud_vs/variables.tf create mode 100644 sap_ecc_hana_install/ibmcloud_vs/variables_generic_for_cli.tfvars create mode 100644 sap_ecc_hana_install/ibmcloud_vs/versions.tf create mode 100644 sap_ecc_hana_install/ibmpowervc/main.tf create mode 100644 sap_ecc_hana_install/ibmpowervc/outputs.tf create mode 100644 sap_ecc_hana_install/ibmpowervc/variable_locals.tf create mode 100644 sap_ecc_hana_install/ibmpowervc/variable_map_hosts.tf create mode 100644 sap_ecc_hana_install/ibmpowervc/variables.tf create mode 100644 sap_ecc_hana_install/ibmpowervc/variables_generic_for_cli.tfvars create mode 100644 sap_ecc_hana_install/ibmpowervc/versions.tf create mode 100644 sap_ecc_hana_install/msazure_vm/main.tf create mode 100644 sap_ecc_hana_install/msazure_vm/outputs.tf create mode 100644 sap_ecc_hana_install/msazure_vm/variable_locals.tf create mode 100644 sap_ecc_hana_install/msazure_vm/variable_map_hosts.tf create mode 100644 sap_ecc_hana_install/msazure_vm/variable_map_os.tf create mode 100644 sap_ecc_hana_install/msazure_vm/variables.tf create mode 100644 sap_ecc_hana_install/msazure_vm/variables_generic_for_cli.tfvars create mode 100644 sap_ecc_hana_install/msazure_vm/versions.tf diff --git a/README.md b/README.md index f16a63d..9ac42a5 100644 --- a/README.md +++ b/README.md @@ -23,10 +23,11 @@ These Terraform Templates for SAP are designed to be: | SAP Software solution scenario | Infrastructure Platform | |:--- |:--- | | **SAP HANA 2.0 (any version)**
single-node installation |
  • :white_check_mark: AWS EC2
  • :white_check_mark: IBM Cloud, Intel VS
  • :white_check_mark: IBM Cloud, Power VS
  • :white_check_mark: Microsoft Azure
  • :white_check_mark: IBM PowerVM LPAR
*Coming Soon: GCP VM, OVirt VM, VMware vSphere VM*
| -| **SAP S/4HANA (2020, 2021, 2022)**
single-node installation |
  • :white_check_mark: AWS EC2
  • :white_check_mark: IBM Cloud, Intel VS
  • :white_check_mark: IBM Cloud, Power VS
  • :white_check_mark: Microsoft Azure
  • :white_check_mark: IBM PowerVM LPAR
*Coming Soon: GCP VM, OVirt VM, VMware vSphere VM*
| +| **SAP S/4HANA (2021, 2022)**
single-node installation |
  • :white_check_mark: AWS EC2
  • :white_check_mark: IBM Cloud, Intel VS
  • :white_check_mark: IBM Cloud, Power VS
  • :white_check_mark: Microsoft Azure
  • :white_check_mark: IBM PowerVM LPAR
*Coming Soon: GCP VM, OVirt VM, VMware vSphere VM*
| | **SAP S/4HANA (2020, 2021, 2022)**
single-node installation,
using SAP Maintenance Planner Stack XML
(to run SUM and SPAM / SAINT) |
  • :white_check_mark: AWS EC2
  • :white_check_mark: IBM Cloud, Intel VS
  • :white_check_mark: IBM Cloud, Power VS
  • :white_check_mark: Microsoft Azure
  • :white_check_mark: IBM PowerVM LPAR
*Coming Soon: GCP VM, OVirt VM, VMware vSphere VM*
| | **SAP S/4HANA (1909, 2020, 2021, 2022)**
single-node System Copy installation
(Homogeneous with SAP HANA Backup / Recovery) |
  • :warning: AWS EC2
  • :white_check_mark: IBM Cloud, Intel VS
  • :white_check_mark: IBM Cloud, Power VS
  • :warning: Microsoft Azure
  • :warning: IBM PowerVM LPAR
*Coming Soon: GCP VM, OVirt VM, VMware vSphere VM*
| | **SAP BW/4HANA (2021)**
single-node installation |
  • :white_check_mark: AWS EC2
  • :white_check_mark: IBM Cloud, Intel VS
  • :white_check_mark: IBM Cloud, Power VS
  • :white_check_mark: Microsoft Azure
  • :white_check_mark: IBM PowerVM LPAR
*Coming Soon: GCP VM, OVirt VM, VMware vSphere VM*
| +| **SAP ECC on SAP HANA (EHP7, EHP8)**
single-node installation |
  • :white_check_mark: AWS EC2
  • :white_check_mark: IBM Cloud, Intel VS
  • :white_check_mark: IBM Cloud, Power VS
  • :white_check_mark: Microsoft Azure
  • :white_check_mark: IBM PowerVM LPAR
*Coming Soon: GCP VM, OVirt VM, VMware vSphere VM*
| | **SAP ECC on SAP HANA (EHP7, EHP8)**
single-node System Copy installation
(Homogeneous with SAP HANA Backup / Recovery) |
  • :warning: AWS EC2
  • :white_check_mark: IBM Cloud, Intel VS
  • :white_check_mark: IBM Cloud, Power VS
  • :warning: Microsoft Azure
  • :warning: IBM PowerVM LPAR
*Coming Soon: GCP VM, OVirt VM, VMware vSphere VM*
| | **SAP ECC on IBM Db2 (EHP7, EHP8)**
single-node installation |
  • :white_check_mark: AWS EC2
  • :white_check_mark: IBM Cloud, Intel VS
  • :no_entry_sign: IBM Cloud, Power VS
  • :white_check_mark: Microsoft Azure
  • :no_entry_sign: IBM PowerVM LPAR
*Coming Soon: GCP VM, OVirt VM, VMware vSphere VM*
| | **SAP ECC on Oracle DB (EHP7, EHP8)**
single-node installation |
  • :white_check_mark: AWS EC2
  • :white_check_mark: IBM Cloud, Intel VS
  • :no_entry_sign: IBM Cloud, Power VS
  • :white_check_mark: Microsoft Azure
  • :no_entry_sign: IBM PowerVM LPAR
*Coming Soon: GCP VM, OVirt VM, VMware vSphere VM*
| diff --git a/sap_bw4hana_single_node_install/aws_ec2_instance/variables_generic_for_cli.tfvars b/sap_bw4hana_single_node_install/aws_ec2_instance/variables_generic_for_cli.tfvars index cb251bd..a8ffdd3 100644 --- a/sap_bw4hana_single_node_install/aws_ec2_instance/variables_generic_for_cli.tfvars +++ b/sap_bw4hana_single_node_install/aws_ec2_instance/variables_generic_for_cli.tfvars @@ -20,7 +20,7 @@ sap_hana_install_master_password = "NewPass$321" sap_hana_install_sid = "H01" -sap_hana_install_instance_number = "10" +sap_hana_install_instance_number = "90" sap_nwas_abap_ascs_instance_no = "01" diff --git a/sap_bw4hana_single_node_install/ibmcloud_powervs/variables_generic_for_cli.tfvars b/sap_bw4hana_single_node_install/ibmcloud_powervs/variables_generic_for_cli.tfvars index 0d68974..247c86f 100644 --- a/sap_bw4hana_single_node_install/ibmcloud_powervs/variables_generic_for_cli.tfvars +++ b/sap_bw4hana_single_node_install/ibmcloud_powervs/variables_generic_for_cli.tfvars @@ -22,7 +22,7 @@ sap_hana_install_master_password = "NewPass$321" sap_hana_install_sid = "H01" -sap_hana_install_instance_number = "10" +sap_hana_install_instance_number = "90" sap_nwas_abap_ascs_instance_no = "01" diff --git a/sap_bw4hana_single_node_install/ibmcloud_vs/variables_generic_for_cli.tfvars b/sap_bw4hana_single_node_install/ibmcloud_vs/variables_generic_for_cli.tfvars index c468fc7..e9b2e30 100644 --- a/sap_bw4hana_single_node_install/ibmcloud_vs/variables_generic_for_cli.tfvars +++ b/sap_bw4hana_single_node_install/ibmcloud_vs/variables_generic_for_cli.tfvars @@ -22,7 +22,7 @@ sap_hana_install_master_password = "NewPass$321" sap_hana_install_sid = "H01" -sap_hana_install_instance_number = "10" +sap_hana_install_instance_number = "90" sap_nwas_abap_ascs_instance_no = "01" diff --git a/sap_bw4hana_single_node_install/ibmpowervc/variables_generic_for_cli.tfvars b/sap_bw4hana_single_node_install/ibmpowervc/variables_generic_for_cli.tfvars index 6fd5104..d4e90b7 100644 --- a/sap_bw4hana_single_node_install/ibmpowervc/variables_generic_for_cli.tfvars +++ b/sap_bw4hana_single_node_install/ibmpowervc/variables_generic_for_cli.tfvars @@ -10,7 +10,7 @@ sap_hana_install_master_password = "NewPass$321" sap_hana_install_sid = "H01" -sap_hana_install_instance_number = "10" +sap_hana_install_instance_number = "90" sap_nwas_abap_ascs_instance_no = "01" diff --git a/sap_bw4hana_single_node_install/msazure_vm/variables.tf b/sap_bw4hana_single_node_install/msazure_vm/variables.tf index c79f424..3573de7 100644 --- a/sap_bw4hana_single_node_install/msazure_vm/variables.tf +++ b/sap_bw4hana_single_node_install/msazure_vm/variables.tf @@ -102,7 +102,7 @@ variable "sap_hana_install_sid" { } variable "sap_hana_install_instance_number" { - description = "Ansible - SAP HANA install: Instance Number (e.g. 10)" + description = "Ansible - SAP HANA install: Instance Number (e.g. 90)" validation { error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." diff --git a/sap_bw4hana_single_node_install/msazure_vm/variables_generic_for_cli.tfvars b/sap_bw4hana_single_node_install/msazure_vm/variables_generic_for_cli.tfvars index 91e2f90..455e97f 100644 --- a/sap_bw4hana_single_node_install/msazure_vm/variables_generic_for_cli.tfvars +++ b/sap_bw4hana_single_node_install/msazure_vm/variables_generic_for_cli.tfvars @@ -18,7 +18,7 @@ sap_hana_install_master_password = "NewPass$321" sap_hana_install_sid = "H01" -sap_hana_install_instance_number = "10" +sap_hana_install_instance_number = "90" sap_nwas_abap_ascs_instance_no = "01" diff --git a/sap_ecc_hana_install/aws_ec2_instance/main.tf b/sap_ecc_hana_install/aws_ec2_instance/main.tf new file mode 100644 index 0000000..c53310d --- /dev/null +++ b/sap_ecc_hana_install/aws_ec2_instance/main.tf @@ -0,0 +1,300 @@ + +module "run_ansible_dry_run" { + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_hana_install?ref=main" + + module_var_dry_run_test = "x86_64" // x86_64 or ppc64le + + # Terraform Module Variables which are mandatory, all with an empty string + module_var_bastion_boolean = false + module_var_bastion_user = "" + module_var_bastion_ssh_port = 0 + module_var_bastion_private_ssh_key = "" + module_var_bastion_floating_ip = "" + module_var_host_private_ssh_key = "" + module_var_host_private_ip = "" + module_var_hostname = "software_media_dry_run" + module_var_dns_root_domain_name = "" + module_var_sap_id_user = var.sap_id_user + module_var_sap_id_user_password = var.sap_id_user_password + module_var_sap_swpm_sid = "" + module_var_sap_swpm_db_schema_abap = "" + module_var_sap_swpm_db_schema_abap_password = "" + module_var_sap_swpm_ddic_000_password = "" + module_var_sap_swpm_template_selected = var.sap_swpm_template_selected + +} + + +module "run_account_init_module" { + + depends_on = [ + module.run_ansible_dry_run + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//aws_ec2_instance/account_init?ref=main" + + module_var_resource_prefix = var.resource_prefix + + module_var_aws_vpc_subnet_id = var.aws_vpc_subnet_id + + module_var_aws_vpc_subnet_create_boolean = local.aws_vpc_subnet_create_boolean + + module_var_aws_vpc_availability_zone = var.aws_vpc_availability_zone + +} + + +module "run_account_bootstrap_module" { + + depends_on = [ + module.run_account_init_module + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//aws_ec2_instance/account_bootstrap?ref=main" + + module_var_resource_prefix = var.resource_prefix + + module_var_aws_vpc_subnet_id = local.aws_vpc_subnet_create_boolean ? module.run_account_init_module.output_aws_vpc_subnet_id : var.aws_vpc_subnet_id + + module_var_dns_root_domain_name = var.dns_root_domain + +} + + +#module "run_account_iam_module" { +# +# depends_on = [ +# module.run_account_bootstrap_module +# ] + + +module "run_bastion_inject_module" { + + depends_on = [ + module.run_account_bootstrap_module + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//aws_ec2_instance/bastion_inject?ref=main" + + module_var_resource_prefix = var.resource_prefix + + module_var_aws_vpc_subnet_id = local.aws_vpc_subnet_create_boolean ? module.run_account_init_module.output_aws_vpc_subnet_id : var.aws_vpc_subnet_id + module_var_aws_vpc_igw_id = module.run_account_init_module.output_aws_vpc_igw_id + + module_var_bastion_user = var.bastion_user + module_var_bastion_ssh_port = var.bastion_ssh_port + module_var_bastion_os_image = var.map_os_image_regex[var.bastion_os_image] + module_var_bastion_ssh_key_name = module.run_account_bootstrap_module.output_bastion_ssh_key_name + module_var_bastion_public_ssh_key = module.run_account_bootstrap_module.output_bastion_public_ssh_key + module_var_bastion_private_ssh_key = module.run_account_bootstrap_module.output_bastion_private_ssh_key + + module_var_aws_vpc_availability_zone = var.aws_vpc_availability_zone + +} + + +module "run_host_network_access_sap_module" { + + depends_on = [ + module.run_bastion_inject_module + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//aws_ec2_instance/host_network_access_sap?ref=main" + + module_var_resource_prefix = var.resource_prefix + + module_var_aws_vpc_subnet_id = local.aws_vpc_subnet_create_boolean ? module.run_account_init_module.output_aws_vpc_subnet_id : var.aws_vpc_subnet_id + module_var_host_security_group_id = module.run_account_bootstrap_module.output_host_security_group_id + + module_var_sap_hana_instance_no = var.sap_hana_install_instance_number + +} + + +module "run_host_network_access_sap_public_via_proxy_module" { + + depends_on = [ + module.run_bastion_inject_module + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//aws_ec2_instance/host_network_access_sap_public_via_proxy?ref=main" + + module_var_resource_prefix = var.resource_prefix + + module_var_aws_vpc_subnet_id = local.aws_vpc_subnet_create_boolean ? module.run_account_init_module.output_aws_vpc_subnet_id : var.aws_vpc_subnet_id + + module_var_bastion_sg_id = module.run_bastion_inject_module.output_bastion_security_group_id + module_var_bastion_connection_sg_id = module.run_bastion_inject_module.output_bastion_connection_security_group_id + + module_var_sap_hana_instance_no = var.sap_hana_install_instance_number + +} + + +module "run_host_provision_module" { + + depends_on = [ + module.run_account_init_module, + module.run_account_bootstrap_module, + module.run_bastion_inject_module + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//aws_ec2_instance/host_provision?ref=main" + + # Set Terraform Module Variables using Terraform Variables at runtime + + module_var_aws_vpc_subnet_id = local.aws_vpc_subnet_create_boolean ? module.run_account_init_module.output_aws_vpc_subnet_id : var.aws_vpc_subnet_id + + module_var_bastion_user = var.bastion_user + module_var_bastion_ssh_port = var.bastion_ssh_port + module_var_bastion_private_ssh_key = module.run_account_bootstrap_module.output_bastion_private_ssh_key + module_var_bastion_ip = module.run_bastion_inject_module.output_bastion_ip + module_var_bastion_connection_sg_id = module.run_bastion_inject_module.output_bastion_connection_security_group_id + + module_var_host_ssh_key_name = module.run_account_bootstrap_module.output_host_ssh_key_name + module_var_host_ssh_public_key = module.run_account_bootstrap_module.output_host_public_ssh_key + module_var_host_ssh_private_key = module.run_account_bootstrap_module.output_host_private_ssh_key + module_var_host_sg_id = module.run_account_bootstrap_module.output_host_security_group_id + + module_var_host_os_image = var.map_os_image_regex[var.host_os_image] + + module_var_dns_zone_id = module.run_account_bootstrap_module.output_dns_zone_id + module_var_dns_root_domain_name = module.run_account_bootstrap_module.output_dns_domain_name + module_var_dns_nameserver_list = module.run_account_bootstrap_module.output_dns_nameserver_list + + # Set Terraform Module Variables using for_each loop on a map Terraform Variable with nested objects + + for_each = toset([ + for key, value in var.map_host_specifications[var.host_specification_plan] : key + ]) + + module_var_host_name = each.key + + module_var_aws_ec2_instance_type = var.map_host_specifications[var.host_specification_plan][each.key].ec2_instance_type + + module_var_disk_volume_count_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data + module_var_disk_volume_type_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_hana_data + module_var_disk_volume_capacity_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_hana_data + module_var_disk_volume_iops_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_hana_data == "custom" ? var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_iops_hana_data : null + module_var_lvm_enable_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? false : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_data + module_var_lvm_pv_data_alignment_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_data ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_pv_data_alignment_hana_data : 0 + module_var_lvm_vg_data_alignment_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_data ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_data_alignment_hana_data : 0 + module_var_lvm_vg_physical_extent_size_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_data ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_physical_extent_size_hana_data : 0 + module_var_lvm_lv_stripe_size_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_data ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_lv_stripe_size_hana_data : 0 + module_var_filesystem_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].filesystem_hana_data + module_var_physical_partition_filesystem_block_size_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_data ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].physical_partition_filesystem_block_size_hana_data + + module_var_disk_volume_count_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log + module_var_disk_volume_type_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_hana_log + module_var_disk_volume_capacity_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_hana_log + module_var_disk_volume_iops_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_hana_log == "custom" ? var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_iops_hana_log : null + module_var_lvm_enable_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? false : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_log + module_var_lvm_pv_data_alignment_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_log ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_pv_data_alignment_hana_log : 0 + module_var_lvm_vg_data_alignment_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_log ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_data_alignment_hana_log : 0 + module_var_lvm_vg_physical_extent_size_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_log ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_physical_extent_size_hana_log : 0 + module_var_lvm_lv_stripe_size_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_log ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_lv_stripe_size_hana_log : 0 + module_var_filesystem_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].filesystem_hana_log + module_var_physical_partition_filesystem_block_size_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_log ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].physical_partition_filesystem_block_size_hana_log + + module_var_disk_volume_count_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared + module_var_disk_volume_type_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_hana_shared + module_var_disk_volume_capacity_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_hana_shared + module_var_disk_volume_iops_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_hana_shared == "custom" ? var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_iops_hana_shared : null + module_var_lvm_enable_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? false : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_shared + module_var_lvm_pv_data_alignment_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_shared ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_pv_data_alignment_hana_shared : 0 + module_var_lvm_vg_data_alignment_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_shared ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_data_alignment_hana_shared : 0 + module_var_lvm_vg_physical_extent_size_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_shared ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_physical_extent_size_hana_shared : 0 + module_var_lvm_lv_stripe_size_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_shared ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_lv_stripe_size_hana_shared : 0 + module_var_filesystem_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].filesystem_hana_shared + module_var_physical_partition_filesystem_block_size_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_shared ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].physical_partition_filesystem_block_size_hana_shared + + module_var_disk_volume_count_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb + module_var_disk_volume_type_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_anydb + module_var_disk_volume_capacity_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_anydb + module_var_disk_volume_iops_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_anydb == "custom" ? var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_iops_anydb : null + module_var_lvm_enable_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? false : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_anydb + module_var_lvm_pv_data_alignment_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_anydb ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_pv_data_alignment_anydb : 0 + module_var_lvm_vg_data_alignment_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_anydb ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_data_alignment_anydb : 0 + module_var_lvm_vg_physical_extent_size_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_anydb ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_physical_extent_size_anydb : 0 + module_var_lvm_lv_stripe_size_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_anydb ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_lv_stripe_size_anydb : 0 + module_var_filesystem_mount_path_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].filesystem_mount_path_anydb + module_var_filesystem_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].filesystem_anydb + module_var_physical_partition_filesystem_block_size_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_anydb ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].physical_partition_filesystem_block_size_anydb + + module_var_disk_volume_count_usr_sap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_usr_sap + module_var_disk_volume_type_usr_sap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_usr_sap + module_var_disk_volume_capacity_usr_sap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_usr_sap + module_var_filesystem_usr_sap = var.map_host_specifications[var.host_specification_plan][each.key].filesystem_usr_sap + + module_var_disk_volume_count_sapmnt = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_sapmnt + module_var_disk_volume_type_sapmnt = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_sapmnt + module_var_disk_volume_capacity_sapmnt = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_sapmnt + module_var_filesystem_sapmnt = var.map_host_specifications[var.host_specification_plan][each.key].filesystem_sapmnt + + module_var_disk_swapfile_size_gb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_swap > 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_swapfile_size_gb + module_var_disk_volume_count_swap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_swap + module_var_disk_volume_type_swap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_swap > 0 ? var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_swap : 0 + module_var_disk_volume_capacity_swap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_swap > 0 ? var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_swap : 0 + module_var_filesystem_swap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_swap > 0 ? var.map_host_specifications[var.host_specification_plan][each.key].filesystem_swap : 0 + + module_var_disk_volume_type_software = var.disk_volume_type_software + module_var_disk_volume_capacity_software = var.disk_volume_capacity_software + module_var_sap_software_download_directory = var.sap_software_download_directory + + module_var_disable_ip_anti_spoofing = false + +} + + +module "run_ansible_sap_ecc_hana_install" { + + depends_on = [ + module.run_host_provision_module + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_hana_install?ref=main" + + # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) + module_var_bastion_boolean = true // required as true boolean for any Cloud Service Provider (CSP) + module_var_bastion_user = var.bastion_user + module_var_bastion_ssh_port = var.bastion_ssh_port + module_var_bastion_private_ssh_key = module.run_account_bootstrap_module.output_bastion_private_ssh_key + + module_var_bastion_floating_ip = module.run_bastion_inject_module.output_bastion_ip + + module_var_host_private_ssh_key = module.run_account_bootstrap_module.output_host_private_ssh_key + + + # Set Terraform Module Variables using for_each loop on a map Terraform Variable at runtime + + for_each = module.run_host_provision_module + module_var_host_private_ip = join(", ", each.value.*.output_host_private_ip) + module_var_hostname = join(", ", each.value.*.output_host_name) + module_var_dns_root_domain_name = var.dns_root_domain + + module_var_sap_id_user = var.sap_id_user + module_var_sap_id_user_password = var.sap_id_user_password + + module_var_sap_hana_install_master_password = var.sap_hana_install_master_password + module_var_sap_hana_install_sid = var.sap_hana_install_sid + module_var_sap_hana_install_instance_number = var.sap_hana_install_instance_number + + module_var_sap_swpm_sid = var.sap_ecc_hana_install_sid + + module_var_sap_swpm_db_schema_abap = "SAPHANADB" + module_var_sap_swpm_db_schema_abap_password = var.sap_hana_install_master_password + module_var_sap_swpm_db_system_password = var.sap_hana_install_master_password + module_var_sap_swpm_db_systemdb_password = var.sap_hana_install_master_password + module_var_sap_swpm_db_sidadm_password = var.sap_hana_install_master_password + module_var_sap_swpm_ddic_000_password = var.sap_hana_install_master_password + module_var_sap_swpm_pas_instance_nr = var.sap_nwas_abap_pas_instance_no + module_var_sap_swpm_ascs_instance_nr = var.sap_nwas_abap_ascs_instance_no + + module_var_sap_swpm_master_password = var.sap_hana_install_master_password + + module_var_sap_swpm_template_selected = var.sap_swpm_template_selected + + module_var_sap_software_download_directory = var.sap_software_download_directory + +} diff --git a/sap_ecc_hana_install/aws_ec2_instance/outputs.tf b/sap_ecc_hana_install/aws_ec2_instance/outputs.tf new file mode 100644 index 0000000..2a16c91 --- /dev/null +++ b/sap_ecc_hana_install/aws_ec2_instance/outputs.tf @@ -0,0 +1,234 @@ + +############################################################## +# Export SSH key to file on local +############################################################## + +# Use path object to store key files temporarily in root of execution - https://www.terraform.io/docs/language/expressions/references.html#filesystem-and-workspace-info +resource "local_file" "bastion_rsa" { + content = module.run_account_bootstrap_module.output_bastion_private_ssh_key + filename = "${path.root}/ssh/bastion_rsa" + file_permission = "0400" +} + +# Use path object to store key files temporarily in root of execution - https://www.terraform.io/docs/language/expressions/references.html#filesystem-and-workspace-info +resource "local_file" "hosts_rsa" { + content = module.run_account_bootstrap_module.output_host_private_ssh_key + filename = "${path.root}/ssh/hosts_rsa" + file_permission = "0400" +} + + +output "ssh_sap_connection_details" { + value = local.is_wsl ? "IGNORE" : <>> Chosen option $REPLY: $opt" + select opt_ip in "$${target_host_array[@]}"; do + if [ $opt_ip = "Quit" ]; then break 2; fi + target_ip=$opt_ip + echo "---- Selected option $REPLY, tunneling into $target_ip ----" + break + done + echo "" + echo "#### For SAP HANA Studio, use Add System with host name as localhost; do not add port numbers." + echo "#### If selecting 'Connect using SSL' on Connection Properties, then on Additional Properties (final) screen deselect 'Validate the SSL certificate'" + echo "" + echo "#### For SAPGUI, use expert mode SAP Logon String as: ####" + echo "conn=/H/localhost/S/32$sap_nwas_abap_pas_instance_no&expert=true" + echo "" + # SSH port forward binding, using -L local_host:local_port:remote_host:remote_port (add -vv for debugging) + ssh -N \ + $bastion_user@$bastion_host -p $bastion_port -i $bastion_private_key_file \ + -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \ + -L localhost:32$sap_nwas_abap_pas_instance_no:$target_ip:32$sap_nwas_abap_pas_instance_no \ + -L localhost:33$sap_nwas_abap_pas_instance_no:$target_ip:33$sap_nwas_abap_pas_instance_no \ + -L localhost:3$${sap_hana_instance_no}13:$target_ip:3$${sap_hana_instance_no}13 \ + -L localhost:3$${sap_hana_instance_no}15:$target_ip:3$${sap_hana_instance_no}15 \ + -L localhost:3$${sap_hana_instance_no}41:$target_ip:3$${sap_hana_instance_no}41 \ + -L localhost:443$sap_hana_instance_no:$target_ip:443$sap_hana_instance_no \ + -L localhost:443$sap_nwas_abap_pas_instance_no:$target_ip:443$sap_nwas_abap_pas_instance_no \ + -L localhost:5$${sap_hana_instance_no}13:$target_ip:5$${sap_hana_instance_no}13 \ + -L localhost:5$${sap_hana_instance_no}14:$target_ip:5$${sap_hana_instance_no}14 + break + ;; + "OS root access, via SSH stdin/stdout forwarding proxy") + echo ">>> Chosen option $REPLY: $opt" + select opt_ssh in "$${target_host_array[@]}"; do + if [ $opt_ssh = "Quit" ]; then break 2; fi + target_ip=$opt_ssh + echo "---- Selected option $REPLY, logging into $target_ip ----" + break + done + + if [ -n "$target_ip" ]; then + ssh -i $target_private_key_file root@$target_ip -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \ + -o ProxyCommand="ssh -W %h:%p $bastion_user@$bastion_host -p $bastion_port -i $bastion_private_key_file -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" + fi + break + ;; + "Quit") + break + ;; + *) echo "Invalid option $REPLY" ;; + esac + done +} + +# Then call shell function and select which target +sshjump + +EOF +} + +# If detected Windows WSL2, then find the installed name using external resource to return a JSON string +data "external" "wsl_distro_name" { + count = local.is_wsl ? 1 : 0 + program = ["bash", "-c", "echo \"{\\\"stdout\\\":\\\"$(echo $WSL_DISTRO_NAME)\\\"}\""] +} + +output "ssh_sap_connection_details_windows" { + value = local.not_wsl ? "IGNORE" : <>> Chosen option $(PSItem)" + echo "" + echo "#### For SAP HANA Studio, use Add System with host name as localhost; do not add port numbers." + echo "#### If selecting 'Connect using SSL' on Connection Properties, then on Additional Properties (final) screen deselect 'Validate the SSL certificate'" + echo "" + echo "#### For SAPGUI, use expert mode SAP Logon String as: ####" + echo "conn=/H/localhost/S/32$sap_nwas_abap_pas_instance_no&expert=true" + echo "" + # SSH port forward binding, using -L local_host:local_port:remote_host:remote_port (add -vv for debugging) + ssh -N ` + $bastion_user@$bastion_host -p $bastion_port -i $temp_bastion_private_key_file ` + -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ` + -L localhost:32$${sap_nwas_abap_pas_instance_no}:$${target_ip}:32$${sap_nwas_abap_pas_instance_no} ` + -L localhost:33$${sap_nwas_abap_pas_instance_no}:$${target_ip}:33$${sap_nwas_abap_pas_instance_no} ` + -L localhost:3$${sap_hana_instance_no}13:$${target_ip}:3$${sap_hana_instance_no}13 ` + -L localhost:3$${sap_hana_instance_no}15:$${target_ip}:3$${sap_hana_instance_no}15 ` + -L localhost:3$${sap_hana_instance_no}41:$${target_ip}:3$${sap_hana_instance_no}41 ` + -L localhost:443$${sap_hana_instance_no}:$${target_ip}:443$${sap_hana_instance_no} ` + -L localhost:443$${sap_nwas_abap_pas_instance_no}:$${target_ip}:443$${sap_nwas_abap_pas_instance_no} ` + -L localhost:5$${sap_hana_instance_no}13:$${target_ip}:5$${sap_hana_instance_no}13 ` + -L localhost:5$${sap_hana_instance_no}14:$${target_ip}:5$${sap_hana_instance_no}14 + } + } + 2 { + foreach ($target_host in $target_host_array) { + $i=$target_host_array.IndexOf($target_host) + echo "$i) $target_host" + } + $target_host_selection = Read-Host "Please make a selection" + if ($target_host_array[$target_host_selection] -eq "Quit" ){ + break + }else { + $target_ip = $target_host_array[$target_host_selection] + #echo ">>> Chosen option $(PSItem)" + ssh -i $temp_target_private_key_file root@$target_ip -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ` + -o ProxyCommand="ssh -W %h:%p $bastion_user@$bastion_host -p $bastion_port -i $temp_bastion_private_key_file ` + -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" + } + } + 3 { + break + } + } +} + +EOF + +} diff --git a/sap_ecc_hana_install/aws_ec2_instance/outputs_debug.tf b/sap_ecc_hana_install/aws_ec2_instance/outputs_debug.tf new file mode 100644 index 0000000..ff3141d --- /dev/null +++ b/sap_ecc_hana_install/aws_ec2_instance/outputs_debug.tf @@ -0,0 +1,4 @@ + +############################################################## +# DEBUG variable map +############################################################## diff --git a/sap_ecc_hana_install/aws_ec2_instance/variable_locals.tf b/sap_ecc_hana_install/aws_ec2_instance/variable_locals.tf new file mode 100644 index 0000000..8c2f87c --- /dev/null +++ b/sap_ecc_hana_install/aws_ec2_instance/variable_locals.tf @@ -0,0 +1,19 @@ +locals { + + aws_vpc_subnet_create_boolean = var.aws_vpc_subnet_id == "new" ? true : false + + # Directories start with "C:..." on Windows; All other OSs use "/" for root. + detect_windows = substr(pathexpand("~"), 0, 1) == "/" ? false : true + detect_shell = substr(pathexpand("~"), 0, 1) == "/" ? true : false + + # Used for displaying Shell ssh connection output + # /proc/version contains WSL subsstring, if detected then running Windows Subsystem for Linux + not_wsl = fileexists("/proc/version") ? length(regexall("WSL", file("/proc/version"))) > 0 ? false : true : true + + # Used for displaying Windows PowerShell ssh connection output + # /proc/version contains WSL subsstring, if detected then running Windows Subsystem for Linux + is_wsl = fileexists("/proc/version") ? length(regexall("WSL", file("/proc/version"))) > 0 ? true : false : false + + aws_region = replace(var.aws_vpc_availability_zone,"/[a-c]$/","") + +} diff --git a/sap_ecc_hana_install/aws_ec2_instance/variable_map_hosts.tf b/sap_ecc_hana_install/aws_ec2_instance/variable_map_hosts.tf new file mode 100644 index 0000000..f047c5e --- /dev/null +++ b/sap_ecc_hana_install/aws_ec2_instance/variable_map_hosts.tf @@ -0,0 +1,75 @@ + +variable "map_host_specifications" { + + description = "Map of host specficiations for SAP NetWeaver AS (ABAP) with SAP HANA single node install" + + type = map(any) + + default = { + + small_256gb = { + + nw01 = { // Hostname + ec2_instance_type = "r5.8xlarge" + + // N.B. all capacities must be different from each other, due to Shell loop searching based on capacity GB + + disk_volume_count_hana_data = 1 + disk_volume_type_hana_data = "gp3" + disk_volume_capacity_hana_data = 384 + #disk_volume_iops_hana_data = + lvm_enable_hana_data = false // if false, then disk volume count should be 1 + #lvm_pv_data_alignment_hana_data = "1M" //default 1MiB offset from disk start before first LVM PV Physical Extent. + #lvm_vg_data_alignment_hana_data = "1M" //default 1MiB offset from disk start before first LVM VG Physical Extent. + #lvm_vg_physical_extent_size_hana_data = "4M" //default 4MiB, difficult to change once set. Akin to Physical Block Size. + #lvm_lv_stripe_size_hana_data = "64K" //default 64KiB. Akin to Virtualized Block Size. + filesystem_hana_data = "xfs" + physical_partition_filesystem_block_size_hana_data = "4k" // only if LVM is set to false; if XFS then only 4k value allowed otherwise will be overridden (see README about XFS and Page Size) + + disk_volume_count_hana_log = 1 + disk_volume_type_hana_log = "gp3" + disk_volume_capacity_hana_log = 128 + #disk_volume_iops_hana_log = + lvm_enable_hana_log = false // if false, then disk volume count should be 1 + #lvm_pv_data_alignment_hana_log = "1M" //default 1MiB offset from disk start before first LVM PV Physical Extent. + #lvm_vg_data_alignment_hana_log = "1M" //default 1MiB offset from disk start before first LVM VG Physical Extent. + #lvm_vg_physical_extent_size_hana_log = "4M" //default 4MiB, difficult to change once set. Akin to Physical Block Size. + #lvm_lv_stripe_size_hana_log = "64K" //default 64KiB. Akin to Virtualized Block Size. + filesystem_hana_log = "xfs" + physical_partition_filesystem_block_size_hana_log = "4k" // only if LVM is set to false; if XFS then only 4k value allowed otherwise will be overridden (see README about XFS and Page Size) + + disk_volume_count_hana_shared = 1 + disk_volume_type_hana_shared = "gp3" // Uses Burst IOPS for storage. May increase costs if there is consistent heavy usage (e.g. longer than 30mins burst, such as 200GB+ DB Backup Restore) + disk_volume_capacity_hana_shared = 320 + #disk_volume_iops_hana_shared = + lvm_enable_hana_shared = false // if false, then disk volume count should be 1 + #lvm_pv_data_alignment_hana_shared = "1M" //default 1MiB offset from disk start before first LVM PV Physical Extent. + #lvm_vg_data_alignment_hana_shared = "1M" //default 1MiB offset from disk start before first LVM VG Physical Extent. + #lvm_vg_physical_extent_size_hana_shared = "4M" //default 4MiB, difficult to change once set. Akin to Physical Block Size. + #lvm_lv_stripe_size_hana_shared = "64K" //default 64KiB. Akin to Virtualized Block Size. + filesystem_hana_shared = "xfs" + physical_partition_filesystem_block_size_hana_shared = "4k" // only if LVM is set to false; if XFS then only 4k value allowed otherwise will be overridden (see README about XFS and Page Size) + + disk_volume_count_anydb = 0 + + disk_volume_count_usr_sap = 0 // max of 1 + disk_volume_type_usr_sap = "gp3" + disk_volume_capacity_usr_sap = 64 + filesystem_usr_sap = "xfs" + + disk_volume_count_sapmnt = 0 // max of 1 + disk_volume_type_sapmnt = "gp3" + disk_volume_capacity_sapmnt = 50 + filesystem_sapmnt = "xfs" + + #disk_swapfile_size_gb = 2 // not required if disk volume set + disk_volume_count_swap = 1 // max of 1 + disk_volume_type_swap = "gp3" + disk_volume_capacity_swap = 64 + filesystem_swap = "xfs" + } + + } + + } +} diff --git a/sap_ecc_hana_install/aws_ec2_instance/variable_map_os.tf b/sap_ecc_hana_install/aws_ec2_instance/variable_map_os.tf new file mode 100644 index 0000000..6e9483c --- /dev/null +++ b/sap_ecc_hana_install/aws_ec2_instance/variable_map_os.tf @@ -0,0 +1,48 @@ + +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-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-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*" + + 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-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*" + + } + +} diff --git a/sap_ecc_hana_install/aws_ec2_instance/variables.tf b/sap_ecc_hana_install/aws_ec2_instance/variables.tf new file mode 100644 index 0000000..12d9419 --- /dev/null +++ b/sap_ecc_hana_install/aws_ec2_instance/variables.tf @@ -0,0 +1,125 @@ + +variable "aws_access_key" { + description = "AWS Access Key" +} + +variable "aws_secret_key" { + description = "AWS Secret Key" +} + +variable "resource_prefix" { + description = "Prefix to resource names" +} + +variable "aws_vpc_availability_zone" { + description = "Target AWS VPC Availability Zone (the AWS Region will be calculated from this value)" +} + +variable "aws_vpc_subnet_id" { + description = "Enter existing/target VPC Subnet ID, or enter 'new' to create a VPC with a default VPC prefix range" +} + +variable "dns_root_domain" { + description = "Root Domain for Private DNS used with the Virtual Server" +} + +variable "bastion_os_image" { + description = "Bastion OS Image. This variable uses the locals mapping with regex of OS Images, and will alter bastion provisioning." +} + +variable "bastion_user" { + description = "OS User to create on Bastion host to avoid pass-through root user (e.g. bastionuser)" +} + +variable "bastion_ssh_port" { + type = number + description = "Bastion host SSH Port from IANA Dynamic Ports range (49152 to 65535)" + + #validation { + # condition = var.bastion_ssh_port > 49152 && var.bastion_ssh_port < 65535 + # error_message = "Bastion host SSH Port must fall within IANA Dynamic Ports range (49152 to 65535)." + #} +} + +variable "host_specification_plan" { + description = "Host specification plans are small_256gb. This variable uses the locals mapping with a nested list of host specifications, and will alter host provisioning." +} + +variable "host_os_image" { + description = "Host OS Image. This variable uses the locals mapping with regex of OS Images, and will alter host provisioning." +} + +variable "disk_volume_capacity_software" { + type = number + description = "Disk volume capacity for downloads of SAP Software" +} + +variable "disk_volume_type_software" { + description = "Disk volume type for downloads of SAP Software" +} + +variable "sap_software_download_directory" { + description = "Mount point for downloads of SAP Software" + + validation { + error_message = "Directory must start with forward slash." + condition = can(regex("^/", var.sap_software_download_directory)) + } + +} + + + +variable "sap_id_user" { + description = "Ansible - Please enter your SAP ID user (e.g. S-User)" +} + +variable "sap_id_user_password" { + description = "Ansible - Please enter your SAP ID password" +} + +variable "sap_hana_install_master_password" { + description = "Ansible - SAP HANA install: set common initial password (e.g. NewPass$321)" +} + +variable "sap_hana_install_sid" { + description = "Ansible - SAP HANA install: System ID (e.g. H01)" +} + +variable "sap_hana_install_instance_number" { + description = "Ansible - SAP HANA install: Instance Number (e.g. 90)" + + validation { + error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." + condition = !can(regex("(43|89)", var.sap_hana_install_instance_number)) + } + +} + +variable "sap_swpm_template_selected" { + description = "Ansible - Select template to use: sap_ecc6_ehp8_hana_onehost, sap_ecc6_ehp7_hana_onehost" +} + +variable "sap_ecc_hana_install_sid" { + description = "Ansible - SAP ECC on HANA install: System ID (e.g. E01)" +} + +variable "sap_nwas_abap_ascs_instance_no" { + description = "Ansible - SAP NetWeaver AS (ABAP) - ABAP Central Services (ASCS) instance number" + + validation { + error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." + condition = !can(regex("(43|89)", var.sap_nwas_abap_ascs_instance_no)) + } + +} + +variable "sap_nwas_abap_pas_instance_no" { + description = "Ansible - SAP NetWeaver AS (ABAP) - Primary Application Server instance number" + + validation { + error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." + condition = !can(regex("(43|89)", var.sap_nwas_abap_pas_instance_no)) + } + +} diff --git a/sap_ecc_hana_install/aws_ec2_instance/variables_generic_for_cli.tfvars b/sap_ecc_hana_install/aws_ec2_instance/variables_generic_for_cli.tfvars new file mode 100644 index 0000000..b71f2dd --- /dev/null +++ b/sap_ecc_hana_install/aws_ec2_instance/variables_generic_for_cli.tfvars @@ -0,0 +1,31 @@ +resource_prefix = "sap" + +dns_root_domain = "poc.cloud" + +bastion_os_image = "rhel-8-4-sap-ha" + +bastion_user = "bastionuser" + +bastion_ssh_port = 50222 + +host_specification_plan = "small_256gb" + +host_os_image = "rhel-8-4-sap-ha" + +disk_volume_capacity_software = 200 + +disk_volume_type_software = "gp3" + +sap_hana_install_master_password = "NewPass$321" + +sap_hana_install_sid = "H01" + +sap_hana_install_instance_number = "90" + +sap_nwas_abap_ascs_instance_no = "01" + +sap_nwas_abap_pas_instance_no = "00" + +sap_ecc_hana_install_sid = "E01" + +sap_software_download_directory = "/software" diff --git a/sap_ecc_hana_install/aws_ec2_instance/versions.tf b/sap_ecc_hana_install/aws_ec2_instance/versions.tf new file mode 100644 index 0000000..f3d8ef7 --- /dev/null +++ b/sap_ecc_hana_install/aws_ec2_instance/versions.tf @@ -0,0 +1,29 @@ +# Terraform declaration + +terraform { + required_version = ">= 1.0" + required_providers { + aws = { + #source = "localdomain/provider/aws" // Local, on macOS path to place files would be $HOME/.terraform.d/plugins/localdomain/provider/aws/1.xx.xx/darwin_amd6 + source = "hashicorp/aws" // Terraform Registry + version = ">=3.73.0" + } + } +} + + +# Terraform Provider declaration + +provider "aws" { + + # Define Provider inputs manually + # access_key = "xxxxxxx" + # secret_key = "xxxxxxx" + # region = "xxxxxxx" + + # Define Provider inputs from given Terraform Variables + access_key = var.aws_access_key + secret_key = var.aws_secret_key + region = local.aws_region + +} diff --git a/sap_ecc_hana_install/ibmcloud_powervs/main.tf b/sap_ecc_hana_install/ibmcloud_powervs/main.tf new file mode 100644 index 0000000..8aafa5b --- /dev/null +++ b/sap_ecc_hana_install/ibmcloud_powervs/main.tf @@ -0,0 +1,377 @@ + +module "run_ansible_dry_run" { + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_hana_install?ref=main" + + module_var_dry_run_test = "x86_64" // x86_64 or ppc64le + + # Terraform Module Variables which are mandatory, all with an empty string + module_var_bastion_boolean = false + module_var_bastion_user = "" + module_var_bastion_ssh_port = 0 + module_var_bastion_private_ssh_key = "" + module_var_bastion_floating_ip = "" + module_var_host_private_ssh_key = "" + module_var_host_private_ip = "" + module_var_hostname = "software_media_dry_run" + module_var_dns_root_domain_name = "" + module_var_sap_id_user = var.sap_id_user + module_var_sap_id_user_password = var.sap_id_user_password + module_var_sap_swpm_sid = "" + module_var_sap_swpm_db_schema_abap = "" + module_var_sap_swpm_db_schema_abap_password = "" + module_var_sap_swpm_ddic_000_password = "" + module_var_sap_swpm_template_selected = var.sap_swpm_template_selected + +} + + +module "run_account_init_module" { + + depends_on = [ + module.run_ansible_dry_run + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//ibmcloud_vs/account_init?ref=main" + + module_var_resource_group_name = local.resource_group_create_boolean ? 0 : var.ibmcloud_resource_group + module_var_resource_group_create_boolean = local.resource_group_create_boolean + + module_var_resource_prefix = var.resource_prefix + + module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? 0 : var.ibmcloud_vpc_subnet_name + module_var_ibmcloud_vpc_subnet_create_boolean = local.ibmcloud_vpc_subnet_create_boolean + module_var_ibmcloud_vpc_availability_zone = var.map_ibm_powervs_to_vpc_az[var.ibmcloud_powervs_location] + +} + + +module "run_account_bootstrap_module" { + + depends_on = [ + module.run_account_init_module + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//ibmcloud_vs/account_bootstrap?ref=main" + + module_var_resource_group_id = module.run_account_init_module.output_resource_group_id + module_var_resource_prefix = var.resource_prefix + + module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name + module_var_ibmcloud_vpc_availability_zone = var.map_ibm_powervs_to_vpc_az[var.ibmcloud_powervs_location] + + module_var_dns_root_domain_name = var.dns_root_domain + +} + + +module "run_account_iam_module" { + + depends_on = [ + module.run_account_bootstrap_module + ] + + count = var.ibmcloud_iam_yesno == "yes" ? 1 : 0 + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//ibmcloud_vs/account_iam?ref=main" + + module_var_resource_group_id = module.run_account_init_module.output_resource_group_id + module_var_resource_prefix = var.resource_prefix + +} + + +module "run_bastion_inject_module" { + + depends_on = [ + module.run_account_init_module, + module.run_account_bootstrap_module + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//ibmcloud_vs/bastion_inject?ref=main" + + module_var_resource_group_id = module.run_account_init_module.output_resource_group_id + module_var_resource_prefix = var.resource_prefix + module_var_resource_tags = var.resource_tags + + module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name + + module_var_bastion_user = var.bastion_user + module_var_bastion_ssh_port = var.bastion_ssh_port + module_var_bastion_ssh_key_id = module.run_account_bootstrap_module.output_bastion_ssh_key_id + module_var_bastion_public_ssh_key = module.run_account_bootstrap_module.output_bastion_public_ssh_key + module_var_bastion_private_ssh_key = module.run_account_bootstrap_module.output_bastion_private_ssh_key + + module_var_bastion_os_image = var.map_os_image_regex[var.bastion_os_image] + +} + + +module "run_host_network_access_sap_public_via_proxy_module" { + + depends_on = [ + module.run_account_init_module, + module.run_account_bootstrap_module, + module.run_bastion_inject_module + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//ibmcloud_vs/host_network_access_sap_public_via_proxy?ref=main" + + module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name + + module_var_bastion_security_group_id = module.run_bastion_inject_module.output_bastion_security_group_id + module_var_bastion_connection_security_group_id = module.run_bastion_inject_module.output_bastion_connection_security_group_id + module_var_host_security_group_id = module.run_account_bootstrap_module.output_host_security_group_id + + module_var_sap_nwas_abap_pas_instance_no = var.sap_nwas_abap_pas_instance_no + module_var_sap_hana_instance_no = var.sap_hana_install_instance_number + +} + + +module "run_powervs_account_bootstrap_module" { + + depends_on = [ + module.run_account_bootstrap_module + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//ibmcloud_powervs/account_bootstrap_addon?ref=main" + + module_var_resource_group_id = module.run_account_init_module.output_resource_group_id + module_var_resource_prefix = var.resource_prefix + module_var_ibmcloud_power_zone = lower(var.ibmcloud_powervs_location) + module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name + +} + + +module "run_powervs_interconnect_sg_update_module" { + + depends_on = [ + module.run_bastion_inject_module, + module.run_powervs_account_bootstrap_module + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//ibmcloud_vs/powervs_interconnect_sg_update?ref=main" + + module_var_bastion_security_group_id = module.run_bastion_inject_module.output_bastion_security_group_id + module_var_host_security_group_id = module.run_account_bootstrap_module.output_host_security_group_id + + module_var_power_group_network_private_subnet = module.run_powervs_account_bootstrap_module.output_power_group_network_private_subnet + +} + + +module "run_powervs_interconnect_proxy_provision_module" { + + depends_on = [ + module.run_account_init_module, + module.run_account_bootstrap_module, + module.run_bastion_inject_module, + module.run_powervs_interconnect_sg_update_module + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//ibmcloud_vs/powervs_interconnect_proxy_provision?ref=main" + + # Set Terraform Module Variables using Terraform Variables at runtime + + module_var_resource_group_id = module.run_account_init_module.output_resource_group_id + module_var_resource_prefix = var.resource_prefix + module_var_resource_tags = var.resource_tags + + module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name + + module_var_bastion_user = var.bastion_user + module_var_bastion_ssh_port = var.bastion_ssh_port + module_var_bastion_public_ssh_key = module.run_account_bootstrap_module.output_bastion_public_ssh_key + module_var_bastion_private_ssh_key = module.run_account_bootstrap_module.output_bastion_private_ssh_key + + module_var_bastion_floating_ip = module.run_bastion_inject_module.output_bastion_ip + module_var_bastion_connection_security_group_id = module.run_bastion_inject_module.output_bastion_connection_security_group_id + + module_var_host_ssh_key_id = module.run_account_bootstrap_module.output_host_ssh_key_id + module_var_host_private_ssh_key = module.run_account_bootstrap_module.output_host_private_ssh_key + module_var_host_security_group_id = module.run_account_bootstrap_module.output_host_security_group_id + + module_var_proxy_os_image = var.map_os_image_regex[var.bastion_os_image] + + module_var_dns_root_domain_name = var.dns_root_domain + module_var_dns_services_instance = module.run_account_bootstrap_module.output_host_dns_services_instance + + module_var_virtual_server_hostname = "${var.resource_prefix}-powervs-proxy" + + module_var_virtual_server_profile = "cx2-8x16" + +} + + +module "run_host_provision_module" { + + depends_on = [ + module.run_account_init_module, + module.run_account_bootstrap_module, + module.run_bastion_inject_module, + module.run_powervs_interconnect_sg_update_module, + module.run_powervs_interconnect_proxy_provision_module + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//ibmcloud_powervs/host_provision?ref=main" + + module_var_resource_group_id = module.run_account_init_module.output_resource_group_id + module_var_resource_prefix = var.resource_prefix + module_var_resource_tags = var.resource_tags + + module_var_ibm_power_group_guid = module.run_powervs_account_bootstrap_module.output_power_group_guid + module_var_power_group_networks = module.run_powervs_account_bootstrap_module.output_power_group_networks + + module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name + + module_var_bastion_user = var.bastion_user + module_var_bastion_ssh_port = var.bastion_ssh_port + module_var_bastion_private_ssh_key = module.run_account_bootstrap_module.output_bastion_private_ssh_key + module_var_bastion_ip = module.run_bastion_inject_module.output_bastion_ip + + module_var_host_public_ssh_key = module.run_account_bootstrap_module.output_host_public_ssh_key + module_var_host_private_ssh_key = module.run_account_bootstrap_module.output_host_private_ssh_key + + module_var_host_os_image = var.map_os_image_regex[var.host_os_image] + + module_var_dns_root_domain_name = var.dns_root_domain + module_var_dns_services_instance = module.run_account_bootstrap_module.output_host_dns_services_instance + + module_var_dns_proxy_ip = module.run_powervs_interconnect_proxy_provision_module.output_proxy_private_ip + module_var_web_proxy_url = "http://${module.run_powervs_interconnect_proxy_provision_module.output_proxy_private_ip}:${module.run_powervs_interconnect_proxy_provision_module.output_proxy_port_squid}" + module_var_web_proxy_exclusion = "localhost,127.0.0.1,${var.dns_root_domain}" // Web Proxy exclusion list for hosts running on IBM Power (e.g. localhost,127.0.0.1,custom.root.domain) + + module_var_os_vendor_account_user = var.os_vendor_account_user + module_var_os_vendor_account_user_passcode = var.os_vendor_account_user_passcode + + # Set Terraform Module Variables using for_each loop on a map Terraform Variable with nested objects + + for_each = toset([ + for key, value in var.map_host_specifications[var.host_specification_plan] : key + ]) + + module_var_virtual_server_hostname = each.key + + module_var_virtual_server_profile = var.map_host_specifications[var.host_specification_plan][each.key].virtual_server_profile + + module_var_disk_volume_count_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data + module_var_disk_volume_type_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_hana_data + module_var_disk_volume_capacity_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_hana_data + module_var_lvm_enable_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? false : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_data + module_var_lvm_pv_data_alignment_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_data ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_pv_data_alignment_hana_data : 0 + module_var_lvm_vg_data_alignment_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_data ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_data_alignment_hana_data : 0 + module_var_lvm_vg_physical_extent_size_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_data ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_physical_extent_size_hana_data : 0 + module_var_lvm_lv_stripe_size_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_data ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_lv_stripe_size_hana_data : 0 + module_var_filesystem_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].filesystem_hana_data + module_var_physical_partition_filesystem_block_size_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_data ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].physical_partition_filesystem_block_size_hana_data + + module_var_disk_volume_count_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log + module_var_disk_volume_type_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_hana_log + module_var_disk_volume_capacity_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_hana_log + module_var_lvm_enable_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? false : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_log + module_var_lvm_pv_data_alignment_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_log ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_pv_data_alignment_hana_log : 0 + module_var_lvm_vg_data_alignment_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_log ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_data_alignment_hana_log : 0 + module_var_lvm_vg_physical_extent_size_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_log ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_physical_extent_size_hana_log : 0 + module_var_lvm_lv_stripe_size_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_log ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_lv_stripe_size_hana_log : 0 + module_var_filesystem_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].filesystem_hana_log + module_var_physical_partition_filesystem_block_size_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_log ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].physical_partition_filesystem_block_size_hana_log + + module_var_disk_volume_count_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared + module_var_disk_volume_type_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_hana_shared + module_var_disk_volume_capacity_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_hana_shared + module_var_lvm_enable_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? false : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_shared + module_var_lvm_pv_data_alignment_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_shared ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_pv_data_alignment_hana_shared : 0 + module_var_lvm_vg_data_alignment_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_shared ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_data_alignment_hana_shared : 0 + module_var_lvm_vg_physical_extent_size_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_shared ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_physical_extent_size_hana_shared : 0 + module_var_lvm_lv_stripe_size_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_shared ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_lv_stripe_size_hana_shared : 0 + module_var_filesystem_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].filesystem_hana_shared + module_var_physical_partition_filesystem_block_size_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_shared ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].physical_partition_filesystem_block_size_hana_shared + + module_var_disk_volume_count_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb + module_var_disk_volume_type_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_anydb + module_var_disk_volume_capacity_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_anydb + module_var_lvm_enable_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? false : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_anydb + module_var_lvm_pv_data_alignment_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_anydb ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_pv_data_alignment_anydb : 0 + module_var_lvm_vg_data_alignment_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_anydb ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_data_alignment_anydb : 0 + module_var_lvm_vg_physical_extent_size_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_anydb ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_physical_extent_size_anydb : 0 + module_var_lvm_lv_stripe_size_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_anydb ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_lv_stripe_size_anydb : 0 + module_var_filesystem_mount_path_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].filesystem_mount_path_anydb + module_var_filesystem_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].filesystem_anydb + module_var_physical_partition_filesystem_block_size_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_anydb ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].physical_partition_filesystem_block_size_anydb + + module_var_disk_volume_count_usr_sap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_usr_sap + module_var_disk_volume_type_usr_sap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_usr_sap + module_var_disk_volume_capacity_usr_sap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_usr_sap + module_var_filesystem_usr_sap = var.map_host_specifications[var.host_specification_plan][each.key].filesystem_usr_sap + + module_var_disk_volume_count_sapmnt = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_sapmnt + module_var_disk_volume_type_sapmnt = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_sapmnt + module_var_disk_volume_capacity_sapmnt = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_sapmnt + module_var_filesystem_sapmnt = var.map_host_specifications[var.host_specification_plan][each.key].filesystem_sapmnt + + module_var_disk_swapfile_size_gb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_swap > 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_swapfile_size_gb + module_var_disk_volume_count_swap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_swap + module_var_disk_volume_type_swap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_swap > 0 ? var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_swap : 0 + module_var_disk_volume_capacity_swap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_swap > 0 ? var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_swap : 0 + module_var_filesystem_swap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_swap > 0 ? var.map_host_specifications[var.host_specification_plan][each.key].filesystem_swap : 0 + + module_var_disk_volume_capacity_software = var.disk_volume_capacity_software + module_var_disk_volume_type_software = var.disk_volume_type_software + module_var_sap_software_download_directory = var.sap_software_download_directory + +} + + +module "run_ansible_sap_ecc_hana_install" { + + depends_on = [ + module.run_host_provision_module + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_hana_install?ref=main" + + # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) + module_var_bastion_boolean = true // required as true boolean for any Cloud Service Provider (CSP) + module_var_bastion_user = var.bastion_user + module_var_bastion_ssh_port = var.bastion_ssh_port + module_var_bastion_private_ssh_key = module.run_account_bootstrap_module.output_bastion_private_ssh_key + + module_var_bastion_floating_ip = module.run_bastion_inject_module.output_bastion_ip + + module_var_host_private_ssh_key = module.run_account_bootstrap_module.output_host_private_ssh_key + + + # Set Terraform Module Variables using for_each loop on a map Terraform Variable at runtime + + for_each = module.run_host_provision_module + module_var_host_private_ip = join(", ", each.value.*.output_host_private_ip) + module_var_hostname = join(", ", each.value.*.output_host_name) + module_var_dns_root_domain_name = var.dns_root_domain + + module_var_sap_id_user = var.sap_id_user + module_var_sap_id_user_password = var.sap_id_user_password + + module_var_sap_hana_install_master_password = var.sap_hana_install_master_password + module_var_sap_hana_install_sid = var.sap_hana_install_sid + module_var_sap_hana_install_instance_number = var.sap_hana_install_instance_number + + module_var_sap_swpm_sid = var.sap_ecc_hana_install_sid + + module_var_sap_swpm_db_schema_abap = "SAPHANADB" + module_var_sap_swpm_db_schema_abap_password = var.sap_hana_install_master_password + module_var_sap_swpm_db_system_password = var.sap_hana_install_master_password + module_var_sap_swpm_db_systemdb_password = var.sap_hana_install_master_password + module_var_sap_swpm_db_sidadm_password = var.sap_hana_install_master_password + module_var_sap_swpm_ddic_000_password = var.sap_hana_install_master_password + module_var_sap_swpm_pas_instance_nr = var.sap_nwas_abap_pas_instance_no + module_var_sap_swpm_ascs_instance_nr = var.sap_nwas_abap_ascs_instance_no + + module_var_sap_swpm_master_password = var.sap_hana_install_master_password + + module_var_sap_swpm_template_selected = var.sap_swpm_template_selected + + module_var_sap_software_download_directory = var.sap_software_download_directory + +} diff --git a/sap_ecc_hana_install/ibmcloud_powervs/outputs.tf b/sap_ecc_hana_install/ibmcloud_powervs/outputs.tf new file mode 100644 index 0000000..f4f4d5f --- /dev/null +++ b/sap_ecc_hana_install/ibmcloud_powervs/outputs.tf @@ -0,0 +1,235 @@ + +############################################################## +# Export SSH key to file on local +############################################################## + +# Use path object to store key files temporarily in root of execution - https://www.terraform.io/docs/language/expressions/references.html#filesystem-and-workspace-info +resource "local_file" "bastion_rsa" { + content = module.run_account_bootstrap_module.output_bastion_private_ssh_key + filename = "${path.root}/ssh/bastion_rsa" + file_permission = "0400" +} + +# Use path object to store key files temporarily in root of execution - https://www.terraform.io/docs/language/expressions/references.html#filesystem-and-workspace-info +resource "local_file" "hosts_rsa" { + content = module.run_account_bootstrap_module.output_host_private_ssh_key + filename = "${path.root}/ssh/hosts_rsa" + file_permission = "0400" +} + + +output "ssh_sap_connection_details" { + value = local.is_wsl ? "IGNORE" : <>> Chosen option $REPLY: $opt" + select opt_ip in "$${target_host_array[@]}"; do + if [ $opt_ip = "Quit" ]; then break 2; fi + target_ip=$opt_ip + echo "---- Selected option $REPLY, tunneling into $target_ip ----" + break + done + echo "" + echo "#### For SAP HANA Studio, use Add System with host name as localhost; do not add port numbers." + echo "#### If selecting 'Connect using SSL' on Connection Properties, then on Additional Properties (final) screen deselect 'Validate the SSL certificate'" + echo "" + echo "#### For SAPGUI, use expert mode SAP Logon String as: ####" + echo "conn=/H/localhost/S/32$sap_nwas_abap_pas_instance_no&expert=true" + echo "" + # SSH port forward binding, using -L local_host:local_port:remote_host:remote_port (add -vv for debugging) + ssh -N \ + $bastion_user@$bastion_host -p $bastion_port -i $bastion_private_key_file \ + -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \ + -L localhost:32$sap_nwas_abap_pas_instance_no:$target_ip:32$sap_nwas_abap_pas_instance_no \ + -L localhost:33$sap_nwas_abap_pas_instance_no:$target_ip:33$sap_nwas_abap_pas_instance_no \ + -L localhost:3$${sap_hana_instance_no}13:$target_ip:3$${sap_hana_instance_no}13 \ + -L localhost:3$${sap_hana_instance_no}15:$target_ip:3$${sap_hana_instance_no}15 \ + -L localhost:3$${sap_hana_instance_no}41:$target_ip:3$${sap_hana_instance_no}41 \ + -L localhost:443$sap_hana_instance_no:$target_ip:443$sap_hana_instance_no \ + -L localhost:443$sap_nwas_abap_pas_instance_no:$target_ip:443$sap_nwas_abap_pas_instance_no \ + -L localhost:5$${sap_hana_instance_no}13:$target_ip:5$${sap_hana_instance_no}13 \ + -L localhost:5$${sap_hana_instance_no}14:$target_ip:5$${sap_hana_instance_no}14 + break + ;; + "OS root access, via SSH stdin/stdout forwarding proxy") + echo ">>> Chosen option $REPLY: $opt" + select opt_ssh in "$${target_host_array[@]}"; do + if [ $opt_ssh = "Quit" ]; then break 2; fi + target_ip=$opt_ssh + echo "---- Selected option $REPLY, logging into $target_ip ----" + break + done + + if [ -n "$target_ip" ]; then + ssh -i $target_private_key_file root@$target_ip -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \ + -o ProxyCommand="ssh -W %h:%p $bastion_user@$bastion_host -p $bastion_port -i $bastion_private_key_file -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" + fi + break + ;; + "Quit") + break + ;; + *) echo "Invalid option $REPLY" ;; + esac + done +} + +# Then call shell function and select which target +sshjump + +EOF +} + + +# If detected Windows WSL2, then find the installed name using external resource to return a JSON string +data "external" "wsl_distro_name" { + count = local.is_wsl ? 1 : 0 + program = ["bash", "-c", "echo \"{\\\"stdout\\\":\\\"$(echo $WSL_DISTRO_NAME)\\\"}\""] +} + +output "ssh_sap_connection_details_windows" { + value = local.not_wsl ? "IGNORE" : <>> Chosen option $(PSItem)" + echo "" + echo "#### For SAP HANA Studio, use Add System with host name as localhost; do not add port numbers." + echo "#### If selecting 'Connect using SSL' on Connection Properties, then on Additional Properties (final) screen deselect 'Validate the SSL certificate'" + echo "" + echo "#### For SAPGUI, use expert mode SAP Logon String as: ####" + echo "conn=/H/localhost/S/32$sap_nwas_abap_pas_instance_no&expert=true" + echo "" + # SSH port forward binding, using -L local_host:local_port:remote_host:remote_port (add -vv for debugging) + ssh -N ` + $bastion_user@$bastion_host -p $bastion_port -i $temp_bastion_private_key_file ` + -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ` + -L localhost:32$${sap_nwas_abap_pas_instance_no}:$${target_ip}:32$${sap_nwas_abap_pas_instance_no} ` + -L localhost:33$${sap_nwas_abap_pas_instance_no}:$${target_ip}:33$${sap_nwas_abap_pas_instance_no} ` + -L localhost:3$${sap_hana_instance_no}13:$${target_ip}:3$${sap_hana_instance_no}13 ` + -L localhost:3$${sap_hana_instance_no}15:$${target_ip}:3$${sap_hana_instance_no}15 ` + -L localhost:3$${sap_hana_instance_no}41:$${target_ip}:3$${sap_hana_instance_no}41 ` + -L localhost:443$${sap_hana_instance_no}:$${target_ip}:443$${sap_hana_instance_no} ` + -L localhost:443$${sap_nwas_abap_pas_instance_no}:$${target_ip}:443$${sap_nwas_abap_pas_instance_no} ` + -L localhost:5$${sap_hana_instance_no}13:$${target_ip}:5$${sap_hana_instance_no}13 ` + -L localhost:5$${sap_hana_instance_no}14:$${target_ip}:5$${sap_hana_instance_no}14 + } + } + 2 { + foreach ($target_host in $target_host_array) { + $i=$target_host_array.IndexOf($target_host) + echo "$i) $target_host" + } + $target_host_selection = Read-Host "Please make a selection" + if ($target_host_array[$target_host_selection] -eq "Quit" ){ + break + }else { + $target_ip = $target_host_array[$target_host_selection] + #echo ">>> Chosen option $(PSItem)" + ssh -i $temp_target_private_key_file root@$target_ip -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ` + -o ProxyCommand="ssh -W %h:%p $bastion_user@$bastion_host -p $bastion_port -i $temp_bastion_private_key_file ` + -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" + } + } + 3 { + break + } + } +} + +EOF + +} diff --git a/sap_ecc_hana_install/ibmcloud_powervs/outputs_debug.tf b/sap_ecc_hana_install/ibmcloud_powervs/outputs_debug.tf new file mode 100644 index 0000000..d6970cd --- /dev/null +++ b/sap_ecc_hana_install/ibmcloud_powervs/outputs_debug.tf @@ -0,0 +1,92 @@ + +############################################################## +# DEBUG variable map +############################################################## + +# Show all Storage Test Template names defined +#output "DEBUG_show_storage_test_template_names_all" { +# value = [ +# for key, value in var.storage_test_templates_map : key +# ] +#} + +# Show each Storage Test Template object, and all the variables set therein +#output "DEBUG_show_storage_test_template_all_variables" { +# value = [ +# for key, value in var.storage_test_templates_map : value +# ] +#} + +# Show value for specific variable within each Storage Test Template object +#output "DEBUG_show_template_value_single_all_items" { +# value = [ +# for key, value in var.storage_test_templates_map : value.*.disk_volume_count_hana_data +# ] +#} + +# Show value for specific variable within each Storage Test Template, and de-duplicate e.g. unique Virtual Server Profiles used in the Storage Test Templates +#output "DEBUG_show_storage_test_template_profiles_condense" { +# value = toset([ +# for key, value in var.storage_test_templates_map : value.*.virtual_server_profile +# ]) +#} + + +# Show value for specific output from module output in one string +#output "DEBUG_show_host_storage_test_module_output_private_ip_one_string" { +# value = join(" ", flatten([for key, value in module.run_host_storage_test_template_provision_module: value.*.output_host_private_ip])) +#} + + + +############################################################## +# DEBUG Bastion - Display key values, shown after successful execution +############################################################## + +#output "bastion_display_private_key" { +# value = "\n${tls_private_key.bastion_ssh.private_key_pem}" +# sensitive = true +#} + +#output "bastion_display_public_key" { +# value = "public_key_openssh is:\n ${tls_private_key.bastion_ssh.public_key_openssh}" +#} + +############################################################## +# DEBUG Bastion - Display key values, shown before execution but with poor output +############################################################## + +#resource "null_resource" "bastion_show_keys" { +# provisioner "local-exec" { +# command = "echo '${tls_private_key.bastion_ssh.private_key_pem}'" +# } +# provisioner "local-exec" { +# command = "echo '${tls_private_key.bastion_ssh.public_key_openssh}'" +# } +#} + +############################################################## +# DEBUG target - Display key values, shown after successful execution +############################################################## + +#output "virtual_server_display_private_key" { +# value = "\n${tls_private_key.virtual_server_ssh.private_key_pem}" +# sensitive = true +#} + +#output "virtual_server_display_public_key" { +# value = "public_key_openssh:\n ${tls_private_key.virtual_server_ssh.public_key_openssh}" +#} + +############################################################## +# DEBUG target - Display key values, shown before execution but with poor output +############################################################## + +#resource "null_resource" "host_show_keys" { +# provisioner "local-exec" { +# command = "echo '${tls_private_key.virtual_server_ssh.private_key_pem}'" +# } +# provisioner "local-exec" { +# command = "echo '${tls_private_key.virtual_server_ssh.public_key_openssh}'" +# } +#} \ No newline at end of file diff --git a/sap_ecc_hana_install/ibmcloud_powervs/variable_locals.tf b/sap_ecc_hana_install/ibmcloud_powervs/variable_locals.tf new file mode 100644 index 0000000..0268009 --- /dev/null +++ b/sap_ecc_hana_install/ibmcloud_powervs/variable_locals.tf @@ -0,0 +1,29 @@ +locals { + + resource_group_create_boolean = var.ibmcloud_resource_group == "new" ? true : false + + ibmcloud_vpc_subnet_create_boolean = var.ibmcloud_vpc_subnet_name == "new" ? true : false + + ibmcloud_vpc_subnet_name_entry_is_ip = ( + can( + regex("^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)([/][0-3][0-2]?|[/][1-2][0-9]|[/][0-9])$", + var.ibmcloud_vpc_subnet_name + ) + ) ? true : false) + + # ibmcloud_region = replace(var.ibmcloud_vpc_availability_zone, "/-[0-9]/", "") + ibmcloud_region = replace(var.map_ibm_powervs_to_vpc_az[var.ibmcloud_powervs_location], "/-[0-9]/", "") + + # Directories start with "C:..." on Windows; All other OSs use "/" for root. + detect_windows = substr(pathexpand("~"), 0, 1) == "/" ? false : true + detect_shell = substr(pathexpand("~"), 0, 1) == "/" ? true : false + + # Used for displaying Shell ssh connection output + # /proc/version contains WSL subsstring, if detected then running Windows Subsystem for Linux + not_wsl = fileexists("/proc/version") ? length(regexall("WSL", file("/proc/version"))) > 0 ? false : true : true + + # Used for displaying Windows PowerShell ssh connection output + # /proc/version contains WSL subsstring, if detected then running Windows Subsystem for Linux + is_wsl = fileexists("/proc/version") ? length(regexall("WSL", file("/proc/version"))) > 0 ? true : false : false + +} diff --git a/sap_ecc_hana_install/ibmcloud_powervs/variable_map_hosts.tf b/sap_ecc_hana_install/ibmcloud_powervs/variable_map_hosts.tf new file mode 100644 index 0000000..0057bd5 --- /dev/null +++ b/sap_ecc_hana_install/ibmcloud_powervs/variable_map_hosts.tf @@ -0,0 +1,77 @@ + +variable "map_host_specifications" { + + description = "Map of host specficiations for SAP S/4HANA single node install" + + type = map(any) + + default = { + + small_256gb = { + + nw01 = { // Hostname + virtual_server_profile = "ush1-4x256" + + // N.B. all capacities must be different from each other, due to Shell loop searching based on capacity GB + + // An IBM PowerVS host will be set to Tier 1 or Tier 3 storage type, and cannot use block storage volumes from both storage types + // Therefore all block storage volumes are provisioned with Tier 1 (this cannot be changed once provisioned) + // https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-about-virtual-server#storage-tiers + // https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-about-virtual-server#storage-tiers + + disk_volume_count_hana_data = 1 + disk_volume_type_hana_data = "tier1" + disk_volume_capacity_hana_data = 384 + lvm_enable_hana_data = false // if false, then disk volume count should be 1 + #lvm_pv_data_alignment_hana_data = "1M" //default 1MiB offset from disk start before first LVM PV Physical Extent. + #lvm_vg_data_alignment_hana_data = "1M" //default 1MiB offset from disk start before first LVM VG Physical Extent. + #lvm_vg_physical_extent_size_hana_data = "4M" //default 4MiB, difficult to change once set. Akin to Physical Block Size. + #lvm_lv_stripe_size_hana_data = "64K" //default 64KiB. Akin to Virtualized Block Size. + filesystem_hana_data = "xfs" + physical_partition_filesystem_block_size_hana_data = "4k" // only if LVM is set to false; if XFS then only 4k value allowed otherwise will be overridden (see README about XFS and Page Size) + + disk_volume_count_hana_log = 1 + disk_volume_type_hana_log = "tier1" + disk_volume_capacity_hana_log = 144 + lvm_enable_hana_log = false // if false, then disk volume count should be 1 + #lvm_pv_data_alignment_hana_log = "1M" //default 1MiB offset from disk start before first LVM PV Physical Extent. + #lvm_vg_data_alignment_hana_log = "1M" //default 1MiB offset from disk start before first LVM VG Physical Extent. + #lvm_vg_physical_extent_size_hana_log = "4M" //default 4MiB, difficult to change once set. Akin to Physical Block Size. + #lvm_lv_stripe_size_hana_log = "64K" //default 64KiB. Akin to Virtualized Block Size. + filesystem_hana_log = "xfs" + physical_partition_filesystem_block_size_hana_log = "4k" // only if LVM is set to false; if XFS then only 4k value allowed otherwise will be overridden (see README about XFS and Page Size) + + disk_volume_count_hana_shared = 1 + disk_volume_type_hana_shared = "tier1" + disk_volume_capacity_hana_shared = 256 + lvm_enable_hana_shared = false // if false, then disk volume count should be 1 + #lvm_pv_data_alignment_hana_shared = "1M" //default 1MiB offset from disk start before first LVM PV Physical Extent. + #lvm_vg_data_alignment_hana_shared = "1M" //default 1MiB offset from disk start before first LVM VG Physical Extent. + #lvm_vg_physical_extent_size_hana_shared = "4M" //default 4MiB, difficult to change once set. Akin to Physical Block Size. + #lvm_lv_stripe_size_hana_shared = "64K" //default 64KiB. Akin to Virtualized Block Size. + filesystem_hana_shared = "xfs" + physical_partition_filesystem_block_size_hana_shared = "4k" // only if LVM is set to false; if XFS then only 4k value allowed otherwise will be overridden (see README about XFS and Page Size) + + disk_volume_count_anydb = 0 + + disk_volume_count_usr_sap = 0 // max of 1 + disk_volume_type_usr_sap = "tier1" + disk_volume_capacity_usr_sap = 64 + filesystem_usr_sap = "xfs" + + disk_volume_count_sapmnt = 0 // max of 1 + disk_volume_type_sapmnt = "tier1" + disk_volume_capacity_sapmnt = 50 + filesystem_sapmnt = "xfs" + + disk_swapfile_size_gb = 2 // not required if disk volume set + disk_volume_count_swap = 0 // max of 1 + #disk_volume_type_swap = "5iops-tier" + #disk_volume_capacity_swap = 10 + #filesystem_swap = "xfs" + } + + } + + } +} diff --git a/sap_ecc_hana_install/ibmcloud_powervs/variable_map_locations.tf b/sap_ecc_hana_install/ibmcloud_powervs/variable_map_locations.tf new file mode 100644 index 0000000..49300c2 --- /dev/null +++ b/sap_ecc_hana_install/ibmcloud_powervs/variable_map_locations.tf @@ -0,0 +1,28 @@ + + +variable "map_ibm_powervs_to_vpc_az" { + + description = "Map of IBM Power VS location to the colocated IBM Cloud VPC Infrastructure Availability Zone" + + type = map(any) + + default = { + + DAL12 = "us-south-2" + us-south = "us-south-3" // naming of IBM Power VS location 'us-south' was previous naming convention, would otherwise be 'DAL13' + us-east = "us-east-1" // naming of IBM Power VS location 'us-east' was previous naming convention, would otherwise be 'WDC04' + WDC06 = "us-east-2" + SAO01 = "br-sao-1" + TOR01 = "ca-tor-1" + eu-de-1 = "eu-de-2" // naming of IBM Power VS location 'us-de-1' was previous naming convention, would otherwise be 'FRA04' + eu-de-2 = "eu-de-3" // naming of IBM Power VS location 'us-de-1' was previous naming convention, would otherwise be 'FRA05' + LON04 = "eu-gb-1" + LON06 = "eu-gb-3" + SYD04 = "au-syd-2" + SYD05 = "au-syd-3" + TOK04 = "jp-tok-2" + OSA21 = "jp-osa-1" + + } + +} diff --git a/sap_ecc_hana_install/ibmcloud_powervs/variable_map_os.tf b/sap_ecc_hana_install/ibmcloud_powervs/variable_map_os.tf new file mode 100644 index 0000000..7f78511 --- /dev/null +++ b/sap_ecc_hana_install/ibmcloud_powervs/variable_map_os.tf @@ -0,0 +1,18 @@ + +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-4 = ".*redhat.*8-4.*minimal.*amd64.*" + + rhel-8-1-sap-ha-byol = "Linux-RHEL-SAP-8-1" + + sles-12-4-sap-ha-byol = "Linux-SUSE-SAP-12-4" + + } + +} diff --git a/sap_ecc_hana_install/ibmcloud_powervs/variables.tf b/sap_ecc_hana_install/ibmcloud_powervs/variables.tf new file mode 100644 index 0000000..9008e71 --- /dev/null +++ b/sap_ecc_hana_install/ibmcloud_powervs/variables.tf @@ -0,0 +1,143 @@ + +variable "ibmcloud_api_key" { + description = "Enter your IBM Cloud API Key" +} + +variable "resource_tags" { + type = list(string) + description = "Tags applied to each resource created" +} + +variable "resource_prefix" { + description = "Prefix to resource names" +} + +variable "ibmcloud_resource_group" { + description = "Enter existing/target Resource Group name, or enter 'new' to create a Resource Group using the defined prefix for all resources" +} + +variable "ibmcloud_powervs_location" { + description = "Target IBM Power VS location (colocated at a IBM Cloud VPC Infrastructure Availability Zone)" +} + +variable "ibmcloud_iam_yesno" { + description = "Please choose 'yes' or 'no' for setup of default IBM Cloud Identity and Access Management (IAM) controls, for use by technicians to view and edit resources of SAP Systems run on IBM Cloud (NOTE: Requires admin privileges on API Key)" +} + +variable "ibmcloud_vpc_subnet_name" { + description = "Enter existing/target VPC Subnet name, or enter 'new' to create a VPC with a default VPC Address Prefix Range" +} + +variable "dns_root_domain" { + description = "Root Domain for Private DNS used with the Virtual Server" +} + +variable "bastion_os_image" { + description = "Bastion OS Image. This variable uses the locals mapping with regex of OS Images, and will alter bastion provisioning." +} + +variable "bastion_user" { + description = "OS User to create on Bastion host to avoid pass-through root user (e.g. bastionuser)" +} + +variable "bastion_ssh_port" { + type = number + description = "Bastion host SSH Port from IANA Dynamic Ports range (49152 to 65535)" + + #validation { + # condition = var.bastion_ssh_port > 49152 && var.bastion_ssh_port < 65535 + # error_message = "Bastion host SSH Port must fall within IANA Dynamic Ports range (49152 to 65535)." + #} +} + +variable "host_specification_plan" { + description = "Host specification plans are small_256gb. This variable uses the locals mapping with a nested list of host specifications, and will alter host provisioning." +} + +variable "host_os_image" { + description = "Host OS Image. This variable uses the locals mapping with regex of OS Images, and will alter host provisioning." +} + +variable "os_vendor_account_user" { + description = "OS Vendor (Red Hat or SUSE) account email/username" +} + +variable "os_vendor_account_user_passcode" { + description = "OS Vendor passcode (password for Red Hat, activation code for SUSE)" +} + +variable "disk_volume_capacity_software" { + type = number + description = "Disk volume capacity for downloads of SAP Software" +} + +variable "disk_volume_type_software" { + description = "Disk volume type for downloads of SAP Software" +} + +variable "sap_software_download_directory" { + description = "Mount point for downloads of SAP Software" + + validation { + error_message = "Directory must start with forward slash." + condition = can(regex("^/", var.sap_software_download_directory)) + } + +} + + + +variable "sap_id_user" { + description = "Ansible - Please enter your SAP ID user (e.g. S-User)" +} + +variable "sap_id_user_password" { + description = "Ansible - Please enter your SAP ID password" +} + +variable "sap_hana_install_master_password" { + description = "Ansible - SAP HANA install: set common initial password (e.g. NewPass$321)" +} + +variable "sap_hana_install_sid" { + description = "Ansible - SAP HANA install: System ID (e.g. H01)" +} + +variable "sap_hana_install_instance_number" { + description = "Ansible - SAP HANA install: Instance Number (e.g. 90)" + + validation { + error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." + condition = !can(regex("(43|89)", var.sap_hana_install_instance_number)) + } + +} + + +variable "sap_swpm_template_selected" { + description = "Ansible - Select template to use: sap_ecc6_ehp8_hana_onehost, sap_ecc6_ehp7_hana_onehost" +} + +variable "sap_ecc_hana_install_sid" { + description = "Ansible - SAP ECC on HANA install: System ID (e.g. E01)" +} + +variable "sap_nwas_abap_ascs_instance_no" { + description = "Ansible - SAP NetWeaver AS (ABAP) - ABAP Central Services (ASCS) instance number" + + validation { + error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." + condition = !can(regex("(43|89)", var.sap_nwas_abap_ascs_instance_no)) + } + +} + +variable "sap_nwas_abap_pas_instance_no" { + description = "Ansible - SAP NetWeaver AS (ABAP) - Primary Application Server instance number" + + validation { + error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." + condition = !can(regex("(43|89)", var.sap_nwas_abap_pas_instance_no)) + } + +} diff --git a/sap_ecc_hana_install/ibmcloud_powervs/variables_generic_for_cli.tfvars b/sap_ecc_hana_install/ibmcloud_powervs/variables_generic_for_cli.tfvars new file mode 100644 index 0000000..11e062a --- /dev/null +++ b/sap_ecc_hana_install/ibmcloud_powervs/variables_generic_for_cli.tfvars @@ -0,0 +1,33 @@ +resource_tags = ["sap", "saphana"] + +resource_prefix = "sap" + +dns_root_domain = "poc.cloud" + +bastion_os_image = "rhel-8-4" + +bastion_user = "bastionuser" + +bastion_ssh_port = 50222 + +host_specification_plan = "small_256gb" + +host_os_image = "rhel-8-1-sap-ha-byol" + +disk_volume_capacity_software = 200 + +disk_volume_type_software = "tier1" + +sap_hana_install_master_password = "NewPass$321" + +sap_hana_install_sid = "H01" + +sap_hana_install_instance_number = "90" + +sap_nwas_abap_ascs_instance_no = "01" + +sap_nwas_abap_pas_instance_no = "00" + +sap_ecc_hana_install_sid = "E01" + +sap_software_download_directory = "/software" diff --git a/sap_ecc_hana_install/ibmcloud_powervs/versions.tf b/sap_ecc_hana_install/ibmcloud_powervs/versions.tf new file mode 100644 index 0000000..cdc1929 --- /dev/null +++ b/sap_ecc_hana_install/ibmcloud_powervs/versions.tf @@ -0,0 +1,34 @@ +# Terraform declaration + +terraform { + required_version = ">= 1.0" + required_providers { + ibm = { + #source = "localdomain/provider/ibm" // Local, on macOS path to place files would be $HOME/.terraform.d/plugins/localdomain/provider/ibm/1.xx.xx/darwin_amd6 + source = "IBM-Cloud/ibm" // Terraform Registry + version = ">=1.45.0" + } + } +} + + +# Terraform Provider declaration + +provider "ibm" { + + # Define Provider inputs manually + # ibmcloud_api_key = "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + + # Define Provider inputs from given Terraform Variables + ibmcloud_api_key = var.ibmcloud_api_key + + # If using IBM Cloud Automation Manager, the Provider declaration values are populated automatically + # from the Cloud Connection credentials (by using Environment Variables) + + # If using IBM Cloud Schematics, the Provider declaration values are populated automatically + + region = local.ibmcloud_region + + zone = var.ibmcloud_powervs_location // Required for IBM Power VS only + +} diff --git a/sap_ecc_hana_install/ibmcloud_vs/main.tf b/sap_ecc_hana_install/ibmcloud_vs/main.tf new file mode 100644 index 0000000..66e4707 --- /dev/null +++ b/sap_ecc_hana_install/ibmcloud_vs/main.tf @@ -0,0 +1,320 @@ + +module "run_ansible_dry_run" { + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_hana_install?ref=main" + + module_var_dry_run_test = "x86_64" // x86_64 or ppc64le + + # Terraform Module Variables which are mandatory, all with an empty string + module_var_bastion_boolean = false + module_var_bastion_user = "" + module_var_bastion_ssh_port = 0 + module_var_bastion_private_ssh_key = "" + module_var_bastion_floating_ip = "" + module_var_host_private_ssh_key = "" + module_var_host_private_ip = "" + module_var_hostname = "software_media_dry_run" + module_var_dns_root_domain_name = "" + module_var_sap_id_user = var.sap_id_user + module_var_sap_id_user_password = var.sap_id_user_password + module_var_sap_swpm_sid = "" + module_var_sap_swpm_db_schema_abap = "" + module_var_sap_swpm_db_schema_abap_password = "" + module_var_sap_swpm_ddic_000_password = "" + module_var_sap_swpm_template_selected = var.sap_swpm_template_selected + +} + + +module "run_account_init_module" { + + depends_on = [ + module.run_ansible_dry_run + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//ibmcloud_vs/account_init?ref=main" + + module_var_resource_group_name = local.resource_group_create_boolean ? 0 : var.ibmcloud_resource_group + module_var_resource_group_create_boolean = local.resource_group_create_boolean + + module_var_resource_prefix = var.resource_prefix + + module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? 0 : var.ibmcloud_vpc_subnet_name + module_var_ibmcloud_vpc_subnet_create_boolean = local.ibmcloud_vpc_subnet_create_boolean + module_var_ibmcloud_vpc_availability_zone = var.ibmcloud_vpc_availability_zone + +} + + +module "run_account_bootstrap_module" { + + depends_on = [ + module.run_account_init_module + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//ibmcloud_vs/account_bootstrap?ref=main" + + module_var_resource_group_id = module.run_account_init_module.output_resource_group_id + module_var_resource_prefix = var.resource_prefix + + module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name + module_var_ibmcloud_vpc_availability_zone = var.ibmcloud_vpc_availability_zone + + module_var_dns_root_domain_name = var.dns_root_domain + +} + + +module "run_account_iam_module" { + + depends_on = [ + module.run_account_bootstrap_module + ] + + count = var.ibmcloud_iam_yesno == "yes" ? 1 : 0 + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//ibmcloud_vs/account_iam?ref=main" + + module_var_resource_group_id = module.run_account_init_module.output_resource_group_id + module_var_resource_prefix = var.resource_prefix + +} + + +module "run_bastion_inject_module" { + + depends_on = [ + module.run_account_init_module, + module.run_account_bootstrap_module + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//ibmcloud_vs/bastion_inject?ref=main" + + module_var_resource_group_id = module.run_account_init_module.output_resource_group_id + module_var_resource_prefix = var.resource_prefix + module_var_resource_tags = var.resource_tags + + module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name + + module_var_bastion_user = var.bastion_user + module_var_bastion_ssh_port = var.bastion_ssh_port + module_var_bastion_ssh_key_id = module.run_account_bootstrap_module.output_bastion_ssh_key_id + module_var_bastion_public_ssh_key = module.run_account_bootstrap_module.output_bastion_public_ssh_key + module_var_bastion_private_ssh_key = module.run_account_bootstrap_module.output_bastion_private_ssh_key + + module_var_bastion_os_image = var.map_os_image_regex[var.bastion_os_image] + +} + + +module "run_host_network_access_sap_module" { + + depends_on = [ + module.run_account_init_module, + module.run_account_bootstrap_module, + module.run_bastion_inject_module + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//ibmcloud_vs/host_network_access_sap?ref=main" + + module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name + module_var_host_security_group_id = module.run_account_bootstrap_module.output_host_security_group_id + + module_var_sap_nwas_abap_pas_instance_no = var.sap_nwas_abap_pas_instance_no + module_var_sap_hana_instance_no = "" + +} + + +module "run_host_network_access_sap_public_via_proxy_module" { + + depends_on = [ + module.run_account_init_module, + module.run_account_bootstrap_module, + module.run_bastion_inject_module + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//ibmcloud_vs/host_network_access_sap_public_via_proxy?ref=main" + + module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name + + module_var_bastion_security_group_id = module.run_bastion_inject_module.output_bastion_security_group_id + module_var_bastion_connection_security_group_id = module.run_bastion_inject_module.output_bastion_connection_security_group_id + module_var_host_security_group_id = module.run_account_bootstrap_module.output_host_security_group_id + + module_var_sap_nwas_abap_pas_instance_no = var.sap_nwas_abap_pas_instance_no + module_var_sap_hana_instance_no = "" + +} + + +module "run_host_provision_module" { + + depends_on = [ + module.run_account_init_module, + module.run_account_bootstrap_module, + module.run_bastion_inject_module + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//ibmcloud_vs/host_provision?ref=main" + + # Set Terraform Module Variables using Terraform Variables at runtime + + module_var_resource_group_id = module.run_account_init_module.output_resource_group_id + module_var_resource_prefix = var.resource_prefix + module_var_resource_tags = var.resource_tags + + module_var_ibmcloud_vpc_subnet_name = local.ibmcloud_vpc_subnet_create_boolean ? module.run_account_init_module.output_vpc_subnet_name : var.ibmcloud_vpc_subnet_name + + module_var_bastion_user = var.bastion_user + module_var_bastion_ssh_port = var.bastion_ssh_port + module_var_bastion_private_ssh_key = module.run_account_bootstrap_module.output_bastion_private_ssh_key + + module_var_bastion_floating_ip = module.run_bastion_inject_module.output_bastion_ip + module_var_bastion_connection_security_group_id = module.run_bastion_inject_module.output_bastion_connection_security_group_id + + module_var_host_ssh_key_id = module.run_account_bootstrap_module.output_host_ssh_key_id + module_var_host_private_ssh_key = module.run_account_bootstrap_module.output_host_private_ssh_key + module_var_host_security_group_id = module.run_account_bootstrap_module.output_host_security_group_id + + module_var_host_os_image = var.map_os_image_regex[var.host_os_image] + + module_var_dns_root_domain_name = var.dns_root_domain + module_var_dns_services_instance = module.run_account_bootstrap_module.output_host_dns_services_instance + + + # Set Terraform Module Variables using for_each loop on a map Terraform Variable with nested objects + + for_each = toset([ + for key, value in var.map_host_specifications[var.host_specification_plan] : key + ]) + + module_var_virtual_server_hostname = each.key + + module_var_virtual_server_profile = var.map_host_specifications[var.host_specification_plan][each.key].virtual_server_profile + + module_var_disk_volume_count_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data + module_var_disk_volume_type_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_hana_data + module_var_disk_volume_capacity_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_hana_data + module_var_disk_volume_iops_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_hana_data == "custom" ? var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_iops_hana_data : null + module_var_lvm_enable_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? false : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_data + module_var_lvm_pv_data_alignment_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_data ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_pv_data_alignment_hana_data : 0 + module_var_lvm_vg_data_alignment_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_data ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_data_alignment_hana_data : 0 + module_var_lvm_vg_physical_extent_size_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_data ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_physical_extent_size_hana_data : 0 + module_var_lvm_lv_stripe_size_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_data ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_lv_stripe_size_hana_data : 0 + module_var_filesystem_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].filesystem_hana_data + module_var_physical_partition_filesystem_block_size_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_data ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].physical_partition_filesystem_block_size_hana_data + + module_var_disk_volume_count_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log + module_var_disk_volume_type_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_hana_log + module_var_disk_volume_capacity_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_hana_log + module_var_disk_volume_iops_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_hana_log == "custom" ? var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_iops_hana_log : null + module_var_lvm_enable_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? false : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_log + module_var_lvm_pv_data_alignment_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_log ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_pv_data_alignment_hana_log : 0 + module_var_lvm_vg_data_alignment_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_log ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_data_alignment_hana_log : 0 + module_var_lvm_vg_physical_extent_size_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_log ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_physical_extent_size_hana_log : 0 + module_var_lvm_lv_stripe_size_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_log ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_lv_stripe_size_hana_log : 0 + module_var_filesystem_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].filesystem_hana_log + module_var_physical_partition_filesystem_block_size_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_log ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].physical_partition_filesystem_block_size_hana_log + + module_var_disk_volume_count_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared + module_var_disk_volume_type_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_hana_shared + module_var_disk_volume_capacity_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_hana_shared + module_var_disk_volume_iops_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_hana_shared == "custom" ? var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_iops_hana_shared : null + module_var_lvm_enable_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? false : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_shared + module_var_lvm_pv_data_alignment_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_shared ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_pv_data_alignment_hana_shared : 0 + module_var_lvm_vg_data_alignment_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_shared ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_data_alignment_hana_shared : 0 + module_var_lvm_vg_physical_extent_size_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_shared ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_physical_extent_size_hana_shared : 0 + module_var_lvm_lv_stripe_size_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_shared ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_lv_stripe_size_hana_shared : 0 + module_var_filesystem_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].filesystem_hana_shared + module_var_physical_partition_filesystem_block_size_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_shared ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].physical_partition_filesystem_block_size_hana_shared + + module_var_disk_volume_count_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb + module_var_disk_volume_type_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_anydb + module_var_disk_volume_capacity_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_anydb + module_var_disk_volume_iops_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_anydb == "custom" ? var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_iops_anydb : null + module_var_lvm_enable_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? false : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_anydb + module_var_lvm_pv_data_alignment_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_anydb ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_pv_data_alignment_anydb : 0 + module_var_lvm_vg_data_alignment_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_anydb ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_data_alignment_anydb : 0 + module_var_lvm_vg_physical_extent_size_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_anydb ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_physical_extent_size_anydb : 0 + module_var_lvm_lv_stripe_size_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_anydb ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_lv_stripe_size_anydb : 0 + module_var_filesystem_mount_path_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].filesystem_mount_path_anydb + module_var_filesystem_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].filesystem_anydb + module_var_physical_partition_filesystem_block_size_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_anydb ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].physical_partition_filesystem_block_size_anydb + + module_var_disk_volume_count_usr_sap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_usr_sap + module_var_disk_volume_type_usr_sap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_usr_sap + module_var_disk_volume_capacity_usr_sap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_usr_sap + module_var_filesystem_usr_sap = var.map_host_specifications[var.host_specification_plan][each.key].filesystem_usr_sap + + module_var_disk_volume_count_sapmnt = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_sapmnt + module_var_disk_volume_type_sapmnt = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_sapmnt + module_var_disk_volume_capacity_sapmnt = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_sapmnt + module_var_filesystem_sapmnt = var.map_host_specifications[var.host_specification_plan][each.key].filesystem_sapmnt + + module_var_disk_swapfile_size_gb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_swap > 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_swapfile_size_gb + module_var_disk_volume_count_swap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_swap + module_var_disk_volume_type_swap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_swap > 0 ? var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_swap : 0 + module_var_disk_volume_capacity_swap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_swap > 0 ? var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_swap : 0 + module_var_filesystem_swap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_swap > 0 ? var.map_host_specifications[var.host_specification_plan][each.key].filesystem_swap : 0 + + module_var_disk_volume_type_software = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_software + module_var_disk_volume_capacity_software = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_software + module_var_sap_software_download_directory = var.sap_software_download_directory + + module_var_disable_ip_anti_spoofing = false + +} + + +module "run_ansible_sap_ecc_hana_install" { + + depends_on = [ + module.run_host_provision_module + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_hana_install?ref=main" + + # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) + module_var_bastion_boolean = true // required as true boolean for any Cloud Service Provider (CSP) + module_var_bastion_user = var.bastion_user + module_var_bastion_ssh_port = var.bastion_ssh_port + module_var_bastion_private_ssh_key = module.run_account_bootstrap_module.output_bastion_private_ssh_key + + module_var_bastion_floating_ip = module.run_bastion_inject_module.output_bastion_ip + + module_var_host_private_ssh_key = module.run_account_bootstrap_module.output_host_private_ssh_key + + + # Set Terraform Module Variables using for_each loop on a map Terraform Variable at runtime + + for_each = module.run_host_provision_module + module_var_host_private_ip = join(", ", each.value.*.output_host_private_ip) + module_var_hostname = join(", ", each.value.*.output_host_name) + module_var_dns_root_domain_name = var.dns_root_domain + + module_var_sap_id_user = var.sap_id_user + module_var_sap_id_user_password = var.sap_id_user_password + + module_var_sap_hana_install_master_password = var.sap_hana_install_master_password + module_var_sap_hana_install_sid = var.sap_hana_install_sid + module_var_sap_hana_install_instance_number = var.sap_hana_install_instance_number + + module_var_sap_swpm_sid = var.sap_ecc_hana_install_sid + + module_var_sap_swpm_db_schema_abap = "SAPHANADB" + module_var_sap_swpm_db_schema_abap_password = var.sap_hana_install_master_password + module_var_sap_swpm_db_system_password = var.sap_hana_install_master_password + module_var_sap_swpm_db_systemdb_password = var.sap_hana_install_master_password + module_var_sap_swpm_db_sidadm_password = var.sap_hana_install_master_password + module_var_sap_swpm_ddic_000_password = var.sap_hana_install_master_password + module_var_sap_swpm_pas_instance_nr = var.sap_nwas_abap_pas_instance_no + module_var_sap_swpm_ascs_instance_nr = var.sap_nwas_abap_ascs_instance_no + + module_var_sap_swpm_master_password = var.sap_hana_install_master_password + + module_var_sap_swpm_template_selected = var.sap_swpm_template_selected + + module_var_sap_software_download_directory = var.sap_software_download_directory + +} diff --git a/sap_ecc_hana_install/ibmcloud_vs/outputs.tf b/sap_ecc_hana_install/ibmcloud_vs/outputs.tf new file mode 100644 index 0000000..f4f4d5f --- /dev/null +++ b/sap_ecc_hana_install/ibmcloud_vs/outputs.tf @@ -0,0 +1,235 @@ + +############################################################## +# Export SSH key to file on local +############################################################## + +# Use path object to store key files temporarily in root of execution - https://www.terraform.io/docs/language/expressions/references.html#filesystem-and-workspace-info +resource "local_file" "bastion_rsa" { + content = module.run_account_bootstrap_module.output_bastion_private_ssh_key + filename = "${path.root}/ssh/bastion_rsa" + file_permission = "0400" +} + +# Use path object to store key files temporarily in root of execution - https://www.terraform.io/docs/language/expressions/references.html#filesystem-and-workspace-info +resource "local_file" "hosts_rsa" { + content = module.run_account_bootstrap_module.output_host_private_ssh_key + filename = "${path.root}/ssh/hosts_rsa" + file_permission = "0400" +} + + +output "ssh_sap_connection_details" { + value = local.is_wsl ? "IGNORE" : <>> Chosen option $REPLY: $opt" + select opt_ip in "$${target_host_array[@]}"; do + if [ $opt_ip = "Quit" ]; then break 2; fi + target_ip=$opt_ip + echo "---- Selected option $REPLY, tunneling into $target_ip ----" + break + done + echo "" + echo "#### For SAP HANA Studio, use Add System with host name as localhost; do not add port numbers." + echo "#### If selecting 'Connect using SSL' on Connection Properties, then on Additional Properties (final) screen deselect 'Validate the SSL certificate'" + echo "" + echo "#### For SAPGUI, use expert mode SAP Logon String as: ####" + echo "conn=/H/localhost/S/32$sap_nwas_abap_pas_instance_no&expert=true" + echo "" + # SSH port forward binding, using -L local_host:local_port:remote_host:remote_port (add -vv for debugging) + ssh -N \ + $bastion_user@$bastion_host -p $bastion_port -i $bastion_private_key_file \ + -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \ + -L localhost:32$sap_nwas_abap_pas_instance_no:$target_ip:32$sap_nwas_abap_pas_instance_no \ + -L localhost:33$sap_nwas_abap_pas_instance_no:$target_ip:33$sap_nwas_abap_pas_instance_no \ + -L localhost:3$${sap_hana_instance_no}13:$target_ip:3$${sap_hana_instance_no}13 \ + -L localhost:3$${sap_hana_instance_no}15:$target_ip:3$${sap_hana_instance_no}15 \ + -L localhost:3$${sap_hana_instance_no}41:$target_ip:3$${sap_hana_instance_no}41 \ + -L localhost:443$sap_hana_instance_no:$target_ip:443$sap_hana_instance_no \ + -L localhost:443$sap_nwas_abap_pas_instance_no:$target_ip:443$sap_nwas_abap_pas_instance_no \ + -L localhost:5$${sap_hana_instance_no}13:$target_ip:5$${sap_hana_instance_no}13 \ + -L localhost:5$${sap_hana_instance_no}14:$target_ip:5$${sap_hana_instance_no}14 + break + ;; + "OS root access, via SSH stdin/stdout forwarding proxy") + echo ">>> Chosen option $REPLY: $opt" + select opt_ssh in "$${target_host_array[@]}"; do + if [ $opt_ssh = "Quit" ]; then break 2; fi + target_ip=$opt_ssh + echo "---- Selected option $REPLY, logging into $target_ip ----" + break + done + + if [ -n "$target_ip" ]; then + ssh -i $target_private_key_file root@$target_ip -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \ + -o ProxyCommand="ssh -W %h:%p $bastion_user@$bastion_host -p $bastion_port -i $bastion_private_key_file -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" + fi + break + ;; + "Quit") + break + ;; + *) echo "Invalid option $REPLY" ;; + esac + done +} + +# Then call shell function and select which target +sshjump + +EOF +} + + +# If detected Windows WSL2, then find the installed name using external resource to return a JSON string +data "external" "wsl_distro_name" { + count = local.is_wsl ? 1 : 0 + program = ["bash", "-c", "echo \"{\\\"stdout\\\":\\\"$(echo $WSL_DISTRO_NAME)\\\"}\""] +} + +output "ssh_sap_connection_details_windows" { + value = local.not_wsl ? "IGNORE" : <>> Chosen option $(PSItem)" + echo "" + echo "#### For SAP HANA Studio, use Add System with host name as localhost; do not add port numbers." + echo "#### If selecting 'Connect using SSL' on Connection Properties, then on Additional Properties (final) screen deselect 'Validate the SSL certificate'" + echo "" + echo "#### For SAPGUI, use expert mode SAP Logon String as: ####" + echo "conn=/H/localhost/S/32$sap_nwas_abap_pas_instance_no&expert=true" + echo "" + # SSH port forward binding, using -L local_host:local_port:remote_host:remote_port (add -vv for debugging) + ssh -N ` + $bastion_user@$bastion_host -p $bastion_port -i $temp_bastion_private_key_file ` + -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ` + -L localhost:32$${sap_nwas_abap_pas_instance_no}:$${target_ip}:32$${sap_nwas_abap_pas_instance_no} ` + -L localhost:33$${sap_nwas_abap_pas_instance_no}:$${target_ip}:33$${sap_nwas_abap_pas_instance_no} ` + -L localhost:3$${sap_hana_instance_no}13:$${target_ip}:3$${sap_hana_instance_no}13 ` + -L localhost:3$${sap_hana_instance_no}15:$${target_ip}:3$${sap_hana_instance_no}15 ` + -L localhost:3$${sap_hana_instance_no}41:$${target_ip}:3$${sap_hana_instance_no}41 ` + -L localhost:443$${sap_hana_instance_no}:$${target_ip}:443$${sap_hana_instance_no} ` + -L localhost:443$${sap_nwas_abap_pas_instance_no}:$${target_ip}:443$${sap_nwas_abap_pas_instance_no} ` + -L localhost:5$${sap_hana_instance_no}13:$${target_ip}:5$${sap_hana_instance_no}13 ` + -L localhost:5$${sap_hana_instance_no}14:$${target_ip}:5$${sap_hana_instance_no}14 + } + } + 2 { + foreach ($target_host in $target_host_array) { + $i=$target_host_array.IndexOf($target_host) + echo "$i) $target_host" + } + $target_host_selection = Read-Host "Please make a selection" + if ($target_host_array[$target_host_selection] -eq "Quit" ){ + break + }else { + $target_ip = $target_host_array[$target_host_selection] + #echo ">>> Chosen option $(PSItem)" + ssh -i $temp_target_private_key_file root@$target_ip -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ` + -o ProxyCommand="ssh -W %h:%p $bastion_user@$bastion_host -p $bastion_port -i $temp_bastion_private_key_file ` + -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" + } + } + 3 { + break + } + } +} + +EOF + +} diff --git a/sap_ecc_hana_install/ibmcloud_vs/outputs_debug.tf b/sap_ecc_hana_install/ibmcloud_vs/outputs_debug.tf new file mode 100644 index 0000000..c21429d --- /dev/null +++ b/sap_ecc_hana_install/ibmcloud_vs/outputs_debug.tf @@ -0,0 +1,92 @@ + +############################################################## +# DEBUG variable map +############################################################## + +# Show all Storage Test Template names defined +#output "DEBUG_show_storage_test_template_names_all" { +# value = [ +# for key, value in var.storage_test_templates_map : key +# ] +#} + +# Show each Storage Test Template object, and all the variables set therein +#output "DEBUG_show_storage_test_template_all_variables" { +# value = [ +# for key, value in var.storage_test_templates_map : value +# ] +#} + +# Show value for specific variable within each Storage Test Template object +#output "DEBUG_show_template_value_single_all_items" { +# value = [ +# for key, value in var.storage_test_templates_map : value.*.disk_volume_count_hana_data +# ] +#} + +# Show value for specific variable within each Storage Test Template, and de-duplicate e.g. unique Virtual Server Profiles used in the Storage Test Templates +#output "DEBUG_show_storage_test_template_profiles_condense" { +# value = toset([ +# for key, value in var.storage_test_templates_map : value.*.virtual_server_profile +# ]) +#} + + +# Show value for specific output from module output in one string +#output "DEBUG_show_host_storage_test_module_output_private_ip_one_string" { +# value = join(" ", flatten([for key, value in module.run_host_storage_test_template_provision_module: value.*.output_host_private_ip])) +#} + + + +############################################################## +# DEBUG Bastion - Display key values, shown after successful execution +############################################################## + +#output "bastion_display_private_key" { +# value = "\n${tls_private_key.bastion_ssh.private_key_pem}" +# sensitive = true +#} + +#output "bastion_display_public_key" { +# value = "public_key_openssh is:\n ${tls_private_key.bastion_ssh.public_key_openssh}" +#} + +############################################################## +# DEBUG Bastion - Display key values, shown before execution but with poor output +############################################################## + +#resource "null_resource" "bastion_show_keys" { +# provisioner "local-exec" { +# command = "echo '${tls_private_key.bastion_ssh.private_key_pem}'" +# } +# provisioner "local-exec" { +# command = "echo '${tls_private_key.bastion_ssh.public_key_openssh}'" +# } +#} + +############################################################## +# DEBUG Intel VS target - Display key values, shown after successful execution +############################################################## + +#output "virtual_server_display_private_key" { +# value = "\n${tls_private_key.virtual_server_ssh.private_key_pem}" +# sensitive = true +#} + +#output "virtual_server_display_public_key" { +# value = "public_key_openssh:\n ${tls_private_key.virtual_server_ssh.public_key_openssh}" +#} + +############################################################## +# DEBUG Intel VS target - Display key values, shown before execution but with poor output +############################################################## + +#resource "null_resource" "host_show_keys" { +# provisioner "local-exec" { +# command = "echo '${tls_private_key.virtual_server_ssh.private_key_pem}'" +# } +# provisioner "local-exec" { +# command = "echo '${tls_private_key.virtual_server_ssh.public_key_openssh}'" +# } +#} \ No newline at end of file diff --git a/sap_ecc_hana_install/ibmcloud_vs/variable_locals.tf b/sap_ecc_hana_install/ibmcloud_vs/variable_locals.tf new file mode 100644 index 0000000..7c05148 --- /dev/null +++ b/sap_ecc_hana_install/ibmcloud_vs/variable_locals.tf @@ -0,0 +1,28 @@ +locals { + + resource_group_create_boolean = var.ibmcloud_resource_group == "new" ? true : false + + ibmcloud_vpc_subnet_create_boolean = var.ibmcloud_vpc_subnet_name == "new" ? true : false + + ibmcloud_vpc_subnet_name_entry_is_ip = ( + can( + regex("^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)([/][0-3][0-2]?|[/][1-2][0-9]|[/][0-9])$", + var.ibmcloud_vpc_subnet_name + ) + ) ? true : false) + + ibmcloud_region = replace(var.ibmcloud_vpc_availability_zone, "/-[^-]*$/", "") + + # Directories start with "C:..." on Windows; All other OSs use "/" for root. + detect_windows = substr(pathexpand("~"), 0, 1) == "/" ? false : true + detect_shell = substr(pathexpand("~"), 0, 1) == "/" ? true : false + + # Used for displaying Shell ssh connection output + # /proc/version contains WSL subsstring, if detected then running Windows Subsystem for Linux + not_wsl = fileexists("/proc/version") ? length(regexall("WSL", file("/proc/version"))) > 0 ? false : true : true + + # Used for displaying Windows PowerShell ssh connection output + # /proc/version contains WSL subsstring, if detected then running Windows Subsystem for Linux + is_wsl = fileexists("/proc/version") ? length(regexall("WSL", file("/proc/version"))) > 0 ? true : false : false + +} diff --git a/sap_ecc_hana_install/ibmcloud_vs/variable_map_hosts.tf b/sap_ecc_hana_install/ibmcloud_vs/variable_map_hosts.tf new file mode 100644 index 0000000..40901b6 --- /dev/null +++ b/sap_ecc_hana_install/ibmcloud_vs/variable_map_hosts.tf @@ -0,0 +1,80 @@ + +variable "map_host_specifications" { + + description = "Map of host specficiations for SAP NetWeaver AS (ABAP) with SAP HANA single node install" + + type = map(any) + + default = { + + small_256gb = { + + nw01 = { // Hostname + virtual_server_profile = "mx2-32x256" + + // N.B. all capacities must be different from each other, due to Shell loop searching based on capacity GB + + disk_volume_count_hana_data = 3 + disk_volume_type_hana_data = "10iops-tier" + disk_volume_capacity_hana_data = 128 + #disk_volume_iops_hana_data = + lvm_enable_hana_data = true // if false, then disk volume count should be 1 + lvm_pv_data_alignment_hana_data = "1M" //default 1MiB offset from disk start before first LVM PV Physical Extent. + lvm_vg_data_alignment_hana_data = "1M" //default 1MiB offset from disk start before first LVM VG Physical Extent. + lvm_vg_physical_extent_size_hana_data = "4M" //default 4MiB, difficult to change once set. Akin to Physical Block Size. + lvm_lv_stripe_size_hana_data = "64K" //default 64KiB. Akin to Virtualized Block Size. + filesystem_hana_data = "xfs" + #physical_partition_filesystem_block_size_hana_data = "4k" // only if LVM is set to false; if XFS then only 4k value allowed otherwise will be overridden (see README about XFS and Page Size) + + disk_volume_count_hana_log = 3 + disk_volume_type_hana_log = "10iops-tier" + disk_volume_capacity_hana_log = 48 + #disk_volume_iops_hana_log = + lvm_enable_hana_log = true // if false, then disk volume count should be 1 + lvm_pv_data_alignment_hana_log = "1M" //default 1MiB offset from disk start before first LVM PV Physical Extent. + lvm_vg_data_alignment_hana_log = "1M" //default 1MiB offset from disk start before first LVM VG Physical Extent. + lvm_vg_physical_extent_size_hana_log = "4M" //default 4MiB, difficult to change once set. Akin to Physical Block Size. + lvm_lv_stripe_size_hana_log = "64K" //default 64KiB. Akin to Virtualized Block Size. + filesystem_hana_log = "xfs" + #physical_partition_filesystem_block_size_hana_log = "4k" // only if LVM is set to false; if XFS then only 4k value allowed otherwise will be overridden (see README about XFS and Page Size) + + disk_volume_count_hana_shared = 1 + disk_volume_type_hana_shared = "10iops-tier" // Does NOT use Burst IOPS storage. Approx same cost as 1TB at lower IOPS Tiers, use lower capacity and increase to 10IOPS/GB to ensure quicker DB Backup Restore from /hana/shared//HDB/backup/data/DB_ + disk_volume_capacity_hana_shared = 320 + #disk_volume_iops_hana_shared = + lvm_enable_hana_shared = false // if false, then disk volume count should be 1 + #lvm_pv_data_alignment_hana_shared = "1M" //default 1MiB offset from disk start before first LVM PV Physical Extent. + #lvm_vg_data_alignment_hana_shared = "1M" //default 1MiB offset from disk start before first LVM VG Physical Extent. + #lvm_vg_physical_extent_size_hana_shared = "4M" //default 4MiB, difficult to change once set. Akin to Physical Block Size. + #lvm_lv_stripe_size_hana_shared = "64K" //default 64KiB. Akin to Virtualized Block Size. + filesystem_hana_shared = "xfs" + physical_partition_filesystem_block_size_hana_shared = "4k" // only if LVM is set to false; if XFS then only 4k value allowed otherwise will be overridden (see README about XFS and Page Size) + + disk_volume_count_anydb = 0 + + disk_volume_count_usr_sap = 1 // max of 1 + disk_volume_type_usr_sap = "general-purpose" + disk_volume_capacity_usr_sap = 256 + filesystem_usr_sap = "xfs" + + disk_volume_count_sapmnt = 1 // max of 1 + disk_volume_type_sapmnt = "general-purpose" + disk_volume_capacity_sapmnt = 56 + filesystem_sapmnt = "xfs" + + #disk_swapfile_size_gb = 2 // not required if disk volume set + disk_volume_count_swap = 1 // max of 1 + disk_volume_type_swap = "5iops-tier" + disk_volume_capacity_swap = 64 + filesystem_swap = "xfs" + + disk_volume_type_software = "5iops-tier" + disk_volume_capacity_software = 200 + + } + + } + + } + +} diff --git a/sap_ecc_hana_install/ibmcloud_vs/variable_map_os.tf b/sap_ecc_hana_install/ibmcloud_vs/variable_map_os.tf new file mode 100644 index 0000000..16cfc85 --- /dev/null +++ b/sap_ecc_hana_install/ibmcloud_vs/variable_map_os.tf @@ -0,0 +1,42 @@ + +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-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-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.*" + + } + +} diff --git a/sap_ecc_hana_install/ibmcloud_vs/variables.tf b/sap_ecc_hana_install/ibmcloud_vs/variables.tf new file mode 100644 index 0000000..170f168 --- /dev/null +++ b/sap_ecc_hana_install/ibmcloud_vs/variables.tf @@ -0,0 +1,126 @@ + +variable "ibmcloud_api_key" { + description = "Enter your IBM Cloud API Key" +} + +variable "resource_tags" { + type = list(string) + description = "Tags applied to each resource created" +} + +variable "resource_prefix" { + description = "Prefix to resource names" +} + +variable "ibmcloud_resource_group" { + description = "Enter existing/target Resource Group name, or enter 'new' to create a Resource Group using the defined prefix for all resources" +} + +variable "ibmcloud_vpc_availability_zone" { + description = "Target IBM Cloud Availability Zone (the IBM Cloud Region will be calculated from this value)" +} + +variable "ibmcloud_iam_yesno" { + description = "Please choose 'yes' or 'no' for setup of default IBM Cloud Identity and Access Management (IAM) controls, for use by technicians to view and edit resources of SAP Systems run on IBM Cloud (NOTE: Requires admin privileges on API Key)" +} + +variable "ibmcloud_vpc_subnet_name" { + description = "Enter existing/target VPC Subnet name, or enter 'new' to create a VPC with a default VPC Address Prefix Range" +} + +variable "dns_root_domain" { + description = "Root Domain for Private DNS used with the Virtual Server" +} + +variable "bastion_os_image" { + description = "Bastion OS Image. This variable uses the locals mapping with regex of OS Images, and will alter bastion provisioning." +} + +variable "bastion_user" { + description = "OS User to create on Bastion host to avoid pass-through root user (e.g. bastionuser)" +} + +variable "bastion_ssh_port" { + type = number + description = "Bastion host SSH Port from IANA Dynamic Ports range (49152 to 65535)" + + #validation { + # condition = var.bastion_ssh_port > 49152 && var.bastion_ssh_port < 65535 + # error_message = "Bastion host SSH Port must fall within IANA Dynamic Ports range (49152 to 65535)." + #} +} + +variable "host_specification_plan" { + description = "Host specification plans are small_32vcpu. This variable uses the locals mapping with a nested list of host specifications, and will alter host provisioning." +} + +variable "host_os_image" { + description = "Host OS Image. This variable uses the locals mapping with regex of OS Images, and will alter host provisioning." +} + +variable "sap_software_download_directory" { + description = "Mount point for downloads of SAP Software" + + validation { + error_message = "Directory must start with forward slash." + condition = can(regex("^/", var.sap_software_download_directory)) + } + +} + + + +variable "sap_id_user" { + description = "Ansible - Please enter your SAP ID user (e.g. S-User)" +} + +variable "sap_id_user_password" { + description = "Ansible - Please enter your SAP ID password" +} + +variable "sap_hana_install_master_password" { + description = "Ansible - SAP HANA install: set common initial password (e.g. NewPass$321)" +} + +variable "sap_hana_install_sid" { + description = "Ansible - SAP HANA install: System ID (e.g. H01)" +} + +variable "sap_hana_install_instance_number" { + description = "Ansible - SAP HANA install: Instance Number (e.g. 90)" + + validation { + error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." + condition = !can(regex("(43|89)", var.sap_hana_install_instance_number)) + } + +} + + +variable "sap_swpm_template_selected" { + description = "Ansible - Select template to use: sap_ecc6_ehp8_hana_onehost, sap_ecc6_ehp7_hana_onehost" +} + +variable "sap_ecc_hana_install_sid" { + description = "Ansible - SAP ECC on HANA install: System ID (e.g. E01)" +} + +variable "sap_nwas_abap_ascs_instance_no" { + description = "Ansible - SAP NetWeaver AS (ABAP) - ABAP Central Services (ASCS) instance number" + + validation { + error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." + condition = !can(regex("(43|89)", var.sap_nwas_abap_ascs_instance_no)) + } + +} + +variable "sap_nwas_abap_pas_instance_no" { + description = "Ansible - SAP NetWeaver AS (ABAP) - Primary Application Server instance number" + + validation { + error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." + condition = !can(regex("(43|89)", var.sap_nwas_abap_pas_instance_no)) + } + +} diff --git a/sap_ecc_hana_install/ibmcloud_vs/variables_generic_for_cli.tfvars b/sap_ecc_hana_install/ibmcloud_vs/variables_generic_for_cli.tfvars new file mode 100644 index 0000000..b378bce --- /dev/null +++ b/sap_ecc_hana_install/ibmcloud_vs/variables_generic_for_cli.tfvars @@ -0,0 +1,29 @@ +resource_tags = ["sap", "sapnwas"] + +resource_prefix = "sap" + +dns_root_domain = "poc.cloud" + +bastion_os_image = "rhel-8-4" + +bastion_user = "bastionuser" + +bastion_ssh_port = 50222 + +host_specification_plan = "small_256gb" + +host_os_image = "rhel-8-4-sap-ha" + +sap_hana_install_master_password = "NewPass$321" + +sap_hana_install_sid = "H01" + +sap_hana_install_instance_number = "90" + +sap_nwas_abap_ascs_instance_no = "01" + +sap_nwas_abap_pas_instance_no = "00" + +sap_ecc_hana_install_sid = "E01" + +sap_software_download_directory = "/software" diff --git a/sap_ecc_hana_install/ibmcloud_vs/versions.tf b/sap_ecc_hana_install/ibmcloud_vs/versions.tf new file mode 100644 index 0000000..aea3f80 --- /dev/null +++ b/sap_ecc_hana_install/ibmcloud_vs/versions.tf @@ -0,0 +1,32 @@ +# Terraform declaration + +terraform { + required_version = ">= 1.0" + required_providers { + ibm = { + #source = "localdomain/provider/ibm" // Local, on macOS path to place files would be $HOME/.terraform.d/plugins/localdomain/provider/ibm/1.xx.xx/darwin_amd6 + source = "IBM-Cloud/ibm" // Terraform Registry + version = ">=1.45.0" + } + } +} + + +# Terraform Provider declaration + +provider "ibm" { + + # Define Provider inputs manually + # ibmcloud_api_key = "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + + # Define Provider inputs from given Terraform Variables + ibmcloud_api_key = var.ibmcloud_api_key + + # If using IBM Cloud Automation Manager, the Provider declaration values are populated automatically + # from the Cloud Connection credentials (by using Environment Variables) + + # If using IBM Cloud Schematics, the Provider declaration values are populated automatically + + region = local.ibmcloud_region + +} diff --git a/sap_ecc_hana_install/ibmpowervc/main.tf b/sap_ecc_hana_install/ibmpowervc/main.tf new file mode 100644 index 0000000..2b7eb7e --- /dev/null +++ b/sap_ecc_hana_install/ibmpowervc/main.tf @@ -0,0 +1,197 @@ + +module "run_ansible_dry_run" { + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_hana_install?ref=main" + + module_var_dry_run_test = "x86_64" // x86_64 or ppc64le + + # Terraform Module Variables which are mandatory, all with an empty string + module_var_bastion_boolean = false + module_var_bastion_user = "" + module_var_bastion_ssh_port = 0 + module_var_bastion_private_ssh_key = "" + module_var_bastion_floating_ip = "" + module_var_host_private_ssh_key = "" + module_var_host_private_ip = "" + module_var_hostname = "software_media_dry_run" + module_var_dns_root_domain_name = "" + module_var_sap_id_user = var.sap_id_user + module_var_sap_id_user_password = var.sap_id_user_password + module_var_sap_swpm_sid = "" + module_var_sap_swpm_db_schema_abap = "" + module_var_sap_swpm_db_schema_abap_password = "" + module_var_sap_swpm_ddic_000_password = "" + module_var_sap_swpm_template_selected = var.sap_swpm_template_selected + +} + + +module "run_host_bootstrap_module" { + + depends_on = [ + module.run_ansible_dry_run + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//ibmpowervc/host_bootstrap?ref=main" + + # Set Terraform Module Variables using Terraform Variables at runtime + module_var_resource_prefix = var.resource_prefix + +} + + +module "run_host_provision_module" { + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//ibmpowervc/host_provision?ref=main" + + # Set Terraform Module Variables using Terraform Variables at runtime + + module_var_ibmpowervc_template_compute_name = local.ibmpowervc_template_compute_name_create_boolean ? 0 : var.ibmpowervc_template_compute_name + module_var_ibmpowervc_template_compute_name_create_boolean = local.ibmpowervc_template_compute_name_create_boolean + + module_var_resource_prefix = var.resource_prefix + + module_var_host_ssh_key_name = module.run_host_bootstrap_module.output_host_ssh_key_name + module_var_host_public_ssh_key = module.run_host_bootstrap_module.output_host_public_ssh_key + module_var_host_private_ssh_key = module.run_host_bootstrap_module.output_host_private_ssh_key + + module_var_ibmpowervc_host_group_name = var.ibmpowervc_host_group_name + module_var_ibmpowervc_network_name = var.ibmpowervc_network_name + + module_var_ibmpowervc_compute_cpu_threads = var.map_host_specifications[var.host_specification_plan][each.key].ibmpowervc_compute_cpu_threads + module_var_ibmpowervc_compute_ram_gb = var.map_host_specifications[var.host_specification_plan][each.key].ibmpowervc_compute_ram_gb + + module_var_ibmpowervc_os_image_name = var.ibmpowervc_os_image_name + + module_var_dns_root_domain_name = var.dns_root_domain + + module_var_web_proxy_url = var.web_proxy_url + module_var_web_proxy_exclusion = "localhost,127.0.0.1,${var.dns_root_domain}" // Web Proxy exclusion list for hosts running on IBM Power (e.g. localhost,127.0.0.1,custom.root.domain) + + module_var_os_vendor_account_user = var.os_vendor_account_user + module_var_os_vendor_account_user_passcode = var.os_vendor_account_user_passcode + module_var_os_systems_mgmt_host = var.os_systems_mgmt_host + + # Set Terraform Module Variables using for_each loop on a map Terraform Variable with nested objects + + for_each = toset([ + for key, value in var.map_host_specifications[var.host_specification_plan] : key + ]) + + module_var_lpar_hostname = each.key + + module_var_ibmpowervc_storage_storwize_hostname_short = var.ibmpowervc_storage_storwize_hostname_short + module_var_ibmpowervc_storage_storwize_storage_pool = var.ibmpowervc_storage_storwize_storage_pool + module_var_ibmpowervc_storage_storwize_storage_pool_flash = var.ibmpowervc_storage_storwize_storage_pool_flash + + module_var_disk_volume_count_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data + module_var_disk_volume_capacity_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_hana_data + module_var_lvm_enable_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? false : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_data + module_var_lvm_pv_data_alignment_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_data ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_pv_data_alignment_hana_data : 0 + module_var_lvm_vg_data_alignment_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_data ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_data_alignment_hana_data : 0 + module_var_lvm_vg_physical_extent_size_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_data ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_physical_extent_size_hana_data : 0 + module_var_lvm_lv_stripe_size_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_data ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_lv_stripe_size_hana_data : 0 + module_var_filesystem_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].filesystem_hana_data + module_var_physical_partition_filesystem_block_size_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_data ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].physical_partition_filesystem_block_size_hana_data + + module_var_disk_volume_count_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log + module_var_disk_volume_capacity_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_hana_log + module_var_lvm_enable_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? false : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_log + module_var_lvm_pv_data_alignment_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_log ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_pv_data_alignment_hana_log : 0 + module_var_lvm_vg_data_alignment_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_log ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_data_alignment_hana_log : 0 + module_var_lvm_vg_physical_extent_size_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_log ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_physical_extent_size_hana_log : 0 + module_var_lvm_lv_stripe_size_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_log ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_lv_stripe_size_hana_log : 0 + module_var_filesystem_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].filesystem_hana_log + module_var_physical_partition_filesystem_block_size_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_log ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].physical_partition_filesystem_block_size_hana_log + + module_var_disk_volume_count_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared + module_var_disk_volume_capacity_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_hana_shared + module_var_lvm_enable_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? false : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_shared + module_var_lvm_pv_data_alignment_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_shared ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_pv_data_alignment_hana_shared : 0 + module_var_lvm_vg_data_alignment_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_shared ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_data_alignment_hana_shared : 0 + module_var_lvm_vg_physical_extent_size_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_shared ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_physical_extent_size_hana_shared : 0 + module_var_lvm_lv_stripe_size_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_shared ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_lv_stripe_size_hana_shared : 0 + module_var_filesystem_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].filesystem_hana_shared + module_var_physical_partition_filesystem_block_size_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_shared ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].physical_partition_filesystem_block_size_hana_shared + + module_var_disk_volume_count_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb + module_var_disk_volume_capacity_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_anydb + module_var_lvm_enable_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? false : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_anydb + module_var_lvm_pv_data_alignment_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_anydb ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_pv_data_alignment_anydb : 0 + module_var_lvm_vg_data_alignment_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_anydb ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_data_alignment_anydb : 0 + module_var_lvm_vg_physical_extent_size_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_anydb ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_physical_extent_size_anydb : 0 + module_var_lvm_lv_stripe_size_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_anydb ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_lv_stripe_size_anydb : 0 + module_var_filesystem_mount_path_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].filesystem_mount_path_anydb + module_var_filesystem_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].filesystem_anydb + module_var_physical_partition_filesystem_block_size_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_anydb ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].physical_partition_filesystem_block_size_anydb + + module_var_disk_volume_count_usr_sap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_usr_sap + module_var_disk_volume_capacity_usr_sap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_usr_sap + module_var_filesystem_usr_sap = var.map_host_specifications[var.host_specification_plan][each.key].filesystem_usr_sap + + module_var_disk_volume_count_sapmnt = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_sapmnt + module_var_disk_volume_capacity_sapmnt = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_sapmnt + module_var_filesystem_sapmnt = var.map_host_specifications[var.host_specification_plan][each.key].filesystem_sapmnt + + module_var_disk_swapfile_size_gb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_swap > 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_swapfile_size_gb + module_var_disk_volume_count_swap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_swap + module_var_disk_volume_capacity_swap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_swap > 0 ? var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_swap : 0 + module_var_filesystem_swap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_swap > 0 ? var.map_host_specifications[var.host_specification_plan][each.key].filesystem_swap : 0 + + module_var_disk_volume_capacity_software = var.disk_volume_capacity_software + module_var_sap_software_download_directory = var.sap_software_download_directory + +} + + +module "run_ansible_sap_ecc_hana_install" { + + depends_on = [ + module.run_host_provision_module + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_hana_install?ref=main" + + # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) + module_var_bastion_boolean = true // required as true boolean for any Cloud Service Provider (CSP) + module_var_bastion_user = var.bastion_user + module_var_bastion_ssh_port = var.bastion_ssh_port + module_var_bastion_private_ssh_key = module.run_account_bootstrap_module.output_bastion_private_ssh_key + + module_var_bastion_floating_ip = module.run_bastion_inject_module.output_bastion_ip + + module_var_host_private_ssh_key = module.run_account_bootstrap_module.output_host_private_ssh_key + + + # Set Terraform Module Variables using for_each loop on a map Terraform Variable at runtime + + for_each = module.run_host_provision_module + module_var_host_private_ip = join(", ", each.value.*.output_host_private_ip) + module_var_hostname = join(", ", each.value.*.output_host_name) + module_var_dns_root_domain_name = var.dns_root_domain + + module_var_sap_id_user = var.sap_id_user + module_var_sap_id_user_password = var.sap_id_user_password + + module_var_sap_hana_install_master_password = var.sap_hana_install_master_password + module_var_sap_hana_install_sid = var.sap_hana_install_sid + module_var_sap_hana_install_instance_number = var.sap_hana_install_instance_number + + module_var_sap_swpm_sid = var.sap_ecc_hana_install_sid + + module_var_sap_swpm_db_schema_abap = "SAPHANADB" + module_var_sap_swpm_db_schema_abap_password = var.sap_hana_install_master_password + module_var_sap_swpm_db_system_password = var.sap_hana_install_master_password + module_var_sap_swpm_db_systemdb_password = var.sap_hana_install_master_password + module_var_sap_swpm_db_sidadm_password = var.sap_hana_install_master_password + module_var_sap_swpm_ddic_000_password = var.sap_hana_install_master_password + module_var_sap_swpm_pas_instance_nr = var.sap_nwas_abap_pas_instance_no + module_var_sap_swpm_ascs_instance_nr = var.sap_nwas_abap_ascs_instance_no + + module_var_sap_swpm_master_password = var.sap_hana_install_master_password + + module_var_sap_swpm_template_selected = var.sap_swpm_template_selected + + module_var_sap_software_download_directory = var.sap_software_download_directory + +} diff --git a/sap_ecc_hana_install/ibmpowervc/outputs.tf b/sap_ecc_hana_install/ibmpowervc/outputs.tf new file mode 100644 index 0000000..5c035d7 --- /dev/null +++ b/sap_ecc_hana_install/ibmpowervc/outputs.tf @@ -0,0 +1,89 @@ + +# Export SSH key to file on local +# Use path object to store key files temporarily in root of execution - https://www.terraform.io/docs/language/expressions/references.html#filesystem-and-workspace-info +resource "local_file" "hosts_rsa" { + content = module.run_host_bootstrap_module.output_host_private_ssh_key + filename = "${path.root}/ssh/hosts_rsa" + file_permission = "0400" +} + + +output "ssh_sap_connection_details" { + value = local.is_wsl ? "IGNORE" : < 0 ? false : true : true + + # Used for displaying Windows PowerShell ssh connection output + # /proc/version contains WSL subsstring, if detected then running Windows Subsystem for Linux + is_wsl = fileexists("/proc/version") ? length(regexall("WSL", file("/proc/version"))) > 0 ? true : false : false + +} diff --git a/sap_ecc_hana_install/ibmpowervc/variable_map_hosts.tf b/sap_ecc_hana_install/ibmpowervc/variable_map_hosts.tf new file mode 100644 index 0000000..b989b5c --- /dev/null +++ b/sap_ecc_hana_install/ibmpowervc/variable_map_hosts.tf @@ -0,0 +1,70 @@ + +variable "map_host_specifications" { + + description = "Map of host specficiations for SAP S/4HANA single node install" + + type = map(any) + + default = { + + small_256gb = { + + nw01 = { // Hostname + ibmpowervc_compute_cpu_threads = 32 + ibmpowervc_compute_ram_gb = 256 + + // N.B. all capacities must be different from each other, due to Shell loop searching based on capacity GB + + disk_volume_count_hana_data = 1 + disk_volume_capacity_hana_data = 512 + lvm_enable_hana_data = false // if false, then disk volume count should be 1 + #lvm_pv_data_alignment_hana_data = "1M" //default 1MiB offset from disk start before first LVM PV Physical Extent. + #lvm_vg_data_alignment_hana_data = "1M" //default 1MiB offset from disk start before first LVM VG Physical Extent. + #lvm_vg_physical_extent_size_hana_data = "4M" //default 4MiB, difficult to change once set. Akin to Physical Block Size. + #lvm_lv_stripe_size_hana_data = "64K" //default 64KiB. Akin to Virtualized Block Size. + filesystem_hana_data = "xfs" + physical_partition_filesystem_block_size_hana_data = "4k" // only if LVM is set to false; if XFS then only 4k value allowed otherwise will be overridden (see README about XFS and Page Size) + + disk_volume_count_hana_log = 1 + disk_volume_capacity_hana_log = 128 + lvm_enable_hana_log = false // if false, then disk volume count should be 1 + #lvm_pv_data_alignment_hana_log = "1M" //default 1MiB offset from disk start before first LVM PV Physical Extent. + #lvm_vg_data_alignment_hana_log = "1M" //default 1MiB offset from disk start before first LVM VG Physical Extent. + #lvm_vg_physical_extent_size_hana_log = "4M" //default 4MiB, difficult to change once set. Akin to Physical Block Size. + #lvm_lv_stripe_size_hana_log = "64K" //default 64KiB. Akin to Virtualized Block Size. + filesystem_hana_log = "xfs" + physical_partition_filesystem_block_size_hana_log = "4k" // only if LVM is set to false; if XFS then only 4k value allowed otherwise will be overridden (see README about XFS and Page Size) + + disk_volume_count_hana_shared = 1 + disk_volume_capacity_hana_shared = 256 + lvm_enable_hana_shared = false // if false, then disk volume count should be 1 + #lvm_pv_data_alignment_hana_shared = "1M" //default 1MiB offset from disk start before first LVM PV Physical Extent. + #lvm_vg_data_alignment_hana_shared = "1M" //default 1MiB offset from disk start before first LVM VG Physical Extent. + #lvm_vg_physical_extent_size_hana_shared = "4M" //default 4MiB, difficult to change once set. Akin to Physical Block Size. + #lvm_lv_stripe_size_hana_shared = "64K" //default 64KiB. Akin to Virtualized Block Size. + filesystem_hana_shared = "xfs" + physical_partition_filesystem_block_size_hana_shared = "4k" // only if LVM is set to false; if XFS then only 4k value allowed otherwise will be overridden (see README about XFS and Page Size) + + disk_volume_count_anydb = 0 + + disk_volume_count_usr_sap = 0 // max of 1 + disk_volume_type_usr_sap = "" + disk_volume_capacity_usr_sap = 64 + filesystem_usr_sap = "xfs" + + disk_volume_count_sapmnt = 0 // max of 1 + disk_volume_type_sapmnt = "" + disk_volume_capacity_sapmnt = 50 + filesystem_sapmnt = "xfs" + + disk_swapfile_size_gb = 2 // not required if disk volume set + disk_volume_count_swap = 0 // max of 1 + disk_volume_type_swap = "" + #disk_volume_capacity_swap = 10 + #filesystem_swap = "xfs" + } + + } + + } +} diff --git a/sap_ecc_hana_install/ibmpowervc/variables.tf b/sap_ecc_hana_install/ibmpowervc/variables.tf new file mode 100644 index 0000000..20f4bc1 --- /dev/null +++ b/sap_ecc_hana_install/ibmpowervc/variables.tf @@ -0,0 +1,175 @@ + +variable "ibmpowervc_auth_endpoint" { + description = "IBM PowerVC: Authentication Endpoint (e.g. https://powervc-host:5000/v3/)" +} + +variable "ibmpowervc_user" { + description = "IBM PowerVC: Username" +} + +variable "ibmpowervc_user_password" { + description = "IBM PowerVC: User Password" +} + +variable "resource_prefix" { + description = "Prefix to resource names" +} + +variable "ibmpowervc_project_name" { + description = "IBM PowerVC: Project Name" +} + +variable "ibmpowervc_host_group_name" { + description = "IBM PowerVC: Host Group Name" +} + +variable "ibmpowervc_network_name" { + description = "IBM PowerVC: Network Name" +} + +variable "ibmpowervc_template_compute_name" { + description = "IBM PowerVC: Enter 'new' to create a Compute Template from the CPU and RAM in the host specification plan, or use an existing/target Compute Template Name" +} + +variable "ibmpowervc_storage_storwize_hostname_short" { + description = "IBM PowerVC - Storage with IBM Storwize: Hostname short (e.g. v7000)" +} + +variable "ibmpowervc_storage_storwize_storage_pool" { + description = "IBM PowerVC - Storage with IBM Storwize: Storage Pool (e.g. V7000_01)" +} + +variable "ibmpowervc_storage_storwize_storage_pool_flash" { + description = "IBM PowerVC - Storage with IBM Storwize: Storage Pool with Flash Storage (e.g. FS900_01)" +} + +variable "dns_root_domain" { + description = "Root Domain to be used with the host" +} + +variable "bastion_boolean" { + description = "Bastion connection required? (boolean default: false)" + default = false +} + +variable "bastion_user" { + description = "OS User to create on Bastion host to avoid pass-through root user (e.g. bastionuser)" + default = "" +} + +variable "bastion_ip" { + description = "Bastion IP address (IPv4)" + default = "" +} + +variable "bastion_private_ssh_key" { + description = "Private SSH Key string" + default = "" +} + +variable "bastion_ssh_port" { + type = number + description = "Bastion host SSH Port from IANA Dynamic Ports range (49152 to 65535)" + default = null + + #validation { + # condition = var.bastion_ssh_port > 49152 && var.bastion_ssh_port < 65535 + # error_message = "Bastion host SSH Port must fall within IANA Dynamic Ports range (49152 to 65535)." + #} +} + +variable "host_specification_plan" { + description = "Host specification plans are small_256gb. This variable uses the locals mapping with a nested list of host specifications, and will alter host provisioning." +} + +variable "ibmpowervc_os_image_name" { + description = "IBM PowerVC: OS Image Name" +} + +variable "os_vendor_account_user" { + description = "OS Vendor account email/username for Red Hat Customer Portal (RHCP) or SUSE Customer Center (SCC). ALT: if using os_systems_mgmt_host for Red Hat Satellite, this acts as Red Hat Org ID" +} + +variable "os_vendor_account_user_passcode" { + description = "OS Vendor passcode [password for Red Hat Customer Portal (RHCP), activation code for SUSE Customer Center (SCC)]. ALT: if using os_systems_mgmt_host for Red Hat Satellite, this acts as Red Hat Activation Key" +} + +variable "os_systems_mgmt_host" { + description = "OS Systems Management host for licensing (i.e. Red Hat Satellite). **Leave blank if using Red Hat Customer Portal (RHCP) or SUSE Customer Center (SCC)**" +} + +variable "disk_volume_capacity_software" { + type = number + description = "Disk volume capacity for downloads of SAP Software" +} + +variable "sap_software_download_directory" { + description = "Mount point for downloads of SAP Software" + + validation { + error_message = "Directory must start with forward slash." + condition = can(regex("^/", var.sap_software_download_directory)) + } + +} + +variable "web_proxy_url" { + description = "Web Proxy URL for hosts running on IBM Power (e.g. http://ip.v4.goes.here:port)" +} + + + +variable "sap_id_user" { + description = "Ansible - Please enter your SAP ID user (e.g. S-User)" +} + +variable "sap_id_user_password" { + description = "Ansible - Please enter your SAP ID password" +} + +variable "sap_hana_install_master_password" { + description = "Ansible - SAP HANA install: set common initial password (e.g. NewPass$321)" +} + +variable "sap_hana_install_sid" { + description = "Ansible - SAP HANA install: System ID (e.g. H01)" +} + +variable "sap_hana_install_instance_number" { + description = "Ansible - SAP HANA install: Instance Number (e.g. 90)" + + validation { + error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." + condition = !can(regex("(43|89)", var.sap_hana_install_instance_number)) + } + +} + + +variable "sap_swpm_template_selected" { + description = "Ansible - Select template to use: sap_ecc6_ehp8_hana_onehost, sap_ecc6_ehp7_hana_onehost" +} + +variable "sap_ecc_hana_install_sid" { + description = "Ansible - SAP ECC on HANA install: System ID (e.g. E01)" +} + +variable "sap_nwas_abap_ascs_instance_no" { + description = "Ansible - SAP NetWeaver AS (ABAP) - ABAP Central Services (ASCS) instance number" + + validation { + error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." + condition = !can(regex("(43|89)", var.sap_nwas_abap_ascs_instance_no)) + } + +} + +variable "sap_nwas_abap_pas_instance_no" { + description = "Ansible - SAP NetWeaver AS (ABAP) - Primary Application Server instance number" + + validation { + error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." + condition = !can(regex("(43|89)", var.sap_nwas_abap_pas_instance_no)) + } + +} diff --git a/sap_ecc_hana_install/ibmpowervc/variables_generic_for_cli.tfvars b/sap_ecc_hana_install/ibmpowervc/variables_generic_for_cli.tfvars new file mode 100644 index 0000000..79de8ca --- /dev/null +++ b/sap_ecc_hana_install/ibmpowervc/variables_generic_for_cli.tfvars @@ -0,0 +1,21 @@ +resource_prefix = "sap" + +bastion_user = false + +host_specification_plan = "small_256gb" + +disk_volume_capacity_software = 200 + +sap_hana_install_master_password = "NewPass$321" + +sap_hana_install_sid = "H01" + +sap_hana_install_instance_number = "90" + +sap_nwas_abap_ascs_instance_no = "01" + +sap_nwas_abap_pas_instance_no = "00" + +sap_ecc_hana_install_sid = "E01" + +sap_software_download_directory = "/software" diff --git a/sap_ecc_hana_install/ibmpowervc/versions.tf b/sap_ecc_hana_install/ibmpowervc/versions.tf new file mode 100644 index 0000000..0bdf4d2 --- /dev/null +++ b/sap_ecc_hana_install/ibmpowervc/versions.tf @@ -0,0 +1,26 @@ + +# Terraform declaration +terraform { + required_version = ">= 1.0" + required_providers { + openstack = { + #source = "localdomain/provider/openstack" // Local, on macOS path to place files would be $HOME/.terraform.d/plugins/localdomain/provider/openstack/1.xx.xx/darwin_amd6 + source = "terraform-provider-openstack/openstack" + version = "1.45.0" + } + } +} + + +# Terraform Provider declaration +provider "openstack" { + + # Define Provider inputs from given Terraform Variables + auth_url = var.ibmpowervc_auth_endpoint + user_name = var.ibmpowervc_user + password = var.ibmpowervc_user_password + + tenant_name = var.ibmpowervc_project_name + #domain_name = "Default" + insecure = true +} diff --git a/sap_ecc_hana_install/msazure_vm/main.tf b/sap_ecc_hana_install/msazure_vm/main.tf new file mode 100644 index 0000000..79cf361 --- /dev/null +++ b/sap_ecc_hana_install/msazure_vm/main.tf @@ -0,0 +1,337 @@ + +module "run_ansible_dry_run" { + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_hana_install?ref=main" + + module_var_dry_run_test = "x86_64" // x86_64 or ppc64le + + # Terraform Module Variables which are mandatory, all with an empty string + module_var_bastion_boolean = false + module_var_bastion_user = "" + module_var_bastion_ssh_port = 0 + module_var_bastion_private_ssh_key = "" + module_var_bastion_floating_ip = "" + module_var_host_private_ssh_key = "" + module_var_host_private_ip = "" + module_var_hostname = "software_media_dry_run" + module_var_dns_root_domain_name = "" + module_var_sap_id_user = var.sap_id_user + module_var_sap_id_user_password = var.sap_id_user_password + module_var_sap_swpm_sid = "" + module_var_sap_swpm_db_schema_abap = "" + module_var_sap_swpm_db_schema_abap_password = "" + module_var_sap_swpm_ddic_000_password = "" + module_var_sap_swpm_template_selected = var.sap_swpm_template_selected + +} + + +module "run_account_init_module" { + + depends_on = [ + module.run_ansible_dry_run + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//msazure_vm/account_init?ref=main" + + module_var_az_resource_group_name = local.resource_group_create_boolean ? 0 : var.az_resource_group_name + module_var_az_resource_group_create_boolean = local.resource_group_create_boolean + + module_var_resource_prefix = var.resource_prefix + + module_var_az_location_region = var.az_location_region + module_var_az_location_availability_zone_no = var.az_location_availability_zone_no + + module_var_az_vnet_name = local.az_vnet_name_create_boolean ? 0 : var.az_vnet_name + module_var_az_vnet_name_create_boolean = local.az_vnet_name_create_boolean + + module_var_az_vnet_subnet_name = local.az_vnet_subnet_name_create_boolean ? 0 : var.az_vnet_subnet_name + module_var_az_vnet_subnet_name_create_boolean = local.az_vnet_subnet_name_create_boolean + +} + + +module "run_account_bootstrap_module" { + + depends_on = [ + module.run_account_init_module + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//msazure_vm/account_bootstrap?ref=main" + + module_var_az_resource_group_name = module.run_account_init_module.output_resource_group_name + module_var_resource_prefix = var.resource_prefix + + module_var_az_location_region = var.az_location_region + module_var_az_location_availability_zone_no = var.az_location_availability_zone_no + + module_var_az_vnet_name = module.run_account_init_module.output_vnet_name + module_var_az_vnet_subnet_name = module.run_account_init_module.output_vnet_subnet_name + + module_var_dns_root_domain_name = var.dns_root_domain +} + + +#module "run_account_iam_module" { +# +# depends_on = [ +# module.run_account_bootstrap_module +# ] +# +# count = var.az_iam_yesno == "yes" ? 1 : 0 +# +# source = "github.com/sap-linuxlab/terraform.modules_for_sap//msazure_vm/account_iam?ref=main" +# +# module_var_az_resource_group_name = module.run_account_init_module.output_resource_group_name +# module_var_resource_prefix = var.resource_prefix +# +#} + + +module "run_bastion_inject_module" { + + depends_on = [ + module.run_account_init_module, + module.run_account_bootstrap_module + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//msazure_vm/bastion_inject?ref=main" + + module_var_az_resource_group_name = module.run_account_init_module.output_resource_group_name + module_var_resource_prefix = var.resource_prefix + + module_var_az_location_region = var.az_location_region + module_var_az_location_availability_zone_no = var.az_location_availability_zone_no + + module_var_az_vnet_name = module.run_account_init_module.output_vnet_name + module_var_az_vnet_subnet_name = module.run_account_init_module.output_vnet_subnet_name + + module_var_bastion_user = var.bastion_user + module_var_bastion_ssh_port = var.bastion_ssh_port + module_var_bastion_ssh_key_id = module.run_account_bootstrap_module.output_bastion_ssh_key_id + module_var_bastion_public_ssh_key = module.run_account_bootstrap_module.output_bastion_public_ssh_key + module_var_bastion_private_ssh_key = module.run_account_bootstrap_module.output_bastion_private_ssh_key + + module_var_bastion_os_image = var.map_os_image_regex[var.bastion_os_image] + +} + + +module "run_host_network_access_sap_module" { + + depends_on = [ + module.run_account_init_module, + module.run_account_bootstrap_module, + module.run_bastion_inject_module + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//msazure_vm/host_network_access_sap?ref=main" + + module_var_az_resource_group_name = module.run_account_init_module.output_resource_group_name + + module_var_az_vnet_name = module.run_account_init_module.output_vnet_name + module_var_az_vnet_subnet_name = module.run_account_init_module.output_vnet_subnet_name + + module_var_host_security_group_name = module.run_account_bootstrap_module.output_host_security_group_name + + module_var_sap_nwas_abap_pas_instance_no = var.sap_nwas_abap_pas_instance_no + module_var_sap_hana_instance_no = var.sap_hana_install_instance_number + +} + + +module "run_host_network_access_sap_public_via_proxy_module" { + + depends_on = [ + module.run_account_init_module, + module.run_account_bootstrap_module, + module.run_bastion_inject_module + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//msazure_vm/host_network_access_sap_public_via_proxy?ref=main" + + module_var_az_resource_group_name = module.run_account_init_module.output_resource_group_name + + module_var_az_vnet_name = module.run_account_init_module.output_vnet_name + module_var_az_vnet_subnet_name = module.run_account_init_module.output_vnet_subnet_name + module_var_az_vnet_bastion_subnet_name = module.run_bastion_inject_module.output_vnet_bastion_subnet_name + + module_var_host_security_group_name = module.run_account_bootstrap_module.output_host_security_group_name + module_var_bastion_security_group_name = module.run_bastion_inject_module.output_bastion_security_group_name + module_var_bastion_connection_security_group_name = module.run_bastion_inject_module.output_bastion_connection_security_group_name + + module_var_sap_nwas_abap_pas_instance_no = var.sap_nwas_abap_pas_instance_no + module_var_sap_hana_instance_no = var.sap_hana_install_instance_number + +} + + +module "run_host_provision_module" { + + depends_on = [ + module.run_account_init_module, + module.run_account_bootstrap_module, + module.run_bastion_inject_module + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//msazure_vm/host_provision?ref=main" + + + module_var_az_resource_group_name = module.run_account_init_module.output_resource_group_name + module_var_resource_prefix = var.resource_prefix + + module_var_az_location_region = var.az_location_region + module_var_az_location_availability_zone_no = var.az_location_availability_zone_no + + module_var_az_vnet_name = module.run_account_init_module.output_vnet_name + module_var_az_vnet_subnet_name = module.run_account_init_module.output_vnet_subnet_name + + module_var_bastion_user = var.bastion_user + module_var_bastion_ssh_port = var.bastion_ssh_port + module_var_bastion_private_ssh_key = module.run_account_bootstrap_module.output_bastion_private_ssh_key + module_var_bastion_ip = module.run_bastion_inject_module.output_bastion_ip + module_var_bastion_connection_sg_id = module.run_bastion_inject_module.output_bastion_connection_security_group_id + + module_var_host_ssh_key_id = module.run_account_bootstrap_module.output_host_ssh_key_id + module_var_host_ssh_public_key = module.run_account_bootstrap_module.output_host_public_ssh_key + module_var_host_ssh_private_key = module.run_account_bootstrap_module.output_host_private_ssh_key + module_var_host_sg_id = module.run_account_bootstrap_module.output_host_security_group_id + + module_var_host_os_image = var.map_os_image_regex[var.host_os_image] + + module_var_dns_zone_name = module.run_account_bootstrap_module.output_dns_zone_name + module_var_dns_root_domain_name = var.dns_root_domain + + + # Set Terraform Module Variables using for_each loop on a map Terraform Variable with nested objects + + for_each = toset([ + for key, value in var.map_host_specifications[var.host_specification_plan] : key + ]) + + module_var_host_name = each.key + + module_var_az_vm_instance = var.map_host_specifications[var.host_specification_plan][each.key].vm_instance + + module_var_disk_volume_count_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data + module_var_disk_volume_type_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_hana_data + module_var_disk_volume_capacity_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_hana_data + module_var_disk_volume_iops_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_hana_data == "custom" ? var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_iops_hana_data : null + module_var_lvm_enable_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? false : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_data + module_var_lvm_pv_data_alignment_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_data ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_pv_data_alignment_hana_data : 0 + module_var_lvm_vg_data_alignment_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_data ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_data_alignment_hana_data : 0 + module_var_lvm_vg_physical_extent_size_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_data ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_physical_extent_size_hana_data : 0 + module_var_lvm_lv_stripe_size_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_data ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_lv_stripe_size_hana_data : 0 + module_var_filesystem_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].filesystem_hana_data + module_var_physical_partition_filesystem_block_size_hana_data = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_data == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_data ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].physical_partition_filesystem_block_size_hana_data + + module_var_disk_volume_count_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log + module_var_disk_volume_type_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_hana_log + module_var_disk_volume_capacity_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_hana_log + module_var_disk_volume_iops_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_hana_log == "custom" ? var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_iops_hana_log : null + module_var_lvm_enable_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? false : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_log + module_var_lvm_pv_data_alignment_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_log ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_pv_data_alignment_hana_log : 0 + module_var_lvm_vg_data_alignment_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_log ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_data_alignment_hana_log : 0 + module_var_lvm_vg_physical_extent_size_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_log ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_physical_extent_size_hana_log : 0 + module_var_lvm_lv_stripe_size_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_log ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_lv_stripe_size_hana_log : 0 + module_var_filesystem_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].filesystem_hana_log + module_var_physical_partition_filesystem_block_size_hana_log = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_log == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_log ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].physical_partition_filesystem_block_size_hana_log + + module_var_disk_volume_count_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared + module_var_disk_volume_type_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_hana_shared + module_var_disk_volume_capacity_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_hana_shared + module_var_disk_volume_iops_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_hana_shared == "custom" ? var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_iops_hana_shared : null + module_var_lvm_enable_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? false : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_shared + module_var_lvm_pv_data_alignment_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_shared ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_pv_data_alignment_hana_shared : 0 + module_var_lvm_vg_data_alignment_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_shared ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_data_alignment_hana_shared : 0 + module_var_lvm_vg_physical_extent_size_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_shared ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_physical_extent_size_hana_shared : 0 + module_var_lvm_lv_stripe_size_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_shared ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_lv_stripe_size_hana_shared : 0 + module_var_filesystem_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].filesystem_hana_shared + module_var_physical_partition_filesystem_block_size_hana_shared = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_hana_shared == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_hana_shared ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].physical_partition_filesystem_block_size_hana_shared + + module_var_disk_volume_count_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb + module_var_disk_volume_type_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_anydb + module_var_disk_volume_capacity_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_anydb + module_var_disk_volume_iops_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_anydb == "custom" ? var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_iops_anydb : null + module_var_lvm_enable_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? false : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_anydb + module_var_lvm_pv_data_alignment_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_anydb ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_pv_data_alignment_anydb : 0 + module_var_lvm_vg_data_alignment_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_anydb ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_data_alignment_anydb : 0 + module_var_lvm_vg_physical_extent_size_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_anydb ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_vg_physical_extent_size_anydb : 0 + module_var_lvm_lv_stripe_size_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_anydb ? var.map_host_specifications[var.host_specification_plan][each.key].lvm_lv_stripe_size_anydb : 0 + module_var_filesystem_mount_path_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].filesystem_mount_path_anydb + module_var_filesystem_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].filesystem_anydb + module_var_physical_partition_filesystem_block_size_anydb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_anydb == 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].lvm_enable_anydb ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].physical_partition_filesystem_block_size_anydb + + module_var_disk_volume_count_usr_sap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_usr_sap + module_var_disk_volume_type_usr_sap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_usr_sap + module_var_disk_volume_capacity_usr_sap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_usr_sap + module_var_filesystem_usr_sap = var.map_host_specifications[var.host_specification_plan][each.key].filesystem_usr_sap + + module_var_disk_volume_count_sapmnt = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_sapmnt + module_var_disk_volume_type_sapmnt = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_sapmnt + module_var_disk_volume_capacity_sapmnt = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_sapmnt + module_var_filesystem_sapmnt = var.map_host_specifications[var.host_specification_plan][each.key].filesystem_sapmnt + + module_var_disk_swapfile_size_gb = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_swap > 0 ? 0 : var.map_host_specifications[var.host_specification_plan][each.key].disk_swapfile_size_gb + module_var_disk_volume_count_swap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_swap + module_var_disk_volume_type_swap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_swap > 0 ? var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_type_swap : 0 + module_var_disk_volume_capacity_swap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_swap > 0 ? var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_capacity_swap : 0 + module_var_filesystem_swap = var.map_host_specifications[var.host_specification_plan][each.key].disk_volume_count_swap > 0 ? var.map_host_specifications[var.host_specification_plan][each.key].filesystem_swap : 0 + + module_var_disk_volume_capacity_software = var.disk_volume_capacity_software + module_var_sap_software_download_directory = var.sap_software_download_directory + +} + + +module "run_ansible_sap_ecc_hana_install" { + + depends_on = [ + module.run_host_provision_module + ] + + source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_hana_install?ref=main" + + # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) + module_var_bastion_boolean = true // required as true boolean for any Cloud Service Provider (CSP) + module_var_bastion_user = var.bastion_user + module_var_bastion_ssh_port = var.bastion_ssh_port + module_var_bastion_private_ssh_key = module.run_account_bootstrap_module.output_bastion_private_ssh_key + + module_var_bastion_floating_ip = module.run_bastion_inject_module.output_bastion_ip + + module_var_host_private_ssh_key = module.run_account_bootstrap_module.output_host_private_ssh_key + + + # Set Terraform Module Variables using for_each loop on a map Terraform Variable at runtime + + for_each = module.run_host_provision_module + module_var_host_private_ip = join(", ", each.value.*.output_host_private_ip) + module_var_hostname = join(", ", each.value.*.output_host_name) + module_var_dns_root_domain_name = var.dns_root_domain + + module_var_sap_id_user = var.sap_id_user + module_var_sap_id_user_password = var.sap_id_user_password + + module_var_sap_hana_install_master_password = var.sap_hana_install_master_password + module_var_sap_hana_install_sid = var.sap_hana_install_sid + module_var_sap_hana_install_instance_number = var.sap_hana_install_instance_number + + module_var_sap_swpm_sid = var.sap_ecc_hana_install_sid + + module_var_sap_swpm_db_schema_abap = "SAPHANADB" + module_var_sap_swpm_db_schema_abap_password = var.sap_hana_install_master_password + module_var_sap_swpm_db_system_password = var.sap_hana_install_master_password + module_var_sap_swpm_db_systemdb_password = var.sap_hana_install_master_password + module_var_sap_swpm_db_sidadm_password = var.sap_hana_install_master_password + module_var_sap_swpm_ddic_000_password = var.sap_hana_install_master_password + module_var_sap_swpm_pas_instance_nr = var.sap_nwas_abap_pas_instance_no + module_var_sap_swpm_ascs_instance_nr = var.sap_nwas_abap_ascs_instance_no + + module_var_sap_swpm_master_password = var.sap_hana_install_master_password + + module_var_sap_swpm_template_selected = var.sap_swpm_template_selected + + module_var_sap_software_download_directory = var.sap_software_download_directory + +} \ No newline at end of file diff --git a/sap_ecc_hana_install/msazure_vm/outputs.tf b/sap_ecc_hana_install/msazure_vm/outputs.tf new file mode 100644 index 0000000..f4f4d5f --- /dev/null +++ b/sap_ecc_hana_install/msazure_vm/outputs.tf @@ -0,0 +1,235 @@ + +############################################################## +# Export SSH key to file on local +############################################################## + +# Use path object to store key files temporarily in root of execution - https://www.terraform.io/docs/language/expressions/references.html#filesystem-and-workspace-info +resource "local_file" "bastion_rsa" { + content = module.run_account_bootstrap_module.output_bastion_private_ssh_key + filename = "${path.root}/ssh/bastion_rsa" + file_permission = "0400" +} + +# Use path object to store key files temporarily in root of execution - https://www.terraform.io/docs/language/expressions/references.html#filesystem-and-workspace-info +resource "local_file" "hosts_rsa" { + content = module.run_account_bootstrap_module.output_host_private_ssh_key + filename = "${path.root}/ssh/hosts_rsa" + file_permission = "0400" +} + + +output "ssh_sap_connection_details" { + value = local.is_wsl ? "IGNORE" : <>> Chosen option $REPLY: $opt" + select opt_ip in "$${target_host_array[@]}"; do + if [ $opt_ip = "Quit" ]; then break 2; fi + target_ip=$opt_ip + echo "---- Selected option $REPLY, tunneling into $target_ip ----" + break + done + echo "" + echo "#### For SAP HANA Studio, use Add System with host name as localhost; do not add port numbers." + echo "#### If selecting 'Connect using SSL' on Connection Properties, then on Additional Properties (final) screen deselect 'Validate the SSL certificate'" + echo "" + echo "#### For SAPGUI, use expert mode SAP Logon String as: ####" + echo "conn=/H/localhost/S/32$sap_nwas_abap_pas_instance_no&expert=true" + echo "" + # SSH port forward binding, using -L local_host:local_port:remote_host:remote_port (add -vv for debugging) + ssh -N \ + $bastion_user@$bastion_host -p $bastion_port -i $bastion_private_key_file \ + -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \ + -L localhost:32$sap_nwas_abap_pas_instance_no:$target_ip:32$sap_nwas_abap_pas_instance_no \ + -L localhost:33$sap_nwas_abap_pas_instance_no:$target_ip:33$sap_nwas_abap_pas_instance_no \ + -L localhost:3$${sap_hana_instance_no}13:$target_ip:3$${sap_hana_instance_no}13 \ + -L localhost:3$${sap_hana_instance_no}15:$target_ip:3$${sap_hana_instance_no}15 \ + -L localhost:3$${sap_hana_instance_no}41:$target_ip:3$${sap_hana_instance_no}41 \ + -L localhost:443$sap_hana_instance_no:$target_ip:443$sap_hana_instance_no \ + -L localhost:443$sap_nwas_abap_pas_instance_no:$target_ip:443$sap_nwas_abap_pas_instance_no \ + -L localhost:5$${sap_hana_instance_no}13:$target_ip:5$${sap_hana_instance_no}13 \ + -L localhost:5$${sap_hana_instance_no}14:$target_ip:5$${sap_hana_instance_no}14 + break + ;; + "OS root access, via SSH stdin/stdout forwarding proxy") + echo ">>> Chosen option $REPLY: $opt" + select opt_ssh in "$${target_host_array[@]}"; do + if [ $opt_ssh = "Quit" ]; then break 2; fi + target_ip=$opt_ssh + echo "---- Selected option $REPLY, logging into $target_ip ----" + break + done + + if [ -n "$target_ip" ]; then + ssh -i $target_private_key_file root@$target_ip -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \ + -o ProxyCommand="ssh -W %h:%p $bastion_user@$bastion_host -p $bastion_port -i $bastion_private_key_file -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" + fi + break + ;; + "Quit") + break + ;; + *) echo "Invalid option $REPLY" ;; + esac + done +} + +# Then call shell function and select which target +sshjump + +EOF +} + + +# If detected Windows WSL2, then find the installed name using external resource to return a JSON string +data "external" "wsl_distro_name" { + count = local.is_wsl ? 1 : 0 + program = ["bash", "-c", "echo \"{\\\"stdout\\\":\\\"$(echo $WSL_DISTRO_NAME)\\\"}\""] +} + +output "ssh_sap_connection_details_windows" { + value = local.not_wsl ? "IGNORE" : <>> Chosen option $(PSItem)" + echo "" + echo "#### For SAP HANA Studio, use Add System with host name as localhost; do not add port numbers." + echo "#### If selecting 'Connect using SSL' on Connection Properties, then on Additional Properties (final) screen deselect 'Validate the SSL certificate'" + echo "" + echo "#### For SAPGUI, use expert mode SAP Logon String as: ####" + echo "conn=/H/localhost/S/32$sap_nwas_abap_pas_instance_no&expert=true" + echo "" + # SSH port forward binding, using -L local_host:local_port:remote_host:remote_port (add -vv for debugging) + ssh -N ` + $bastion_user@$bastion_host -p $bastion_port -i $temp_bastion_private_key_file ` + -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ` + -L localhost:32$${sap_nwas_abap_pas_instance_no}:$${target_ip}:32$${sap_nwas_abap_pas_instance_no} ` + -L localhost:33$${sap_nwas_abap_pas_instance_no}:$${target_ip}:33$${sap_nwas_abap_pas_instance_no} ` + -L localhost:3$${sap_hana_instance_no}13:$${target_ip}:3$${sap_hana_instance_no}13 ` + -L localhost:3$${sap_hana_instance_no}15:$${target_ip}:3$${sap_hana_instance_no}15 ` + -L localhost:3$${sap_hana_instance_no}41:$${target_ip}:3$${sap_hana_instance_no}41 ` + -L localhost:443$${sap_hana_instance_no}:$${target_ip}:443$${sap_hana_instance_no} ` + -L localhost:443$${sap_nwas_abap_pas_instance_no}:$${target_ip}:443$${sap_nwas_abap_pas_instance_no} ` + -L localhost:5$${sap_hana_instance_no}13:$${target_ip}:5$${sap_hana_instance_no}13 ` + -L localhost:5$${sap_hana_instance_no}14:$${target_ip}:5$${sap_hana_instance_no}14 + } + } + 2 { + foreach ($target_host in $target_host_array) { + $i=$target_host_array.IndexOf($target_host) + echo "$i) $target_host" + } + $target_host_selection = Read-Host "Please make a selection" + if ($target_host_array[$target_host_selection] -eq "Quit" ){ + break + }else { + $target_ip = $target_host_array[$target_host_selection] + #echo ">>> Chosen option $(PSItem)" + ssh -i $temp_target_private_key_file root@$target_ip -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ` + -o ProxyCommand="ssh -W %h:%p $bastion_user@$bastion_host -p $bastion_port -i $temp_bastion_private_key_file ` + -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" + } + } + 3 { + break + } + } +} + +EOF + +} diff --git a/sap_ecc_hana_install/msazure_vm/variable_locals.tf b/sap_ecc_hana_install/msazure_vm/variable_locals.tf new file mode 100644 index 0000000..ff321be --- /dev/null +++ b/sap_ecc_hana_install/msazure_vm/variable_locals.tf @@ -0,0 +1,21 @@ +locals { + + resource_group_create_boolean = var.az_resource_group_name == "new" ? true : false + + az_vnet_name_create_boolean = var.az_vnet_name == "new" ? true : false + + az_vnet_subnet_name_create_boolean = var.az_vnet_subnet_name == "new" ? true : false + + # Directories start with "C:..." on Windows; All other OSs use "/" for root. + detect_windows = substr(pathexpand("~"), 0, 1) == "/" ? false : true + detect_shell = substr(pathexpand("~"), 0, 1) == "/" ? true : false + + # Used for displaying Shell ssh connection output + # /proc/version contains WSL subsstring, if detected then running Windows Subsystem for Linux + not_wsl = fileexists("/proc/version") ? length(regexall("WSL", file("/proc/version"))) > 0 ? false : true : true + + # Used for displaying Windows PowerShell ssh connection output + # /proc/version contains WSL subsstring, if detected then running Windows Subsystem for Linux + is_wsl = fileexists("/proc/version") ? length(regexall("WSL", file("/proc/version"))) > 0 ? true : false : false + +} diff --git a/sap_ecc_hana_install/msazure_vm/variable_map_hosts.tf b/sap_ecc_hana_install/msazure_vm/variable_map_hosts.tf new file mode 100644 index 0000000..79c3b25 --- /dev/null +++ b/sap_ecc_hana_install/msazure_vm/variable_map_hosts.tf @@ -0,0 +1,76 @@ + +variable "map_host_specifications" { + + description = "Map of host specficiations for SAP NetWeaver AS (ABAP) with SAP HANA single node install" + + type = map(any) + + default = { + + small_256gb = { + + nw01 = { // Hostname + vm_instance = "Standard_M32ls" + + // N.B. all capacities must be different from each other, due to Shell loop searching based on capacity GB + + disk_volume_count_hana_data = 4 + disk_volume_type_hana_data = "P6" + disk_volume_capacity_hana_data = 64 + #disk_volume_iops_hana_data = + lvm_enable_hana_data = true // if false, then disk volume count should be 1 + lvm_pv_data_alignment_hana_data = "1M" //default 1MiB offset from disk start before first LVM PV Physical Extent. + lvm_vg_data_alignment_hana_data = "1M" //default 1MiB offset from disk start before first LVM VG Physical Extent. + lvm_vg_physical_extent_size_hana_data = "4M" //default 4MiB, difficult to change once set. Akin to Physical Block Size. + lvm_lv_stripe_size_hana_data = "64K" //default 64KiB. Akin to Virtualized Block Size. + filesystem_hana_data = "xfs" + #physical_partition_filesystem_block_size_hana_data = "4k" // only if LVM is set to false; if XFS then only 4k value allowed otherwise will be overridden (see README about XFS and Page Size) + + disk_volume_count_hana_log = 3 + disk_volume_type_hana_log = "P10" + disk_volume_capacity_hana_log = 128 + #disk_volume_iops_hana_log = + lvm_enable_hana_log = true // if false, then disk volume count should be 1 + lvm_pv_data_alignment_hana_log = "1M" //default 1MiB offset from disk start before first LVM PV Physical Extent. + lvm_vg_data_alignment_hana_log = "1M" //default 1MiB offset from disk start before first LVM VG Physical Extent. + lvm_vg_physical_extent_size_hana_log = "4M" //default 4MiB, difficult to change once set. Akin to Physical Block Size. + lvm_lv_stripe_size_hana_log = "64K" //default 64KiB. Akin to Virtualized Block Size. + filesystem_hana_log = "xfs" + #physical_partition_filesystem_block_size_hana_log = "4k" // only if LVM is set to false; if XFS then only 4k value allowed otherwise will be overridden (see README about XFS and Page Size) + + disk_volume_count_hana_shared = 1 + disk_volume_type_hana_shared = "P15" // Uses Burst IOPS for storage. May increase costs if there is consistent heavy usage (e.g. longer than 30mins burst, such as 200GB+ DB Backup Restore) + disk_volume_capacity_hana_shared = 256 + #disk_volume_iops_hana_shared = + lvm_enable_hana_shared = false // if false, then disk volume count should be 1 + #lvm_pv_data_alignment_hana_shared = "1M" //default 1MiB offset from disk start before first LVM PV Physical Extent. + #lvm_vg_data_alignment_hana_shared = "1M" //default 1MiB offset from disk start before first LVM VG Physical Extent. + #lvm_vg_physical_extent_size_hana_shared = "4M" //default 4MiB, difficult to change once set. Akin to Physical Block Size. + #lvm_lv_stripe_size_hana_shared = "64K" //default 64KiB. Akin to Virtualized Block Size. + filesystem_hana_shared = "xfs" + physical_partition_filesystem_block_size_hana_shared = "4k" // only if LVM is set to false; if XFS then only 4k value allowed otherwise will be overridden (see README about XFS and Page Size) + + disk_volume_count_anydb = 0 + + disk_volume_count_usr_sap = 1 // max of 1 + disk_volume_type_usr_sap = "E20" + disk_volume_capacity_usr_sap = 512 + filesystem_usr_sap = "xfs" + + disk_volume_count_sapmnt = 1 // max of 1 + disk_volume_type_sapmnt = "E4" + disk_volume_capacity_sapmnt = 32 // bad sizing, but use this so each drive size is unique + filesystem_sapmnt = "xfs" + + #disk_swapfile_size_gb = 2 // not required if disk volume set + disk_volume_count_swap = 1 // max of 1 + disk_volume_type_swap = "E3" + disk_volume_capacity_swap = 16 // bad sizing, but use this so each drive size is unique + filesystem_swap = "xfs" + } + + } + + } + +} diff --git a/sap_ecc_hana_install/msazure_vm/variable_map_os.tf b/sap_ecc_hana_install/msazure_vm/variable_map_os.tf new file mode 100644 index 0000000..010c0a6 --- /dev/null +++ b/sap_ecc_hana_install/msazure_vm/variable_map_os.tf @@ -0,0 +1,59 @@ + +# Find latest OS Image for RHEL +# az account list-locations | jq .[].displayName +# az vm image list --all --publisher redhat --offer RHEL-SAP-APPS --sku 8 --query "[?starts_with(version,'8.4')]" | jq .[].version --raw-output | sort -r | head -1 +# az vm image list --all --publisher redhat --offer RHEL-SAP-HA --sku 8 --query "[?starts_with(version,'8.4')]" | jq .[].version --raw-output | sort -r | head -1 + +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-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" + } + + } + +} diff --git a/sap_ecc_hana_install/msazure_vm/variables.tf b/sap_ecc_hana_install/msazure_vm/variables.tf new file mode 100644 index 0000000..469c146 --- /dev/null +++ b/sap_ecc_hana_install/msazure_vm/variables.tf @@ -0,0 +1,140 @@ + +variable "az_tenant_id" { + description = "Azure Tenant ID" +} + +variable "az_subscription_id" { + description = "Azure Subscription ID" +} + +variable "az_app_client_id" { + description = "Azure AD App Client ID" +} + +variable "az_app_client_secret" { + description = "Azure AD App Client Secret" +} + +variable "resource_prefix" { + description = "Enter prefix to resource names" +} + +variable "az_resource_group_name" { + description = "Enter existing/target Azure Resource Group name, or enter 'new' to create a Resource Group using the defined prefix for all resources" +} + +variable "az_location_region" { + description = "Target Azure Region aka. Azure Location Display Name (e.g. 'West Europe')" +} + +variable "az_location_availability_zone_no" { + description = "Target Azure Availability Zone (e.g. 1)" +} + +variable "az_vnet_name" { + description = "Enter existing/target Azure VNet name, or enter 'new' to create a VPC with a default VPC Address Prefix Range (cannot be 'new' if using existing VNet Subnet)" +} + +variable "az_vnet_subnet_name" { + description = "Enter existing/target Azure VNet Subnet name, or enter 'new' to create a VPC with a default VPC Address Prefix Range (if using existing VNet, ensure default subnet range matches to VNet address space and does not conflict with existing Subnet)" +} + +variable "dns_root_domain" { + description = "Root Domain for Private DNS used with the Virtual Machine" +} + +variable "bastion_os_image" { + description = "Bastion OS Image. This variable uses the locals mapping with regex of OS Images, and will alter bastion provisioning." +} + +variable "bastion_user" { + description = "OS User to create on Bastion host to avoid pass-through root user (e.g. bastionuser)" +} + +variable "bastion_ssh_port" { + type = number + description = "Bastion host SSH Port from IANA Dynamic Ports range (49152 to 65535)" + + #validation { + # condition = var.bastion_ssh_port > 49152 && var.bastion_ssh_port < 65535 + # error_message = "Bastion host SSH Port must fall within IANA Dynamic Ports range (49152 to 65535)." + #} +} + +variable "host_specification_plan" { + description = "Host specification plans are small_256gb. This variable uses the locals mapping with a nested list of host specifications, and will alter host provisioning." +} + +variable "host_os_image" { + description = "Host OS Image. This variable uses the locals mapping with regex of OS Images, and will alter host provisioning." +} + +variable "disk_volume_capacity_software" { + type = number + description = "Disk volume capacity for downloads of SAP Software" +} + +variable "sap_software_download_directory" { + description = "Mount point for downloads of SAP Software" + + validation { + error_message = "Directory must start with forward slash." + condition = can(regex("^/", var.sap_software_download_directory)) + } + +} + + +variable "sap_id_user" { + description = "Ansible - Please enter your SAP ID user (e.g. S-User)" +} + +variable "sap_id_user_password" { + description = "Ansible - Please enter your SAP ID password" +} + +variable "sap_hana_install_master_password" { + description = "Ansible - SAP HANA install: set common initial password (e.g. NewPass$321)" +} + +variable "sap_hana_install_sid" { + description = "Ansible - SAP HANA install: System ID (e.g. H01)" +} + +variable "sap_hana_install_instance_number" { + description = "Ansible - SAP HANA install: Instance Number (e.g. 90)" + + validation { + error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." + condition = !can(regex("(43|89)", var.sap_hana_install_instance_number)) + } + +} + +variable "sap_swpm_template_selected" { + description = "Ansible - Select template to use: sap_ecc6_ehp8_hana_onehost, sap_ecc6_ehp7_hana_onehost" +} + +variable "sap_ecc_hana_install_sid" { + description = "Ansible - SAP ECC on HANA install: System ID (e.g. E01)" +} + +variable "sap_nwas_abap_ascs_instance_no" { + description = "Ansible - SAP NetWeaver AS (ABAP) - ABAP Central Services (ASCS) instance number" + + validation { + error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." + condition = !can(regex("(43|89)", var.sap_nwas_abap_ascs_instance_no)) + } + +} + +variable "sap_nwas_abap_pas_instance_no" { + description = "Ansible - SAP NetWeaver AS (ABAP) - Primary Application Server instance number" + + validation { + error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." + condition = !can(regex("(43|89)", var.sap_nwas_abap_pas_instance_no)) + } + +} diff --git a/sap_ecc_hana_install/msazure_vm/variables_generic_for_cli.tfvars b/sap_ecc_hana_install/msazure_vm/variables_generic_for_cli.tfvars new file mode 100644 index 0000000..d28ad8f --- /dev/null +++ b/sap_ecc_hana_install/msazure_vm/variables_generic_for_cli.tfvars @@ -0,0 +1,29 @@ +resource_prefix = "sap" + +dns_root_domain = "poc.cloud" + +bastion_os_image = "rhel-8-4" + +bastion_user = "bastionuser" + +bastion_ssh_port = 50222 + +host_specification_plan = "small_256gb" + +host_os_image = "rhel-8-4-sap-ha" + +disk_volume_capacity_software = 200 + +sap_hana_install_master_password = "NewPass$321" + +sap_hana_install_sid = "H01" + +sap_hana_install_instance_number = "90" + +sap_nwas_abap_ascs_instance_no = "01" + +sap_nwas_abap_pas_instance_no = "00" + +sap_ecc_hana_install_sid = "E01" + +sap_software_download_directory = "/software" diff --git a/sap_ecc_hana_install/msazure_vm/versions.tf b/sap_ecc_hana_install/msazure_vm/versions.tf new file mode 100644 index 0000000..74aaca6 --- /dev/null +++ b/sap_ecc_hana_install/msazure_vm/versions.tf @@ -0,0 +1,28 @@ +# Terraform declaration +terraform { + required_version = ">= 1.0" + required_providers { + azurerm = { + #source = "localdomain/provider/azurerm" // Local, on macOS path to place files would be $HOME/.terraform.d/plugins/localdomain/provider/azurerm/1.xx.xx/darwin_amd6 + source = "hashicorp/azurerm" // Terraform Registry + version = ">=2.90.0" + } + } +} + +# Terraform Provider declaration + +provider "azurerm" { + + features {} + + tenant_id = var.az_tenant_id // Azure Tenant ID, linked to the Azure Active Directory instance + subscription_id = var.az_subscription_id // Azure Subscription ID, linked to an Azure Tenant. All resource groups belong to the Azure Subscription. + + client_id = var.az_app_client_id // Azure Client ID, defined in the Azure Active Directory instance; equivalent to Active Directory Application ID. + client_secret = var.az_app_client_secret // Azure Application ID Password, defined in the Azure Active Directory instance + + # Role-based Access Control (RBAC) permissions control the actions for resources within the Azure Subscription. + # The Roles are assigned to a Security Principal - which can be a User, Group, Service Principal or Managed Identity. + +} diff --git a/sap_ecc_hana_single_node_system_copy_homogeneous_hdb/ibmcloud_powervs/variables.tf b/sap_ecc_hana_single_node_system_copy_homogeneous_hdb/ibmcloud_powervs/variables.tf index a75ecc2..285d38b 100644 --- a/sap_ecc_hana_single_node_system_copy_homogeneous_hdb/ibmcloud_powervs/variables.tf +++ b/sap_ecc_hana_single_node_system_copy_homogeneous_hdb/ibmcloud_powervs/variables.tf @@ -108,7 +108,7 @@ variable "sap_hana_install_sid" { } variable "sap_hana_install_instance_number" { - description = "Ansible - SAP HANA install: Instance Number (e.g. 10)" + description = "Ansible - SAP HANA install: Instance Number (e.g. 90)" validation { error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." diff --git a/sap_ecc_hana_single_node_system_copy_homogeneous_hdb/ibmcloud_powervs/variables_generic_for_cli.tfvars b/sap_ecc_hana_single_node_system_copy_homogeneous_hdb/ibmcloud_powervs/variables_generic_for_cli.tfvars index da357d4..8672c1c 100644 --- a/sap_ecc_hana_single_node_system_copy_homogeneous_hdb/ibmcloud_powervs/variables_generic_for_cli.tfvars +++ b/sap_ecc_hana_single_node_system_copy_homogeneous_hdb/ibmcloud_powervs/variables_generic_for_cli.tfvars @@ -22,7 +22,7 @@ sap_hana_install_master_password = "NewPass$321" sap_hana_install_sid = "H01" -sap_hana_install_instance_number = "10" +sap_hana_install_instance_number = "90" sap_nwas_abap_ascs_instance_no = "01" diff --git a/sap_ecc_hana_single_node_system_copy_homogeneous_hdb/ibmcloud_vs/variables.tf b/sap_ecc_hana_single_node_system_copy_homogeneous_hdb/ibmcloud_vs/variables.tf index 05b14c9..d9e027f 100644 --- a/sap_ecc_hana_single_node_system_copy_homogeneous_hdb/ibmcloud_vs/variables.tf +++ b/sap_ecc_hana_single_node_system_copy_homogeneous_hdb/ibmcloud_vs/variables.tf @@ -100,7 +100,7 @@ variable "sap_hana_install_sid" { } variable "sap_hana_install_instance_number" { - description = "Ansible - SAP HANA install: Instance Number (e.g. 10)" + description = "Ansible - SAP HANA install: Instance Number (e.g. 90)" validation { error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." diff --git a/sap_ecc_hana_single_node_system_copy_homogeneous_hdb/ibmcloud_vs/variables_generic_for_cli.tfvars b/sap_ecc_hana_single_node_system_copy_homogeneous_hdb/ibmcloud_vs/variables_generic_for_cli.tfvars index c652bf5..2b7c042 100644 --- a/sap_ecc_hana_single_node_system_copy_homogeneous_hdb/ibmcloud_vs/variables_generic_for_cli.tfvars +++ b/sap_ecc_hana_single_node_system_copy_homogeneous_hdb/ibmcloud_vs/variables_generic_for_cli.tfvars @@ -22,7 +22,7 @@ sap_hana_install_master_password = "NewPass$321" sap_hana_install_sid = "H01" -sap_hana_install_instance_number = "10" +sap_hana_install_instance_number = "90" sap_nwas_abap_ascs_instance_no = "01" diff --git a/sap_hana_single_node_install/aws_ec2_instance/variables.tf b/sap_hana_single_node_install/aws_ec2_instance/variables.tf index 4ed3988..0a619c0 100644 --- a/sap_hana_single_node_install/aws_ec2_instance/variables.tf +++ b/sap_hana_single_node_install/aws_ec2_instance/variables.tf @@ -87,7 +87,7 @@ variable "sap_hana_install_sid" { } variable "sap_hana_install_instance_number" { - description = "Ansible - SAP HANA install: Instance Number (e.g. 10)" + description = "Ansible - SAP HANA install: Instance Number (e.g. 90)" validation { error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." diff --git a/sap_hana_single_node_install/aws_ec2_instance/variables_generic_for_cli.tfvars b/sap_hana_single_node_install/aws_ec2_instance/variables_generic_for_cli.tfvars index beeb797..bea059e 100644 --- a/sap_hana_single_node_install/aws_ec2_instance/variables_generic_for_cli.tfvars +++ b/sap_hana_single_node_install/aws_ec2_instance/variables_generic_for_cli.tfvars @@ -20,6 +20,6 @@ sap_hana_install_master_password = "NewPass$321" sap_hana_install_sid = "H01" -sap_hana_install_instance_number = "10" +sap_hana_install_instance_number = "90" sap_software_download_directory = "/software" diff --git a/sap_hana_single_node_install/ibmcloud_powervs/variables.tf b/sap_hana_single_node_install/ibmcloud_powervs/variables.tf index 2e23917..5bb48d5 100644 --- a/sap_hana_single_node_install/ibmcloud_powervs/variables.tf +++ b/sap_hana_single_node_install/ibmcloud_powervs/variables.tf @@ -104,7 +104,7 @@ variable "sap_hana_install_sid" { } variable "sap_hana_install_instance_number" { - description = "Ansible - SAP HANA install: Instance Number (e.g. 10)" + description = "Ansible - SAP HANA install: Instance Number (e.g. 90)" validation { error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." diff --git a/sap_hana_single_node_install/ibmcloud_powervs/variables_generic_for_cli.tfvars b/sap_hana_single_node_install/ibmcloud_powervs/variables_generic_for_cli.tfvars index df0daff..f7d81de 100644 --- a/sap_hana_single_node_install/ibmcloud_powervs/variables_generic_for_cli.tfvars +++ b/sap_hana_single_node_install/ibmcloud_powervs/variables_generic_for_cli.tfvars @@ -22,6 +22,6 @@ sap_hana_install_master_password = "NewPass$321" sap_hana_install_sid = "H01" -sap_hana_install_instance_number = "10" +sap_hana_install_instance_number = "90" sap_software_download_directory = "/software" diff --git a/sap_hana_single_node_install/ibmcloud_vs/variables.tf b/sap_hana_single_node_install/ibmcloud_vs/variables.tf index 6b68bb5..940c64b 100644 --- a/sap_hana_single_node_install/ibmcloud_vs/variables.tf +++ b/sap_hana_single_node_install/ibmcloud_vs/variables.tf @@ -96,7 +96,7 @@ variable "sap_hana_install_sid" { } variable "sap_hana_install_instance_number" { - description = "Ansible - SAP HANA install: Instance Number (e.g. 10)" + description = "Ansible - SAP HANA install: Instance Number (e.g. 90)" validation { error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." diff --git a/sap_hana_single_node_install/ibmcloud_vs/variables_generic_for_cli.tfvars b/sap_hana_single_node_install/ibmcloud_vs/variables_generic_for_cli.tfvars index b97c6e9..826a0f4 100644 --- a/sap_hana_single_node_install/ibmcloud_vs/variables_generic_for_cli.tfvars +++ b/sap_hana_single_node_install/ibmcloud_vs/variables_generic_for_cli.tfvars @@ -22,6 +22,6 @@ sap_hana_install_master_password = "NewPass$321" sap_hana_install_sid = "H01" -sap_hana_install_instance_number = "10" +sap_hana_install_instance_number = "90" sap_software_download_directory = "/software" diff --git a/sap_hana_single_node_install/ibmpowervc/variables.tf b/sap_hana_single_node_install/ibmpowervc/variables.tf index 5ecf2ad..93ecef0 100644 --- a/sap_hana_single_node_install/ibmpowervc/variables.tf +++ b/sap_hana_single_node_install/ibmpowervc/variables.tf @@ -136,7 +136,7 @@ variable "sap_hana_install_sid" { } variable "sap_hana_install_instance_number" { - description = "Ansible - SAP HANA install: Instance Number (e.g. 10)" + description = "Ansible - SAP HANA install: Instance Number (e.g. 90)" validation { error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." diff --git a/sap_hana_single_node_install/ibmpowervc/variables_generic_for_cli.tfvars b/sap_hana_single_node_install/ibmpowervc/variables_generic_for_cli.tfvars index d809a62..07f844e 100644 --- a/sap_hana_single_node_install/ibmpowervc/variables_generic_for_cli.tfvars +++ b/sap_hana_single_node_install/ibmpowervc/variables_generic_for_cli.tfvars @@ -10,6 +10,6 @@ sap_hana_install_master_password = "NewPass$321" sap_hana_install_sid = "H01" -sap_hana_install_instance_number = "10" +sap_hana_install_instance_number = "90" sap_software_download_directory = "/software" diff --git a/sap_hana_single_node_install/msazure_vm/variables.tf b/sap_hana_single_node_install/msazure_vm/variables.tf index c1bf573..70d7fd9 100644 --- a/sap_hana_single_node_install/msazure_vm/variables.tf +++ b/sap_hana_single_node_install/msazure_vm/variables.tf @@ -102,7 +102,7 @@ variable "sap_hana_install_sid" { } variable "sap_hana_install_instance_number" { - description = "Ansible - SAP HANA install: Instance Number (e.g. 10)" + description = "Ansible - SAP HANA install: Instance Number (e.g. 90)" validation { error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." diff --git a/sap_hana_single_node_install/msazure_vm/variables_generic_for_cli.tfvars b/sap_hana_single_node_install/msazure_vm/variables_generic_for_cli.tfvars index 62ec77b..480f187 100644 --- a/sap_hana_single_node_install/msazure_vm/variables_generic_for_cli.tfvars +++ b/sap_hana_single_node_install/msazure_vm/variables_generic_for_cli.tfvars @@ -18,6 +18,6 @@ sap_hana_install_master_password = "NewPass$321" sap_hana_install_sid = "H01" -sap_hana_install_instance_number = "10" +sap_hana_install_instance_number = "90" sap_software_download_directory = "/software" diff --git a/sap_nwas_abap_hana_install/aws_ec2_instance/variables.tf b/sap_nwas_abap_hana_install/aws_ec2_instance/variables.tf index 668a486..efc1fdb 100644 --- a/sap_nwas_abap_hana_install/aws_ec2_instance/variables.tf +++ b/sap_nwas_abap_hana_install/aws_ec2_instance/variables.tf @@ -87,7 +87,7 @@ variable "sap_hana_install_sid" { } variable "sap_hana_install_instance_number" { - description = "Ansible - SAP HANA install: Instance Number (e.g. 10)" + description = "Ansible - SAP HANA install: Instance Number (e.g. 90)" validation { error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." diff --git a/sap_nwas_abap_hana_install/aws_ec2_instance/variables_generic_for_cli.tfvars b/sap_nwas_abap_hana_install/aws_ec2_instance/variables_generic_for_cli.tfvars index 1760dcd..6d45227 100644 --- a/sap_nwas_abap_hana_install/aws_ec2_instance/variables_generic_for_cli.tfvars +++ b/sap_nwas_abap_hana_install/aws_ec2_instance/variables_generic_for_cli.tfvars @@ -20,7 +20,7 @@ sap_hana_install_master_password = "NewPass$321" sap_hana_install_sid = "H01" -sap_hana_install_instance_number = "10" +sap_hana_install_instance_number = "90" sap_nwas_abap_ascs_instance_no = "01" diff --git a/sap_nwas_abap_hana_install/ibmcloud_powervs/variables_generic_for_cli.tfvars b/sap_nwas_abap_hana_install/ibmcloud_powervs/variables_generic_for_cli.tfvars index 36f5ae9..b3cc066 100644 --- a/sap_nwas_abap_hana_install/ibmcloud_powervs/variables_generic_for_cli.tfvars +++ b/sap_nwas_abap_hana_install/ibmcloud_powervs/variables_generic_for_cli.tfvars @@ -22,7 +22,7 @@ sap_hana_install_master_password = "NewPass$321" sap_hana_install_sid = "H01" -sap_hana_install_instance_number = "10" +sap_hana_install_instance_number = "90" sap_nwas_abap_ascs_instance_no = "01" diff --git a/sap_nwas_abap_hana_install/ibmcloud_vs/variables_generic_for_cli.tfvars b/sap_nwas_abap_hana_install/ibmcloud_vs/variables_generic_for_cli.tfvars index d0c51ea..6c13a0b 100644 --- a/sap_nwas_abap_hana_install/ibmcloud_vs/variables_generic_for_cli.tfvars +++ b/sap_nwas_abap_hana_install/ibmcloud_vs/variables_generic_for_cli.tfvars @@ -18,7 +18,7 @@ sap_hana_install_master_password = "NewPass$321" sap_hana_install_sid = "H01" -sap_hana_install_instance_number = "10" +sap_hana_install_instance_number = "90" sap_nwas_abap_ascs_instance_no = "01" diff --git a/sap_nwas_abap_hana_install/ibmpowervc/variables_generic_for_cli.tfvars b/sap_nwas_abap_hana_install/ibmpowervc/variables_generic_for_cli.tfvars index 35d4eb4..02c29b7 100644 --- a/sap_nwas_abap_hana_install/ibmpowervc/variables_generic_for_cli.tfvars +++ b/sap_nwas_abap_hana_install/ibmpowervc/variables_generic_for_cli.tfvars @@ -10,7 +10,7 @@ sap_hana_install_master_password = "NewPass$321" sap_hana_install_sid = "H01" -sap_hana_install_instance_number = "10" +sap_hana_install_instance_number = "90" sap_nwas_abap_ascs_instance_no = "01" diff --git a/sap_nwas_abap_hana_install/msazure_vm/variables.tf b/sap_nwas_abap_hana_install/msazure_vm/variables.tf index af78bca..4721a41 100644 --- a/sap_nwas_abap_hana_install/msazure_vm/variables.tf +++ b/sap_nwas_abap_hana_install/msazure_vm/variables.tf @@ -102,7 +102,7 @@ variable "sap_hana_install_sid" { } variable "sap_hana_install_instance_number" { - description = "Ansible - SAP HANA install: Instance Number (e.g. 10)" + description = "Ansible - SAP HANA install: Instance Number (e.g. 90)" validation { error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." diff --git a/sap_nwas_abap_hana_install/msazure_vm/variables_generic_for_cli.tfvars b/sap_nwas_abap_hana_install/msazure_vm/variables_generic_for_cli.tfvars index 6595434..5629fb9 100644 --- a/sap_nwas_abap_hana_install/msazure_vm/variables_generic_for_cli.tfvars +++ b/sap_nwas_abap_hana_install/msazure_vm/variables_generic_for_cli.tfvars @@ -18,7 +18,7 @@ sap_hana_install_master_password = "NewPass$321" sap_hana_install_sid = "H01" -sap_hana_install_instance_number = "10" +sap_hana_install_instance_number = "90" sap_nwas_abap_ascs_instance_no = "01" diff --git a/sap_s4hana_single_node_install/aws_ec2_instance/variables.tf b/sap_s4hana_single_node_install/aws_ec2_instance/variables.tf index 53af9c0..3e5666c 100644 --- a/sap_s4hana_single_node_install/aws_ec2_instance/variables.tf +++ b/sap_s4hana_single_node_install/aws_ec2_instance/variables.tf @@ -87,7 +87,7 @@ variable "sap_hana_install_sid" { } variable "sap_hana_install_instance_number" { - description = "Ansible - SAP HANA install: Instance Number (e.g. 10)" + description = "Ansible - SAP HANA install: Instance Number (e.g. 90)" validation { error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." diff --git a/sap_s4hana_single_node_install/aws_ec2_instance/variables_generic_for_cli.tfvars b/sap_s4hana_single_node_install/aws_ec2_instance/variables_generic_for_cli.tfvars index 9efac90..19c9ce2 100644 --- a/sap_s4hana_single_node_install/aws_ec2_instance/variables_generic_for_cli.tfvars +++ b/sap_s4hana_single_node_install/aws_ec2_instance/variables_generic_for_cli.tfvars @@ -20,7 +20,7 @@ sap_hana_install_master_password = "NewPass$321" sap_hana_install_sid = "H01" -sap_hana_install_instance_number = "10" +sap_hana_install_instance_number = "90" sap_nwas_abap_ascs_instance_no = "01" diff --git a/sap_s4hana_single_node_install/ibmcloud_powervs/variables_generic_for_cli.tfvars b/sap_s4hana_single_node_install/ibmcloud_powervs/variables_generic_for_cli.tfvars index 6e30f94..5089bde 100644 --- a/sap_s4hana_single_node_install/ibmcloud_powervs/variables_generic_for_cli.tfvars +++ b/sap_s4hana_single_node_install/ibmcloud_powervs/variables_generic_for_cli.tfvars @@ -22,7 +22,7 @@ sap_hana_install_master_password = "NewPass$321" sap_hana_install_sid = "H01" -sap_hana_install_instance_number = "10" +sap_hana_install_instance_number = "90" sap_nwas_abap_ascs_instance_no = "01" diff --git a/sap_s4hana_single_node_install/ibmcloud_vs/variables_generic_for_cli.tfvars b/sap_s4hana_single_node_install/ibmcloud_vs/variables_generic_for_cli.tfvars index 00ed2d3..e3de805 100644 --- a/sap_s4hana_single_node_install/ibmcloud_vs/variables_generic_for_cli.tfvars +++ b/sap_s4hana_single_node_install/ibmcloud_vs/variables_generic_for_cli.tfvars @@ -22,7 +22,7 @@ sap_hana_install_master_password = "NewPass$321" sap_hana_install_sid = "H01" -sap_hana_install_instance_number = "10" +sap_hana_install_instance_number = "90" sap_nwas_abap_ascs_instance_no = "01" diff --git a/sap_s4hana_single_node_install/ibmpowervc/variables_generic_for_cli.tfvars b/sap_s4hana_single_node_install/ibmpowervc/variables_generic_for_cli.tfvars index 44f6995..2be6518 100644 --- a/sap_s4hana_single_node_install/ibmpowervc/variables_generic_for_cli.tfvars +++ b/sap_s4hana_single_node_install/ibmpowervc/variables_generic_for_cli.tfvars @@ -10,7 +10,7 @@ sap_hana_install_master_password = "NewPass$321" sap_hana_install_sid = "H01" -sap_hana_install_instance_number = "10" +sap_hana_install_instance_number = "90" sap_nwas_abap_ascs_instance_no = "01" diff --git a/sap_s4hana_single_node_install/msazure_vm/variables.tf b/sap_s4hana_single_node_install/msazure_vm/variables.tf index e473f44..7a19102 100644 --- a/sap_s4hana_single_node_install/msazure_vm/variables.tf +++ b/sap_s4hana_single_node_install/msazure_vm/variables.tf @@ -102,7 +102,7 @@ variable "sap_hana_install_sid" { } variable "sap_hana_install_instance_number" { - description = "Ansible - SAP HANA install: Instance Number (e.g. 10)" + description = "Ansible - SAP HANA install: Instance Number (e.g. 90)" validation { error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." diff --git a/sap_s4hana_single_node_install/msazure_vm/variables_generic_for_cli.tfvars b/sap_s4hana_single_node_install/msazure_vm/variables_generic_for_cli.tfvars index 6595434..5629fb9 100644 --- a/sap_s4hana_single_node_install/msazure_vm/variables_generic_for_cli.tfvars +++ b/sap_s4hana_single_node_install/msazure_vm/variables_generic_for_cli.tfvars @@ -18,7 +18,7 @@ sap_hana_install_master_password = "NewPass$321" sap_hana_install_sid = "H01" -sap_hana_install_instance_number = "10" +sap_hana_install_instance_number = "90" sap_nwas_abap_ascs_instance_no = "01" diff --git a/sap_s4hana_single_node_install_maintenance_plan/aws_ec2_instance/variables.tf b/sap_s4hana_single_node_install_maintenance_plan/aws_ec2_instance/variables.tf index 90abbbc..a6c4cb2 100644 --- a/sap_s4hana_single_node_install_maintenance_plan/aws_ec2_instance/variables.tf +++ b/sap_s4hana_single_node_install_maintenance_plan/aws_ec2_instance/variables.tf @@ -87,7 +87,7 @@ variable "sap_hana_install_sid" { } variable "sap_hana_install_instance_number" { - description = "Ansible - SAP HANA install: Instance Number (e.g. 10)" + description = "Ansible - SAP HANA install: Instance Number (e.g. 90)" validation { error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." diff --git a/sap_s4hana_single_node_install_maintenance_plan/aws_ec2_instance/variables_generic_for_cli.tfvars b/sap_s4hana_single_node_install_maintenance_plan/aws_ec2_instance/variables_generic_for_cli.tfvars index 9efac90..19c9ce2 100644 --- a/sap_s4hana_single_node_install_maintenance_plan/aws_ec2_instance/variables_generic_for_cli.tfvars +++ b/sap_s4hana_single_node_install_maintenance_plan/aws_ec2_instance/variables_generic_for_cli.tfvars @@ -20,7 +20,7 @@ sap_hana_install_master_password = "NewPass$321" sap_hana_install_sid = "H01" -sap_hana_install_instance_number = "10" +sap_hana_install_instance_number = "90" sap_nwas_abap_ascs_instance_no = "01" diff --git a/sap_s4hana_single_node_install_maintenance_plan/ibmcloud_powervs/variables.tf b/sap_s4hana_single_node_install_maintenance_plan/ibmcloud_powervs/variables.tf index 5a48c40..b661ae4 100644 --- a/sap_s4hana_single_node_install_maintenance_plan/ibmcloud_powervs/variables.tf +++ b/sap_s4hana_single_node_install_maintenance_plan/ibmcloud_powervs/variables.tf @@ -104,7 +104,7 @@ variable "sap_hana_install_sid" { } variable "sap_hana_install_instance_number" { - description = "Ansible - SAP HANA install: Instance Number (e.g. 10)" + description = "Ansible - SAP HANA install: Instance Number (e.g. 90)" validation { error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." diff --git a/sap_s4hana_single_node_install_maintenance_plan/ibmcloud_powervs/variables_generic_for_cli.tfvars b/sap_s4hana_single_node_install_maintenance_plan/ibmcloud_powervs/variables_generic_for_cli.tfvars index 6e30f94..5089bde 100644 --- a/sap_s4hana_single_node_install_maintenance_plan/ibmcloud_powervs/variables_generic_for_cli.tfvars +++ b/sap_s4hana_single_node_install_maintenance_plan/ibmcloud_powervs/variables_generic_for_cli.tfvars @@ -22,7 +22,7 @@ sap_hana_install_master_password = "NewPass$321" sap_hana_install_sid = "H01" -sap_hana_install_instance_number = "10" +sap_hana_install_instance_number = "90" sap_nwas_abap_ascs_instance_no = "01" diff --git a/sap_s4hana_single_node_install_maintenance_plan/ibmcloud_vs/variables_generic_for_cli.tfvars b/sap_s4hana_single_node_install_maintenance_plan/ibmcloud_vs/variables_generic_for_cli.tfvars index cc072e2..a79db22 100644 --- a/sap_s4hana_single_node_install_maintenance_plan/ibmcloud_vs/variables_generic_for_cli.tfvars +++ b/sap_s4hana_single_node_install_maintenance_plan/ibmcloud_vs/variables_generic_for_cli.tfvars @@ -22,7 +22,7 @@ sap_hana_install_master_password = "NewPass$321" sap_hana_install_sid = "H01" -sap_hana_install_instance_number = "10" +sap_hana_install_instance_number = "90" sap_nwas_abap_ascs_instance_no = "01" diff --git a/sap_s4hana_single_node_install_maintenance_plan/ibmpowervc/variables.tf b/sap_s4hana_single_node_install_maintenance_plan/ibmpowervc/variables.tf index 09448f9..ee95ca4 100644 --- a/sap_s4hana_single_node_install_maintenance_plan/ibmpowervc/variables.tf +++ b/sap_s4hana_single_node_install_maintenance_plan/ibmpowervc/variables.tf @@ -136,7 +136,7 @@ variable "sap_hana_install_sid" { } variable "sap_hana_install_instance_number" { - description = "Ansible - SAP HANA install: Instance Number (e.g. 10)" + description = "Ansible - SAP HANA install: Instance Number (e.g. 90)" validation { error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." diff --git a/sap_s4hana_single_node_install_maintenance_plan/ibmpowervc/variables_generic_for_cli.tfvars b/sap_s4hana_single_node_install_maintenance_plan/ibmpowervc/variables_generic_for_cli.tfvars index 44f6995..2be6518 100644 --- a/sap_s4hana_single_node_install_maintenance_plan/ibmpowervc/variables_generic_for_cli.tfvars +++ b/sap_s4hana_single_node_install_maintenance_plan/ibmpowervc/variables_generic_for_cli.tfvars @@ -10,7 +10,7 @@ sap_hana_install_master_password = "NewPass$321" sap_hana_install_sid = "H01" -sap_hana_install_instance_number = "10" +sap_hana_install_instance_number = "90" sap_nwas_abap_ascs_instance_no = "01" diff --git a/sap_s4hana_single_node_install_maintenance_plan/msazure_vm/variables.tf b/sap_s4hana_single_node_install_maintenance_plan/msazure_vm/variables.tf index e473f44..7a19102 100644 --- a/sap_s4hana_single_node_install_maintenance_plan/msazure_vm/variables.tf +++ b/sap_s4hana_single_node_install_maintenance_plan/msazure_vm/variables.tf @@ -102,7 +102,7 @@ variable "sap_hana_install_sid" { } variable "sap_hana_install_instance_number" { - description = "Ansible - SAP HANA install: Instance Number (e.g. 10)" + description = "Ansible - SAP HANA install: Instance Number (e.g. 90)" validation { error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." diff --git a/sap_s4hana_single_node_install_maintenance_plan/msazure_vm/variables_generic_for_cli.tfvars b/sap_s4hana_single_node_install_maintenance_plan/msazure_vm/variables_generic_for_cli.tfvars index 6595434..5629fb9 100644 --- a/sap_s4hana_single_node_install_maintenance_plan/msazure_vm/variables_generic_for_cli.tfvars +++ b/sap_s4hana_single_node_install_maintenance_plan/msazure_vm/variables_generic_for_cli.tfvars @@ -18,7 +18,7 @@ sap_hana_install_master_password = "NewPass$321" sap_hana_install_sid = "H01" -sap_hana_install_instance_number = "10" +sap_hana_install_instance_number = "90" sap_nwas_abap_ascs_instance_no = "01" diff --git a/sap_s4hana_single_node_system_copy_homogeneous_hdb/ibmcloud_powervs/variables.tf b/sap_s4hana_single_node_system_copy_homogeneous_hdb/ibmcloud_powervs/variables.tf index 0a00492..b1abda5 100644 --- a/sap_s4hana_single_node_system_copy_homogeneous_hdb/ibmcloud_powervs/variables.tf +++ b/sap_s4hana_single_node_system_copy_homogeneous_hdb/ibmcloud_powervs/variables.tf @@ -107,7 +107,7 @@ variable "sap_hana_install_sid" { } variable "sap_hana_install_instance_number" { - description = "Ansible - SAP HANA install: Instance Number (e.g. 10)" + description = "Ansible - SAP HANA install: Instance Number (e.g. 90)" validation { error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." diff --git a/sap_s4hana_single_node_system_copy_homogeneous_hdb/ibmcloud_powervs/variables_generic_for_cli.tfvars b/sap_s4hana_single_node_system_copy_homogeneous_hdb/ibmcloud_powervs/variables_generic_for_cli.tfvars index a5ece86..562bdf5 100644 --- a/sap_s4hana_single_node_system_copy_homogeneous_hdb/ibmcloud_powervs/variables_generic_for_cli.tfvars +++ b/sap_s4hana_single_node_system_copy_homogeneous_hdb/ibmcloud_powervs/variables_generic_for_cli.tfvars @@ -22,7 +22,7 @@ sap_hana_install_master_password = "NewPass$321" sap_hana_install_sid = "H01" -sap_hana_install_instance_number = "10" +sap_hana_install_instance_number = "90" sap_nwas_abap_ascs_instance_no = "01" diff --git a/sap_s4hana_single_node_system_copy_homogeneous_hdb/ibmcloud_vs/variables.tf b/sap_s4hana_single_node_system_copy_homogeneous_hdb/ibmcloud_vs/variables.tf index e86ec67..6dc6d38 100644 --- a/sap_s4hana_single_node_system_copy_homogeneous_hdb/ibmcloud_vs/variables.tf +++ b/sap_s4hana_single_node_system_copy_homogeneous_hdb/ibmcloud_vs/variables.tf @@ -100,7 +100,7 @@ variable "sap_hana_install_sid" { } variable "sap_hana_install_instance_number" { - description = "Ansible - SAP HANA install: Instance Number (e.g. 10)" + description = "Ansible - SAP HANA install: Instance Number (e.g. 90)" validation { error_message = "Cannot use Instance Number 43 (HA port number) or 89 (Windows Remote Desktop Services)." diff --git a/sap_s4hana_single_node_system_copy_homogeneous_hdb/ibmcloud_vs/variables_generic_for_cli.tfvars b/sap_s4hana_single_node_system_copy_homogeneous_hdb/ibmcloud_vs/variables_generic_for_cli.tfvars index 5568e64..5142b1e 100644 --- a/sap_s4hana_single_node_system_copy_homogeneous_hdb/ibmcloud_vs/variables_generic_for_cli.tfvars +++ b/sap_s4hana_single_node_system_copy_homogeneous_hdb/ibmcloud_vs/variables_generic_for_cli.tfvars @@ -22,7 +22,7 @@ sap_hana_install_master_password = "NewPass$321" sap_hana_install_sid = "H01" -sap_hana_install_instance_number = "10" +sap_hana_install_instance_number = "90" sap_nwas_abap_ascs_instance_no = "01" From c8829e7313747df936c87b4771b1a70f403a9259 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Mon, 9 Jan 2023 12:32:09 +0000 Subject: [PATCH 4/6] fix: rename tf template --- .../aws_ec2_instance/main.tf | 0 .../aws_ec2_instance/outputs.tf | 0 .../aws_ec2_instance/outputs_debug.tf | 0 .../aws_ec2_instance/variable_locals.tf | 0 .../aws_ec2_instance/variable_map_hosts.tf | 0 .../aws_ec2_instance/variable_map_os.tf | 0 .../aws_ec2_instance/variables.tf | 0 .../aws_ec2_instance/variables_generic_for_cli.tfvars | 0 .../aws_ec2_instance/versions.tf | 0 .../ibmcloud_powervs/main.tf | 0 .../ibmcloud_powervs/outputs.tf | 0 .../ibmcloud_powervs/outputs_debug.tf | 0 .../ibmcloud_powervs/variable_locals.tf | 0 .../ibmcloud_powervs/variable_map_hosts.tf | 0 .../ibmcloud_powervs/variable_map_locations.tf | 0 .../ibmcloud_powervs/variable_map_os.tf | 0 .../ibmcloud_powervs/variables.tf | 0 .../ibmcloud_powervs/variables_generic_for_cli.tfvars | 0 .../ibmcloud_powervs/versions.tf | 0 .../ibmcloud_vs/main.tf | 0 .../ibmcloud_vs/outputs.tf | 0 .../ibmcloud_vs/outputs_debug.tf | 0 .../ibmcloud_vs/variable_locals.tf | 0 .../ibmcloud_vs/variable_map_hosts.tf | 0 .../ibmcloud_vs/variable_map_os.tf | 0 .../ibmcloud_vs/variables.tf | 0 .../ibmcloud_vs/variables_generic_for_cli.tfvars | 0 .../ibmcloud_vs/versions.tf | 0 .../ibmpowervc/main.tf | 0 .../ibmpowervc/outputs.tf | 0 .../ibmpowervc/variable_locals.tf | 0 .../ibmpowervc/variable_map_hosts.tf | 0 .../ibmpowervc/variables.tf | 0 .../ibmpowervc/variables_generic_for_cli.tfvars | 0 .../ibmpowervc/versions.tf | 0 .../msazure_vm/main.tf | 0 .../msazure_vm/outputs.tf | 0 .../msazure_vm/variable_locals.tf | 0 .../msazure_vm/variable_map_hosts.tf | 0 .../msazure_vm/variable_map_os.tf | 0 .../msazure_vm/variables.tf | 0 .../msazure_vm/variables_generic_for_cli.tfvars | 0 .../msazure_vm/versions.tf | 0 43 files changed, 0 insertions(+), 0 deletions(-) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/aws_ec2_instance/main.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/aws_ec2_instance/outputs.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/aws_ec2_instance/outputs_debug.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/aws_ec2_instance/variable_locals.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/aws_ec2_instance/variable_map_hosts.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/aws_ec2_instance/variable_map_os.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/aws_ec2_instance/variables.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/aws_ec2_instance/variables_generic_for_cli.tfvars (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/aws_ec2_instance/versions.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/ibmcloud_powervs/main.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/ibmcloud_powervs/outputs.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/ibmcloud_powervs/outputs_debug.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/ibmcloud_powervs/variable_locals.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/ibmcloud_powervs/variable_map_hosts.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/ibmcloud_powervs/variable_map_locations.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/ibmcloud_powervs/variable_map_os.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/ibmcloud_powervs/variables.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/ibmcloud_powervs/variables_generic_for_cli.tfvars (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/ibmcloud_powervs/versions.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/ibmcloud_vs/main.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/ibmcloud_vs/outputs.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/ibmcloud_vs/outputs_debug.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/ibmcloud_vs/variable_locals.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/ibmcloud_vs/variable_map_hosts.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/ibmcloud_vs/variable_map_os.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/ibmcloud_vs/variables.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/ibmcloud_vs/variables_generic_for_cli.tfvars (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/ibmcloud_vs/versions.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/ibmpowervc/main.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/ibmpowervc/outputs.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/ibmpowervc/variable_locals.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/ibmpowervc/variable_map_hosts.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/ibmpowervc/variables.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/ibmpowervc/variables_generic_for_cli.tfvars (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/ibmpowervc/versions.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/msazure_vm/main.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/msazure_vm/outputs.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/msazure_vm/variable_locals.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/msazure_vm/variable_map_hosts.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/msazure_vm/variable_map_os.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/msazure_vm/variables.tf (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/msazure_vm/variables_generic_for_cli.tfvars (100%) rename {sap_ecc_hana_install => sap_ecc_hana_single_node_install}/msazure_vm/versions.tf (100%) diff --git a/sap_ecc_hana_install/aws_ec2_instance/main.tf b/sap_ecc_hana_single_node_install/aws_ec2_instance/main.tf similarity index 100% rename from sap_ecc_hana_install/aws_ec2_instance/main.tf rename to sap_ecc_hana_single_node_install/aws_ec2_instance/main.tf diff --git a/sap_ecc_hana_install/aws_ec2_instance/outputs.tf b/sap_ecc_hana_single_node_install/aws_ec2_instance/outputs.tf similarity index 100% rename from sap_ecc_hana_install/aws_ec2_instance/outputs.tf rename to sap_ecc_hana_single_node_install/aws_ec2_instance/outputs.tf diff --git a/sap_ecc_hana_install/aws_ec2_instance/outputs_debug.tf b/sap_ecc_hana_single_node_install/aws_ec2_instance/outputs_debug.tf similarity index 100% rename from sap_ecc_hana_install/aws_ec2_instance/outputs_debug.tf rename to sap_ecc_hana_single_node_install/aws_ec2_instance/outputs_debug.tf diff --git a/sap_ecc_hana_install/aws_ec2_instance/variable_locals.tf b/sap_ecc_hana_single_node_install/aws_ec2_instance/variable_locals.tf similarity index 100% rename from sap_ecc_hana_install/aws_ec2_instance/variable_locals.tf rename to sap_ecc_hana_single_node_install/aws_ec2_instance/variable_locals.tf diff --git a/sap_ecc_hana_install/aws_ec2_instance/variable_map_hosts.tf b/sap_ecc_hana_single_node_install/aws_ec2_instance/variable_map_hosts.tf similarity index 100% rename from sap_ecc_hana_install/aws_ec2_instance/variable_map_hosts.tf rename to sap_ecc_hana_single_node_install/aws_ec2_instance/variable_map_hosts.tf diff --git a/sap_ecc_hana_install/aws_ec2_instance/variable_map_os.tf b/sap_ecc_hana_single_node_install/aws_ec2_instance/variable_map_os.tf similarity index 100% rename from sap_ecc_hana_install/aws_ec2_instance/variable_map_os.tf rename to sap_ecc_hana_single_node_install/aws_ec2_instance/variable_map_os.tf diff --git a/sap_ecc_hana_install/aws_ec2_instance/variables.tf b/sap_ecc_hana_single_node_install/aws_ec2_instance/variables.tf similarity index 100% rename from sap_ecc_hana_install/aws_ec2_instance/variables.tf rename to sap_ecc_hana_single_node_install/aws_ec2_instance/variables.tf diff --git a/sap_ecc_hana_install/aws_ec2_instance/variables_generic_for_cli.tfvars b/sap_ecc_hana_single_node_install/aws_ec2_instance/variables_generic_for_cli.tfvars similarity index 100% rename from sap_ecc_hana_install/aws_ec2_instance/variables_generic_for_cli.tfvars rename to sap_ecc_hana_single_node_install/aws_ec2_instance/variables_generic_for_cli.tfvars diff --git a/sap_ecc_hana_install/aws_ec2_instance/versions.tf b/sap_ecc_hana_single_node_install/aws_ec2_instance/versions.tf similarity index 100% rename from sap_ecc_hana_install/aws_ec2_instance/versions.tf rename to sap_ecc_hana_single_node_install/aws_ec2_instance/versions.tf diff --git a/sap_ecc_hana_install/ibmcloud_powervs/main.tf b/sap_ecc_hana_single_node_install/ibmcloud_powervs/main.tf similarity index 100% rename from sap_ecc_hana_install/ibmcloud_powervs/main.tf rename to sap_ecc_hana_single_node_install/ibmcloud_powervs/main.tf diff --git a/sap_ecc_hana_install/ibmcloud_powervs/outputs.tf b/sap_ecc_hana_single_node_install/ibmcloud_powervs/outputs.tf similarity index 100% rename from sap_ecc_hana_install/ibmcloud_powervs/outputs.tf rename to sap_ecc_hana_single_node_install/ibmcloud_powervs/outputs.tf diff --git a/sap_ecc_hana_install/ibmcloud_powervs/outputs_debug.tf b/sap_ecc_hana_single_node_install/ibmcloud_powervs/outputs_debug.tf similarity index 100% rename from sap_ecc_hana_install/ibmcloud_powervs/outputs_debug.tf rename to sap_ecc_hana_single_node_install/ibmcloud_powervs/outputs_debug.tf diff --git a/sap_ecc_hana_install/ibmcloud_powervs/variable_locals.tf b/sap_ecc_hana_single_node_install/ibmcloud_powervs/variable_locals.tf similarity index 100% rename from sap_ecc_hana_install/ibmcloud_powervs/variable_locals.tf rename to sap_ecc_hana_single_node_install/ibmcloud_powervs/variable_locals.tf diff --git a/sap_ecc_hana_install/ibmcloud_powervs/variable_map_hosts.tf b/sap_ecc_hana_single_node_install/ibmcloud_powervs/variable_map_hosts.tf similarity index 100% rename from sap_ecc_hana_install/ibmcloud_powervs/variable_map_hosts.tf rename to sap_ecc_hana_single_node_install/ibmcloud_powervs/variable_map_hosts.tf diff --git a/sap_ecc_hana_install/ibmcloud_powervs/variable_map_locations.tf b/sap_ecc_hana_single_node_install/ibmcloud_powervs/variable_map_locations.tf similarity index 100% rename from sap_ecc_hana_install/ibmcloud_powervs/variable_map_locations.tf rename to sap_ecc_hana_single_node_install/ibmcloud_powervs/variable_map_locations.tf diff --git a/sap_ecc_hana_install/ibmcloud_powervs/variable_map_os.tf b/sap_ecc_hana_single_node_install/ibmcloud_powervs/variable_map_os.tf similarity index 100% rename from sap_ecc_hana_install/ibmcloud_powervs/variable_map_os.tf rename to sap_ecc_hana_single_node_install/ibmcloud_powervs/variable_map_os.tf diff --git a/sap_ecc_hana_install/ibmcloud_powervs/variables.tf b/sap_ecc_hana_single_node_install/ibmcloud_powervs/variables.tf similarity index 100% rename from sap_ecc_hana_install/ibmcloud_powervs/variables.tf rename to sap_ecc_hana_single_node_install/ibmcloud_powervs/variables.tf diff --git a/sap_ecc_hana_install/ibmcloud_powervs/variables_generic_for_cli.tfvars b/sap_ecc_hana_single_node_install/ibmcloud_powervs/variables_generic_for_cli.tfvars similarity index 100% rename from sap_ecc_hana_install/ibmcloud_powervs/variables_generic_for_cli.tfvars rename to sap_ecc_hana_single_node_install/ibmcloud_powervs/variables_generic_for_cli.tfvars diff --git a/sap_ecc_hana_install/ibmcloud_powervs/versions.tf b/sap_ecc_hana_single_node_install/ibmcloud_powervs/versions.tf similarity index 100% rename from sap_ecc_hana_install/ibmcloud_powervs/versions.tf rename to sap_ecc_hana_single_node_install/ibmcloud_powervs/versions.tf diff --git a/sap_ecc_hana_install/ibmcloud_vs/main.tf b/sap_ecc_hana_single_node_install/ibmcloud_vs/main.tf similarity index 100% rename from sap_ecc_hana_install/ibmcloud_vs/main.tf rename to sap_ecc_hana_single_node_install/ibmcloud_vs/main.tf diff --git a/sap_ecc_hana_install/ibmcloud_vs/outputs.tf b/sap_ecc_hana_single_node_install/ibmcloud_vs/outputs.tf similarity index 100% rename from sap_ecc_hana_install/ibmcloud_vs/outputs.tf rename to sap_ecc_hana_single_node_install/ibmcloud_vs/outputs.tf diff --git a/sap_ecc_hana_install/ibmcloud_vs/outputs_debug.tf b/sap_ecc_hana_single_node_install/ibmcloud_vs/outputs_debug.tf similarity index 100% rename from sap_ecc_hana_install/ibmcloud_vs/outputs_debug.tf rename to sap_ecc_hana_single_node_install/ibmcloud_vs/outputs_debug.tf diff --git a/sap_ecc_hana_install/ibmcloud_vs/variable_locals.tf b/sap_ecc_hana_single_node_install/ibmcloud_vs/variable_locals.tf similarity index 100% rename from sap_ecc_hana_install/ibmcloud_vs/variable_locals.tf rename to sap_ecc_hana_single_node_install/ibmcloud_vs/variable_locals.tf diff --git a/sap_ecc_hana_install/ibmcloud_vs/variable_map_hosts.tf b/sap_ecc_hana_single_node_install/ibmcloud_vs/variable_map_hosts.tf similarity index 100% rename from sap_ecc_hana_install/ibmcloud_vs/variable_map_hosts.tf rename to sap_ecc_hana_single_node_install/ibmcloud_vs/variable_map_hosts.tf diff --git a/sap_ecc_hana_install/ibmcloud_vs/variable_map_os.tf b/sap_ecc_hana_single_node_install/ibmcloud_vs/variable_map_os.tf similarity index 100% rename from sap_ecc_hana_install/ibmcloud_vs/variable_map_os.tf rename to sap_ecc_hana_single_node_install/ibmcloud_vs/variable_map_os.tf diff --git a/sap_ecc_hana_install/ibmcloud_vs/variables.tf b/sap_ecc_hana_single_node_install/ibmcloud_vs/variables.tf similarity index 100% rename from sap_ecc_hana_install/ibmcloud_vs/variables.tf rename to sap_ecc_hana_single_node_install/ibmcloud_vs/variables.tf diff --git a/sap_ecc_hana_install/ibmcloud_vs/variables_generic_for_cli.tfvars b/sap_ecc_hana_single_node_install/ibmcloud_vs/variables_generic_for_cli.tfvars similarity index 100% rename from sap_ecc_hana_install/ibmcloud_vs/variables_generic_for_cli.tfvars rename to sap_ecc_hana_single_node_install/ibmcloud_vs/variables_generic_for_cli.tfvars diff --git a/sap_ecc_hana_install/ibmcloud_vs/versions.tf b/sap_ecc_hana_single_node_install/ibmcloud_vs/versions.tf similarity index 100% rename from sap_ecc_hana_install/ibmcloud_vs/versions.tf rename to sap_ecc_hana_single_node_install/ibmcloud_vs/versions.tf diff --git a/sap_ecc_hana_install/ibmpowervc/main.tf b/sap_ecc_hana_single_node_install/ibmpowervc/main.tf similarity index 100% rename from sap_ecc_hana_install/ibmpowervc/main.tf rename to sap_ecc_hana_single_node_install/ibmpowervc/main.tf diff --git a/sap_ecc_hana_install/ibmpowervc/outputs.tf b/sap_ecc_hana_single_node_install/ibmpowervc/outputs.tf similarity index 100% rename from sap_ecc_hana_install/ibmpowervc/outputs.tf rename to sap_ecc_hana_single_node_install/ibmpowervc/outputs.tf diff --git a/sap_ecc_hana_install/ibmpowervc/variable_locals.tf b/sap_ecc_hana_single_node_install/ibmpowervc/variable_locals.tf similarity index 100% rename from sap_ecc_hana_install/ibmpowervc/variable_locals.tf rename to sap_ecc_hana_single_node_install/ibmpowervc/variable_locals.tf diff --git a/sap_ecc_hana_install/ibmpowervc/variable_map_hosts.tf b/sap_ecc_hana_single_node_install/ibmpowervc/variable_map_hosts.tf similarity index 100% rename from sap_ecc_hana_install/ibmpowervc/variable_map_hosts.tf rename to sap_ecc_hana_single_node_install/ibmpowervc/variable_map_hosts.tf diff --git a/sap_ecc_hana_install/ibmpowervc/variables.tf b/sap_ecc_hana_single_node_install/ibmpowervc/variables.tf similarity index 100% rename from sap_ecc_hana_install/ibmpowervc/variables.tf rename to sap_ecc_hana_single_node_install/ibmpowervc/variables.tf diff --git a/sap_ecc_hana_install/ibmpowervc/variables_generic_for_cli.tfvars b/sap_ecc_hana_single_node_install/ibmpowervc/variables_generic_for_cli.tfvars similarity index 100% rename from sap_ecc_hana_install/ibmpowervc/variables_generic_for_cli.tfvars rename to sap_ecc_hana_single_node_install/ibmpowervc/variables_generic_for_cli.tfvars diff --git a/sap_ecc_hana_install/ibmpowervc/versions.tf b/sap_ecc_hana_single_node_install/ibmpowervc/versions.tf similarity index 100% rename from sap_ecc_hana_install/ibmpowervc/versions.tf rename to sap_ecc_hana_single_node_install/ibmpowervc/versions.tf diff --git a/sap_ecc_hana_install/msazure_vm/main.tf b/sap_ecc_hana_single_node_install/msazure_vm/main.tf similarity index 100% rename from sap_ecc_hana_install/msazure_vm/main.tf rename to sap_ecc_hana_single_node_install/msazure_vm/main.tf diff --git a/sap_ecc_hana_install/msazure_vm/outputs.tf b/sap_ecc_hana_single_node_install/msazure_vm/outputs.tf similarity index 100% rename from sap_ecc_hana_install/msazure_vm/outputs.tf rename to sap_ecc_hana_single_node_install/msazure_vm/outputs.tf diff --git a/sap_ecc_hana_install/msazure_vm/variable_locals.tf b/sap_ecc_hana_single_node_install/msazure_vm/variable_locals.tf similarity index 100% rename from sap_ecc_hana_install/msazure_vm/variable_locals.tf rename to sap_ecc_hana_single_node_install/msazure_vm/variable_locals.tf diff --git a/sap_ecc_hana_install/msazure_vm/variable_map_hosts.tf b/sap_ecc_hana_single_node_install/msazure_vm/variable_map_hosts.tf similarity index 100% rename from sap_ecc_hana_install/msazure_vm/variable_map_hosts.tf rename to sap_ecc_hana_single_node_install/msazure_vm/variable_map_hosts.tf diff --git a/sap_ecc_hana_install/msazure_vm/variable_map_os.tf b/sap_ecc_hana_single_node_install/msazure_vm/variable_map_os.tf similarity index 100% rename from sap_ecc_hana_install/msazure_vm/variable_map_os.tf rename to sap_ecc_hana_single_node_install/msazure_vm/variable_map_os.tf diff --git a/sap_ecc_hana_install/msazure_vm/variables.tf b/sap_ecc_hana_single_node_install/msazure_vm/variables.tf similarity index 100% rename from sap_ecc_hana_install/msazure_vm/variables.tf rename to sap_ecc_hana_single_node_install/msazure_vm/variables.tf diff --git a/sap_ecc_hana_install/msazure_vm/variables_generic_for_cli.tfvars b/sap_ecc_hana_single_node_install/msazure_vm/variables_generic_for_cli.tfvars similarity index 100% rename from sap_ecc_hana_install/msazure_vm/variables_generic_for_cli.tfvars rename to sap_ecc_hana_single_node_install/msazure_vm/variables_generic_for_cli.tfvars diff --git a/sap_ecc_hana_install/msazure_vm/versions.tf b/sap_ecc_hana_single_node_install/msazure_vm/versions.tf similarity index 100% rename from sap_ecc_hana_install/msazure_vm/versions.tf rename to sap_ecc_hana_single_node_install/msazure_vm/versions.tf From 52af59f9de1521f550181ac9aa01fd4175658eca Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Mon, 9 Jan 2023 12:35:29 +0000 Subject: [PATCH 5/6] fix: add new tf template to gh action --- .github/workflows/terraform_validate_100.yml | 2 +- .github/workflows/terraform_validate_110.yml | 2 +- .github/workflows/terraform_validate_120.yml | 2 +- .github/workflows/terraform_validate_130.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/terraform_validate_100.yml b/.github/workflows/terraform_validate_100.yml index 9c8145c..b371395 100644 --- a/.github/workflows/terraform_validate_100.yml +++ b/.github/workflows/terraform_validate_100.yml @@ -18,7 +18,7 @@ jobs: max-parallel: 10 matrix: terraform_ver: [~1.0.0] # Job matrix can generate a maximum of 256 jobs per workflow run - sap_solution_scenario: [sap_bw4hana_single_node_install, sap_ecc_hana_single_node_system_copy_homogeneous_hdb, sap_ecc_ibmdb2_single_node_install, sap_ecc_oracledb_single_node_install, sap_ecc_sapase_single_node_install, sap_ecc_sapmaxdb_single_node_install, sap_hana_single_node_install, sap_nwas_abap_hana_install, sap_nwas_abap_ibmdb2_install, sap_nwas_abap_oracledb_install, sap_nwas_abap_sapase_install, sap_nwas_abap_sapmaxdb_install, sap_nwas_java_ibmdb2_install, sap_nwas_java_sapase_install, sap_s4hana_single_node_install, sap_s4hana_single_node_install_maintenance_plan, sap_s4hana_single_node_system_copy_homogeneous_hdb] + sap_solution_scenario: [sap_bw4hana_single_node_install, sap_ecc_hana_single_node_install, sap_ecc_hana_single_node_system_copy_homogeneous_hdb, sap_ecc_ibmdb2_single_node_install, sap_ecc_oracledb_single_node_install, sap_ecc_sapase_single_node_install, sap_ecc_sapmaxdb_single_node_install, sap_hana_single_node_install, sap_nwas_abap_hana_install, sap_nwas_abap_ibmdb2_install, sap_nwas_abap_oracledb_install, sap_nwas_abap_sapase_install, sap_nwas_abap_sapmaxdb_install, sap_nwas_java_ibmdb2_install, sap_nwas_java_sapase_install, sap_s4hana_single_node_install, sap_s4hana_single_node_install_maintenance_plan, sap_s4hana_single_node_system_copy_homogeneous_hdb] infrastructure_platform: [aws_ec2_instance, ibmcloud_vs, ibmcloud_powervs, ibmpowervc, msazure_vm] steps: - name: Checkout diff --git a/.github/workflows/terraform_validate_110.yml b/.github/workflows/terraform_validate_110.yml index 2f8c9cc..1749a95 100644 --- a/.github/workflows/terraform_validate_110.yml +++ b/.github/workflows/terraform_validate_110.yml @@ -18,7 +18,7 @@ jobs: max-parallel: 10 matrix: terraform_ver: [~1.1.0] # Job matrix can generate a maximum of 256 jobs per workflow run - sap_solution_scenario: [sap_bw4hana_single_node_install, sap_ecc_hana_single_node_system_copy_homogeneous_hdb, sap_ecc_ibmdb2_single_node_install, sap_ecc_oracledb_single_node_install, sap_ecc_sapase_single_node_install, sap_ecc_sapmaxdb_single_node_install, sap_hana_single_node_install, sap_nwas_abap_hana_install, sap_nwas_abap_ibmdb2_install, sap_nwas_abap_oracledb_install, sap_nwas_abap_sapase_install, sap_nwas_abap_sapmaxdb_install, sap_nwas_java_ibmdb2_install, sap_nwas_java_sapase_install, sap_s4hana_single_node_install, sap_s4hana_single_node_install_maintenance_plan, sap_s4hana_single_node_system_copy_homogeneous_hdb] + sap_solution_scenario: [sap_bw4hana_single_node_install, sap_ecc_hana_single_node_install, sap_ecc_hana_single_node_system_copy_homogeneous_hdb, sap_ecc_ibmdb2_single_node_install, sap_ecc_oracledb_single_node_install, sap_ecc_sapase_single_node_install, sap_ecc_sapmaxdb_single_node_install, sap_hana_single_node_install, sap_nwas_abap_hana_install, sap_nwas_abap_ibmdb2_install, sap_nwas_abap_oracledb_install, sap_nwas_abap_sapase_install, sap_nwas_abap_sapmaxdb_install, sap_nwas_java_ibmdb2_install, sap_nwas_java_sapase_install, sap_s4hana_single_node_install, sap_s4hana_single_node_install_maintenance_plan, sap_s4hana_single_node_system_copy_homogeneous_hdb] infrastructure_platform: [aws_ec2_instance, ibmcloud_vs, ibmcloud_powervs, ibmpowervc, msazure_vm] steps: - name: Checkout diff --git a/.github/workflows/terraform_validate_120.yml b/.github/workflows/terraform_validate_120.yml index 0e51777..862c0c9 100644 --- a/.github/workflows/terraform_validate_120.yml +++ b/.github/workflows/terraform_validate_120.yml @@ -18,7 +18,7 @@ jobs: max-parallel: 10 matrix: terraform_ver: [~1.2.0] # Job matrix can generate a maximum of 256 jobs per workflow run - sap_solution_scenario: [sap_bw4hana_single_node_install, sap_ecc_hana_single_node_system_copy_homogeneous_hdb, sap_ecc_ibmdb2_single_node_install, sap_ecc_oracledb_single_node_install, sap_ecc_sapase_single_node_install, sap_ecc_sapmaxdb_single_node_install, sap_hana_single_node_install, sap_nwas_abap_hana_install, sap_nwas_abap_ibmdb2_install, sap_nwas_abap_oracledb_install, sap_nwas_abap_sapase_install, sap_nwas_abap_sapmaxdb_install, sap_nwas_java_ibmdb2_install, sap_nwas_java_sapase_install, sap_s4hana_single_node_install, sap_s4hana_single_node_install_maintenance_plan, sap_s4hana_single_node_system_copy_homogeneous_hdb] + sap_solution_scenario: [sap_bw4hana_single_node_install, sap_ecc_hana_single_node_install, sap_ecc_hana_single_node_system_copy_homogeneous_hdb, sap_ecc_ibmdb2_single_node_install, sap_ecc_oracledb_single_node_install, sap_ecc_sapase_single_node_install, sap_ecc_sapmaxdb_single_node_install, sap_hana_single_node_install, sap_nwas_abap_hana_install, sap_nwas_abap_ibmdb2_install, sap_nwas_abap_oracledb_install, sap_nwas_abap_sapase_install, sap_nwas_abap_sapmaxdb_install, sap_nwas_java_ibmdb2_install, sap_nwas_java_sapase_install, sap_s4hana_single_node_install, sap_s4hana_single_node_install_maintenance_plan, sap_s4hana_single_node_system_copy_homogeneous_hdb] infrastructure_platform: [aws_ec2_instance, ibmcloud_vs, ibmcloud_powervs, ibmpowervc, msazure_vm] steps: - name: Checkout diff --git a/.github/workflows/terraform_validate_130.yml b/.github/workflows/terraform_validate_130.yml index 15a9a9d..15f9f75 100644 --- a/.github/workflows/terraform_validate_130.yml +++ b/.github/workflows/terraform_validate_130.yml @@ -18,7 +18,7 @@ jobs: max-parallel: 10 matrix: terraform_ver: [~1.3.0] # Job matrix can generate a maximum of 256 jobs per workflow run - sap_solution_scenario: [sap_bw4hana_single_node_install, sap_ecc_hana_single_node_system_copy_homogeneous_hdb, sap_ecc_ibmdb2_single_node_install, sap_ecc_oracledb_single_node_install, sap_ecc_sapase_single_node_install, sap_ecc_sapmaxdb_single_node_install, sap_hana_single_node_install, sap_nwas_abap_hana_install, sap_nwas_abap_ibmdb2_install, sap_nwas_abap_oracledb_install, sap_nwas_abap_sapase_install, sap_nwas_abap_sapmaxdb_install, sap_nwas_java_ibmdb2_install, sap_nwas_java_sapase_install, sap_s4hana_single_node_install, sap_s4hana_single_node_install_maintenance_plan, sap_s4hana_single_node_system_copy_homogeneous_hdb] + sap_solution_scenario: [sap_bw4hana_single_node_install, sap_ecc_hana_single_node_install, sap_ecc_hana_single_node_system_copy_homogeneous_hdb, sap_ecc_ibmdb2_single_node_install, sap_ecc_oracledb_single_node_install, sap_ecc_sapase_single_node_install, sap_ecc_sapmaxdb_single_node_install, sap_hana_single_node_install, sap_nwas_abap_hana_install, sap_nwas_abap_ibmdb2_install, sap_nwas_abap_oracledb_install, sap_nwas_abap_sapase_install, sap_nwas_abap_sapmaxdb_install, sap_nwas_java_ibmdb2_install, sap_nwas_java_sapase_install, sap_s4hana_single_node_install, sap_s4hana_single_node_install_maintenance_plan, sap_s4hana_single_node_system_copy_homogeneous_hdb] infrastructure_platform: [aws_ec2_instance, ibmcloud_vs, ibmcloud_powervs, ibmpowervc, msazure_vm] steps: - name: Checkout From cbd67f5b403f349281999861951065e89bfc1826 Mon Sep 17 00:00:00 2001 From: sean-freeman Date: Mon, 9 Jan 2023 12:53:22 +0000 Subject: [PATCH 6/6] fix: bad inputs and outputs shown by validate --- .../ibmpowervc/main.tf | 21 +++++++------ .../ibmcloud_vs/outputs.tf | 30 +++++++++++++++---- 2 files changed, 35 insertions(+), 16 deletions(-) diff --git a/sap_ecc_hana_single_node_install/ibmpowervc/main.tf b/sap_ecc_hana_single_node_install/ibmpowervc/main.tf index 2b7eb7e..1c8fabe 100644 --- a/sap_ecc_hana_single_node_install/ibmpowervc/main.tf +++ b/sap_ecc_hana_single_node_install/ibmpowervc/main.tf @@ -153,22 +153,21 @@ module "run_ansible_sap_ecc_hana_install" { source = "github.com/sap-linuxlab/terraform.modules_for_sap//all/ansible_sap_ecc_hana_install?ref=main" # Terraform Module Variables using the prior Terraform Module Variables (from bootstrap module) - module_var_bastion_boolean = true // required as true boolean for any Cloud Service Provider (CSP) - module_var_bastion_user = var.bastion_user - module_var_bastion_ssh_port = var.bastion_ssh_port - module_var_bastion_private_ssh_key = module.run_account_bootstrap_module.output_bastion_private_ssh_key + module_var_bastion_boolean = var.bastion_boolean + module_var_bastion_user = var.bastion_boolean ? var.bastion_user : "" + module_var_bastion_ssh_port = var.bastion_boolean ? var.bastion_ssh_port : 0 + module_var_bastion_private_ssh_key = var.bastion_boolean ? var.bastion_private_ssh_key : 0 + module_var_bastion_floating_ip = var.bastion_boolean ? var.bastion_ip : 0 - module_var_bastion_floating_ip = module.run_bastion_inject_module.output_bastion_ip - - module_var_host_private_ssh_key = module.run_account_bootstrap_module.output_host_private_ssh_key + module_var_host_private_ssh_key = module.run_host_bootstrap_module.output_host_private_ssh_key # Set Terraform Module Variables using for_each loop on a map Terraform Variable at runtime - for_each = module.run_host_provision_module - module_var_host_private_ip = join(", ", each.value.*.output_host_private_ip) - module_var_hostname = join(", ", each.value.*.output_host_name) - module_var_dns_root_domain_name = var.dns_root_domain + for_each = module.run_host_provision_module + module_var_host_private_ip = join(", ", each.value.*.output_host_private_ip) + module_var_hostname = join(", ", each.value.*.output_host_name) + module_var_dns_root_domain_name = var.dns_root_domain module_var_sap_id_user = var.sap_id_user module_var_sap_id_user_password = var.sap_id_user_password diff --git a/sap_nwas_abap_hana_install/ibmcloud_vs/outputs.tf b/sap_nwas_abap_hana_install/ibmcloud_vs/outputs.tf index d33b8fb..f4f4d5f 100644 --- a/sap_nwas_abap_hana_install/ibmcloud_vs/outputs.tf +++ b/sap_nwas_abap_hana_install/ibmcloud_vs/outputs.tf @@ -45,20 +45,21 @@ bastion_host="${module.run_bastion_inject_module.output_bastion_ip}" bastion_port="${var.bastion_ssh_port}" target_host_array=(${join(" ", flatten([for key, value in module.run_host_provision_module : value.*.output_host_private_ip]))} "Quit") +sap_hana_instance_no="${var.sap_hana_install_instance_number}" sap_nwas_abap_pas_instance_no="${var.sap_nwas_abap_pas_instance_no}" function sshjump() { ssh_options=( - "SAPGUI, via SSH port forward binding proxy" + "SAP HANA Studio or SAPGUI, via SSH port forward binding proxy" "OS root access, via SSH stdin/stdout forwarding proxy" "Quit" ) select opt in "$${ssh_options[@]}"; do case $opt in - "SAPGUI, via SSH port forward binding proxy") + "SAP HANA Studio or SAPGUI, via SSH port forward binding proxy") echo ">>> Chosen option $REPLY: $opt" select opt_ip in "$${target_host_array[@]}"; do if [ $opt_ip = "Quit" ]; then break 2; fi @@ -67,6 +68,9 @@ function sshjump() { break done echo "" + echo "#### For SAP HANA Studio, use Add System with host name as localhost; do not add port numbers." + echo "#### If selecting 'Connect using SSL' on Connection Properties, then on Additional Properties (final) screen deselect 'Validate the SSL certificate'" + echo "" echo "#### For SAPGUI, use expert mode SAP Logon String as: ####" echo "conn=/H/localhost/S/32$sap_nwas_abap_pas_instance_no&expert=true" echo "" @@ -76,7 +80,13 @@ function sshjump() { -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \ -L localhost:32$sap_nwas_abap_pas_instance_no:$target_ip:32$sap_nwas_abap_pas_instance_no \ -L localhost:33$sap_nwas_abap_pas_instance_no:$target_ip:33$sap_nwas_abap_pas_instance_no \ - -L localhost:443$sap_nwas_abap_pas_instance_no:$target_ip:443$sap_nwas_abap_pas_instance_no + -L localhost:3$${sap_hana_instance_no}13:$target_ip:3$${sap_hana_instance_no}13 \ + -L localhost:3$${sap_hana_instance_no}15:$target_ip:3$${sap_hana_instance_no}15 \ + -L localhost:3$${sap_hana_instance_no}41:$target_ip:3$${sap_hana_instance_no}41 \ + -L localhost:443$sap_hana_instance_no:$target_ip:443$sap_hana_instance_no \ + -L localhost:443$sap_nwas_abap_pas_instance_no:$target_ip:443$sap_nwas_abap_pas_instance_no \ + -L localhost:5$${sap_hana_instance_no}13:$target_ip:5$${sap_hana_instance_no}13 \ + -L localhost:5$${sap_hana_instance_no}14:$target_ip:5$${sap_hana_instance_no}14 break ;; "OS root access, via SSH stdin/stdout forwarding proxy") @@ -143,12 +153,13 @@ $bastion_port = "${var.bastion_ssh_port}" $target_host_string = "${join("','",flatten([for key, value in module.run_host_provision_module : value.*.output_host_private_ip]))}" $target_host_array = @($target_host_string.Split(","),"Quit") +$sap_hana_instance_no = "${var.sap_hana_install_instance_number}" $sap_nwas_abap_pas_instance_no = "${var.sap_nwas_abap_pas_instance_no}" function sshjump { - echo '1) SAPGUI, via SSH port forward binding proxy' + echo '1) SAP HANA Studio or SAPGUI, via SSH port forward binding proxy' echo '2) OS root access, via SSH stdin/stdout forwarding proxy' echo '3) Quit' @@ -176,6 +187,9 @@ function sshjump { $target_ip = $target_host_array[$target_host_selection] #echo ">>> Chosen option $(PSItem)" echo "" + echo "#### For SAP HANA Studio, use Add System with host name as localhost; do not add port numbers." + echo "#### If selecting 'Connect using SSL' on Connection Properties, then on Additional Properties (final) screen deselect 'Validate the SSL certificate'" + echo "" echo "#### For SAPGUI, use expert mode SAP Logon String as: ####" echo "conn=/H/localhost/S/32$sap_nwas_abap_pas_instance_no&expert=true" echo "" @@ -185,7 +199,13 @@ function sshjump { -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ` -L localhost:32$${sap_nwas_abap_pas_instance_no}:$${target_ip}:32$${sap_nwas_abap_pas_instance_no} ` -L localhost:33$${sap_nwas_abap_pas_instance_no}:$${target_ip}:33$${sap_nwas_abap_pas_instance_no} ` - -L localhost:443$${sap_nwas_abap_pas_instance_no}:$${target_ip}:443$${sap_nwas_abap_pas_instance_no} + -L localhost:3$${sap_hana_instance_no}13:$${target_ip}:3$${sap_hana_instance_no}13 ` + -L localhost:3$${sap_hana_instance_no}15:$${target_ip}:3$${sap_hana_instance_no}15 ` + -L localhost:3$${sap_hana_instance_no}41:$${target_ip}:3$${sap_hana_instance_no}41 ` + -L localhost:443$${sap_hana_instance_no}:$${target_ip}:443$${sap_hana_instance_no} ` + -L localhost:443$${sap_nwas_abap_pas_instance_no}:$${target_ip}:443$${sap_nwas_abap_pas_instance_no} ` + -L localhost:5$${sap_hana_instance_no}13:$${target_ip}:5$${sap_hana_instance_no}13 ` + -L localhost:5$${sap_hana_instance_no}14:$${target_ip}:5$${sap_hana_instance_no}14 } } 2 {