Skip to content

[BUG] Route Configuration Override Actions when is disabled #1

@vladciobancai

Description

@vladciobancai

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

1.5.7

AzureRM Provider Version

3.79.0

Affected Resource(s)/Data Source(s)

route_configuration_override_action

Terraform Configuration Files

rules = [
  {
    name                 = "redirectroot"
    custom_resource_name = "redirectroot"
    order                = 1
    conditions = {
      url_path_conditions = [{
        operator     = "Equal"
        match_values = ["/"]
        transforms   = []
      }]
    }
    actions = {
      route_configuration_override_actions = [{
        cdn_frontdoor_origin_group_id = data.azurerm_cdn_frontdoor_origin_group.origin_ea_website.id
        forwarding_protocol = "MatchRequest"
        cache_behavior = "Disabled"
        query_string_parameters = []
      }]
    }
  }
]

Debug Output/Panic Output

╷
│ Error: expanding 'actions': the 'route_configuration_override_action' block is not valid, if the 'cache_behavior' is set to 'Disabled' you cannot define the 'query_string_caching_behavior', got "IgnoreQueryString"
│
│   with module.app_service_ea_front_cdn.azurerm_cdn_frontdoor_rule.cdn_frontdoor_rule["web-app-rule-redirect.redirectroot"],
│   on .terraform/modules/app_service_ea_front_cdn/r-cdn-frontdoor-rules.tf line 11, in resource "azurerm_cdn_frontdoor_rule" "cdn_frontdoor_rule":
│   11: resource "azurerm_cdn_frontdoor_rule" "cdn_frontdoor_rule" {
│
╵

Expected Behaviour

When cache_behavior is setup as "Disabled" it should ignore cache_duration, query_string_caching_behavior, query_string_parameters, compression_enabled on route_configuration_override_action https://github.com/claranet/terraform-azurerm-cdn-frontdoor/blob/master/r-cdn-frontdoor-rules.tf#L45

Actual Behaviour

No response

Steps to Reproduce

No response

Important Factoids

No response

References

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions