-
Notifications
You must be signed in to change notification settings - Fork 214
Open
Labels
questionFurther information is requestedFurther information is requested
Description
Problem:
terraform plan
Error: parsing "admin_ssh_key.0.public_key" as a public key object
or
Error: decoding "public_key" for public key data
main.aztfexport.tf contains \r\n multiple times inside public key
resource "azurerm_ssh_public_key" "res-4" {
location = "eastus"
name = "vm_key"
public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDg6i01BFp7R6i1xImXnOsR3OzT\r\nfBsk.....ZV\r\nSO.....5oLpk= generated-by-azure\r\nWorkaround:
sed -i 's|\\r\\n||g' main.aztfexport.tfInfo:
- Windows, Bash
- aztfexport version v0.18.0(c787766)
After fix, terraform plan shows newline-ed SSH key block, that it will replace with a singleline string.
So this may very well be the way Azure saved key itself - the edge case.
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested