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

ECR UX needs work #37

Open
mattmoor opened this issue Dec 16, 2022 · 1 comment
Open

ECR UX needs work #37

mattmoor opened this issue Dec 16, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@mattmoor
Copy link
Contributor

ECR forces the pre-creation of repositories, so ideally we would have a UX like:

resource "aws_ecr_repository" "foo" {
  name                 = "foo"
  image_tag_mutability = "MUTABLE"

  image_scanning_configuration {
    scan_on_push = false
  }
}

resource "ko_image" "image" {
  base_image  = "cgr.dev/chainguard/static"
  working_dir = path.module
  importpath  = "github.com/mattmoor/foo"

  # NEW!
  repo = aws_ecr_repository.foo.repository_url
}

This would be the equivalent of:

KO_DOCKER_REPO=${aws_ecr_repository.foo.repository_url} ko build --bare github.com/mattmoor/foo

I know @nsmith5 used this to deploy some stuff to AWS, so I'm curious whether this resonates with him (when he's back!).

cc @imjasonh

@mattmoor mattmoor added the enhancement New feature or request label Dec 16, 2022
@imjasonh
Copy link
Member

Is there anything we might want ko_image to do if it can tell that the ECR repo has immutable tags?

resource "ko_image" "image" {
  image_tag_immutability = aws_ecr_repository.foo.image_tag_immutability
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants