Closed jlucktay closed 4 years ago
This brings up the following underlying issues:
Could #78 be a possible alternative resolution to this PR? In summary, it would remove the SSH key requirement entirely by creating a key fully managed within Terraform.
Yeah, the tls_private_key
resource looks like a great solution for this, nice one!
When the SSH private key has a passphrase, is managed by an SSH agent, and the
agent
flag in the SSHconnection
blocks of the twoaws_instance
resources are set totrue
, then settingprivate_key
as well in the same block is counter-productive, as Terraform will follow theprivate_key
value before checking with the SSH agent, load the encrypted key first, and subsequently fail with the following:This is worked around with an override flag to toggle the behaviour appropriately.
Ref: