Skip to content

Commit 677d12e

Browse files
committed
Update to version v2.0.0
1 parent 1c11d1e commit 677d12e

File tree

72 files changed

+1228
-427
lines changed

Some content is hidden

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

72 files changed

+1228
-427
lines changed

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,20 @@ 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.0.0] - 2021-03-15
8+
### Added
9+
- Support for new simplified manifest schema (version "2021-03-15"). This does not impact existing customers using manifest version "2020-01-01".
10+
### Changed
11+
- Optimization to skip update Stack Set workflow when only new accounts are added to the Stack Set.
12+
- 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)
13+
- Pinned versions for all the third-party packages.
14+
- 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.
15+
- Update default branch name to 'main'.
16+
- Add support for https path for the resource file in the manifest.
17+
718
## [1.2.1] - 2020-10-01
819
### Changed
9-
- Fix the issue related to incompatibility between latest version of BotoCore and AWS CLI. Ref:[Boto3 Issue #2596](https://github.com/boto/boto3/issues/2596)
20+
- Fix the issue related to incompatibility between latest version of BotoCore and AWS CLI. Ref: [Boto3 Issue #2596](https://github.com/boto/boto3/issues/2596)
1021

1122
## [1.2.0] - 2020-06-20
1223
### Added

NOTICE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Customizations for AWS Control Tower Solution
22

3-
Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except
55
in compliance with the License. A copy of the License is located at http://www.apache.org/licenses/LICENSE-2.0
66
or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ custom_control_tower_configuration
7676
```
7777
***
7878

79-
Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
79+
Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
8080
Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at
8181

8282
http://www.apache.org/licenses/LICENSE-2.0

deployment/custom-control-tower-initiation.template

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Parameters:
4343

4444
CodeCommitBranchName:
4545
Description: Name of the branch in CodeCommit repository that contains custom Control Tower configuration.
46-
Default: master
46+
Default: main
4747
Type: String
4848

4949
ExistingRepository:
@@ -584,7 +584,7 @@ Resources:
584584
Action:
585585
- s3:GetObject
586586
Resource:
587-
- !Sub arn:${AWS::Partition}:s3:::%TEMPLATE_BUCKET_NAME%/*
587+
- !Sub arn:${AWS::Partition}:s3:::*/* # needed to support validation of remotely sourced templates feature. The host S3 bucket can be created by the customers or partners.
588588
- PolicyName: "Custom-Control-Tower-SCP-CodeBuild-Policy-StepFunctions"
589589
PolicyDocument:
590590
Version: "2012-10-17"
@@ -707,7 +707,7 @@ Resources:
707707
Action:
708708
- s3:GetObject
709709
Resource:
710-
- !Sub arn:${AWS::Partition}:s3:::%TEMPLATE_BUCKET_NAME%/*
710+
- !Sub arn:${AWS::Partition}:s3:::*/* # needed to support validation of remotely sourced templates feature. The host S3 bucket can be created by the customers or partners.
711711
- PolicyName: "Custom-Control-Tower-StackSet-CodeBuild-Policy-StepFunctions"
712712
PolicyDocument:
713713
Version: "2012-10-17"
@@ -828,6 +828,10 @@ Resources:
828828
Value: !FindInMap [KMS, Alias, Name]
829829
- Name: EXECUTION_ROLE_NAME
830830
Value: !FindInMap [AWSControlTower, ExecutionRole, Name]
831+
- Name: SOLUTION_ID
832+
Value: !FindInMap [Solution, Metrics, SolutionID]
833+
- Name: METRICS_URL
834+
Value: !FindInMap [Solution, Metrics, MetricsURL]
831835
Artifacts:
832836
Name: !Sub ${CustomControlTowerPipelineArtifactS3Bucket}-Built
833837
Type: CODEPIPELINE
@@ -2117,17 +2121,24 @@ Resources:
21172121
"Next": "List StackInstances Accounts"
21182122
},
21192123
"Skip Update StackSet?": {
2120-
"Type": "Choice",
2121-
"Choices": [
2122-
{
2123-
"Variable": "$.LoopFlag",
2124-
"StringEquals": "yes",
2125-
"Next": "Check Instance Pass"
2126-
}
2127-
],
2128-
"Default": "Update StackSet Pass"
2129-
},
2130-
2124+
"Type": "Choice",
2125+
"Choices": [
2126+
{
2127+
"Or": [
2128+
{
2129+
"Variable": "$.LoopFlag",
2130+
"StringEquals": "yes"
2131+
},
2132+
{
2133+
"Variable": "$.SkipUpdateStackSet",
2134+
"StringEquals": "yes"
2135+
}
2136+
],
2137+
"Next": "Check Instance Pass"
2138+
}
2139+
],
2140+
"Default": "Update StackSet Pass"
2141+
},
21312142
"Update StackSet Pass": {
21322143
"Type": "Pass",
21332144
"Result": {

deployment/run-unit-tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ echo 'pip3 install -r source/requirements.txt -t source/'
33
pip3 install -r source/requirements.txt -t source/
44
echo 'pip3 install -r source/testing_requirements.txt'
55
pip3 install -r source/testing_requirements.txt
6-
echo 'cd source && pytest tests && cd -'
7-
cd source && pytest tests && cd -
6+
echo 'cd source && python3 -m pytest tests && cd -'
7+
cd source && python3 -m pytest tests && cd -

source/aws/services/cloudformation.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
##############################################################################
2-
# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. #
2+
# Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. #
33
# #
44
# Licensed under the Apache License, Version 2.0 (the "License"). #
55
# You may not use this file except in compliance #
@@ -36,6 +36,7 @@ def __init__(self, logger, **kwargs):
3636
'Caught exception OperationInProgressException' \
3737
' handling the exception...'
3838

39+
@try_except_retry()
3940
def describe_stack_set(self, stack_set_name):
4041
try:
4142
response = self.cfn_client.describe_stack_set(
@@ -58,6 +59,7 @@ def describe_stack_set_operation(self, stack_set_name, operation_id):
5859
self.logger.log_unhandled_exception(e)
5960
raise
6061

62+
@try_except_retry()
6163
def list_stack_instances(self, **kwargs):
6264
try:
6365
response = self.cfn_client.list_stack_instances(**kwargs)
@@ -335,6 +337,7 @@ def describe_stack_instance(self, stack_set_name, account_id, region):
335337
self.logger.log_unhandled_exception(e)
336338
raise
337339

340+
@try_except_retry()
338341
def list_stack_set_operations(self, **kwargs):
339342
try:
340343
response = self.cfn_client.list_stack_set_operations(**kwargs)

source/aws/services/code_pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
##############################################################################
2-
# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. #
2+
# Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. #
33
# #
44
# Licensed under the Apache License, Version 2.0 (the "License"). #
55
# You may not use this file except in compliance #

source/aws/services/ec2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
##############################################################################
2-
# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. #
2+
# Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. #
33
# #
44
# Licensed under the Apache License, Version 2.0 (the "License"). #
55
# You may not use this file except in compliance #

source/aws/services/kms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
###############################################################################
2-
# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. #
2+
# Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. #
33
# #
44
# Licensed under the Apache License, Version 2.0 (the "License"). #
55
# You may not use this file except in compliance with the License.

source/aws/services/organizations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
##############################################################################
2-
# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. #
2+
# Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. #
33
# #
44
# Licensed under the Apache License, Version 2.0 (the "License"). #
55
# You may not use this file except in compliance #

0 commit comments

Comments
 (0)