I have created a linux centos machine on azure cloud using terraform.
I tried to see the content of private key so I can connect later using output variable.
But, I got error as I need to set it as sensitive and I did the same and the outputs is shown as below.
Apply complete! Resources: 15 added, 0 changed, 0 destroyed.
Outputs:
tls_private_key = <sensitive>
How to get the private key content then? My terraform files link
It seems I can retrieve that from state file but it has all the lines kept with \n and I need to manually replace all of them one by one with new line from editor like vscode.
Any other suugestions?
refer :https://docs.microsoft.com/en-us/azure/developer/terraform/create-linux-virtual-machine-with-infrastructure