The default value for the github_ssh_pub_key variable used in the Terraform module to populate the known hosts file for Flux CD contains an invalid value. Currently, the variables.tf file sets the default value like this:
variable "github_ssh_pub_key" {
description = "GitHub SSH public key"
type = string
default = "github.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg="
}
Solution
Remove the redundant "github.com" part form the string. It's already appended by the known_hosts parameter from the data resource inside main.tf file:
Description
The default value for the
github_ssh_pub_key
variable used in the Terraform module to populate the known hosts file for Flux CD contains an invalid value. Currently, thevariables.tf
file sets the default value like this:Solution
Remove the redundant "github.com" part form the string. It's already appended by the
known_hosts
parameter from thedata
resource insidemain.tf
file: