Skip to content

Commit 2a702b7

Browse files
committed
I was accidentally making the ECR repo twice.
We were trying to create the ECR repo in the deployment/action and in the infrastructure YAML. Here we make it only a single time.
1 parent 4f639e3 commit 2a702b7

File tree

1 file changed

+3
-28
lines changed

1 file changed

+3
-28
lines changed

infrastructure/cloudformation-template.yaml

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -42,32 +42,6 @@ Parameters:
4242
Description: RDS password
4343

4444
Resources:
45-
# ECR Repository
46-
ECRRepository:
47-
Type: AWS::ECR::Repository
48-
Properties:
49-
RepositoryName: !Sub 'neoapi-${Environment}'
50-
ImageScanningConfiguration:
51-
ScanOnPush: true
52-
LifecyclePolicy:
53-
LifecyclePolicyText: |
54-
{
55-
"rules": [
56-
{
57-
"rulePriority": 1,
58-
"selection": {
59-
"tagStatus": "untagged",
60-
"countType": "sinceImagePushed",
61-
"countUnit": "days",
62-
"countNumber": 1
63-
},
64-
"action": {
65-
"type": "expire"
66-
}
67-
}
68-
]
69-
}
70-
7145
# Security Group for App Runner
7246
AppRunnerSecurityGroup:
7347
Type: AWS::EC2::SecurityGroup
@@ -161,8 +135,9 @@ Outputs:
161135
Export:
162136
Name: !Sub '${AWS::StackName}-ServiceUrl'
163137

138+
# Remove or update this output since ECRRepository resource no longer exists
164139
ECRRepository:
165140
Description: ECR Repository URI
166-
Value: !Sub '${AWS::AccountId}.dkr.ecr.${AWS::Region}.amazonaws.com/${ECRRepository}'
141+
Value: !Sub '${AWS::AccountId}.dkr.ecr.${AWS::Region}.amazonaws.com/neoapi-${Environment}'
167142
Export:
168-
Name: !Sub '${AWS::StackName}-ECRRepository'
143+
Name: !Sub '${AWS::StackName}-ECRRepository'

0 commit comments

Comments
 (0)