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

feat(consul): Adds a data source to retrieve kv pairs under a specified path #10353

Closed

Conversation

samber
Copy link
Contributor

@samber samber commented Nov 24, 2016

Hi guys,

Example:

provider "consul" {
    address = "1.2.3.4:8500"
    datacenter = "eu_central_1"
}

data "consul_key_prefix" "test" {
     path_prefix = "services/api/"
}

output "variables" { value = "${data.consul_key_prefix.test.var}" }

Read have been deprecated in resource consul_keys after adding the consul_keys data source. I think we should do the same for the resource consul_key_prefix. This data source should be the correct way to get data.

@stack72
Copy link
Contributor

stack72 commented Dec 7, 2016

Hi @samber

Thanks for the work here - looks like this doesn't build - any chance you could have a look at it?

Thanks

Paul

@samber
Copy link
Contributor Author

samber commented Dec 27, 2016

@stack72 sorry for the late fix.

This is working well ;)

Should we deprecate reads from consul_key_prefix resource ?

@partsalliance
Copy link

@stack72 any ideas when this PR can be merged?

@samber
Copy link
Contributor Author

samber commented Feb 21, 2017

up ?

@nanoz
Copy link

nanoz commented Mar 19, 2017

Having this PR checked and merged would be very helpful to us @stack72 :)

@stack72
Copy link
Contributor

stack72 commented Mar 19, 2017

Hi @samber

Please can you rebase this PR? I can then start to review it and see if we can get it merged ASAP

Thanks

Paul

// in case it was read from the provider
d.Set("datacenter", dc)

d.SetId("-")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is no Id, then we should use something like:

d.SetId(time.Now().UTC().String())

@apparentlymart
Copy link
Member

Note that consul_key_prefix has never supported read-only usage, so there's no need to deprecate anything there as we did with consul_keys.

@teamterraform
Copy link
Contributor

Hi folks! Now that terraform 0.12 is released, we are undertaking a general GH issue/PR cleanup. The providers now live in their own repositories, so any new issues or PRs should be opened there. Thanks!

@ghost
Copy link

ghost commented Sep 5, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@hashicorp hashicorp locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants