You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
provider"azurerm" {
version="=2.6"features {}
}
resource"azurerm_resource_group""test-cors" {
name="test-cors-RG"location="West Europe"
}
resource"azurerm_storage_account""test-cors" {
name="terraformtestcors"resource_group_name=azurerm_resource_group.test-cors.namelocation=azurerm_resource_group.test-cors.locationaccount_tier="Standard"account_replication_type="LRS"enable_https_traffic_only=trueaccount_kind="StorageV2"static_website {
index_document="index.html"
}
blob_properties {
cors_rule {
allowed_headers=["x-ms-*"]
allowed_methods=[
"PUT",
"OPTIONS",
"POST",
"GET",
"HEAD",
"DELETE",
"MERGE",
"PATCH", # Not allowed by terraform CLI, but present on Azure
]
allowed_origins=["http://localhost:61674"]
exposed_headers=["x-ms-*"]
max_age_in_seconds=86400
}
}
tags={"DETELEME":"THIS IS A TEST"}
}
Debug Output
terraform validate:
Error: expected blob_properties.0.cors_rule.0.allowed_methods.7 to be one of [DELETE GET HEAD MERGE POST OPTIONS PUT], got PATCH
on test-cors.tf line 11, in resource "azurerm_storage_account""test-cors":
11: resource "azurerm_storage_account""test-cors" {
Expected Behavior
PATH To be a valid method.
Actual Behavior
Error from the validator
Steps to Reproduce
terraform init
terraform validate
Additional Context
In the Azure portal the patch is listed as a valid method:
Thanks for reporting this! I think that this is an issue to be addressed in the AzureRM Terraform provider, rather than in core. I'm going to label it as such, and the HashiBot will shortly migrate it over to the provider GitHub repository. Please feel free to re-open this if they determine that it is indeed an issue that needs to be addressed in Terraform core.
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.
ghost
locked and limited conversation to collaborators
Jun 13, 2020
This issue was closed.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Terraform Version
Terraform Configuration Files
Debug Output
terraform validate:
Expected Behavior
PATH To be a valid method.
Actual Behavior
Error from the validator
Steps to Reproduce
terraform init
terraform validate
Additional Context
In the Azure portal the patch is listed as a valid method:
References
The documentation is consistent with the validator and doesn't list PATCH as a valid method for this parameter:
https://www.terraform.io/docs/providers/azurerm/r/storage_account.html#allowed_methods
The text was updated successfully, but these errors were encountered: