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

azurerm_cdn_frontdoor_custom_domain - make resource ID case insensitive during import #22289

Closed
wants to merge 1 commit into from

Conversation

WodansSon
Copy link
Collaborator

(fixes #21950)

@tombuildsstuff
Copy link
Contributor

hi @WodansSon

One of the long-running casing issues present within the Provider is where users have imported resources into Terraform using the incorrect casing. This means that as validation is added to the Provider (and parsers are updated to more closely match the ARM specification) - that users encounter issues.

As such to prevent this issue going forwards, we've actually been taking a different approach of validating the user input matches what we're expecting, and have recently updated the errors being output by the new Resource ID (example) to better explain which Resource ID segments are cased incorrectly. Whilst the older Resource ID Parsers generated by the tooling in this repository don't take advantage of this, the newer style present in hashicorp/go-azure-sdk do - and as we're migrating across to those this'll become clearer across all resources.

It's worth noting that Terraform Core requires a Stable Resource ID, which means that we're also unable to accept one Resource ID casing at import time, and then convert this to another - since in newer versions of the protocol this'll cause an error (rather than a warning in the logs).

The Resource IDs used by Terraform do not necessarily map 1:1 with the Resource IDs defined within the Azure API - indeed, there's many cases where these don't, as such the documentation for each Resource defines the Resource ID used at Import time in the import section of the documentation (and with the generated resources, we call out the segments which need to be populated too).

Since we're unable to accept this contribution without causing knock-on effects in other places - I'm going to close this PR for the moment. However in this case the user can workaround this by importing the Resource ID for this resource as defined in the import section of the documentation for this resource.

Thanks!

@WodansSon
Copy link
Collaborator Author

@tombuildsstuff

I understand that but I still feel that there is value at making the import process case-insensitive from a customer centric point of view as various CLI's expose the resource ID's with various casings.

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, 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 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

azurerm_cdn_frontdoor_custom_domain import path incorrect
2 participants