---
AWSTemplateFormatVersion: "2010-09-09"
Resources:
  ecr1:
    Type: AWS::ECR::Repository
    Properties:
      RepositoryPolicyText:
        Id: MyTopicPolicy
        Version: '2012-10-17'
        Statement:
        - Sid: My-statement-id
          Effect: NotAllow
          Principal: arn:aws:iam::account-id:user/user-name
          Action: sns:Publish
          Resource: "*"
          BadProperty: test
  ecr2:
    Type: AWS::ECR::Repository
    Properties:
      RepositoryPolicyText:
        Id: MyTopicPolicy
        Version: '2012-10-17'
        Statement:
        - Sid: My-statement-id
          Effect: Allow
          Principal: arn:aws:iam::account-id:user/user-name
          Action: sns:Publish
