-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
Using splat with 'host' property under 'connection' results in wrong IP address #868
Comments
I believe you're seeing the same bug I fixed in #795 . We haven't merged it into master because I haven't yet gotten to writing the test. You can merge in that PR and see if it fixes your problem. I'd be interested to see if it does. |
@knuckolls Thanks for your response. So, n00b question, but when I try to run your branch locally I get this output:
Any pointers / resources on how I can get around that? |
@josh-padnick by adding the '-f' flag to your 'go get' command... |
This shouldn't be allowed. The functionality you're trying to get should be, see #219, but accessing the splat shouldn't be possible here so this should be a semantic error. |
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. |
I've been trying to get Terraform to deploy 3 EC2 instances. I'm using provisioners and a
connection
block that specifies that terraform should attempt to connect to theprivate_ip
, but terraform appears to get the IP addresses wrong.elk.tf
The problematic line is
host = "${ element(aws_instance.elk.*.private_ip, count.index) }"
. Observe how terraform attempts to connect:The key issue is that terraform came up with the following associations:
Looking in the AWS Web Console, it appears that
aws_instance.elk.1
is connecting to the wrong address. I also tried compiling the latest dev build (0.3.7.dev) but that didn't seem to help either. Thoughts? Or alternative ways I can accomplish this? Or have I misinterpreted the docs and am I doing this wrong?The text was updated successfully, but these errors were encountered: