Closed baldpope closed 2 months ago
No issue, I mis-read documentation based on authentication. The working example is as such:
main.tf:
# Configure the Junos Provider
provider "junos" {
ip = var.junos_host
username = var.junos_user
sshkey_pem = file(var.sshkeyfile)
}
I'll close this issue as user error.
Hi :wave:
Yes, the provider attribute sshkeyfile
expects the file path, not its contents.
Two solutions for your case:
provider "junos" {
sshkey_pem = file(var.sshkeyfile)
}
or
provider "junos" {
sshkeyfile = var.sshkeyfile
}
I think this is a duplicate of https://github.com/jeremmfr/terraform-provider-junos/issues/40
Very basic example...
main.tf:
variables.tf:
and then the command output