ajout Dockerfile pour automatisation

master
greglebreton 2 years ago
parent bc26ed8889
commit 1fec82de6c
  1. 18
      main.tf

@ -77,19 +77,7 @@ resource "google_compute_instance" "default" {
} }
} }
### COPY APP.PY + DEPLOY.SH - NOT WORKING ### COPY DES FICHIERS
# 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)}"
# }
# }
provisioner "file" { provisioner "file" {
source = "app/" source = "app/"
destination = "./" 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 ### START DEPLOY.SH
provisioner "remote-exec" { provisioner "remote-exec" {
inline = [ inline = [

Loading…
Cancel
Save