|
|
|
@ -77,19 +77,7 @@ resource "google_compute_instance" "default" { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
### COPY APP.PY + DEPLOY.SH - NOT WORKING |
|
|
|
|
# provisioner "file" { |
|
|
|
|
# source = "app/deploy.sh" |
|
|
|
|
# destination = "deploy.sh" |
|
|
|
|
# connection { |
|
|
|
|
# host = google_compute_instance.default.network_interface.0.access_config.0.nat_ip |
|
|
|
|
# type = "ssh" |
|
|
|
|
# user = var.gcp_ssh_user |
|
|
|
|
# timeout = "500s" |
|
|
|
|
# private_key = "${file(var.gcp_ssh_priv_key_file)}" |
|
|
|
|
# } |
|
|
|
|
# } |
|
|
|
|
|
|
|
|
|
### COPY DES FICHIERS |
|
|
|
|
provisioner "file" { |
|
|
|
|
source = "app/" |
|
|
|
|
destination = "./" |
|
|
|
@ -102,10 +90,6 @@ resource "google_compute_instance" "default" { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
# provisioner "local-exec" { |
|
|
|
|
# command = "ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -u {var.gcp_ssh_user} -i '${self.ipv4_address},' --private-key ${var.gcp_ssh_priv_key_file} playbook.yml" |
|
|
|
|
# } |
|
|
|
|
|
|
|
|
|
### START DEPLOY.SH |
|
|
|
|
provisioner "remote-exec" { |
|
|
|
|
inline = [ |
|
|
|
|