cfn: fix failing test_mapping_ref_map_key
for multi-account/region
#11699
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.
Motivation
With the support to add the region ref in mappings inside the conditions for cloudformation in the PR:#11671 the test
tests.aws.services.cloudformation.engine.test_mappings.TestCloudFormationMappings.test_mapping_ref_map_key
was updated to useAWS::Region
, but when the test runs against non-default region it would fail because of the missing mapping in the template with the following error:localstack.services.cloudformation.engine.errors.TemplateError: Invalid reference: 'ap-southeast-2' could not be found in the 'MyMap' mapping: '['*********']'
Related workflow: https://app.circleci.com/pipelines/github/localstack/localstack/28846/workflows/dc1a47d0-eaf1-46a7-8149-fc987e80351b/jobs/253009/parallel-runs/2
Changes
This PR adds mappings for the non-default regions currently being used to run the MA/MR pipeline.
(Alternatively added a static region in 680cc01 but this would defeat the purpose of testing ref region in the mappings)
Testing
Set the environment variable:
TEST_AWS_REGION=us-west-1