Skip to content

Commit

Permalink
Control the creation of SMB file share during workload zone deployment (
Browse files Browse the repository at this point in the history
#646)



* Add support for selecting if SMB shares are created during installation. To preserve the existing behavior the variable `install_create_smb_shares` defaults to true.

* Set default value for install_create_smb_shares variable

---------

Co-authored-by: Kimmo Forss <[email protected]>
Co-authored-by: Kimmo Forss <[email protected]>
  • Loading branch information
3 people authored Oct 7, 2024
1 parent f0d4166 commit 5757b22
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions deploy/terraform/run/sap_landscape/module.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ module "sap_landscape" {
enable_rbac_authorization_for_keyvault = var.enable_rbac_authorization_for_keyvault
infrastructure = local.infrastructure
install_always_create_fileshares = var.install_always_create_fileshares
install_create_smb_shares = var.install_create_smb_shares
install_private_endpoint_id = var.install_private_endpoint_id
install_storage_account_id = var.install_storage_account_id
install_volume_size = var.install_volume_size
Expand Down
6 changes: 5 additions & 1 deletion deploy/terraform/run/sap_landscape/tfvar_variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -486,10 +486,14 @@ variable "install_private_endpoint_id" {
}

variable "install_always_create_fileshares" {
description = "Value indicating if file shares are created ehen using existing storage accounts"
description = "Value indicating if file shares are created when using existing storage accounts"
default = false
}

variable "install_create_smb_shares" {
description = "Value indicating if SMB shares should be created"
default = true
}

variable "Agent_IP" {
description = "If provided, contains the IP address of the agent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ resource "azurerm_storage_share" "install" {

resource "azurerm_storage_share" "install_smb" {
provider = azurerm.main
count = local.use_AFS_for_shared ? (
count = local.use_AFS_for_shared && var.install_create_smb_shares ? (
length(var.install_storage_account_id) > 0 ? (
var.install_always_create_fileshares ? 1 : 0) : (
1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,10 @@ variable "install_storage_account_id" { description = "Azure R

variable "install_private_endpoint_id" { description = "Azure Resource Identifier for an private endpoint connection" }
variable "install_always_create_fileshares" { description = "Value indicating if file shares are created ehen using existing storage accounts" }

variable "install_create_smb_shares" {
description = "Value indicating if SMB shares should be created"
default = true
}
variable "storage_account_replication_type" {
description = "Storage account replication type"
default = "ZRS"
Expand Down

0 comments on commit 5757b22

Please sign in to comment.