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

Allow importing consul nodes #323

Merged
merged 4 commits into from
Dec 8, 2022

Conversation

marceloboeira
Copy link
Contributor

It seems the import function is overall "necessary" since creating a node that already exists ends up updating it / binding it to the terraform resource. But I could also not find strong reasons NOT to allow import since it facilitates a more standard and "terraform compliant" workflow when migrating things from consul configs to terraform.

I have tested both using $name-$address and simply $name, but it seems unnecessary, at first, to use the address since the only logical isolations possible would be namespace/datacenter.

@remilapeyre
Copy link
Contributor

Hi @marceloboeira, as you mentioned the consul_node resource actually does not need import support due to its behaviour: just creating a new resource will work and replace the current node configuration just like importing it would.

I understand that this may be confusing as it may not be what some users may be expecting so it makes sense to make it also possible to imported.

Thanks for this PR!

@remilapeyre remilapeyre merged commit 50e7bc2 into hashicorp:master Dec 8, 2022
@marceloboeira marceloboeira deleted the import-nodes branch December 8, 2022 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants