- fix provisioners - move inline to scripts - fix scripts

This commit is contained in:
Vassiliy Yegorov
2019-07-13 15:01:13 +07:00
parent 571774344d
commit 5ce0c01eca
5 changed files with 25 additions and 28 deletions

11
main.tf
View File

@@ -7,20 +7,18 @@ resource "google_compute_instance" "zabbix" {
zone = "${var.zone_instance}"
tags = ["${var.zabbix_tag}"]
# add image disk
boot_disk {
initialize_params {
image = var.disk_image
}
}
# add network
network_interface {
network = "default"
access_config {
}
}
# ssh_key
metadata = {
sshKeys = "${var.default_user}:${file("~/.ssh/id_rsa.pub")}"
}
@@ -36,13 +34,12 @@ resource "google_compute_instance" "zabbix" {
destination = "~/setupzabbix.sh"
}
# provisioner "remote-exec" {
# inline = ["${file("scripts/setupzabbix.sh")}"]
# }
provisioner "file" {
source = "scripts/zabconf"
destination = "~/"
}
# provisioner "remote-exec" {
# inline = ["${file("scripts/setupzabbix.sh")}"]
# }
}