Last active
November 1, 2024 14:22
-
-
Save atheiman/8a9824bccc4724a50ec9f4a13e1ab8cc to your computer and use it in GitHub Desktop.
CloudFormation template creating a cross account role assumable by a source arn with permission to submit Config evaluations. Can be deployed as a stackset.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Parameters: | |
RoleName: | |
Description: Name of role to be created - this will be suffixed with the region name | |
Type: String | |
SourceRoleArn: | |
Description: Source IAM role ARN to assume the role | |
Type: String | |
Resources: | |
ConfigCrossAcctEvaluationRole: | |
Type: 'AWS::IAM::Role' | |
Properties: | |
RoleName: | |
Fn::Sub: "${RoleName}-${AWS::Region}" | |
AssumeRolePolicyDocument: | |
Version: "2012-10-17" | |
Statement: | |
- Effect: Allow | |
Principal: | |
AWS: | |
- Ref: SourceRoleArn | |
Action: 'sts:AssumeRole' | |
Policies: | |
- PolicyName: Inline | |
PolicyDocument: | |
Version: "2012-10-17" | |
Statement: | |
- Effect: Allow | |
Action: | |
- 'config:PutEvaluations' | |
Resource: '*' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment