28 lines
791 B
Python
28 lines
791 B
Python
import json
|
|
import pulumi
|
|
import pulumi_aws as aws
|
|
|
|
caller_identity = aws.get_caller_identity()
|
|
account_id = caller_identity.account_id
|
|
|
|
config = pulumi.Config()
|
|
project = config.require("project")
|
|
environment = config.require("environment")
|
|
stacks=["backend"]
|
|
for stack in stacks:
|
|
ecr_config = config.require_object("ecr")[stack]
|
|
|
|
ecr_repo = aws.ecr.Repository(ecr_config['name'],
|
|
name=ecr_config['name'],
|
|
encryption_configurations=[{
|
|
"encryption_type": "AES256",
|
|
}],
|
|
image_scanning_configuration={
|
|
"scan_on_push": False,
|
|
},
|
|
image_tag_mutability=ecr_config['image_mutability'],
|
|
opts = pulumi.ResourceOptions(protect=False))
|
|
|
|
|
|
pulumi.export("url", pulumi.Output.concat("ECR REPO ID:", ecr_repo.id))
|