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 doesn't notice if origin_path is removed or set to "" #1595

Closed
Supermathie opened this issue Jul 17, 2018 · 4 comments
Closed

Comments

@Supermathie
Copy link
Contributor

Supermathie commented Jul 17, 2018

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Terraform v0.11.7

  • provider.azurerm v1.9.0
  • provider.random v1.3.1
  • provider.template v1.0.0

Affected Resource(s)

  • azurerm_cdn_endpoint

Terraform Configuration Files

resource "azurerm_cdn_endpoint" "app" {
  name                = "${terraform.workspace}-${var.label}"
  location            = "${azurerm_resource_group.app.location}"
  resource_group_name = "${azurerm_resource_group.app.name}"
  profile_name        = "${azurerm_cdn_profile.app.name}"

  optimization_type   = "GeneralWebDelivery"
  origin_path         = "/${azurerm_storage_container.assets.name}/"
  #origin_path         = ""
  #origin_path         = "/"
  origin_host_header  = "${azurerm_storage_account.app.name}.blob.core.windows.net"
  origin {
    name = "assets"
    host_name = "${azurerm_storage_account.app.name}.blob.core.windows.net"
  }
  tags {
    Cluster = "${var.label}"
    DC = "${terraform.workspace}"
  }
}

Debug Output

(available on request)

Panic Output

Expected Behavior

I have an existing endpoint successfully created that looks like this:

module.discuss_cluster.azurerm_cdn_endpoint.app:
  id = /subscriptions/xxxx/resourcegroups/xxxx-dev-michael-discuss/providers/Microsoft.Cdn/profiles/discuss/endpoints/xxxx-dev-michael-discuss
  content_types_to_compress.# = 0
  geo_filter.# = 0
  host_name = xxxx-dev-michael-discuss.azureedge.net
  is_compression_enabled = false
  is_http_allowed = true
  is_https_allowed = true
  location = eastus
  name = xxxx-dev-michael-discuss
  optimization_type = GeneralWebDelivery
  origin.# = 1
  origin.722596397.host_name = xxxxdevmichaeldiscuss.blob.core.windows.net
  origin.722596397.http_port = 80
  origin.722596397.https_port = 443
  origin.722596397.name = assets
  origin_host_header = xxxxdevmichaeldiscuss.blob.core.windows.net
  origin_path = /assets/
  probe_path = 
  profile_name = discuss
  querystring_caching_behaviour = IgnoreQueryString
  resource_group_name = xxxx-dev-michael-discuss
  tags.% = 2
  tags.Cluster = discuss
  tags.DC = xxxx-dev-michael

I attempted to introduce a change by commenting origin_path and re-running terraform apply but terraform didn't detect the change.

Actual Behavior

"No changes. Infrastructure is up-to-date."

Steps to Reproduce

  1. comment out origin_path
  2. terraform apply

Setting it explicitly to "" also did not cause a change.

I had to set it to another value ("/") to force the change (though / is invalid here so it didn't apply):

Terraform will perform the following actions:

  ~ module.discuss_cluster.azurerm_cdn_endpoint.app
      origin_path: "/assets/" => "/"

Important Factoids

References

Ø

@Supermathie
Copy link
Contributor Author

Same for origin_host_header

@tombuildsstuff
Copy link
Member

Fixed via #7164

@tombuildsstuff tombuildsstuff added this to the v2.13.0 milestone Jun 4, 2020
@ghost
Copy link

ghost commented Jun 4, 2020

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

@ghost
Copy link

ghost commented Jul 4, 2020

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 👉 hashibot-feedback@hashicorp.com. Thanks!

@hashicorp hashicorp locked and limited conversation to collaborators Jul 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants