-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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_frontdoor_origin deploys as disabled. #18063
Comments
@RutgerAlbersCE thank you for opening this issue, but from my understanding this is by design. The Frontdoor Origin resource will be deployed as disabled if a route has not been associated with it. |
Thanks for your reply. I'm not really sure that it's checking to see if a route has been associated for it to enable or disable the resource. My guess is that it's using the "health_probes_enabled" property to also set the origin enabled state. terraform-provider-azurerm/internal/services/cdn/cdn_frontdoor_origin_resource.go Line 192 in df114ab
In our use-case we want to disable the health probes, but enable the origin resource. I've currently managed to get around this by using a workaround with the azapi_resource provider for the origin group. Maybe that offers some extra insight. But I'd prefer to use the azurerm provider where possible. resource "azapi_resource" "origin" {
type = "Microsoft.Cdn/profiles/originGroups/origins@2020-09-01"
name = "public-ip"
parent_id = azurerm_cdn_frontdoor_origin_group.origin_group.id
body = jsonencode({
properties : {
hostName : var.host_name
httpPort : 80
httpsPort : 443
originHostHeader : null
enabledState : "Enabled"
priority : 1
weight : 50
}
})
} |
@RutgerAlbersCE That is exactly what is going on, in my new PR #18231 I fix this issue and expose an new field in the origin resource called |
That's great, I'll keep an eye out for the PR and test it when it's merged. Thanks! |
…18551 * initial check-in * still refactoring but should be functional * Doc updates * deprecate health_probes_enabled property * Update website/docs/r/cdn_frontdoor_custom_domain_secret_validator.html.markdown Co-authored-by: Sebastian <11445087+sebader@users.noreply.github.com> * Update website/docs/r/cdn_frontdoor_custom_domain_txt_validator.html.markdown Co-authored-by: Sebastian <11445087+sebader@users.noreply.github.com> * refactor CIDR validation into validation packages * fix naked return lint error in cidr overlap func * Update code comments to add context * Fix for 18249 * Remove txt and secret validators * Remove validator ids, parse/validation packages * Update rules doc for depends_on usage * Doc updates * Update test cases * Correct skip txt for origin test * More test and doc updates * Update test and docs to use new subnet field * Fix for 18370 * Update docs per PR comment * Incremental fixed per PR review * Initial additon of association and doc fix * Custom domain assoc mostly working * Additional progress... * Fix lint errors * Fix lint errors * Last of the PR comments addressed... * Fix for issue #18551 * Mostly working not done with the disable resource * Done Co-authored-by: Sebastian <11445087+sebader@users.noreply.github.com>
This functionality has been released in v3.25.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
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. |
Is there an existing issue for this?
Community Note
Terraform Version
1.2.7
AzureRM Provider Version
3.19.1
Affected Resource(s)/Data Source(s)
azurerm_cdn_frontdoor_origin_group
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
The Origin Group should be created with the status "Enabled".
Actual Behaviour
The Origin Group gets created with the status "Disabled". When manually changing the status to "Enabled" and then deploying again terraform will try to set it to "Disabled" again. Resulting in the error message above.
Steps to Reproduce
When deploying the azurerm_cdn_frontdoor_origin resource with the settings supplied above it will create an origin resource, but with the "Disabled" status.
In the documentation I can't find a property to force this status to Enabled.
(Documentation: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/cdn_frontdoor_origin)
Important Factoids
No response
References
Pull request for the new Frontdoor implementation:
#16671
The text was updated successfully, but these errors were encountered: