Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consul_keys data source ignores provider datacenter #8

Closed
hashibot opened this issue Jun 13, 2017 · 2 comments · Fixed by #259
Closed

consul_keys data source ignores provider datacenter #8

hashibot opened this issue Jun 13, 2017 · 2 comments · Fixed by #259
Labels

Comments

@hashibot
Copy link

This issue was originally opened by @hexedpackets as hashicorp/terraform#9310. It was migrated here as part of the provider split. The original body of the issue is below.


Terraform Version

0.7.5

Affected Resource(s)

  • consul provider
  • consul_keys data source

Terraform Configuration Files

provider "consul" {
  address = "consul.service.consul:8500"
  datacenter = "${var.datacenter}"
}

data "consul_keys" "foobar" {
  key {
    name = "foobar"
    path = "services/foo/bar"
  }
}

outut "foobar" {
  value = "${data.consul_keys.foobar.var.foobar}"
}

Expected Behavior

The datacenter specified in the provider is used to retrieve the key.

Actual Behavior

The agent's default datacenter is used instead of the one specified in the provider, resulting in an empty or incorrect value.

Adding the datacenter argument to the consul_keys stanza as a workaround does cause the correct datacenter to be used.

@hashibot hashibot added the bug label Jun 13, 2017
@Chhed13
Copy link

Chhed13 commented Dec 17, 2017

As result of investigation - roots of this issue the same as in #13

@amanjeev
Copy link

Maybe we can close #13 in favor of this one.

remilapeyre added a commit to remilapeyre/terraform-provider-consul that referenced this issue May 12, 2021
…ovider configuration

This also adds test with multiple datacenter, we were not testing this
configuration until now. The tests are not run by default to not make
local development more complicated but are run in CI both with Consul
Community Edition and Consul Enterprise.

Closes hashicorp#8
remilapeyre added a commit that referenced this issue May 12, 2021
…ovider configuration (#259)

This also adds test with multiple datacenters, we were not testing this
configuration until now. The tests are not run by default to not make
local development more complicated but are run in CI both with Consul
Community Edition and Consul Enterprise.

Closes #8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants