aws-ia / terraform-aws-control_tower_account_factory

AWS Control Tower Account Factory
Apache License 2.0
604 stars 386 forks source link

aft-customizations ignores the maximum_concurrent_customization parameter #395

Closed wellsiau-aws closed 7 months ago

wellsiau-aws commented 9 months ago

Terraform Version & Prov: n/a

AFT Version: 1.10.4

Terraform Version & Provider Versions n/a

Bug Description AFT introduce parameter maximum_concurrent_customization to set the maximum number of pipeline that runs in parallel. This parameter however was not honored in the aft-customizations module, where the state machine has a hard-coded concurrency of 25

To Reproduce The hard-coded value can be found here

Lambda that controls the pipeline execution can be found here

Based of this understanding, it's possible for user to execute the state machine aft-invoke-customizations with larger parallelization than value defined in maximum_concurrent_customization. This will impact the downstream aft-account-provisioning-framework as well.

As additional note, the maximum_concurrent_customization was passed to the module but never used in the template file, this might be just an overlook.

Expected behavior I proposed two possible solution:

  1. Honor maximum_concurrent_customization in the aft-customizations module by removing the hard-coded concurrency of 25
  2. If the hard-coded concurrency of 25 was by design, introduce separate variable to surface this value on the root module.

Related Logs n/a

Additional context n/a

stumins commented 9 months ago

Hi @wellsiau-aws,

Thanks for reporting this bug. I've created a backlog item for the team to fix this issue.

stumins commented 7 months ago

Hi @wellsiau-aws,

AFT 1.11.0 was just released and includes a fix for this issue.

As of 1.11.0, the concurrency of the Account Provisioning step function (when invoked via aft-invoke-customizations) will change from 25 to the current value of maximum_concurrent_customizations. If left unspecified, the default value is 5.