diff --git a/README.md b/README.md index 14cb8c6..b2c6a7a 100644 --- a/README.md +++ b/README.md @@ -288,6 +288,7 @@ Name | Description | Type | Default `account_kind`|General-purpose v2 accounts: Basic storage account type for blobs, files, queues, and tables.|string|`"StorageV2"` `skuname`|The SKUs supported by Microsoft Azure Storage. Valid options are Premium_LRS, Premium_ZRS, Standard_GRS, Standard_GZRS, Standard_LRS, Standard_RAGRS, Standard_RAGZRS, Standard_ZRS|string|`Standard_RAGRS` `access_tier`|Defines the access tier for BlobStorage and StorageV2 accounts. Valid options are Hot and Cool.|string|`"Hot"` +`is_hns_enabled`|Is Hierarchical Namespace enabled? This can be used with Azure Data Lake Storage Gen 2|bool|`false` `min_tls_version`|The minimum supported TLS version for the storage account. Possible values are `TLS1_0`, `TLS1_1`, and `TLS1_2` |string|`"TLS1_2"` `blob_soft_delete_retention_days`|Specifies the number of days that the blob should be retained, between `1` and `365` days.|number|`7` `container_soft_delete_retention_days`|Specifies the number of days that the blob should be retained, between `1` and `365` days.|number|`7` diff --git a/main.tf b/main.tf index 407532a..57c3309 100644 --- a/main.tf +++ b/main.tf @@ -40,6 +40,8 @@ resource "azurerm_storage_account" "storeacc" { account_tier = local.account_tier account_replication_type = local.account_replication_type enable_https_traffic_only = true + is_hns_enabled = var.is_hns_enabled || var.sftp_enabled + sftp_enabled = var.sftp_enabled min_tls_version = var.min_tls_version tags = merge({ "ResourceName" = substr(format("sta%s%s", lower(replace(var.storage_account_name, "/[[:^alnum:]]/", "")), random_string.unique.result), 0, 24) }, var.tags, ) diff --git a/variables.tf b/variables.tf index db5aee0..1f20836 100644 --- a/variables.tf +++ b/variables.tf @@ -34,6 +34,18 @@ variable "skuname" { type = string } +variable "is_hns_enabled" { + type = bool + default = false + description = "Is Hierarchical Namespace enabled? This can be used with Azure Data Lake Storage Gen 2" +} + +variable "sftp_enabled" { + type = bool + default = false + description = "Enable SFTP for the storage account" +} + variable "access_tier" { description = "Defines the access tier for BlobStorage and StorageV2 accounts. Valid options are Hot and Cool." default = "Hot"