terraform-provider-docker
terraform-provider-docker copied to clipboard
Alias fails when passed to child module.
This issue was originally opened by @hongkongkiwi as https://github.com/hashicorp/terraform-provider-docker/issues/290. It was migrated here as a result of the community provider takeover from @kreuzwerker. The original body of the issue is below.
Terraform does not correctly handle aliases for this provider when passing to child module.
Terraform v0.13.0
+ provider registry.terraform.io/terraform-providers/docker v2.7.2
For example, this will fail with error during terraform validate:
Error: missing provider provider["registry.terraform.io/hashicorp/docker"].foo
provider "docker" {
alias = "foo"
host = "tcp://127.0.0.1:2376/"
}
module "mycustommodule" {
source = "./test2"
providers = {
docker = docker.foo
}
}
Any plan to address this issue?
I can't reproduce this issue with the latest provider v2.11.0.
Would you share code to reproduce this issue?
I can reproduce it with the v2.11.0 with this code and terraform 0.14:
terraform {
required_providers {
docker = {
source = "kreuzwerker/docker"
version = ">= 2.11.0"
}
}
}
provider "docker" {
alias = "foo"
host = "tcp://127.0.0.1:2376/"
}
module "mycustommodule" {
source = "./test2"
providers = {
docker = docker.foo
}
}
The child module looks for the "registry.terraform.io/hashicorp/docker"
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.
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.
Seems to be working in 3.0.1.