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

customize role name in log forwarder CFN template #594

Open
wants to merge 1 commit into
base: master
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
14 changes: 14 additions & 0 deletions aws/logs_monitoring/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ Parameters:
Type: Number
Default: 20
Description: Set the max number of workers sending logs concurrently.
ForwarderRoleNamePrefix:
Type: String
Default: ""
Description: Set the name of the execution role to be created for the lambda. Region will be added for global uniqueness.
PermissionsBoundaryArn:
Type: String
Default: ""
Expand Down Expand Up @@ -377,6 +381,11 @@ Conditions:
- Fn::Equals:
- Ref: PermissionsBoundaryArn
- ""
SetForwarderRoleName:
Fn::Not:
- Fn::Equals:
- Ref: ForwarderRoleNamePrefix
- ""
SetAdditionalTargetLambdas:
Fn::Not:
- Fn::Equals:
Expand Down Expand Up @@ -629,6 +638,11 @@ Resources:
ForwarderRole:
Type: AWS::IAM::Role
Properties:
RoleName:
Fn::If:
- SetForwarderRoleName
- !Sub "${ForwarderRoleNamePrefix}-${AWS::Region}"
- Ref: AWS::NoValue
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
Expand Down