I am getting the lab failure even after creting the rsa key pair files.
‘nautilus-kp’ doesn’t exist or or its type is not ‘rsa’.
==============================
Terraform will perform the following actions:
local_file.nautilus-kp-pem will be created
- resource “local_file” “nautilus-kp-pem” {
- content = “sshkey_rsa_key_pair.nautilus-kp.private_key_pem”
- content_base64sha256 = (known after apply)
- content_base64sha512 = (known after apply)
- content_md5 = (known after apply)
- content_sha1 = (known after apply)
- content_sha256 = (known after apply)
- content_sha512 = (known after apply)
- directory_permission = “0777”
- file_permission = “0777”
- filename = “/home/bob/nautilus-kp.pem”
- id = (known after apply)
}
local_file.nautilus-kp-pub will be created
- resource “local_file” “nautilus-kp-pub” {
- content = “sshkey_rsa_key_pair.nautilus-kp.public_key_pem”
- content_base64sha256 = (known after apply)
- content_base64sha512 = (known after apply)
- content_md5 = (known after apply)
- content_sha1 = (known after apply)
- content_sha256 = (known after apply)
- content_sha512 = (known after apply)
- directory_permission = “0777”
- file_permission = “0777”
- filename = “/home/bob/nautilus-kp.pub”
- id = (known after apply)
}
tls_private_key.nautilus-kp will be created
- resource “tls_private_key” “nautilus-kp” {
- algorithm = “RSA”
- ecdsa_curve = “P224”
- id = (known after apply)
- private_key_openssh = (sensitive value)
- private_key_pem = (sensitive value)
- private_key_pem_pkcs8 = (sensitive value)
- public_key_fingerprint_md5 = (known after apply)
- public_key_fingerprint_sha256 = (known after apply)
- public_key_openssh = (known after apply)
- public_key_pem = (known after apply)
- rsa_bits = 2048
}
Plan: 3 to add, 0 to change, 0 to destroy.
───────────────────────────────────────────────────────────────────────────────────────────
Saved the plan to: test
To perform exactly these actions, run the following command to apply:
terraform apply “test”
bob@iac-server ~/terraform via
default ➜ terraform apply test
tls_private_key.nautilus-kp: Creating…
local_file.nautilus-kp-pub: Creating…
local_file.nautilus-kp-pem: Creating…
local_file.nautilus-kp-pub: Creation complete after 0s [id=9d6eccfcef96539c6f4e11a093f44ef4a7d9adc9]
local_file.nautilus-kp-pem: Creation complete after 0s [id=4fe2acf4788887566c1b0f11d3e49d8a5879a1db]
tls_private_key.nautilus-kp: Creation complete after 0s [id=d4142a744551dab25f8446cfecf602b6f09524d4]
Apply complete! Resources: 3 added, 0 changed, 0 destroyed.
bob@iac-server ~/terraform via
default ➜ cd /home/bob/
bob@iac-server ~ ➜ ls
nautilus-kp.pem nautilus-kp.pub terraform