So, I have a terraform script that creates instances in the Google Cloud platform, I want my terraform script to also add my ssh key to the instances so that I can provide them via ssh. Here is my current terraform script.
#PROVIDER INFO provider "google" { credentials = "${file("account.json")}" project = "myProject" region = "us-central1" } #MAKING CONSUL SERVERS resource "google_compute_instance" "default" { count = 3 name = "a-consul${count.index}" machine_type = "n1-standard-1" zone = "us-central1-a" disk { image = "ubuntu-1404-trusty-v20160627" } # Local SSD disk disk { type = "local-ssd" scratch = true } network_interface { network = "myNetwork" access_config {} } }
What do I need to add to this so that my terraform script add my ssh key /Users/myUsername/.ssh/id_rsa.pub ?
source share