Skip to content
4 changes: 2 additions & 2 deletions docs/user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ targets:
- path: /my_ou/production/some_path
regions: [eu-central-1, us-west-1]
name: another_step
wave_config:
wave:
size: 30 # (Optional) This forces the pipeline to split this OU into seperate stages, each stage containing up to X accounts
exclude:
- 9999999999 # (Optional) List of accounts to exclude from this target. Currently only supports account Ids
Expand All @@ -204,7 +204,7 @@ A stage is identified in the above list of targets with a new entry in the array
To workaround this limit, ADF will split the accounts x regions that are selected as part of one stage over multiple stages when required.
A new stage is introduced for every 50 accounts/region deployments by default. The default of 50 will make sense for most pipelines.
However, in some situations, you would like to limit the rate at which an update is rolled out to the list of accounts/regions.
This can be configured using the `wave_config/size` target property. Setting these to `30` as shown above, will introduce a new stage for every 30 accounts/regions.
This can be configured using the `wave/size` target property. Setting these to `30` as shown above, will introduce a new stage for every 30 accounts/regions.
If the `/my_ou/production/some_path` OU would contain 25 accounts (actually 26, but account `9999999999` is excluded by the setup above), multiplied by the two regions it targets in the last step, the total of account/region deployment actions required would be 50.
Since the configuration is set to 30, the first 30 accounts will be deployed to in the first stage. If all of these successfully deploy, the pipeline will continue to the next stage, deploying to the remaining 20 account/regions.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@
int
)]

TARGET_WAVE_CONFIG_SCHEME = {
TARGET_wave_SCHEME = {
Optional("size", default=50): int,
}

Expand All @@ -317,7 +317,7 @@
Optional("properties"): Or(CODEBUILD_PROPS, JENKINS_PROPS, CLOUDFORMATION_PROPS, CODEDEPLOY_PROPS, S3_DEPLOY_PROPS, SERVICECATALOG_PROPS, LAMBDA_PROPS, APPROVAL_PROPS),
Optional("regions"): REGION_SCHEMA,
Optional("exclude", default=[]): [str],
Optional("wave_config", default={"size": 50}): TARGET_WAVE_CONFIG_SCHEME
Optional("wave", default={"size": 50}): TARGET_wave_SCHEME
}
COMPLETION_TRIGGERS_SCHEMA = {
"pipelines": [str]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class TargetStructure:
def __init__(self, target):
self.target = TargetStructure._define_target_type(target)
self.account_list = []
self.wave_config = target.get('wave_config', {}) if isinstance(target, dict) else {}
self.wave = target.get('wave', {}) if isinstance(target, dict) else {}
self.exclude = target.get('exclude', []) if isinstance(target, dict) else []

@staticmethod
Expand All @@ -49,7 +49,7 @@ def _define_target_type(target):

def generate_waves(self):
waves = []
wave_size = self.wave_config.get('size', 50)
wave_size = self.wave.get('size', 50)
length = len(self.account_list)
for index in range(0, length, wave_size):
yield self.account_list[index:min(index + wave_size, length)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ def test_fetch_account_error_invalid_account_id():
cls.fetch_accounts_for_target()


def test_target_scructure_respects_wave_config():
test_target_config = {"path": "/some/random/ou", "wave_config": {"size": 2}}
def test_target_scructure_respects_wave():
test_target_config = {"path": "/some/random/ou", "wave": {"size": 2}}
target_structure = TargetStructure(
target=test_target_config,
)
Expand Down Expand Up @@ -205,7 +205,7 @@ def test_target_scructure_respects_wave_config():
def test_target_wave_scructure_respects_exclude_config():
test_target_config = {
"path": "/some/random/ou",
"wave_config": {"size": 2},
"wave": {"size": 2},
"exclude": ["5"],
}
target_structure = TargetStructure(
Expand Down