Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

add docker_registry_image resource with build support #248

Closed
edgarpoce opened this issue Mar 24, 2020 · 1 comment
Closed

add docker_registry_image resource with build support #248

edgarpoce opened this issue Mar 24, 2020 · 1 comment
Milestone

Comments

@edgarpoce
Copy link
Contributor

edgarpoce commented Mar 24, 2020

Summary

Add a new resource called docker_registry_image that provides an image/tag in a docker registry such as AWS ECR

resource "docker_registry_image" "helloworld" {
  name = "1234567890.dkr.ecr.us-east-1.amazonaws.com/helloworld:1.0"
  build {
    context = "pathToContextFolder"
  }
}

Schema proposal

  • name - (Required, string) The name of the Docker image.

  • keep_remotely - (Optional, boolean) If true, then the Docker image won't be
    deleted on destroy operation. If this is false, it will delete the image from
    the docker registry on destroy operation.

  • build - (Optional, Map) ... arguments from docker cli golang library

Implementation proposal

  • Optionally build the image if a build configuration is provided
  • Create a context folder hash to identify whether the source files changed, store the context folder hash in the tf state

References

@mavogel
Copy link
Contributor

mavogel commented Oct 7, 2020

closed with #249

@mavogel mavogel closed this as completed Oct 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants