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

azurerm_cdn_endpoint - fix API error when given an empty origin_host_header #11852

Merged
merged 1 commit into from
May 25, 2021

Conversation

magodo
Copy link
Collaborator

@magodo magodo commented May 25, 2021

Confirmed with service team, the request payload can't contain an empty string for the origin_host_header, otherwise, the service will raise following error:

{
  "error": {
    "code": "BadRequest",
    "message": "OriginHostHeader \"\" is invalid. It must be a valid domain name, IP version 4, or IP version 6."
  }
}

Also update the document of this property to remove the line about default, since that is not true.

Meanwhile, this should fix some of the acctest failures.

Fixes #8870, #11107.

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@katbyte katbyte merged commit 2292f59 into hashicorp:master May 25, 2021
katbyte added a commit that referenced this pull request May 25, 2021
@ghost
Copy link

ghost commented May 27, 2021

This has been released in version 2.61.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.61.0"
}
# ... other configuration ...

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 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 this pull request may close these issues.

azurerm_cdn_endpoint : OriginHostHeader must match the regex
2 participants