Skip to content

Commit 84dea36

Browse files
author
Marges, RSY (Rick)
committed
Provide Terraform fixes
These fixes include: - Handle empty deployer state when not using a dpeloyer - Adding tags to more resources - Adding 'var.' before variables in output file
1 parent e7cbd5f commit 84dea36

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

deploy/terraform/terraform-units/modules/sap_landscape/storage_accounts.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@ resource "azurerm_private_endpoint" "transport" {
396396
local.prefix,
397397
local.resource_suffixes.storage_private_link_transport
398398
)
399+
tags = var.tags
399400
custom_network_interface_name = format("%s%s%s%s",
400401
var.naming.resource_prefixes.storage_private_link_transport,
401402
local.prefix,
@@ -587,6 +588,7 @@ resource "azurerm_private_endpoint" "install" {
587588
local.prefix,
588589
local.resource_suffixes.storage_private_link_install
589590
)
591+
tags = var.tags
590592
custom_network_interface_name = format("%s%s%s%s",
591593
var.naming.resource_prefixes.storage_private_link_install,
592594
local.prefix,

deploy/terraform/terraform-units/modules/sap_landscape/variables_local.tf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ locals {
2525
region = var.infrastructure.region
2626

2727
// Firewall
28-
29-
30-
firewall_exists = length(trimspace(coalesce(var.deployer_tfstate.firewall_id, " "))) > 0
28+
firewall_exists = var.use_deployer ? length(trimspace(coalesce(var.deployer_tfstate.firewall_id, ""))) > 0 : false
3129
firewall_id = local.firewall_exists ? try(var.deployer_tfstate.firewall_id, "") : ""
3230
firewall_ip = local.firewall_exists ? try(var.deployer_tfstate.firewall_ip, "") : ""
3331
firewall_name = local.firewall_exists ? try(split("/", local.firewall_id)[8], "") : ""

deploy/terraform/terraform-units/modules/sap_system/output_files/inventory.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,10 @@ resource "local_file" "sap-parameters_yml" {
266266
calapi_kv = var.calapi_kv
267267
sap_cal_product_name = var.sap_cal_product_name
268268

269-
single_server = length(webdispatcher_server_ips) + length(application_server_ips) + length(scs_server_ips) + length(database_server_ips) == 1 ? (
270-
true) : (
271-
false
272-
)
269+
single_server = length(var.webdispatcher_server_ips) + length(var.application_server_ips) + length(var.scs_server_ips) + length(var.database_server_ips) == 1 ? (
270+
true) : (
271+
false
272+
)
273273

274274
}
275275
)

0 commit comments

Comments
 (0)