AWSTemplateFormatVersion: 2010-09-09
Description: CloudFormation Template for Scrut AWS Integration IAM
Resources:
  ScrutRole:
    Type: 'AWS::IAM::Role'
    Properties:
      ManagedPolicyArns:
        - 'arn:aws:iam::aws:policy/SecurityAudit'
        - 'arn:aws:iam::aws:policy/ReadOnlyAccess'
      AssumeRolePolicyDocument:
        Version: 2012-10-17
        Statement:
          - Action: 'sts:AssumeRole'
            Effect: Allow
            Principal:
              AWS: 'arn:aws:iam::378176467373:root'
            Condition:
              StringEquals:
                'sts:ExternalId': '4365882f-ecb6-4c08-9eb8-720b5433bf41'
      MaxSessionDuration: 43200 
Outputs:
  RoleARN:
    Description: ARN of the Scrut role
    Value: !GetAtt
      - ScrutRole
      - Arn
