-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhyva.tf
33 lines (28 loc) · 833 Bytes
/
hyva.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#######################################################################
## setup hyva theme
#######################################################################
resource "terraform_data" "hyva_setup" {
count = var.hyva == true ? 1 : 0
depends_on = [terraform_data.magento_setup]
connection {
type = "ssh"
user = "ubuntu"
private_key = file("${var.ssh_priv_key}")
host = google_compute_instance.demo_origin_instance.network_interface.0.access_config.0.nat_ip
}
provisioner "file" {
source = "hyva.sh"
destination = "hyva.sh"
}
provisioner "file" {
source = var.hyva_ssh_priv_key
destination = ".ssh/id_rsa"
}
provisioner "remote-exec" {
inline = [
"chmod +x hyva.sh",
"chmod 600 ~/.ssh/id_rsa",
"./hyva.sh"
]
}
}