awslabs / aws-deployment-framework

The AWS Deployment Framework (ADF) is an extensive and flexible framework to manage and deploy resources across multiple AWS accounts and regions based on AWS Organizations.
Apache License 2.0
668 stars 226 forks source link

Add /adf params prefix and other SSM Parameter improvements #695

Closed sbkok closed 7 months ago

sbkok commented 8 months ago

Why?

Issues: #659 and #594.

When installing ADF the first time, the global IAM bootstrap stack that gets deployed is sourced from the adf-bootstrap/global-iam.yml.

The reason for this behaviour is the absence of the global-iam.yml file in the deployment OU bootstrap folder (adf-bootstrap/deployment/global-iam.yml).

It iterates to the parent directory until it finds a global-iam.yml to deploy. Hence, when the adf-bootstrap/global-iam.yml gets deployed in the deployment account, it was looking for the deployment_account_id SSM parameter. That did not get deployed in the deployment account.


Pytest failures were ignored due to a change in the Makefile used to execute tests. The ADF CI GitHub Workflow would result in a success, even when a test case failed.


Some of the parameters ADF created would be placed in the root of the SSM Parameter Store while others were neatly located in the /adf path.

What?


Fixed by exiting on the first failure using Makefile foreach instead.


Add a /adf/ prefix to parameter names to ease access management and making it easier to distinguish ADF parameters from other solutions.

To enable upgrades, the account handler function that performs the lookup or creation of the deployment account is updated to rely on the AWS Organizations API to check if there are any deployment accounts in the /deployment organization unit path.

Upon an update, it will use the AWS account if only one is in that specific OU. If there are more, it will error and instruct the user to move unnecessary accounts out of the /deployment organization unit first and try again.


Refactor master references to management or main.


Fix default_scm_codecommit_account_id and other scm related params under the /adf/scm path. Changed param name to underscores for consistency.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.