-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Failed to read key for aws_instance ssh provisioner #9308
Comments
I tried with
|
Hi @radekg, The
Both of those however expect the key value directly, which you can get with the Feel free to comment to reopen this if you are still have trouble with the configuration. Thanks! |
@jbardin Thanks for closing the issue, however, the problem does not magically resolve itself. Just FYI, you say that I used the
Trying this
returns
|
@radekg, Sorry, I did forget that the That |
What I can't understand is why would the property be deprecated AND its behavior changed? Surely, if it's deprecated, don't break it? Give me a slight chance to migrate? |
I apologize that this is causing a problem, any undocumented change in behavior was not intended. We're looking into the issue now. As for the issue with using the |
I'll put it in secret gist shortly. Any chance I can share the link with you offline? |
Feel free to email me at my username at hashicorp.com |
I wrote a .tf file last week and it worked with v0.7.5 and the key_file variable. today it stopped as I destroyed and applied my .tf |
same as 'nungster' destroyed a instance that used key_file and ran into this problem when making new. 0.7.5. Actually destroyed everything (blank state) and got this error. |
replaced: key_file = "${var.private_key_path}" and it is working again with 0.7.5 |
If you don't have the private/public keys in variables you'll need to quote them. # e.g.
public_key = "${file("ssh/insecure-deployer.pub")}"
# or
private_key = "${file("ssh/insecure-deployer")}" |
@codesoda it seems the interpolation of variables inside of the "${file("...")}" does not work though. |
Hi @radekg, Did you have an example that shows variables not interpolating inside the |
We have to apologize about the initial confusion about These 2 arguments will be officially removed in the next release. @radekg, if you still have an issue with interpolation in the file function, we can open a new issue specifically for that. |
On terraform 0.12.17 |
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 have just upgraded from terraform 0.6.x to 0.7.x and suddenly Terraform has issues with SSH provisioner
key_file
. Details below. Help, please.Terraform Version
Affected Resource(s)
Terraform Configuration Files
Only the relevant parts.
This is now I define my
var.provisioner
map:and this is how I use it awith
aws_instance
:Debug Output
Debug output does not show anything relevant.
Expected Behavior
SSH provisioner uses the existing PEM file to provision an instance.
Actual Behavior
Yet:
Steps to Reproduce
terraform apply
Every single time.
Important Factoids
Just upgraded from 0.6.x to 0.7.x, changed how I access my maps, from
.
notation to["..."]
The text was updated successfully, but these errors were encountered: