forked from hashicorp/terraform-provider-azurerm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Importer function to normalize resource id
Normalize the ID using the importer function to conform to what is defined in the ID formatter. This is to mitigate cases like users import resource ID with lowercase 'g' for the resource group. In this case, the current validation in the importer raise no error, which results into the incorrect cased ID leak into terraform state. This will cause the other referencing resource get unexpected plan diff (see hashicorp#14854). This commit adds the helper function for both untyped and typed sdk. The users are expected to pass in a wrapper function around the parse function generated via the resource id tool. While this wrapper might be eliminated once we have generic in Go.
- Loading branch information
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters