-
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_dns_a_record failing with weird "from no visitor picked" string in target_resource_id? #8191
Comments
Was just gonna do this my self but with data objects. From the portal it looks like it points to the endpoint and not the profile. Also cnd_endpoint doesn't have a data source. |
While it "works" if you target the endpoint.id in that it doesn't throw an error, it doesn't trigger the creation of the When you select the CDN target manually in the Azure portal, then |
Hi @dossy
|
@magodo, thanks for asking. So, I selected the CDN resource in the Azure portal, then used Azure CLI to fetch the record with something like this:
And, the In Terraform, I define a resource At this point, there should be nothing to do, because the resource in Azure which was imported should mostly match the resource in TF. But, instead, when I
So, the updated In my TF configuration, I'm using Where'd that lowercase |
@dossy where there a lower g in the inport? what does terraform state list say? If Yes try terraform state rm and import with upper case g to see if there is a difference |
Hi @dossy Thank you for providing the details! Besides the |
In some case (at least for the cdn endpoint), the ID of target resource read from API (which uses the API model of the target resource) doesn't match the `target_resource_id` if it is imported via Terraform (which actually uses the API model of the `azurerm_dns_x_record`) in casing. Fixes: hashicorp#8191
@tehho - The issue isn't with what's |
@magodo in which case can we ensure the ID coming back from the CDN Endpoint resource is patched to the expected format (as we do for FrontDoor) - for users Resource ID's should be consistent/reliable where possible |
…tive This is a workaround for #Azure/azure-rest-api-specs#10576. Fixes: hashicorp#8191
This has been released in version 2.26.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.26.0"
}
# ... other configuration ... |
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 👉 [email protected]. Thanks! |
Community Note
Terraform (and AzureRM Provider) Version
Affected Resource(s)
azurerm_dns_a_record
azurerm_cdn_profile
azurerm_cdn_endpoint
Terraform Configuration Files
Debug Output
(I cannot provide the entire log, but I've redacted names and IDs from the relevant portion of the log. Click to expand.)
Panic Output
N/A
Expected Behavior
The apex record
@
should have been created in the Azure DNS zone, as an alias resource pointing at the Azure CDN profilecdn
.Actual Behavior
Steps to Reproduce
terraform apply
Important Factoids
N/A
References
N/A
The text was updated successfully, but these errors were encountered: