From 09f21655fb8778b8c74fb10296bccee254d94a7b Mon Sep 17 00:00:00 2001 From: Jakub Igla Date: Thu, 1 Dec 2022 10:46:31 +0100 Subject: [PATCH 1/2] feat: Add HNS support --- README.md | 1 + main.tf | 1 + variables.tf | 6 ++++++ 3 files changed, 8 insertions(+) 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..50abd29 100644 --- a/main.tf +++ b/main.tf @@ -40,6 +40,7 @@ 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 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..fb82eea 100644 --- a/variables.tf +++ b/variables.tf @@ -34,6 +34,12 @@ 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 "access_tier" { description = "Defines the access tier for BlobStorage and StorageV2 accounts. Valid options are Hot and Cool." default = "Hot" From 20a5ed19fdd1917d3a00dd2498083da8017c1fb6 Mon Sep 17 00:00:00 2001 From: Jakub Igla Date: Wed, 1 Mar 2023 17:45:20 +0100 Subject: [PATCH 2/2] feat: Add SFTP support --- main.tf | 3 ++- variables.tf | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 50abd29..57c3309 100644 --- a/main.tf +++ b/main.tf @@ -40,7 +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 + 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 fb82eea..1f20836 100644 --- a/variables.tf +++ b/variables.tf @@ -40,6 +40,12 @@ variable "is_hns_enabled" { 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"