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

The active property in azurerm_cdn_frontdoor_security_policy.security_policies.firewall.association.domain is not configurable, contrary to what the documentation states #28364

Open
1 task done
kaganmersin opened this issue Dec 22, 2024 · 1 comment

Comments

@kaganmersin
Copy link

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 comments along the lines of "+1", "me too" or "any updates", 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 and review the contribution guide to help.

Terraform Version

1.9.4

AzureRM Provider Version

4.14.0

Affected Resource(s)/Data Source(s)

azurerm_cdn_frontdoor_security_policy

Terraform Configuration Files

resource "azurerm_cdn_frontdoor_security_policy" "default" {
  for_each = var.create ? { for sp in flatten([for idx, policy in var.firewall_policies : [
    for sp_idx, security_policy in policy.security_policies : {
      policy_index          = format("%02d", idx + 1)
      security_policy_index = format("%02d", sp_idx + 1)
      security_policy       = security_policy
    }
  ]]) : "${sp.policy_index}-${sp.security_policy_index}" => sp } : {}

  name = var.name
  cdn_frontdoor_profile_id = one(azurerm_cdn_frontdoor_profile.default[*].id)

  security_policies {
    firewall {
      cdn_frontdoor_firewall_policy_id = azurerm_cdn_frontdoor_firewall_policy.default[each.value.policy_index].id
      association {
        patterns_to_match = each.value.security_policy.patterns_to_match

        dynamic "domain" {
          for_each = {
            for name in concat(
              try(each.value.security_policy.endpoint_names, []),
              try(each.value.security_policy.custom_domain_names, [])
            ) : name => name
          }
          content {
            cdn_frontdoor_domain_id = try(
              azurerm_cdn_frontdoor_endpoint.default[domain.value].id,
              azurerm_cdn_frontdoor_custom_domain.default[domain.value].id
            )
            active = true
          }
        }
      }
    }
  }
}

Debug Output/Panic Output

Error: Value for unconfigurable attribute

  with azurerm_cdn_frontdoor_security_policy.default["default"],
  on waf.tf line 162, in resource "azurerm_cdn_frontdoor_security_policy" "default":
 162:       association {

Can't configure a value for
"security_policies.0.firewall.0.association.0.domain.0.active": its value
will be decided automatically based on the result of applying this

Expected Behaviour

No response

Actual Behaviour

No response

Steps to Reproduce

No response

Important Factoids

No response

References

No response

@kaganmersin
Copy link
Author

kaganmersin commented Dec 22, 2024

It seems this argument is unconfigurable unlike it seems configurable in documentation and I believe this argument should be omitted in the documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant