hashicorp / terraform-provider-docker

As part of our introduction to self-service publishing in the Terraform Registry, this copy of the provider has been archived, and ownership has been transferred to active maintainers in the community. Please see the new location on the Terraform Registry: https://registry.terraform.io/providers/kreuzwerker/docker/latest
https://registry.terraform.io/providers/kreuzwerker/docker/latest
Mozilla Public License 2.0
132 stars 92 forks source link

Registry Config File MUST be a file reference. #224

Closed dgarstang-clover closed 4 years ago

dgarstang-clover commented 5 years ago

Terraform Version

Terraform v0.12.12

Affected Resource(s)

provider "docker"

Terraform Configuration Files

Straight from the docs at https://www.terraform.io/docs/providers/docker/index.html

provider "docker" {
  host = "tcp://localhost:2376"

  registry_auth {
    address = "registry.hub.docker.com"
    config_file = "${pathexpand("~/.docker/config.json")}"
  }

  registry_auth {
    address = "quay.io:8181"
    username = "someuser"
    password = "somepass"
  }
}

The config_file must reference a file. It can't be a string. The config.json file contains credentials and therefore we could not check the file into git. We are using Terraform enterprise, and if the config_file could be a string, we could have simply populated value from a secret Terraform Enterprise workspace variable. We were forced to write a jenkins job instead of using Terraform Enterprise since there's no way to get the file into terraform without it being checked into the code.