From d9fb3a3279c71448fd5458cef40b650f9ce1adcb Mon Sep 17 00:00:00 2001 From: anubi <80677434+fabriziopapi@users.noreply.github.com> Date: Mon, 20 Feb 2023 12:51:06 +0100 Subject: [PATCH] fix(storage_account): Reaplce identity with enable_identity in storage_account (#67) reaplce identity with enable_identity in storage_account --- storage_account/README.md | 2 +- storage_account/main.tf | 4 ++-- storage_account/variables.tf | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/storage_account/README.md b/storage_account/README.md index 9403eb35..bc7f65c1 100644 --- a/storage_account/README.md +++ b/storage_account/README.md @@ -166,7 +166,7 @@ No modules. | [cross\_tenant\_replication\_enabled](#input\_cross\_tenant\_replication\_enabled) | (Optional) Should cross Tenant replication be enabled? Defaults to false. | `bool` | `false` | no | | [custom\_domain](#input\_custom\_domain) | Custom domain for accessing blob data |
object({
name = string
use_subdomain = bool
})
|
{
"name": null,
"use_subdomain": false
}
| no | | [domain](#input\_domain) | (Optional) Specifies the domain of the Storage Account. | `string` | `null` | no | -| [enable\_identity](#input\_enable\_identity) | (Optional) Specifies the type of Managed Service Identity that should be configured on this Storage Account. Possible values are SystemAssigned, UserAssigned, SystemAssigned, UserAssigned (to enable both). | `string` | `null` | no | +| [enable\_identity](#input\_enable\_identity) | (Optional) If true, set the identity as SystemAssigned | `bool` | `false` | no | | [enable\_low\_availability\_alert](#input\_enable\_low\_availability\_alert) | Enable the Low Availability alert. Default is true | `bool` | `true` | no | | [error\_404\_document](#input\_error\_404\_document) | The absolute path to a custom webpage that should be used when a request is made which does not correspond to an existing file. | `string` | `null` | no | | [index\_document](#input\_index\_document) | The webpage that Azure Storage serves for requests to the root of a website or any subfolder. For example, index.html. The value is case-sensitive. | `string` | `null` | no | diff --git a/storage_account/main.tf b/storage_account/main.tf index 4ae4c6bc..5639fffc 100644 --- a/storage_account/main.tf +++ b/storage_account/main.tf @@ -64,9 +64,9 @@ resource "azurerm_storage_account" "this" { } dynamic "identity" { - for_each = (var.enable_identity != null ? [1] : []) + for_each = (var.enable_identity ? [1] : []) content { - type = var.identity_type + type = "SystemAssigned" } } diff --git a/storage_account/variables.tf b/storage_account/variables.tf index d3948a14..20869e16 100644 --- a/storage_account/variables.tf +++ b/storage_account/variables.tf @@ -81,9 +81,9 @@ variable "cross_tenant_replication_enabled" { } variable "enable_identity" { - description = "(Optional) Specifies the type of Managed Service Identity that should be configured on this Storage Account. Possible values are SystemAssigned, UserAssigned, SystemAssigned, UserAssigned (to enable both)." - type = string - default = null + description = "(Optional) If true, set the identity as SystemAssigned" + type = bool + default = false } # Note: If specifying network_rules,