Azure / terraform-azurerm-avm-res-storage-storageaccount

This Terraform module is designed to create Azure Storage Accounts and its related resources, including blob containers, queues, tables, and file shares. It also supports the creation of a storage account private endpoint which provides secure and direct connectivity to Azure Storage over a private network.
https://registry.terraform.io/modules/Azure/avm-res-storage-storageaccount
MIT License
22 stars 36 forks source link

"default_share_level_permission" is not expected here #175

Open pieter-jangoeman opened 1 month ago

pieter-jangoeman commented 1 month ago

Is there an existing issue for this?

Greenfield/Brownfield provisioning

greenfield

Terraform Version

latest

Module Version

0.2.7

AzureRM Provider Version

3.114.0

Affected Resource(s)/Data Source(s)

azurerm_storage_account

Terraform Configuration Files

module "avm-res-storage-storageaccount" { source = "Azure/avm-res-storage-storageaccount/azurerm" version = "0.2.7"

name = "st${var.prefix}${var.lztri}${var.env}${var.frontend.name}dls01" location = var.location resource_group_name = "${var.prefix}-${var.loc}-${var.lztri}-${var.env}-frontend-rg" static_website = { index_document = var.frontend.index_document }

depends_on = [module.avm-res-resources-resourcegroup] }

tfvars variables values

frontend = { name = "frontend" index_document = "index.html" }

Debug Output/Panic Output

│ Error: Unsupported argument │ │ on .terraform/modules/avm-res-storage-storageaccount/main.tf line 34, in resource "azurerm_storage_account" "this": │ 34: default_share_level_permission = azure_files_authentication.value.default_share_level_permission │ │ An argument named "default_share_level_permission" is not expected here.

Expected Behaviour

Storage account should be deployed, the var talked about in the error is never used.

Actual Behaviour

Deployment failed with this error:

│ Error: Unsupported argument │ │ on .terraform/modules/avm-res-storage-storageaccount/main.tf line 34, in resource "azurerm_storage_account" "this": │ 34: default_share_level_permission = azure_files_authentication.value.default_share_level_permission │ │ An argument named "default_share_level_permission" is not expected here.

Steps to Reproduce

execute the code

Important Factoids

No response

References

No response

chinthakaru commented 3 weeks ago

@pieter-jangoeman I tried to reproduce the issue, but i don't get any issues with the given values. Please can you share the complete code ?

pieter-jangoeman commented 3 weeks ago

Hi,

sure!

This is that part of the code:

module "avm-res-web-staticsite" { source = "Azure/avm-res-web-staticsite/azurerm" version = "0.4.0"

name = "${var.prefix}-${var.loc}-${var.lztri}-${var.env} -stapp" resource_group_name = "${var.prefix}-${var.loc}-${var.lztri}-${var.env} -webapp-rg" location = var.location sku_tier = "Standard" sku_size = "Standard" private_endpoints = { "private-endpoint" = { name = "${var.prefix}-${var.loc}-${var.lztri} -${var.env}-pep-frontend-01" subnet_resource_id = "/subscriptions/${data. azurerm_client_config.current.subscription_id}/resourceGroups/${var.prefix}- ${var.loc}-${var.lztri}-${var.env} -network-rg/providers/Microsoft.Network/virtualNetworks/${var.prefix}-${var. loc}-${var.lztri}-${var.env}-vn/subnets/${var.private_endpoint_config ["staticwebapp"].subnet_name}" private_dns_zone_group_name = var.private_endpoint_config[ "staticwebapp"].private_dns_zone_group[0].name private_dns_zone_resource_ids = ["/subscriptions/${var. connectivity_subscription_id}/resourceGroups/${var. private_dns_zone_resourcegroup_name} /providers/Microsoft.Network/privateDnsZones/${var.private_endpoint_config ["staticwebapp"].private_dns_zone_group[0].name}"] } } tags = merge(var.tags, {}) depends_on = [module.avm-res-resources-resourcegroup] }

module "avm-res-operationalinsights-workspace" { source = "Azure/avm-res-operationalinsights-workspace/azurerm" version = "0.4.1"

name = "${var.prefix}-${var.loc}-${var.lztri}-${var.env} -log" resource_group_name = "${var.prefix}-${var.loc}-${var.lztri}-${var.env} -loganalytics-rg" location = var.location

depends_on = [module.avm-res-resources-resourcegroup] }

Op ma 4 nov 2024 om 16:15 schreef chinthakaru @.***>:

@pieter-jangoeman https://github.com/pieter-jangoeman I tried to reproduce the issue, but i don't get any issues with the given values. Please can you share the complete code ?

— Reply to this email directly, view it on GitHub https://github.com/Azure/terraform-azurerm-avm-res-storage-storageaccount/issues/175#issuecomment-2454981071, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACFG76C7JNKAYWFZUMUZWKDZ66FP3AVCNFSM6AAAAABQS5XFDOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJUHE4DCMBXGE . You are receiving this because you were mentioned.Message ID: <Azure/terraform-azurerm-avm-res-storage-storageaccount/issues/175/2454981071 @github.com>

FV1F167 commented 1 week ago

I had the same issue with the AzureRM provider version 3.114.0.

As a workaround, I upgraded to 3.117.0 and it worked. (As I am reverse engineering a Clickops deployment using aztfexport, upgrade to 4.x is not an option for me right now, however, you might want to consider that, too).