From b96e30b3c3bd30e183cc01965176c82af1a154aa Mon Sep 17 00:00:00 2001 From: Michele Pagot Date: Tue, 12 Nov 2024 14:13:08 +0100 Subject: [PATCH] Remove gcp_credentials_file variable at module level (#292) Remove this setting where not needed and let the deployment works without it. --- terraform/gcp/main.tf | 35 +++++++++---------- terraform/gcp/modules/drbd_node/variables.tf | 5 --- terraform/gcp/modules/hana_node/variables.tf | 5 --- .../gcp/modules/netweaver_node/variables.tf | 5 --- 4 files changed, 16 insertions(+), 34 deletions(-) diff --git a/terraform/gcp/main.tf b/terraform/gcp/main.tf index 6f01c763..d6cb6871 100644 --- a/terraform/gcp/main.tf +++ b/terraform/gcp/main.tf @@ -138,23 +138,22 @@ module "common_variables" { } module "drbd_node" { - source = "./modules/drbd_node" - common_variables = module.common_variables.configuration - name = var.drbd_name - network_domain = var.drbd_network_domain == "" ? var.network_domain : var.drbd_network_domain - drbd_count = var.drbd_enabled == true ? 2 : 0 - vm_size = var.drbd_machine_type - compute_zones = local.compute_zones - network_name = local.vpc_name - network_subnet_name = local.subnet_name - os_image = local.drbd_os_image - drbd_data_disk_size = var.drbd_data_disk_size - drbd_data_disk_type = var.drbd_data_disk_type - gcp_credentials_file = var.gcp_credentials_file - host_ips = local.drbd_ips - iscsi_srv_ip = module.iscsi_server.iscsisrv_ip - nfs_mounting_point = var.drbd_nfs_mounting_point - nfs_export_name = var.netweaver_sid + source = "./modules/drbd_node" + common_variables = module.common_variables.configuration + name = var.drbd_name + network_domain = var.drbd_network_domain == "" ? var.network_domain : var.drbd_network_domain + drbd_count = var.drbd_enabled == true ? 2 : 0 + vm_size = var.drbd_machine_type + compute_zones = local.compute_zones + network_name = local.vpc_name + network_subnet_name = local.subnet_name + os_image = local.drbd_os_image + drbd_data_disk_size = var.drbd_data_disk_size + drbd_data_disk_type = var.drbd_data_disk_type + host_ips = local.drbd_ips + iscsi_srv_ip = module.iscsi_server.iscsisrv_ip + nfs_mounting_point = var.drbd_nfs_mounting_point + nfs_export_name = var.netweaver_sid } module "netweaver_node" { @@ -169,7 +168,6 @@ module "netweaver_node" { network_name = local.vpc_name network_subnet_name = local.subnet_name os_image = local.netweaver_os_image - gcp_credentials_file = var.gcp_credentials_file host_ips = local.netweaver_ips iscsi_srv_ip = module.iscsi_server.iscsisrv_ip netweaver_software_bucket = var.netweaver_software_bucket @@ -187,7 +185,6 @@ module "hana_node" { network_name = local.vpc_name network_subnet_name = local.subnet_name os_image = local.hana_os_image - gcp_credentials_file = var.gcp_credentials_file host_ips = local.hana_ips iscsi_srv_ip = module.iscsi_server.iscsisrv_ip hana_data_disk_type = var.hana_data_disk_type diff --git a/terraform/gcp/modules/drbd_node/variables.tf b/terraform/gcp/modules/drbd_node/variables.tf index 54bd8be9..01fced9e 100644 --- a/terraform/gcp/modules/drbd_node/variables.tf +++ b/terraform/gcp/modules/drbd_node/variables.tf @@ -56,11 +56,6 @@ variable "drbd_data_disk_type" { default = "pd-standard" } -variable "gcp_credentials_file" { - description = "Path to your local gcp credentials file" - type = string -} - variable "host_ips" { description = "ip addresses to set to the nodes" type = list(string) diff --git a/terraform/gcp/modules/hana_node/variables.tf b/terraform/gcp/modules/hana_node/variables.tf index a8dbcebd..3b4bdcd7 100644 --- a/terraform/gcp/modules/hana_node/variables.tf +++ b/terraform/gcp/modules/hana_node/variables.tf @@ -43,11 +43,6 @@ variable "network_domain" { type = string } -variable "gcp_credentials_file" { - description = "Path to your local gcp credentials file" - type = string -} - variable "host_ips" { description = "ip addresses to set to the nodes" type = list(string) diff --git a/terraform/gcp/modules/netweaver_node/variables.tf b/terraform/gcp/modules/netweaver_node/variables.tf index 383b943b..f905afe6 100644 --- a/terraform/gcp/modules/netweaver_node/variables.tf +++ b/terraform/gcp/modules/netweaver_node/variables.tf @@ -47,11 +47,6 @@ variable "network_domain" { type = string } -variable "gcp_credentials_file" { - description = "Path to your local gcp credentials file" - type = string -} - variable "host_ips" { description = "ip addresses to set to the nodes" type = list(string)