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

Issue for setting Compression configuration for CDN endpoint to False #22326

Closed
1 task done
priyatiranee opened this issue Jun 29, 2023 · 10 comments · Fixed by #22662
Closed
1 task done

Issue for setting Compression configuration for CDN endpoint to False #22326

priyatiranee opened this issue Jun 29, 2023 · 10 comments · Fixed by #22662

Comments

@priyatiranee
Copy link

priyatiranee commented Jun 29, 2023

Hi Team,
Can you please update on this issue. It is really impacting end user business.

Is there an existing issue for this?

  • I have searched the existing issues

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

0.15.5

AzureRM Provider Version

3.30.0

Affected Resource(s)/Data Source(s)

azurerm_cdn_endpoint

Terraform Configuration Files

Called Module:
resource "azurerm_cdn_endpoint" "default" {
  for_each = {
    for cdn_endpoint in var.cdn_endpoints : cdn_endpoint.endpoint_name => cdn_endpoint
  }
  name                          = each.value.endpoint_name
  location                      = coalesce(var.location, data.azurerm_resource_group.current.location)
  resource_group_name           = data.azurerm_resource_group.current.name
  profile_name                  = azurerm_cdn_profile.default.name
  tags                          = var.resource_tags
  is_http_allowed               = var.is_http_allowed
  is_https_allowed              = var.is_https_allowed
  is_compression_enabled        = lookup(each.value, "compression_enabled", false)

Calling module:

module "AZ-CDN-CS-MW-CDN-NA-Prod-08" {   
  resource_group        = "AZ-RG-CS-MW-CDN-NA-01"
  resource_name         = "AZ-CDN-CS-MW-CDN-NA-Prod-08"
  subscription_id       = local.subscription_id  
  sku                   = local.sku
  create_custom_domain  = local.custom_domain
  is_http_allowed       = local.allow_http
  cdn_endpoints = [
    {
      "endpoint_name" : "origtest-pg-com-01",
      "origin_host_name" : "origtest.pg.com",
      "origin_host_header" : "origtest.pg.com",
      "origin_path" : "",
      "compression_enabled" : "true"
    },
    { 
      "endpoint_name" : "origtest-pg-com-02",
      "origin_host_name" : "origtest1.pg.com",
      "origin_host_header" : "origtest1.pg.com",
      "origin_path" : "",
      "compression_enabled" : "false"
    }
  ]

Debug Output/Panic Output

Terraform will perform the following actions:
 # module.AZ-CDN-CS-MW-CDN-NA-Prod-08.azurerm_cdn_endpoint.default["origtest-pg-com-01"] will be updated in-place
  ~ resource "azurerm_cdn_endpoint" "default" {
        id                            = origtest-pg-com-01"
      ~ is_compression_enabled        = false -> true
        name                          = "origtest-pg-com-01"

# module.AZ-CDN-CS-MW-CDN-NA-Prod-08.azurerm_cdn_endpoint.default["origtest-pg-com-02"] will be updated in-place
  ~ resource "azurerm_cdn_endpoint" "default" {
        id                            = "origtest-pg-com-02"
      ~ is_compression_enabled        = true -> false
        name                          = "origtest-pg-com-02"



Apply complete! Resources: 0 added, 2 changed, 0 destroyed.
Finishing: Terraform Apply for "AZ-CDN-CS-MW-CDN-NA-Prod-08"

Expected Behaviour

For origtest-pg-com-01 it should be on.

image

For origtest-pg-com-02 it should be off.

image

Actual Behaviour

For origtest-pg-com-01 it should be on which is as expected.
image

For origtest-pg-com-02 it should be off which did not happen.

image

Steps to Reproduce

  1. Update Çompression configuration to on for endpoint origtest-pg-com-02.
  2. In calling module of Terraform set it false. "compression_enabled" : "false"
  3. Run the pipeline. Pipeline succeeds, but the Azure Portal no update to CDN endpoint.

Important Factoids

No

References

No response

@priyatiranee
Copy link
Author

Hi Team,
Can you please update on this issue. It is really impacting end user business.

Regards,
Priyati

@priyatiranee
Copy link
Author

Hi Team,
Can you please update on this issue. There is a huge business impact due to this. Please help to expedite.

Regards,
Priyati

@WodansSon WodansSon self-assigned this Jul 20, 2023
@WodansSon
Copy link
Collaborator

@priyatiranee, thanks for opening this issue. I have started looking into this and it appears that the update client, per ARM Documentation, Only tags can be updated after creating an endpoint. That said, I believe I can do something else to work around this limitation via Terraform.

@priyatiranee
Copy link
Author

priyatiranee commented Aug 4, 2023 via email

@priyatiranee
Copy link
Author

priyatiranee commented Aug 4, 2023 via email

@priyatiranee
Copy link
Author

priyatiranee commented Aug 7, 2023 via email

@WodansSon
Copy link
Collaborator

@priyatiranee, this was automatically closed as the issue has been fixed by the linked PR #22326 and has been released in v3.69.0 of the provider. Is there something else that was not addressed by the fix?

@priyatiranee
Copy link
Author

priyatiranee commented Aug 10, 2023 via email

@WodansSon
Copy link
Collaborator

WodansSon commented Aug 11, 2023

@priyatiranee, have you upgraded your provider to v3.69.0 and tried your scenario again? I have written a test case called TestAccCdnEndpoint_compressionUpdate which tests all scenarios which you had stated above and it passes our daily regression test pass since it was merged.

image

Also of note, the Portal tends to cache a lot of the information that it displays in it's UI. So have you also tried going back to the `resource group` blade in the Portal and clicking the `refresh` button and then going back to the resource to check what the current state of the `Compression` is?

image

Copy link

github-actions bot commented May 8, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.