diff --git a/modules/s4/variables.tf b/modules/s4/variables.tf index b9af5c27..6668adcb 100644 --- a/modules/s4/variables.tf +++ b/modules/s4/variables.tf @@ -429,19 +429,19 @@ variable "disk_size_map" { } variable "custom_app_metadata" { - type = map(string) + type = map(string) description = "Optional - default is empty. Custom metadata to be added to the app VMs." default = {} } variable "custom_ascs_metadata" { - type = map(string) + type = map(string) description = "Optional - default is empty. Custom metadata to be added to the ASCS VMs." default = {} } variable "custom_db_metadata" { - type = map(string) + type = map(string) description = "Optional - default is empty. Custom metadata to be added to the DB VMs." default = {} } diff --git a/modules/s4_ha/ascs.tf b/modules/s4_ha/ascs.tf index 8d5cc9fd..187b4787 100644 --- a/modules/s4_ha/ascs.tf +++ b/modules/s4_ha/ascs.tf @@ -249,7 +249,7 @@ resource "google_compute_instance" "sapdascs12" { metadata = merge(var.custom_ascs_metadata, { enable-oslogin = "FALSE" ssh-keys = "" - }) + }) min_cpu_platform = lookup(local.cpu_platform_map, var.ascs_machine_type, "Automatic") name = length(var.ascs_vm_names) > 1 ? var.ascs_vm_names[1] : "${var.vm_prefix}ascs12" network_interface { diff --git a/modules/s4_ha/variables.tf b/modules/s4_ha/variables.tf index 1805baec..3884b5d3 100644 --- a/modules/s4_ha/variables.tf +++ b/modules/s4_ha/variables.tf @@ -458,19 +458,19 @@ variable "disk_size_map" { } variable "custom_app_metadata" { - type = map(string) + type = map(string) description = "Optional - default is empty. Custom metadata to be added to the app VMs." default = {} } variable "custom_ascs_metadata" { - type = map(string) + type = map(string) description = "Optional - default is empty. Custom metadata to be added to the ASCS VMs." default = {} } variable "custom_db_metadata" { - type = map(string) + type = map(string) description = "Optional - default is empty. Custom metadata to be added to the DB VMs." default = {} } diff --git a/modules/sap_ase/variables.tf b/modules/sap_ase/variables.tf index f5f5eeca..011ffb59 100644 --- a/modules/sap_ase/variables.tf +++ b/modules/sap_ase/variables.tf @@ -229,7 +229,7 @@ variable "can_ip_forward" { } variable "custom_metadata" { - type = map(string) + type = map(string) description = "Optional - default is empty. Custom metadata to be added to the VM." default = {} } diff --git a/modules/sap_db2/variables.tf b/modules/sap_db2/variables.tf index 13078f87..a63585c7 100644 --- a/modules/sap_db2/variables.tf +++ b/modules/sap_db2/variables.tf @@ -239,7 +239,7 @@ variable "can_ip_forward" { } variable "custom_metadata" { - type = map(string) + type = map(string) description = "Optional - default is empty. Custom metadata to be added to the VM." default = {} } diff --git a/modules/sap_hana/main.tf b/modules/sap_hana/main.tf index b7647ca2..708f14da 100644 --- a/modules/sap_hana/main.tf +++ b/modules/sap_hana/main.tf @@ -414,11 +414,11 @@ resource "google_compute_address" "sap_hana_worker_ip" { # Sole tenant items ################################################################################ resource "google_compute_node_template" "sole_tenant_node_template" { - count = var.sole_tenant_deployment ? 1 : 0 - name = "${local.sole_tenant_name_prefix}-node-template" - node_type = var.sole_tenant_node_type - region = local.region - project = var.project_id + count = var.sole_tenant_deployment ? 1 : 0 + name = "${local.sole_tenant_name_prefix}-node-template" + node_type = var.sole_tenant_node_type + region = local.region + project = var.project_id } resource "google_compute_node_group" "sole_tenant_node_group" { @@ -455,12 +455,12 @@ resource "google_compute_instance" "sap_hana_primary_instance" { for_each = (local.native_bm || var.sole_tenant_deployment) ? [1] : [] content { on_host_maintenance = local.native_bm ? "TERMINATE" : null - dynamic "node_affinities" { + dynamic "node_affinities" { for_each = length(resource.google_compute_node_group.sole_tenant_node_group) > 0 ? [1] : [] content { - key = "compute.googleapis.com/node-group-name" + key = "compute.googleapis.com/node-group-name" operator = "IN" - values = ["${local.sole_tenant_name_prefix}-node-group"] + values = ["${local.sole_tenant_name_prefix}-node-group"] } } } @@ -601,12 +601,12 @@ resource "google_compute_instance" "sap_hana_worker_instances" { for_each = (local.native_bm || var.sole_tenant_deployment) ? [1] : [] content { on_host_maintenance = local.native_bm ? "TERMINATE" : null - dynamic "node_affinities" { + dynamic "node_affinities" { for_each = length(resource.google_compute_node_group.sole_tenant_node_group) > 0 ? [1] : [] content { - key = "compute.googleapis.com/node-group-name" + key = "compute.googleapis.com/node-group-name" operator = "IN" - values = ["${local.sole_tenant_name_prefix}-node-group"] + values = ["${local.sole_tenant_name_prefix}-node-group"] } } } diff --git a/modules/sap_hana/variables.tf b/modules/sap_hana/variables.tf index 13777707..9480dedf 100644 --- a/modules/sap_hana/variables.tf +++ b/modules/sap_hana/variables.tf @@ -553,13 +553,13 @@ variable "log_stripe_size" { } variable "custom_primary_metadata" { - type = map(string) + type = map(string) description = "Optional - default is empty. Custom metadata to be added to the primary VM." default = {} } variable "custom_secondary_metadata" { - type = map(string) + type = map(string) description = "Optional - default is empty. Custom metadata to be added to the secondary VMs." default = {} } diff --git a/modules/sap_hana_ha/main.tf b/modules/sap_hana_ha/main.tf index 898eed55..800e7e6f 100644 --- a/modules/sap_hana_ha/main.tf +++ b/modules/sap_hana_ha/main.tf @@ -363,11 +363,11 @@ resource "google_compute_address" "sap_hana_ha_worker_vm_ip" { # Sole tenant items ################################################################################ resource "google_compute_node_template" "sole_tenant_node_template" { - count = var.sole_tenant_deployment ? 1 : 0 - name = "${local.sole_tenant_name_prefix}-node-template" - node_type = var.sole_tenant_node_type - region = local.region - project = var.project_id + count = var.sole_tenant_deployment ? 1 : 0 + name = "${local.sole_tenant_name_prefix}-node-template" + node_type = var.sole_tenant_node_type + region = local.region + project = var.project_id } resource "google_compute_node_group" "sole_tenant_primary_node_group" { @@ -515,12 +515,12 @@ resource "google_compute_instance" "sap_hana_ha_primary_instance" { for_each = (local.native_bm || var.sole_tenant_deployment) ? [1] : [] content { on_host_maintenance = local.native_bm ? "TERMINATE" : null - dynamic "node_affinities" { + dynamic "node_affinities" { for_each = length(resource.google_compute_node_group.sole_tenant_primary_node_group) > 0 ? [1] : [] content { - key = "compute.googleapis.com/node-group-name" + key = "compute.googleapis.com/node-group-name" operator = "IN" - values = ["${local.sole_tenant_name_prefix}-primary-node-group"] + values = ["${local.sole_tenant_name_prefix}-primary-node-group"] } } } @@ -676,12 +676,12 @@ resource "google_compute_instance" "sap_hana_ha_primary_workers" { for_each = (local.native_bm || var.sole_tenant_deployment) ? [1] : [] content { on_host_maintenance = local.native_bm ? "TERMINATE" : null - dynamic "node_affinities" { + dynamic "node_affinities" { for_each = length(resource.google_compute_node_group.sole_tenant_primary_node_group) > 0 ? [1] : [] content { - key = "compute.googleapis.com/node-group-name" + key = "compute.googleapis.com/node-group-name" operator = "IN" - values = ["${local.sole_tenant_name_prefix}-primary-node-group"] + values = ["${local.sole_tenant_name_prefix}-primary-node-group"] } } } @@ -918,12 +918,12 @@ resource "google_compute_instance" "sap_hana_ha_secondary_instance" { for_each = (local.native_bm || var.sole_tenant_deployment) ? [1] : [] content { on_host_maintenance = local.native_bm ? "TERMINATE" : null - dynamic "node_affinities" { + dynamic "node_affinities" { for_each = length(resource.google_compute_node_group.sole_tenant_secondary_node_group) > 0 ? [1] : [] content { - key = "compute.googleapis.com/node-group-name" + key = "compute.googleapis.com/node-group-name" operator = "IN" - values = ["${local.sole_tenant_name_prefix}-secondary-node-group"] + values = ["${local.sole_tenant_name_prefix}-secondary-node-group"] } } } @@ -1078,12 +1078,12 @@ resource "google_compute_instance" "sap_hana_ha_secondary_workers" { for_each = (local.native_bm || var.sole_tenant_deployment) ? [1] : [] content { on_host_maintenance = local.native_bm ? "TERMINATE" : null - dynamic "node_affinities" { + dynamic "node_affinities" { for_each = length(resource.google_compute_node_group.sole_tenant_secondary_node_group) > 0 ? [1] : [] content { - key = "compute.googleapis.com/node-group-name" + key = "compute.googleapis.com/node-group-name" operator = "IN" - values = ["${local.sole_tenant_name_prefix}-secondary-node-group"] + values = ["${local.sole_tenant_name_prefix}-secondary-node-group"] } } } diff --git a/modules/sap_hana_ha/variables.tf b/modules/sap_hana_ha/variables.tf index 0d76b2a5..0912c3e4 100644 --- a/modules/sap_hana_ha/variables.tf +++ b/modules/sap_hana_ha/variables.tf @@ -608,19 +608,19 @@ variable "log_stripe_size" { } variable "custom_primary_metadata" { - type = map(string) + type = map(string) description = "Optional - default is empty. Custom metadata to be added to the primary VM." default = {} } variable "custom_secondary_metadata" { - type = map(string) + type = map(string) description = "Optional - default is empty. Custom metadata to be added to the secondary VMs." default = {} } variable "custom_mm_metadata" { - type = map(string) + type = map(string) description = "Optional - default is empty. Custom metadata to be added to the majority maker VM." default = {} } \ No newline at end of file diff --git a/modules/sap_hana_scaleout/main.tf b/modules/sap_hana_scaleout/main.tf index 41295dcf..65547cb1 100644 --- a/modules/sap_hana_scaleout/main.tf +++ b/modules/sap_hana_scaleout/main.tf @@ -357,7 +357,7 @@ resource "google_compute_instance" "sap_hana_scaleout_primary_instance" { } } - metadata = merge(var.custom_primary_metadata,{ + metadata = merge(var.custom_primary_metadata, { startup-script = local.primary_startup_url post_deployment_script = var.post_deployment_script sap_deployment_debug = var.sap_deployment_debug diff --git a/modules/sap_hana_scaleout/variables.tf b/modules/sap_hana_scaleout/variables.tf index 2689861c..1aacac75 100644 --- a/modules/sap_hana_scaleout/variables.tf +++ b/modules/sap_hana_scaleout/variables.tf @@ -380,19 +380,19 @@ variable "can_ip_forward" { } variable "custom_primary_metadata" { - type = map(string) + type = map(string) description = "Optional - default is empty. Custom metadata to be added to the primary VM." default = {} } variable "custom_secondary_metadata" { - type = map(string) + type = map(string) description = "Optional - default is empty. Custom metadata to be added to the secondary VMs." default = {} } variable "custom_standby_metadata" { - type = map(string) + type = map(string) description = "Optional - default is empty. Custom metadata to be added to the standby VMs." default = {} } diff --git a/modules/sap_maxdb/variables.tf b/modules/sap_maxdb/variables.tf index 1f7839da..611779ba 100644 --- a/modules/sap_maxdb/variables.tf +++ b/modules/sap_maxdb/variables.tf @@ -174,7 +174,7 @@ variable "can_ip_forward" { } variable "custom_metadata" { - type = map(string) + type = map(string) description = "Optional - default is empty. Custom metadata to be added to the VM." default = {} } diff --git a/modules/sap_nw/variables.tf b/modules/sap_nw/variables.tf index dc678a74..b4176614 100644 --- a/modules/sap_nw/variables.tf +++ b/modules/sap_nw/variables.tf @@ -147,7 +147,7 @@ variable "can_ip_forward" { } variable "custom_metadata" { - type = map(string) + type = map(string) description = "Optional - default is empty. Custom metadata to be added to the VM." default = {} } diff --git a/modules/sap_nw_ha/main.tf b/modules/sap_nw_ha/main.tf index 0fe4eb45..56272870 100644 --- a/modules/sap_nw_ha/main.tf +++ b/modules/sap_nw_ha/main.tf @@ -173,7 +173,7 @@ resource "google_compute_instance" "scs_instance" { } } } - metadata = merge(var.custom_primary_metadata,{ + metadata = merge(var.custom_primary_metadata, { startup-script = local.primary_startup_url # SCS settings diff --git a/modules/sap_nw_ha/variables.tf b/modules/sap_nw_ha/variables.tf index cd110686..07f60505 100644 --- a/modules/sap_nw_ha/variables.tf +++ b/modules/sap_nw_ha/variables.tf @@ -342,13 +342,13 @@ variable "can_ip_forward" { } variable "custom_primary_metadata" { - type = map(string) + type = map(string) description = "Optional - default is empty. Custom metadata to be added to the primary VM." default = {} } variable "custom_secondary_metadata" { - type = map(string) + type = map(string) description = "Optional - default is empty. Custom metadata to be added to the secondary VM." default = {} }