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

feat: add ECR for docker images #51

Merged
merged 3 commits into from
Jan 21, 2024
Merged

feat: add ECR for docker images #51

merged 3 commits into from
Jan 21, 2024

Conversation

maxneuvians
Copy link
Contributor

This PR adds an ECR for docker images in the infra

Copy link

Plan for aws/acm

✅   Terraform Init: success
✅   Terraform Validate: success
✅   Terraform Format: success
✅   Terraform Plan: success
✅   Conftest: success

Plan: 0 to add, 0 to change, 0 to destroy
Show summary
CHANGE NAME
Show plan
No changes. Infrastructure is up-to-date.

This means that Terraform did not detect any differences between your
configuration and real physical resources that exist. As a result, no
actions need to be performed.
Releasing state lock. This may take a few moments...
Show Conftest results
20 tests, 20 passed, 0 warnings, 0 failures, 0 exceptions

Copy link

Plan for aws/ecr

✅   Terraform Init: success
✅   Terraform Validate: success
✅   Terraform Format: success
✅   Terraform Plan: success
✅   Conftest: success

Plan: 2 to add, 0 to change, 0 to destroy
Show summary
CHANGE NAME
add aws_ecr_lifecycle_policy.encrypted_message_policy
aws_ecr_repository.app
Show plan
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_ecr_lifecycle_policy.encrypted_message_policy will be created
  + resource "aws_ecr_lifecycle_policy" "encrypted_message_policy" {
      + id          = (known after apply)
      + policy      = jsonencode(
            {
              + rules = [
                  + {
                      + action       = {
                          + type = "expire"
                        }
                      + description  = "Expire untagged images older than 14 days"
                      + rulePriority = 1
                      + selection    = {
                          + countNumber = 14
                          + countType   = "sinceImagePushed"
                          + countUnit   = "days"
                          + tagStatus   = "untagged"
                        }
                    },
                  + {
                      + action       = {
                          + type = "expire"
                        }
                      + description  = "Keep last 20 tagged images"
                      + rulePriority = 2
                      + selection    = {
                          + countNumber   = 20
                          + countType     = "imageCountMoreThan"
                          + tagPrefixList = [
                              + "latest",
                            ]
                          + tagStatus     = "tagged"
                        }
                    },
                ]
            }
        )
      + registry_id = (known after apply)
      + repository  = "secret/app"
    }

  # aws_ecr_repository.app will be created
  + resource "aws_ecr_repository" "app" {
      + arn                  = (known after apply)
      + id                   = (known after apply)
      + image_tag_mutability = "MUTABLE"
      + name                 = "secret/app"
      + registry_id          = (known after apply)
      + repository_url       = (known after apply)
      + tags                 = {
          + "CostCentre" = "secret"
          + "Terraform"  = "true"
        }

      + image_scanning_configuration {
          + scan_on_push = true
        }
    }

Plan: 2 to add, 0 to change, 0 to destroy.

------------------------------------------------------------------------

This plan was saved to: plan.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "plan.tfplan"

Releasing state lock. This may take a few moments...
Show Conftest results
20 tests, 20 passed, 0 warnings, 0 failures, 0 exceptions

@maxneuvians maxneuvians merged commit 4945c42 into main Jan 21, 2024
4 checks passed
@maxneuvians maxneuvians deleted the feat/ecr branch January 21, 2024 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant