kreuzwerker / terraform-provider-docker

Terraform Docker provider
Mozilla Public License 2.0
620 stars 188 forks source link

Support for registry auth from outside #186

Open atrauzzi opened 3 years ago

atrauzzi commented 3 years ago

Community Note

Description

I'm using the Google Cloud container registry which is neatly handled by:

gcloud auth configure-docker

What I'd like to do is piggyback docker_registry_image on top of the assumption that I've already run this command.

New or Affected Resource(s)

Potential Terraform Configuration

No major change in current terraform config, this is strictly behavioural.

resource "docker_registry_image" "something" {
  name = "gcr.io/my-project/something/something:0.0.0-development"

  build {
    context = "../docker/something"
  }
}
mavogel commented 3 years ago

Hi @atrauzzi , as a non-native speaker in English, am I right that piggyback in this context means support? So you'd like the resource to use the auth from gcloud?

According to stoflw the credentials are stored in ~/.config/gcloud/credentials, right? In which format are the credentials stored?

So we would need to parse this file and add it to the auth of the provider.

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days. If you don't want this issue to be closed, please set the label pinned.

atrauzzi commented 3 years ago

Not stale.