Skip to content

ECR UX needs work #37

Open
Open
@mattmoor

Description

@mattmoor

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions