-
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
provider/aws: Migrate KeyPair to version 1 #3470
Conversation
Worth noting too, that I checked both formats (with or without |
0805f9e
to
31b8f04
Compare
LGTM |
provider/aws: Migrate KeyPair to version 1
Yeah, this seems right to me. |
Remote state includes MD5-based checksumming to protect against State conflicts. This can generate improper conflicts with states that differ only in their Schema version. We began to see this issue with #3470 which changes the "schema_version" of aws_key_pairs.
Solved Solution 👍 resource "aws_key_pair" "deployer" { This worked for me. :) produce with terraform plan
|
But for the instance creation I am getting a long wait and ending aws_instance.nat: Provisioning with 'remote-exec'... |
Error applying plan: 1 error(s) occurred:
Terraform does not automatically rollback in the face of errors. |
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. |
This PR upgrades
resource_aws_key_pair
to version 1.It fixes #3455 , where reading a key with the
file()
included a trailing\n
.Copying and pasting that same public key (typically?) did not include this
\n
.For example, swapping out the
public_key
method for the full string below should result in no change:Gives this plan:
vs.
and
Swapping
file()
and the full string in-line should not produce a change, but onmaster
it does.This PR uses
strings.TrimSpace()
to trim off the trailing\n
.