Hi guys,
I parsed Google and what I found is to get AWS instance_id it is enough to use the construction as follow:
"${aws_instance.test_terraform.id}"
But whenever I try to use it this way I get an error as follow:
Doesn't matter if I try to save it into a variable or use from resource "aws_eip_association".
Always get this error.
But this way of doing that stuff even described here:
https://www.terraform.io/docs/providers/aws/r/eip_association.html
Can anyone help me please with this and whet I am doing wrong?
Regards,
Taras.
Hi @fog1985
Please can you post your terraform config (minus any secrets) and we can try and help you with what you want to do
Thanks
Paul
Hi @stack72
I have just reviewed my config and found very simple but not very obvious error. :)
I tried to associate EIP inside of instance creation block.
Just moved it outside and everything works as expected.
Sorry to disturb you.
Regards,
Taras.
Nothing to apologise for @fog1985 :)
Glad you got it working
Paul
@fog1985 thanks for posting this!
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.
Most helpful comment
Hi @stack72
I have just reviewed my config and found very simple but not very obvious error. :)
I tried to associate EIP inside of instance creation block.
Just moved it outside and everything works as expected.
Sorry to disturb you.
Regards,
Taras.