-
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
azurerm 1.24 & app_service CORS #3188
Comments
Hi @dhabierre, from looking at the PR that added this functionality, it looks like |
Hi Lucretius, You are right! My bad eyes :/ Thanks. |
I can't deploy the app_service with site_config / cors resource "azurerm_app_service" "app_service_backend" {
name = "${local.app_resource_prefix}-app-service-backend"
location = "${azurerm_resource_group.app_resource_group.location}"
resource_group_name = "${azurerm_resource_group.app_resource_group.name}"
app_service_plan_id = "${azurerm_app_service_plan.app_service_plan.id}"
https_only = true
identity {
type = "SystemAssigned"
}
tags = "${local.app_tags}"
} => OK resource "azurerm_app_service" "app_service_backend" {
name = "${local.app_resource_prefix}-app-service-backend"
location = "${azurerm_resource_group.app_resource_group.location}"
resource_group_name = "${azurerm_resource_group.app_resource_group.name}"
app_service_plan_id = "${azurerm_app_service_plan.app_service_plan.id}"
https_only = true
identity {
type = "SystemAssigned"
}
site_config {
cors {
allowed_origins = "${split(",", var.cors_allowed_origins)}"
support_credentials = false
}
}
tags = "${local.app_tags}"
} => Failure
Execution trace:
|
@dhabierre - The nil is returned when support_credentials is set (which is marked as optional in Terraform provider code). Try to remove it , it should work properly and CORS settings are updated accordingly.
Still, it seems call to Azure API is failing when support_credentials key=value is set. |
I have the same error when using terraform 0.12.1 & azurerm 1.30.1: resource "azurerm_app_service" "app_service_backend" {
name = "${local.app_resource_prefix}-app-service-backend"
location = azurerm_resource_group.app_resource_group.location
resource_group_name = azurerm_resource_group.app_resource_group.name
app_service_plan_id = azurerm_app_service_plan.app_service_plan.id
https_only = true
identity {
type = "SystemAssigned"
}
site_config {
cors {
allowed_origins = split(",", var.cors_allowed_origins)
}
}
tags = local.app_tags
}
|
Closing this in favour of #6796 which'll highlight the actual error being returned here |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Community Note
Terraform (and AzureRM Provider) Version
Terraform v0.11.13
provider.azurerm v1.24.0
Affected Resource(s)
azurerm_app_service
Terraform Configuration Files
Debug Output
Expected Behavior
No error.
Actual Behavior
terraform apply
The text was updated successfully, but these errors were encountered: