-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
issue in azurerm_storage_container creation #24677
Comments
Hi @manishingole-coder! The output you're showing is actually from the AzureRM provider, not terraform core. Based on the information you've provided, I don't immediately see evidence of a bug in Terraform core or in the AzureRM provider. I do see the text output There are two possible next steps for you:
I'm going to close this for now, because I think the community forum is the right approach. My recommendation is that you first take this to the community forum, ask for troubleshooting help, and then file an issue with the AzureRM provider if you're able to demonstrate that this is a bug in the provider. |
@manishingole-coder (and anyone encountering this), I had a similar problem (TF 12.23, azurerm provider 2.7) and it had to do with the 'default_action = "Deny"' clause in the azurerm_storage_account resource definition. I was able to get this to work by removing the network_rules block from that resource and then adding a separate azurerm_storage_account_network_rules resource with a dependency on my container resource. Not sure if this dependency works this way but I wanted to try to introduce ordering where the container was hopefully created before the network rule was put in place. Here is my example:
|
FYI, this allowed me to create the container, but subsequent TF plans failed with the same error. Seems this is related to open issue hashicorp/terraform-provider-azurerm#2977. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Hi there,
Terraform Version
0.12.20
Azure provider version 2.5.0
Terraform Configuration Files
Create storage account
resource "azurerm_storage_account" "terraform_storage" {
name = var.storage_account_name
resource_group_name = var.rg_name
location = var.region
account_tier = "Standard"
account_replication_type = "GRS"
account_kind = "Storage"
network_rules {
default_action = "Deny"
virtual_network_subnet_ids = [data.azurerm_subnet.publicsubnet.id]
}
}
Create container
resource "azurerm_storage_container" "mycontainer" {
name = "walfiles"
storage_account_name = azurerm_storage_account.terraform_storage.name
container_access_type = "private"
}
Debug Output
Error: Error checking for existence of existing Container "walfiles" (Account "storagename" / Resource Group "rgname"): containers.Client#GetProperties: Failure responding to request: StatusCode=403 -- Original Error: autorest/azure: Service returned an error. Status=403 Code="AuthorizationFailure" Message="This request is not authorized to perform this operation.\nRequestId:d0b6a7c2-b01e-00f6-0516-13e510000000\nTime:2020-04-15T11:11:58.4707719Z"
Crash Output
Error: Error checking for existence of existing Container "walfiles" (Account "storagename" / Resource Group "rgname"): containers.Client#GetProperties: Failure responding to request: StatusCode=403 -- Original Error: autorest/azure: Service returned an error. Status=403 Code="AuthorizationFailure" Message="This request is not authorized to perform this operation.\nRequestId:d0b6a7c2-b01e-00f6-0516-13e510000000\nTime:2020-04-15T11:11:58.4707719Z"
Expected Behavior
it should create a container.
Actual Behavior
Error: Error checking for existence of existing Container "walfiles" (Account "storagename" / Resource Group "rgname"): containers.Client#GetProperties: Failure responding to request: StatusCode=403 -- Original Error: autorest/azure: Service returned an error. Status=403 Code="AuthorizationFailure" Message="This request is not authorized to perform this operation.\nRequestId:d0b6a7c2-b01e-00f6-0516-13e510000000\nTime:2020-04-15T11:11:58.4707719Z"
Steps to Reproduce
Please list the full steps required to reproduce the issue, for example:
terraform init
terraform apply
Additional Context
No
References
The text was updated successfully, but these errors were encountered: