Skip to content

Commit fff6b03

Browse files
committed
Merge branch 'master' into pozeus-master
2 parents 3b89462 + 881a23f commit fff6b03

62 files changed

Lines changed: 1007 additions & 655 deletions

Some content is hidden

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

CONTRIBUTING.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,3 @@ If you discover a potential security issue in this project we ask that you notif
5757
## Licensing
5858

5959
See the [LICENSE](https://github.com/awslabs/aws-deployment-framework/blob/master/LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
60-
61-
We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.

docs/providers-guide.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ Provider type: `codebuild`.
230230
> pipeline to consume a custom image if required.
231231
> Along with `repository_arn`, we also support a `tag` key which can be used
232232
> to define which image should be used (defaults to `latest`).
233+
> An example of this setup is provided [here](https://github.com/awslabs/aws-deployment-framework/blob/master/docs/user-guide.md#custom-build-images).
233234
>
234235
> Image can also take an object that contains a reference to a
235236
> public docker hub image with a prefix of `docker-hub://`, such as
@@ -238,8 +239,6 @@ Provider type: `codebuild`.
238239
> Along with the docker hub image name, we also support using a tag which can
239240
> be provided after the docker hub image name such as `docker-hub://bitnami/mongodb:3.6.23`
240241
> in order to define which image should be used (defaults to `latest`).
241-
>
242-
>
243242
- *size* *(String)* **(small|medium|large)** - default: `small`.
244243
> The Compute type to use for the build, types can be found
245244
> [here](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html).

docs/user-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ pipelines:
314314
provider: codebuild
315315
image:
316316
repository_arn: arn:aws:ecr:region:012345678910:repository/test
317-
tag: latest #optional (and also defaults to latest)
317+
tag: latest # optional (defaults to latest)
318318
targets:
319319
- ...
320320
```

requirements.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
astroid~=2.4.2
2-
botocore==1.17.63
3-
boto3==1.14.63
4-
isort==5.6.4
1+
astroid~=2.6.4
2+
botocore==1.21.2
3+
boto3==1.18.2
4+
isort==5.9.2
55
mock~=4.0.3
6-
pylint~=2.6.0
7-
pytest~=6.2.1
8-
pyyaml>=5.3
9-
schema~=0.7.2
10-
tox==3.20.1
6+
pylint~=2.9.3
7+
pytest~=6.2.4
8+
pyyaml>=5.4.1
9+
schema~=0.7.4
10+
tox==3.24.0
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
AWSTemplateFormatVersion: "2010-09-09"
2+
Description: >
3+
Organizational Account Access Role for Cross-Account automation
4+
5+
Parameters:
6+
RoleName:
7+
Type: String
8+
Description: >-
9+
The name of the Cross-Account role
10+
Default: OrganizationAccountAccessRole
11+
AdministratorAccountId:
12+
Type: String
13+
Description: >-
14+
AWS Account Id of the administrator account
15+
(the account in which StackSets will be created).
16+
MaxLength: 12
17+
MinLength: 12
18+
19+
Resources:
20+
OrganizationAccountAccessRole:
21+
Type: AWS::IAM::Role
22+
Properties:
23+
RoleName: !Ref RoleName
24+
AssumeRolePolicyDocument:
25+
Version: 2012-10-17
26+
Statement:
27+
- Effect: Allow
28+
Principal:
29+
AWS:
30+
- !Ref AdministratorAccountId
31+
Action:
32+
- sts:AssumeRole
33+
Path: /
34+
ManagedPolicyArns:
35+
- !Sub arn:${AWS::Partition}:iam::aws:policy/AdministratorAccess
36+
37+
Outputs:
38+
RoleArn:
39+
Description: The ARN of the Organization Account Access Role
40+
Value: !GetAtt OrganizationAccountAccessRole.Arn
41+
Export:
42+
Name: !Sub "${AWS::StackName}-RoleArn"

samples/sample-ec2-with-codedeploy/template.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ Resources:
166166
Fn::Sub: ${Environment}-public-subnet-1b
167167
- Fn::ImportValue:
168168
Fn::Sub: ${Environment}-public-subnet-1c
169-
SecurityGroups:
169+
SecurityGroups:
170170
- !Ref 'PublicLoadBalancerSG'
171171
ApplicationLoadBalancerHTTPListener:
172172
Type: "AWS::ElasticLoadBalancingV2::Listener"
@@ -251,4 +251,4 @@ Outputs:
251251
Description: The url of the external load balancer
252252
Value: !Join ['', ['http://', !GetAtt 'PublicLoadBalancer.DNSName']]
253253
Export:
254-
Name: 'LoadBalancerExternalUrl'
254+
Name: 'LoadBalancerExternalUrl'

samples/sample-ecr-repository/template.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
# // Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
# // SPDX-License-Identifier: Apache-2.0
33

4-
AWSTemplateFormatVersion: '2010-09-09'
4+
AWSTemplateFormatVersion: "2010-09-09"
55
Description: ADF CloudFormation Sample Template (Shared ECR Repository)
66
Metadata:
77
License: Apache-2.0
88
Parameters:
99
TestingAccountId:
10-
Description: Testing Accound Id that will pull from this repository
10+
Description: Testing Account Id that will pull from this repository
1111
Type: String
1212
ProductionAccountId:
13-
Description: Production Accound Id that will pull from this repository
13+
Description: Production Account Id that will pull from this repository
1414
Type: String
1515
Resources:
1616
SampleAppRepository:
1717
Type: AWS::ECR::Repository
1818
Properties:
19-
RepositoryName: 'sample-node-app'
19+
RepositoryName: "sample-node-app"
2020
LifecyclePolicy:
2121
LifecyclePolicyText: !Sub
2222
- |
@@ -48,21 +48,21 @@ Resources:
4848
}
4949
- DaysToRetainUntaggedContainerImages: 2
5050
MaxTaggedContainerImagesToRetain: 2
51-
RepositoryPolicyText:
51+
RepositoryPolicyText:
5252
Version: "2012-10-17"
53-
Statement:
53+
Statement:
5454
- Sid: AllowPull
5555
Effect: Allow
56-
Principal:
57-
AWS:
58-
- !Sub "arn:aws:iam::${TestingAccountId}:root"
59-
- !Sub "arn:aws:iam::${ProductionAccountId}:root"
60-
Action:
56+
Principal:
57+
AWS:
58+
- !Sub "arn:${AWS::Partition}:iam::${TestingAccountId}:root"
59+
- !Sub "arn:${AWS::Partition}:iam::${ProductionAccountId}:root"
60+
Action:
6161
- "ecr:Get*"
6262
- "ecr:Describe*"
6363
- "ecr:BatchGetImage"
6464
- "ecr:BatchCheckLayerAvailability"
6565

66-
Outputs:
66+
Outputs:
6767
SampleAppRepository:
6868
Value: !GetAtt SampleAppRepository.Arn

samples/sample-expunge-vpc/template.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
AWSTemplateFormatVersion: '2010-09-09'
1+
AWSTemplateFormatVersion: "2010-09-09"
22
Transform: AWS::Serverless-2016-10-31
33
Description: Deploys the Custom Resource for deleting the default VPC in all regions
44
Resources:
55
LambdaVPCPolicyRole:
6-
Type: 'AWS::IAM::Role'
6+
Type: "AWS::IAM::Role"
77
Properties:
88
AssumeRolePolicyDocument:
9-
Version: '2012-10-17'
9+
Version: "2012-10-17"
1010
Statement:
1111
- Effect: Allow
1212
Principal:
13-
Service: 'lambda.amazonaws.com'
13+
Service: "lambda.amazonaws.com"
1414
Action:
15-
- 'sts:AssumeRole'
16-
Path: '/'
15+
- "sts:AssumeRole"
16+
Path: "/"
1717
ManagedPolicyArns:
18-
- 'arn:aws:iam::aws:policy/AmazonVPCFullAccess'
19-
- 'arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole'
18+
- !Sub "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
19+
- !Sub "arn:${AWS::Partition}:iam::aws:policy/AmazonVPCFullAccess"
2020
Policies:
2121
- PolicyName: ec2
2222
PolicyDocument:
2323
Statement:
2424
- Effect: Allow
2525
Action:
26-
- 'ec2:DescribeRegions'
27-
Resource: '*'
26+
- "ec2:DescribeRegions"
27+
Resource: "*"
2828
DeleteVPCLambda:
2929
Type: AWS::Serverless::Function
3030
Properties:
@@ -35,8 +35,8 @@ Resources:
3535
Runtime: python3.8
3636
Timeout: 600
3737
Environment:
38-
Variables:
39-
region_name: !Ref "AWS::Region"
38+
Variables:
39+
region_name: !Ref "AWS::Region"
4040
DeleteVPCCustom:
4141
Type: Custom::DeleteVPC
4242
Properties:

samples/sample-iam/template.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
# // Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
# // SPDX-License-Identifier: Apache-2.0
33

4-
AWSTemplateFormatVersion: '2010-09-09'
4+
AWSTemplateFormatVersion: "2010-09-09"
55
Description: ADF CloudFormation Sample Template (IAM)
66
Metadata:
77
License: Apache-2.0
88
Resources:
99
DevelopersIAMGroup:
1010
Type: AWS::IAM::Group
11-
Properties:
11+
Properties:
1212
GroupName: adf-sample-developers-group
1313
ManagedPolicyArns:
14-
- 'arn:aws:iam::aws:policy/AWSServiceCatalogEndUserFullAccess'
15-
- 'arn:aws:iam::aws:policy/AWSCloud9User'
16-
- 'arn:aws:iam::aws:policy/AWSCloudFormationReadOnlyAccess'
17-
- 'arn:aws:iam::aws:policy/AWSCodeCommitFullAccess'
18-
- 'arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess'
14+
- !Sub "arn:${AWS::Partition}:iam::aws:policy/AWSServiceCatalogEndUserFullAccess"
15+
- !Sub "arn:${AWS::Partition}:iam::aws:policy/AWSCloud9User"
16+
- !Sub "arn:${AWS::Partition}:iam::aws:policy/AWSCloudFormationReadOnlyAccess"
17+
- !Sub "arn:${AWS::Partition}:iam::aws:policy/AWSCodeCommitFullAccess"
18+
- !Sub "arn:${AWS::Partition}:iam::aws:policy/AmazonS3ReadOnlyAccess"
1919
GlobalInstanceProfile:
2020
Type: "AWS::IAM::InstanceProfile"
2121
Properties:
@@ -75,7 +75,7 @@ Resources:
7575
Action:
7676
- "sts:AssumeRole"
7777
ManagedPolicyArns:
78-
- "arn:aws:iam::aws:policy/service-role/AWSCodeDeployRole"
78+
- !Sub "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSCodeDeployRole"
7979
RoleName: "codedeploy-service-role"
8080
Outputs:
8181
DevelopersIAMGroup:

samples/sample-service-catalog-product/productX/template.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,35 @@ AWSTemplateFormatVersion: '2010-09-09'
55
Description: ADF CloudFormation Sample Service Catalog Product
66
Metadata:
77
License: Apache-2.0
8-
Parameters:
8+
Parameters:
99
Environment:
1010
Type: String
1111
Default: testing
12-
AllowedValues:
12+
AllowedValues:
1313
- testing
1414
Description: The environment to use, IDE are only supported in testing
15-
InstanceType:
15+
InstanceType:
1616
Type: String
1717
Default: t3.micro
18-
AllowedValues:
18+
AllowedValues:
1919
- t3.micro
2020
- m5.large
2121
Description: Enter t3.micro or m5.large. Default is t3.micro.
22-
AutomaticStopTimeInMinutes:
22+
AutomaticStopTimeInMinutes:
2323
Type: Number
2424
Default: 480
2525
AllowedValues:
2626
- 480
2727
- 960
2828
Description: The amount of minutes that this Cloud9 Instance should stop after (8 or 16 hours).
29-
InstanceDescription:
29+
InstanceDescription:
3030
Type: String
3131
Default: "Development environment used during office hours"
3232
Description: The Description of the Cloud9 Instance.
33-
InstanceName:
33+
InstanceName:
3434
Type: String
3535
Description: The name of the Cloud9 Instance.
36-
UserName:
36+
UserName:
3737
Type: String
3838
Description: Your IAM UserName that will be used as the OwnerArn in the Cloud9 Instance.
3939
Resources:
@@ -44,7 +44,7 @@ Resources:
4444
Description: !Ref InstanceDescription
4545
InstanceType: !Ref InstanceType
4646
Name: !Ref InstanceName
47-
OwnerArn: !Sub "arn:aws:iam::${AWS::AccountId}:user/${UserName}" #In this sample case 'sample-developer' from the IAM stack can be used here
47+
OwnerArn: !Sub "arn:${AWS::Partition}:iam::${AWS::AccountId}:user/${UserName}" #In this sample case 'sample-developer' from the IAM stack can be used here
4848
SubnetId:
4949
Fn::ImportValue:
5050
Fn::Sub: ${Environment}-public-subnet-1a # Imported from sample-vpc

0 commit comments

Comments
 (0)