Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update quickstart-aws-acm-certificate.template.yml #25

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions templates/quickstart-aws-acm-certificate.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Metadata:
default: IAM
Parameters:
- IamRoleArn
- PermissionsBoundaryArn
ParameterLabels:
QSS3BucketName:
default: Quick Start S3 bucket name
Expand All @@ -39,6 +40,8 @@ Metadata:
default: Domain name
IamRoleArn:
default: ARN of a pre-deployed IAM Role
PermissionsBoundaryArn:
default: Will be attached to all created IAM Roles to satisfy security requirements
SubjectAlternativeNames:
default: Subject AlternativeNames
Parameters:
Expand Down Expand Up @@ -88,6 +91,10 @@ Parameters:
see the ACMCertificateRole resource in this template for reference
Type: String
Default: ''
PermissionsBoundaryArn:
Description: Will be attached to all created IAM Roles to satisfy security requirements
Type: String
Default: ''
SubjectAlternativeNames:
Description: 'Subject Alternative Names seperated by commas. Must be valid FQDNs'
Type: CommaDelimitedList
Expand Down Expand Up @@ -129,6 +136,7 @@ Conditions:
StackProvidedIAM:
Fn::Not:
- Condition: CustomerProvidedIAM
PermissionsBoundaryProvided: !Not [!Equals ["", !Ref PermissionsBoundaryArn]]
Resources:
# So we can copy the ACM lambda everywhere
CopyZips:
Expand All @@ -149,10 +157,17 @@ Resources:
QSS3BucketName: !Ref QSS3BucketName
QSS3KeyPrefix: !Ref QSS3KeyPrefix
SourceObjects: "functions/packages/ACMCert/lambda.zip"
PermissionsBoundaryArn: !Ref PermissionsBoundaryArn
ACMCertificateRole:
Condition: StackProvidedIAM
Type: AWS::IAM::Role
Properties:
PermissionsBoundary:
!If [
PermissionsBoundaryProvided,
!Ref PermissionsBoundaryArn,
!Ref AWS::NoValue,
]
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
Expand Down