fix: allow AccountURL function to handle accounts in orgs spanning multiple regions #2080
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses an issue with the
snowflake_current_account
data source. Currently, it's not able to return the account url when the account belongs to an organization that spans multiple region groups. It's currently returning this error when it tries to construct the account URL. The underlying cause of this error is that when an organization spans multiple regions, the current_account() function returns<region_group>.<region>
, which is different behavior from when the organization's accounts are in a single region.The current_region logic is documented here.
This PR also addresses an error in the regionMapping for the
aws_us_gov_east_1
region.This PR changes the query that's used for fetching the current account and current region: it adds a new column to that query output to contain the
region_group
. In case there is ever a need for region_group in the future, I've added that to the CurrentAccount type.It also corrects the url string mapping for
aws_us_gov_east_1
region.Test Plan
References
Closes issue 2067