Skip to content

Conversation

@bentoluizv
Copy link
Contributor

Uncomment the ECR module and introduce outputs for the ECR repository URL and name to enhance visibility and accessibility of these values.

@github-actions
Copy link

Terraform Plan (dev)

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # module.ecr.aws_ecr_lifecycle_policy.api_repository_policy will be created
  + resource "aws_ecr_lifecycle_policy" "api_repository_policy" {
      + id          = (known after apply)
      + policy      = jsonencode(
            {
              + rules = [
                  + {
                      + action       = {
                          + type = "expire"
                        }
                      + description  = "Manter apenas as últimas 1 imagens para otimizar custos"
                      + rulePriority = 1
                      + selection    = {
                          + countNumber = 1
                          + countType   = "imageCountMoreThan"
                          + tagStatus   = "untagged"
                        }
                    },
                  + {
                      + action       = {
                          + type = "expire"
                        }
                      + description  = "Manter apenas as últimas 1 imagens taggeadas"
                      + rulePriority = 2
                      + selection    = {
                          + countNumber   = 1
                          + countType     = "imageCountMoreThan"
                          + tagPrefixList = [
                              + "latest",
                              + "v",
                              + "dev",
                              + "prod",
                              + "staging",
                            ]
                          + tagStatus     = "tagged"
                        }
                    },
                ]
            }
        )
      + region      = "us-east-1"
      + registry_id = (known after apply)
      + repository  = "tech-floripa-certificates-api-dev"
    }

  # module.ecr.aws_ecr_lifecycle_policy.builder_repository_policy will be created
  + resource "aws_ecr_lifecycle_policy" "builder_repository_policy" {
      + id          = (known after apply)
      + policy      = jsonencode(
            {
              + rules = [
                  + {
                      + action       = {
                          + type = "expire"
                        }
                      + description  = "Manter apenas as últimas 1 imagens para otimizar custos"
                      + rulePriority = 1
                      + selection    = {
                          + countNumber = 1
                          + countType   = "imageCountMoreThan"
                          + tagStatus   = "untagged"
                        }
                    },
                  + {
                      + action       = {
                          + type = "expire"
                        }
                      + description  = "Manter apenas as últimas 1 imagens taggeadas"
                      + rulePriority = 2
                      + selection    = {
                          + countNumber   = 1
                          + countType     = "imageCountMoreThan"
                          + tagPrefixList = [
                              + "latest",
                              + "v",
                              + "dev",
                              + "prod",
                              + "staging",
                            ]
                          + tagStatus     = "tagged"
                        }
                    },
                ]
            }
        )
      + region      = "us-east-1"
      + registry_id = (known after apply)
      + repository  = "tech-floripa-certificates-builder-dev"
    }

  # module.ecr.aws_ecr_lifecycle_policy.notification_repository_policy will be created
  + resource "aws_ecr_lifecycle_policy" "notification_repository_policy" {
      + id          = (known after apply)
      + policy      = jsonencode(
            {
              + rules = [
                  + {
                      + action       = {
                          + type = "expire"
                        }
                      + description  = "Manter apenas as últimas 1 imagens para otimizar custos"
                      + rulePriority = 1
                      + selection    = {
                          + countNumber = 1
                          + countType   = "imageCountMoreThan"
                          + tagStatus   = "untagged"
                        }
                    },
                  + {
                      + action       = {
                          + type = "expire"
                        }
                      + description  = "Manter apenas as últimas 1 imagens taggeadas"
                      + rulePriority = 2
                      + selection    = {
                          + countNumber   = 1
                          + countType     = "imageCountMoreThan"
                          + tagPrefixList = [
                              + "latest",
                              + "v",
                              + "dev",
                              + "prod",
                              + "staging",
                            ]
                          + tagStatus     = "tagged"
                        }
                    },
                ]
            }
        )
      + region      = "us-east-1"
      + registry_id = (known after apply)
      + repository  = "tech-floripa-certificates-notification-dev"
    }

  # module.ecr.aws_ecr_repository.api_repository will be created
  + resource "aws_ecr_repository" "api_repository" {
      + arn                  = (known after apply)
      + force_delete         = true
      + id                   = (known after apply)
      + image_tag_mutability = "MUTABLE"
      + name                 = "tech-floripa-certificates-api-dev"
      + region               = "us-east-1"
      + registry_id          = (known after apply)
      + repository_url       = (known after apply)
      + tags                 = {
          + "Name"    = "tech-floripa-certificates-api-dev"
          + "Project" = "tech-floripa-certificates"
        }
      + tags_all             = {
          + "Environment" = "dev"
          + "ManagedBy"   = "terraform"
          + "Name"        = "tech-floripa-certificates-api-dev"
          + "Project"     = "tech-floripa-certificates"
        }

      + image_scanning_configuration {
          + scan_on_push = true
        }
    }

  # module.ecr.aws_ecr_repository.builder_repository will be created
  + resource "aws_ecr_repository" "builder_repository" {
      + arn                  = (known after apply)
      + force_delete         = true
      + id                   = (known after apply)
      + image_tag_mutability = "MUTABLE"
      + name                 = "tech-floripa-certificates-builder-dev"
      + region               = "us-east-1"
      + registry_id          = (known after apply)
      + repository_url       = (known after apply)
      + tags                 = {
          + "Name"    = "tech-floripa-certificates-builder-dev"
          + "Project" = "tech-floripa-certificates"
        }
      + tags_all             = {
          + "Environment" = "dev"
          + "ManagedBy"   = "terraform"
          + "Name"        = "tech-floripa-certificates-builder-dev"
          + "Project"     = "tech-floripa-certificates"
        }

      + image_scanning_configuration {
          + scan_on_push = true
        }
    }

  # module.ecr.aws_ecr_repository.notification_repository will be created
  + resource "aws_ecr_repository" "notification_repository" {
      + arn                  = (known after apply)
      + force_delete         = true
      + id                   = (known after apply)
      + image_tag_mutability = "MUTABLE"
      + name                 = "tech-floripa-certificates-notification-dev"
      + region               = "us-east-1"
      + registry_id          = (known after apply)
      + repository_url       = (known after apply)
      + tags                 = {
          + "Name"    = "tech-floripa-certificates-notification-dev"
          + "Project" = "tech-floripa-certificates"
        }
      + tags_all             = {
          + "Environment" = "dev"
          + "ManagedBy"   = "terraform"
          + "Name"        = "tech-floripa-certificates-notification-dev"
          + "Project"     = "tech-floripa-certificates"
        }

      + image_scanning_configuration {
          + scan_on_push = true
        }
    }

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

Changes to Outputs:
  + ecr_api_repository_name = "tech-floripa-certificates-api-dev"
  + ecr_repository_url      = (known after apply)

@github-actions
Copy link

Terraform Plan (shared)

No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration
and found no differences, so no changes are needed.

@bentoluizv bentoluizv merged commit eb3aae0 into main Nov 30, 2025
2 checks passed
@maxsonferovante maxsonferovante deleted the add-ecr-infraestructure branch November 30, 2025 23:34
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.

2 participants