Hello anyone can help with this invalid template property . I am trying to create an ECR repo with name as "sample ", with kms. But is throwing error invalid template property " ImageRepoName."
Any reference to a ECR cloudformation is also fine . ECRRepoName is declared in the parameter section
EcrMlPlatform:
Type: 'AWS::ECR::Repository'
Properties:
DisplayName: !Ref ECRRepoName
KmsMasterKeyId: !Ref ECRkeyMLPlatform
EmptyOnDelete: true
EncryptionConfiguration:
EncryptionType: KMS
KmsKey: !Ref ECRkeyMLPlatform
ImageScanningConfiguration:
scanOnPush: true
ImageTagMutability: IMMUTABLE
RepositoryName: !Ref ECRRepoName
RepositoryPolicyText:
Version: "2012-10-17"
Statement:
-
Sid: AllowPull
Effect: Allow
Principal: "*"
Action:
- "ecr:GetDownloadUrlForLayer"
- "ecr:BatchGetImage"
- "ecr:BatchCheckLayerAvailability"
- "ecr:DescribeImages"
- "ecr:DescribeRepositories"
Outputs:
ImageRepoName:
Value: !Sub ${AWS::AccountId}.dkr.ecr.${AWS::Region}.amazonaws.com/${ECRRepoName}
This issue is solved by placing the outputs section as same level of resources. it was a yaml error