Skip to content

Commit

Permalink
No public description
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 684059512
  • Loading branch information
sjswerdlow authored and copybara-github committed Oct 9, 2024
1 parent 592ce59 commit 0d5833d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions modules/sap_hana/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ resource "google_compute_instance" "sap_hana_primary_instance" {
content {
on_host_maintenance = local.native_bm ? "TERMINATE" : null
dynamic "node_affinities" {
for_each = resource.google_compute_node_group.sole_tenant_node_group != null ? [1] : []
for_each = length(resource.google_compute_node_group.sole_tenant_node_group) > 0 ? [1] : []
content {
key = "compute.googleapis.com/node-group-name"
operator = "IN"
Expand Down Expand Up @@ -602,7 +602,7 @@ resource "google_compute_instance" "sap_hana_worker_instances" {
content {
on_host_maintenance = local.native_bm ? "TERMINATE" : null
dynamic "node_affinities" {
for_each = resource.google_compute_node_group.sole_tenant_node_group != null ? [1] : []
for_each = length(resource.google_compute_node_group.sole_tenant_node_group) > 0 ? [1] : []
content {
key = "compute.googleapis.com/node-group-name"
operator = "IN"
Expand Down
8 changes: 4 additions & 4 deletions modules/sap_hana_ha/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ resource "google_compute_instance" "sap_hana_ha_primary_instance" {
content {
on_host_maintenance = local.native_bm ? "TERMINATE" : null
dynamic "node_affinities" {
for_each = resource.google_compute_node_group.sole_tenant_primary_node_group != null ? [1] : []
for_each = length(resource.google_compute_node_group.sole_tenant_primary_node_group) > 0 ? [1] : []
content {
key = "compute.googleapis.com/node-group-name"
operator = "IN"
Expand Down Expand Up @@ -676,7 +676,7 @@ resource "google_compute_instance" "sap_hana_ha_primary_workers" {
content {
on_host_maintenance = local.native_bm ? "TERMINATE" : null
dynamic "node_affinities" {
for_each = resource.google_compute_node_group.sole_tenant_primary_node_group != null ? [1] : []
for_each = length(resource.google_compute_node_group.sole_tenant_primary_node_group) > 0 ? [1] : []
content {
key = "compute.googleapis.com/node-group-name"
operator = "IN"
Expand Down Expand Up @@ -917,7 +917,7 @@ resource "google_compute_instance" "sap_hana_ha_secondary_instance" {
content {
on_host_maintenance = local.native_bm ? "TERMINATE" : null
dynamic "node_affinities" {
for_each = resource.google_compute_node_group.sole_tenant_secondary_node_group != null ? [1] : []
for_each = length(resource.google_compute_node_group.sole_tenant_secondary_node_group) > 0 ? [1] : []
content {
key = "compute.googleapis.com/node-group-name"
operator = "IN"
Expand Down Expand Up @@ -1076,7 +1076,7 @@ resource "google_compute_instance" "sap_hana_ha_secondary_workers" {
content {
on_host_maintenance = local.native_bm ? "TERMINATE" : null
dynamic "node_affinities" {
for_each = resource.google_compute_node_group.sole_tenant_secondary_node_group != null ? [1] : []
for_each = length(resource.google_compute_node_group.sole_tenant_secondary_node_group) > 0 ? [1] : []
content {
key = "compute.googleapis.com/node-group-name"
operator = "IN"
Expand Down

0 comments on commit 0d5833d

Please sign in to comment.