Skip to content

Commit 12dafeb

Browse files
authored
Merge pull request #84 from aws-solutions/develop
Updated to version v2.2.0
2 parents 8076f8f + 6fa4fc5 commit 12dafeb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+910
-319
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

100755100644
Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,31 @@
11
---
22
name: Bug report
33
about: Create a report to help us improve
4-
title: ""
4+
title: ''
55
labels: bug
6-
assignees: ""
6+
assignees: ''
7+
78
---
89

910
**Describe the bug**
10-
11-
<!--- A clear and concise description of what the bug is -->
11+
A clear and concise description of what the bug is.
1212

1313
**To Reproduce**
14-
15-
<!--- Steps to reproduce the behavior -->
14+
Steps to reproduce the behavior.
1615

1716
**Expected behavior**
18-
19-
<!--- A clear and concise description of what you expected to happen -->
17+
A clear and concise description of what you expected to happen.
2018

2119
**Please complete the following information about the solution:**
22-
2320
- [ ] Version: [e.g. v1.0.0]
2421

25-
To get the version of the solution, you can look at the description of the created CloudFormation stack. For example, "_(SO0158) - The AWS CloudFormation template for deployment of the Amazon CloudWatch Monitoring Framework. Version **v1.0.0**_". You can also find the version from [releases](https://github.com/awslabs/amazon-cloudwatch-monitoring-framework/releases)
22+
To get the version of the solution, you can look at the description of the created CloudFormation stack. For example, "_(SO0089) - customizations-for-aws-control-tower Solution. Version: v1.0.0_". You can also find the version from [releases](https://github.com/aws-solutions/aws-control-tower-customizations/releases)
2623

2724
- [ ] Region: [e.g. us-east-1]
2825
- [ ] Was the solution modified from the version published on this repository?
2926
- [ ] If the answer to the previous question was yes, are the changes available on GitHub?
3027
- [ ] Have you checked your [service quotas](https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html) for the sevices this solution uses?
31-
- [ ] Were there any errors in the CloudWatch Logs? [How to enable debug mode?](https://docs.aws.amazon.com/solutions/latest/amazon-cloudwatch-monitoring-framework/troubleshooting.html)
28+
- [ ] Were there any errors in the CloudWatch Logs?
3229

3330
**Screenshots**
3431
If applicable, add screenshots to help explain your problem (please **DO NOT include sensitive information**).

.github/ISSUE_TEMPLATE/feature_request.md

100755100644
Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
---
22
name: Feature request
33
about: Suggest an idea for this solution
4-
title: ""
5-
labels: feature-request, enhancement
6-
assignees: ""
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
78
---
89

910
**Is your feature request related to a problem? Please describe.**
10-
11-
<!--- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
1212

1313
**Describe the feature you'd like**
14-
15-
<!--- A clear and concise description of what you want to happen -->
14+
A clear and concise description of what you want to happen.
1615

1716
**Additional context**
18-
19-
<!--- Add any other context or screenshots about the feature request here -->
17+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22

33
*Description of changes:*
44

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

.gitignore

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
.DS_Store
2+
.idea/
3+
*.pyc
4+
.eggs
5+
*.egg-info
6+
.cache
7+
*.sonarlint
8+
source/tests/__pycache__/
9+
source/lib/__pycache__/
10+
/deployment/state_machines/sample_events/
11+
/source/scratch/
12+
/source/bin/build_scripts/CHANGELOG.json
13+
/deployment/global-s3-assets/
14+
/deployment/regional-s3-assets/
15+
/source/parse*
16+
/source/dateutil/
17+
/source/python_dateutil*
18+
/source/docutils*
19+
/source/futures-*
20+
/source/jmespath*
21+
/source/concurrent/
22+
/source/s3transfer*
23+
/source/six-*
24+
/source/urllib3*
25+
/source/six.py
26+
/source/chardet*
27+
/source/certifi*
28+
/source/idna*
29+
/source/requests*
30+
/source/yorm*
31+
/source/yaml*
32+
/source/jinja2*
33+
/source/markupsafe*
34+
/source/simplejson*
35+
/source/PyYAML*
36+
/source/_yaml/
37+
/source/pathlib2-2.3.6.dist-info/
38+
/source/pathlib2/

CHANGELOG.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,24 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [2.2.0] - 2021-12-09
8+
### Added
9+
- Added support for organization Root as an OU for manifest schema version "2021-03-15". [#8](https://github.com/aws-solutions/aws-control-tower-customizations/pull/8)
10+
- Added support for nested OU for manifest schema version "2021-03-15". [#19](https://github.com/aws-solutions/aws-control-tower-customizations/issues/19)
11+
- Added support for CAPABILITY_AUTO_EXPAND for SAM. [#78](https://github.com/aws-solutions/aws-control-tower-customizations/pull/78)
12+
### Changed
13+
- Fixed the issue that SSM parameter names were not output to logs for troubleshooting. [#68](https://github.com/aws-solutions/aws-control-tower-customizations/pull/68)
14+
- Fixed the issue that resources starting with "S3" were incorrectly parsed as empty buckets. [#65](https://github.com/aws-solutions/aws-control-tower-customizations/issues/65)
15+
- Fixed the issue that customization example folder was missing from the github repository. [#71](https://github.com/aws-solutions/aws-control-tower-customizations/issues/71)
16+
717
## [2.1.0] - 2021-05-15
818
### Added
919
- Added option to enable concurrency to deploy StackSets operations in regions in parallel.
10-
- Added support for UTF-8 encoded CloudFormation templates. [#55](https://github.com/awslabs/aws-control-tower-customizations/issues/55)
20+
- Added support for UTF-8 encoded CloudFormation templates. [#55](https://github.com/aws-solutions/aws-control-tower-customizations/issues/55)
1121
### Changed
12-
- Support list of SSM Parameter Store keys as CloudFormation parameter value. [#43](https://github.com/awslabs/aws-control-tower-customizations/issues/43)
13-
- Use environment variable for Update StackSet API [#50](https://github.com/awslabs/aws-control-tower-customizations/pull/50/files)
14-
- Handle account names with overlapping string [#45](https://github.com/awslabs/aws-control-tower-customizations/issues/45)
22+
- Support list of SSM Parameter Store keys as CloudFormation parameter value. [#43](https://github.com/aws-solutions/aws-control-tower-customizations/issues/43)
23+
- Use environment variable for Update StackSet API [#50](https://github.com/aws-solutions/aws-control-tower-customizations/pull/50/files)
24+
- Handle account names with overlapping string [#45](https://github.com/aws-solutions/aws-control-tower-customizations/issues/45)
1525
- Handle SCP policy tag name with whitespace.
1626
- Update parsing logic to learn manifest version in the manifest.
1727

@@ -20,7 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2030
- Support for new simplified manifest schema (version "2021-03-15"). This does not impact existing customers using manifest version "2020-01-01".
2131
### Changed
2232
- Optimization to skip update Stack Set workflow when only new accounts are added to the Stack Set.
23-
- Ability to create only Stack Sets if the account list is empty. This allows users to configure Stack Set resources with empty Organizational Units. Ref:[GitHub Issue 42](https://github.com/awslabs/aws-control-tower-customizations/issues/42)
33+
- Ability to create only Stack Sets if the account list is empty. This allows users to configure Stack Set resources with empty Organizational Units. Ref:[GitHub Issue 42](https://github.com/aws-solutions/aws-control-tower-customizations/issues/42)
2434
- Pinned versions for all the third-party packages.
2535
- Update cfn-nag package to v0.7.2 to utilize new rules. This may result in new failures and warning in the build stage. However, it would help you identify new issues.
2636
- Update default branch name to 'main'.
@@ -42,8 +52,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4252
- Updates the AWS CodeBuild image to the latest available version (aws/codebuild/standard:4.0).
4353
- Optimizes the CloudFormation resource stage to trigger step function execution only if there is difference between the configuration and deployed stack sets.
4454
- Fixes the issue in the build stage of the CodePipeline by updating manifest version to match the manifest schema.
45-
- Fixes the issue for comparing deployed stack set templates and parameters [#4](https://github.com/awslabs/aws-control-tower-customizations/issues/4)
46-
- Fixes the issue for updating the variables in the files using Jinja [#17](https://github.com/awslabs/aws-control-tower-customizations/issues/17)
55+
- Fixes the issue for comparing deployed stack set templates and parameters [#4](https://github.com/aws-solutions/aws-control-tower-customizations/issues/4)
56+
- Fixes the issue for updating the variables in the files using Jinja [#17](https://github.com/aws-solutions/aws-control-tower-customizations/issues/17)
4757

4858
## [1.1.0] - 2020-02-25
4959
### Known Issue Fix and Code Optimization

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ information to effectively respond to your bug report or contribution.
1111

1212
We welcome you to use the GitHub issue tracker to report bugs or suggest features.
1313

14-
When filing an issue, please check [existing open](https://github.com/awslabs/aws-control-tower-customizations/issues), or [recently closed](https://github.com/awslabs/aws-control-tower-customizations/issues?q=is%3Aissue+is%3Aclosed), issues to make sure somebody else hasn't already
14+
When filing an issue, please check [existing open](https://github.com/aws-solutions/aws-control-tower-customizations/issues), or [recently closed](https://github.com/aws-solutions/aws-control-tower-customizations/issues?q=is%3Aissue+is%3Aclosed), issues to make sure somebody else hasn't already
1515
reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
1616

1717
* A reproducible test case or series of steps
@@ -41,7 +41,7 @@ GitHub provides additional document on [forking a repository](https://help.githu
4141

4242

4343
## Finding contributions to work on
44-
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels ((enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/awslabs/aws-control-tower-customizations/labels/help%20wanted) issues is a great place to start.
44+
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels ((enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/aws-solutions/aws-control-tower-customizations/labels/help%20wanted) issues is a great place to start.
4545

4646

4747
## Code of Conduct
@@ -55,7 +55,7 @@ If you discover a potential security issue in this project we ask that you notif
5555

5656

5757
## Licensing
58-
See the [LICENSE](https://github.com/awslabs/aws-control-tower-customizations/blob/main/LICENSE.txt) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
58+
See the [LICENSE](https://github.com/aws-solutions/aws-control-tower-customizations/blob/main/LICENSE.txt) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
5959

6060

6161
We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.

README.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
# Customizations for AWS Control Tower Solution
2-
3-
**[🚀Solution Landing Page](https://aws.amazon.com/solutions/implementations/customizations-for-aws-control-tower/)** | **[🚧Feature request](https://github.com/awslabs/aws-control-tower-customizations/issues/new?assignees=&labels=feature-request%2C+enhancement&template=feature_request.md&title=)** | **[🐛Bug Report](https://github.com/awslabs/aws-control-tower-customizations/issues/new?assignees=&labels=bug%2C+triage&template=bug_report.md&title=)** | **[📜Documentation Improvement](https://github.com/awslabs/aws-control-tower-customizations/issues/new?assignees=&labels=document-update&template=documentation_improvements.md&title=)**
4-
5-
## Solution Overview
1+
## Customizations for AWS Control Tower Solution
62
The Customizations for AWS Control Tower solution combines AWS Control Tower and other highly-available, trusted AWS services to help customers more quickly set up a secure, multi-account AWS environment based on AWS best practices. Customers can easily add customizations to their AWS Control Tower landing zone using an AWS CloudFormation template and service control policies (SCPs). Customers can deploy their custom template and policies to both individual accounts and organizational units (OUs) within their organization. Customizations for AWS Control Tower integrates with AWS Control Tower lifecycle events to ensure that resource deployments stay in sync with the customer's landing zone. For example, when a new account is created using the AWS Control Tower account factory, the solution ensures that all resources attached to the account's OUs will be automatically deployed. Before deploying this solution, customers need to have an AWS Control Tower landing zone deployed in their account.
73

84
## Getting Started
9-
To get started with the Customizations for AWS Control Tower solution, please review the solution documentation. https://aws.amazon.com/solutions/customizations-for-aws-control-tower
5+
To get started with the Customizations for AWS Control Tower solution, please review the [solution documentation](https://aws.amazon.com/solutions/implementations/customizations-for-aws-control-tower/)
106

117
## Running unit tests for customization
128
* Clone the repository, then make the desired code changes
@@ -20,25 +16,31 @@ chmod +x ./deployment/run-unit-tests.sh
2016
## Building the customized solution
2117
* Configure the solution name, version number and bucket name of your target Amazon S3 distribution bucket
2218
```
23-
export DIST_OUTPUT_BUCKET=my-source-code-bucket-name # Name for the S3 bucket where customized code will reside
19+
export DIST_OUTPUT_BUCKET_PREFIX=my-source-code-bucket-name_prefix # Prefix for the S3 bucket where customized code will reside
2420
export TEMPLATE_OUTPUT_BUCKET=my-template-bucket-name # Name for the S3 bucket where the template will be located
2521
export SOLUTION_NAME=customizations-for-aws-control-tower # name of the solution
2622
export VERSION=my-version # version number for the customized code
23+
export REGION=aws-region-code # the AWS region to test the solution (e.g. us-east-1)
2724
```
28-
_Note:_ You would have to create an S3 bucket with prefix 'my-bucket-name-<aws_region>'; aws_region is where you are testing the customized solution. Also, the assets in bucket should be publicly accessible
25+
_Note:_ You would need to create one global bucket and one regional bucket. The global bucket TEMPLATE_OUTPUT_BUCKET, for example "my-bucket-name", is used to store the AWS CloudFormation template. The regional bucket <DIST_OUTPUT_BUCKET_PREFIX>-<REGION>, for example "my-bucket-name-us-east-1", is used to store your customized source code zip packages (lambda code). The solution's CloudFormation template will expect the source code to be located in a bucket matching that name. Also, the assets in bucket should be publicly accessible.
2926

30-
* Now build the distributable:
27+
* Now build the distributable
3128
```
3229
chmod +x ./build-s3-dist.sh
33-
./build-s3-dist.sh $DIST_OUTPUT_BUCKET $TEMPLATE_OUTPUT_BUCKET $SOLUTION_NAME $VERSION
30+
./build-s3-dist.sh $DIST_OUTPUT_BUCKET_PREFIX $TEMPLATE_OUTPUT_BUCKET $SOLUTION_NAME $VERSION
3431
```
3532

36-
* Deploy the distributable to an Amazon S3 bucket in your account. _Note:_ you must have the AWS Command Line Interface installed.
37-
Make sure you use proper acl and profile for the copy operation as applicable.
38-
```
39-
aws s3 cp deployment/global-s3-assets/ s3://my-bucket-name-<aws_region>/$SOLUTION_NAME/$VERSION/ --recursive --acl bucket-owner-full-control --profile aws-cred-profile-name
40-
aws s3 cp deployment/regional-s3-assets/ s3://my-bucket-name-<aws_region>/$SOLUTION_NAME/$VERSION/ --recursive --acl bucket-owner-full-control --profile aws-cred-profile-name
41-
```
33+
* Upload the distributable to an Amazon S3 bucket in your account.
34+
35+
* Upload the AWS CloudFormation template to your global bucket in the following pattern
36+
```
37+
s3://my-bucket-name/$SOLUTION_NAME/$VERSION/
38+
```
39+
40+
* Upload the customized source code zip packages to your regional bucket in the following pattern
41+
```
42+
s3://my-bucket-name-<REGION>/$SOLUTION_NAME/$VERSION/
43+
```
4244
4345
## Deploying the customized solution
4446
* Get the link of the custom-control-tower-initiation.template loaded to your Amazon S3 bucket.
@@ -82,8 +84,8 @@ custom_control_tower_configuration
8284
8385
## Collection of operational metrics
8486
85-
This solution collects anonymous operational metrics to help AWS improve the quality and features of the solution. For more information, including how to disable this capability, please see the [implementation guide](https://docs.aws.amazon.com/solutions/latest/customizations-for-aws-control-tower/welcome.html).
87+
This solution collects anonymous operational metrics to help AWS improve the quality and features of the solution. For more information, including how to disable this capability, please see the [implementation guide](https://docs.aws.amazon.com/solutions/latest/customizations-for-aws-control-tower/appendix-b.html).
8688
8789
## License
8890
89-
See license [here](https://github.com/awslabs/aws-control-tower-customizations/blob/main/LICENSE.txt)
91+
See license [here](https://github.com/aws-solutions/aws-control-tower-customizations/blob/main/LICENSE.txt)

deployment/custom-control-tower-initiation.template

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2012-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1+
# Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License").
44
# You may not use this file except in compliance with the License.
@@ -151,6 +151,10 @@ Mappings:
151151
AutoBuild:
152152
CustomControlTower:
153153
Flag: 'No'
154+
ControlTowerBaselineConfigStackset:
155+
Info:
156+
Name: 'AWSControlTowerBP-BASELINE-CONFIG'
157+
154158

155159
Conditions:
156160
IsPipelineApprovalStageCondition: !Equals [!Ref PipelineApprovalStage, 'Yes']
@@ -769,6 +773,7 @@ Resources:
769773
- organizations:ListOrganizationalUnitsForParent
770774
- organizations:ListAccountsForParent
771775
- organizations:ListAccounts
776+
- organizations:DescribeOrganization
772777
Resource: '*' # The APIs above only support '*' resource.
773778
- PolicyName: "Custom-Control-Tower-StackSet-CodeBuild-Policy-SSM"
774779
PolicyDocument:
@@ -867,6 +872,8 @@ Resources:
867872
Value: %VERSION%
868873
- Name: METRICS_URL
869874
Value: !FindInMap [Solution, Metrics, MetricsURL]
875+
- Name: CONTROL_TOWER_BASELINE_CONFIG_STACKSET
876+
Value: !FindInMap [ControlTowerBaselineConfigStackset, Info, Name]
870877
Artifacts:
871878
Name: !Sub ${CustomControlTowerPipelineArtifactS3Bucket}-Built
872879
Type: CODEPIPELINE
@@ -1275,11 +1282,6 @@ Resources:
12751282

12761283
StateMachineRole:
12771284
Type: "AWS::IAM::Role"
1278-
Metadata:
1279-
cfn_nag:
1280-
rules_to_suppress:
1281-
- id: W11
1282-
reason: "Allow Resource * for AWS Lambda Functions in the account. State Machine execution fails otherwise."
12831285
Properties:
12841286
AssumeRolePolicyDocument:
12851287
Version: "2012-10-17"

0 commit comments

Comments
 (0)