Skip to content
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

Error 400 creating Azure Premium CDN endpoint #9895

Closed
GlenColby opened this issue Dec 16, 2020 · 2 comments · Fixed by #9902
Closed

Error 400 creating Azure Premium CDN endpoint #9895

GlenColby opened this issue Dec 16, 2020 · 2 comments · Fixed by #9902

Comments

@GlenColby
Copy link

Sorry to bring the bad news but it seems there is another issue:

cdn.EndpointsClient#Create: Failure sending request: 
StatusCode=400 -- Original Error: Code="BadRequest" 
Message="We couldn’t configure QueryStringCachingBehavior, IsCompressionEnabled, ContentTypesToCompress, GeoFilters and DeliveryPolicy for premium profile endpoints. 
You’ll need to manage these endpoints in the supplemental portal."

The terraform provider seems to add the QueryStringCachingBehavior and ContentTypesToCompress by default like IsCompressionEnabled was before the PR.

eg:

resource "azurerm_cdn_endpoint" "cdn_endpoint" {
  name                          = "cdne${local.formatted_name}"
  profile_name                  = var.cdn_profile_name
  location                      = "global"
  resource_group_name           = var.resource_group_name
  origin_path                   = "/foo"
  origin_host_header            = var.originHostname
  is_https_allowed              = true
  is_http_allowed               = false
  origin {
    name      = "name"
    host_name = var.originHostname
  }
}

Seems like the tests of the provider are not really in Sync with API. Especially with the verizon API.

Originally posted by @zekth in #1109 (comment)

@katbyte katbyte added this to the v2.42.0 milestone Dec 27, 2020
katbyte pushed a commit that referenced this issue Dec 27, 2020
Added test for "Premium_Verizon" SKU for azurerm_cdn_profile
Assigning the parameters EndpointProperties.ContentTypesToCompress, EndpointProperties.GeoFilters only when values are set for content_types_to_compress, geo_filter.
Assigning the parameter EndpointProperties.DeliveryPolicy only when SKU set to Microsoft_Standard.
Fixes #9895
@ghost
Copy link

ghost commented Jan 8, 2021

This has been released in version 2.42.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.42.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Jan 27, 2021

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!

@ghost ghost locked as resolved and limited conversation to collaborators Jan 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants