forked from GoogleCloudPlatform/magic-modules
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow the use of region selflinks in provider configs.
When configuring the provider, currently we only accept the name of a region. As per hashicorp/terraform-provider-google#4133, being able to use self_links for regions here would be helpful. I added a utility function to pull the region's name from a self_link, tests for that behavior, and then used it when setting up our Config object. It'll either return what the user passed in, or if it recognizes it as a region self_link, it'll just return the name part of the region. I also left it open to expand on potentially more formats in the future.
- Loading branch information
1 parent
bb4c89a
commit 963d3f1
Showing
3 changed files
with
25 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
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