-
Notifications
You must be signed in to change notification settings - Fork 4.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
already exists - to be managed via Terraform this resource needs to be imported into the State. Please see the resource documentation for "azurerm_storage_account_network_rule" for more information. #19718
Comments
I would like to add more details to this. The request including payload that was sent to the management API - as captured by terraform trace log:
Notice there is no field for
If I set value of |
Update - thanks for the suggestion from Azure Support: |
Can confirm also affected by this issue version |
@ronarieke @ffforest See #19719 for possible fix |
We are also seeing this issue. |
Workaround is to enable the |
#19719 (comment) reports issue resolved |
@srjennings Yes it seems like Microsoft have reverted some changes on their end with the storage resource provider. |
This functionality has been released in v3.38.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
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. |
Is there an existing issue for this?
Community Note
Terraform Version
1.36.0
AzureRM Provider Version
3.36.0
Affected Resource(s)/Data Source(s)
azurerm_storage_account_network_rules
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Should be able to deploy a storage account network rule without updating the state to include the state.
This is a breaking change on an existing workflow.
Need to understand if there are any backward compatibility issues, or recent changes that require the storage account to be added to the state before the network rule can be created.
Actual Behaviour
network rule cannot be created at the same time as the storage account and the storage account needs to be added to the state before the network rule can be created. This is a breaking change of existing workflows.
The azurerm and terraform API versions did not change, but we tried updating the versions to the most recent version and that did not resolve the issue
Steps to Reproduce
add storage account and network rule to the terraform spec, apply the terraform spec.
Storage account successfully gets created, network rule fails with the validation saying the storage account should be added to the state because it already exists.
This is a problem because we need to create the storage account and network rule in the same operation, but that functionality is different from a few days ago.
Important Factoids
Public Azure
References
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_account_network_rules
https://learn.microsoft.com/en-us/azure/templates/microsoft.storage/storageaccounts?pivots=deployment-language-terraform#networkruleset-2
The text was updated successfully, but these errors were encountered: