Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

moved "beniyiyim" terraform files to its own repo #20

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.terraform*
224 changes: 0 additions & 224 deletions alb.tf

This file was deleted.

65 changes: 65 additions & 0 deletions aws_ecr.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
resource "aws_ecr_repository" "base-ecr" {
name = "base-ecr"
image_tag_mutability = "MUTABLE"

image_scanning_configuration {
scan_on_push = true
}
}

resource "aws_ecr_lifecycle_policy" "ecr-policy" {
repository = aws_ecr_repository.base-ecr.name

policy = <<EOF
{
"rules": [
{
"rulePriority": 1,
"description": "Expire images older than 10 days",
"selection": {
"tagStatus": "untagged",
"countType": "sinceImagePushed",
"countUnit": "days",
"countNumber": 10
},
"action": {
"type": "expire"
}
}
]
}
EOF
}

resource "aws_ecr_repository" "worker-ecr" {
name = "worker-ecr"
image_tag_mutability = "MUTABLE"

image_scanning_configuration {
scan_on_push = true
}
}

resource "aws_ecr_lifecycle_policy" "worker-policy" {
repository = aws_ecr_repository.worker-ecr.name

policy = <<EOF
{
"rules": [
{
"rulePriority": 1,
"description": "Expire images older than 10 days",
"selection": {
"tagStatus": "untagged",
"countType": "sinceImagePushed",
"countUnit": "days",
"countNumber": 10
},
"action": {
"type": "expire"
}
}
]
}
EOF
}
Loading