support defining AZs through account mapping #6
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.
Selecting Availability Zones
By default the
vpc-v2
component will automatically select the AZs. This is achieved by looping over themax_availability_zones
count and using theFn::GetAZs
Cloudformation function to select the AZ id.However if you wish to define which as AZs you want to use you can by configuring a map per AWS account with the AZs you wish to use.
NOTE: the total count of AZ's defined in the map for each account has to be the same value as
max_availability_zones
.To configure your AZ settings, set
az_mapping
to trueThen configure a map in the following structure to define your AZs
the numerical values will map to the Availability Zone retuned from the
Fn::GetAZs
function in the AWS account. For example inus-east-1
returnstherefore the mapping
AZs: '3,5,0'
will use AZs[ "us-east-1d", "us-east-1f", "us-east-1a" ]
the new function to retrieve the AZ becomes