---
AWSTemplateFormatVersion: "2010-09-09"
Description: >
  Test bad IAM policies
Resources:
  rIamRole:
    Type: AWS::IAM::Role
    Properties:
      RoleName: jeAoXmadgEUYzfalKtuYjeAoXmadgEUYzfalKtuYjeAoXmadgEUYzfalKtuYjeAoXmadgEUYzfalKtuYBadRoleName
      AssumeRolePolicyDocument: {}
      Policies:
      - PolicyName: String
        PolicyDocument:
          Version: 'blah'
          BadProperty: test
          Statement: "Test"
  rIamUser:
    Type: AWS::IAM::ManagedPolicy
    Properties:
      PolicyDocument:
        Version: 'blah'
        Statement:
        - Resource: '*'
          Effect: 'NotAllow'
          Principal: [123456789012]
        - Effect: Allow
          Action:
          - cloudwatch:*
          Resource:
          - Effect: Allow
          - Effect: Allow
            Action:
            - cloudwatch:*
            Resource: '*'
  rIamPolicy:
    Type: AWS::IAM::Policy
    Properties:
      PolicyDocument:
      - Fn::If:
        - cCondition
        - Statement: {}
        - Statement: []
  rIamPolicyExtraThings:
    Type: AWS::IAM::Policy
    Properties:
      PolicyName: test
      Roles:
      - MyRole
      PolicyDocument:
        Version: '2012-10-17'
        Statement:
        - Effect: Allow

          Action:
          - cloudwatch:*
          NotAction:
          - ec2:*
          Resource:
          - '*'
          NotResource:
          - 'arn'
