Find a way to add SSH keys through the module. Problem with the count repetition right now.
Presently, we can add a block like this outside before, or after, calling the module
resource "google_compute_project_metadata" "default" {
for_each = toset(["username:${file("./files/sshpubkey.pem.pub")}"])
project = data.google_project.gpc_indy_node.number
metadata = {
ssh-keys = each.value
}
}
but I'd like to find way to put it inside the module itself. The reason it's not there yet is that if we use a "count" of 2 or higher when calling the module, to deploy more than one node, the SSH keys can only be added once to the project and will give an error when trying to apply a second time.
Find a way to add SSH keys through the module. Problem with the count repetition right now.
Presently, we can add a block like this outside before, or after, calling the module
but I'd like to find way to put it inside the module itself. The reason it's not there yet is that if we use a "count" of 2 or higher when calling the module, to deploy more than one node, the SSH keys can only be added once to the project and will give an error when trying to apply a second time.