-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
provider/azurerm: set resource_group_name on resource import #9073
Conversation
Thanks for the work here, this is a great addition!!! - if you are getting these added - can you also remove the Thanks Paul |
There's another issue thrown up by the tests. The capitalisation of resource_group_name from the storage account acceptance fails due to the capitalisation. The resource_group_name of azurerm_storage_account is always stored in lowercase. |
fb24a2b
to
29c44fc
Compare
@stack72 Would adding a DiffSuppressFunc() https://github.com/hashicorp/terraform/blob/master/helper/schema/schema.go#L62 to resource_group_name inside most azurerm resources schema be a good solution to this? It should just ignore the diff when the .ToLower() is equal. This will allow the name to stay capitalised for display purposes. |
29c44fc
to
42c8822
Compare
I've gone through the first half of the importable resource today. I'll try to complete them tomorrow. |
@carinadigital this is awesome :) |
42c8822
to
e71e13f
Compare
I've found 4 resources that always store resource_group_name in lowercase. I'm not sure why this is the case.
I've not yet completed a full run of the acceptance tests to see if there are anymore. |
@stack72 This is ready for a review. |
Some azurerm resources store resource_group_name in lowercase only. Other store resource_group_name using lower and upper case. Ensure that all test cases use capitalisation in resource_group_name to find errors in diffs due to capitalisation. Some resource_group_name were refactored to match naming scheme across the azurerm tests.
Some resource fail due to resource_group_name always being stored as lowercase. For those resources we add the case insensitive diff function.
Thanks for the work here - this LGTM! All tests are passing as expected:
Paul |
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Fix for GH-9072
I will add more resources as I test them.