50 lines
1.5 KiB
Python
50 lines
1.5 KiB
Python
"""An AWS Python Pulumi program"""
|
|
|
|
import pulumi
|
|
import pulumi_aws as aws
|
|
from pulumi_aws import s3
|
|
import json
|
|
caller_identity = aws.get_caller_identity()
|
|
account_id = caller_identity.account_id
|
|
|
|
config = pulumi.Config()
|
|
project = config.require("project")
|
|
environment = config.require("environment")
|
|
|
|
ecr_config = config.require_object("ecr")["entity_extraction"]
|
|
|
|
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=True))
|
|
|
|
|
|
pulumi.export("url", pulumi.Output.concat("ECR REPO ID:", ecr_repo.id))
|
|
|
|
# Create an AWS resource (S3 Bucket)
|
|
"""bucket = s3.Bucket('br-edu-ifsp-ifsp-ret-s3-bucket-chatbot-editais-d',
|
|
tags={
|
|
"nome":"bucket-chatbot-editais",
|
|
"ambiente":"dev",
|
|
"projeto":"chatbot-editais",
|
|
"responsavel":"dti.prd@ifsp.edu.br",
|
|
"criticidade":"baixa",
|
|
"data-de-criacao":"03-09-2025",
|
|
"backup":"nunca",
|
|
"servico":"sistemas",
|
|
"prospeccao":"sim",
|
|
"poc":"sim",
|
|
"ia":"sim",
|
|
"modelo":"claude-sonnet-4"
|
|
})
|
|
|
|
|
|
# Export the name of the bucket
|
|
pulumi.export('bucket_name', bucket.id)"""
|