Skip to content
Open
4 changes: 2 additions & 2 deletions modules/google/dns-c2/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ resource "google_compute_instance" "dns-c2" {
}

provisioner "local-exec" {
command = "echo \"${tls_private_key.ssh.*.private_key_pem[count.index]}\" > ./ssh_keys/dns_rdir_${self.network_interface.0.access_config.0.assigned_nat_ip } && echo \"${tls_private_key.ssh.*.public_key_openssh[count.index]}\" > ./ssh_keys/dns_rdir_${self.network_interface.0.access_config.0.assigned_nat_ip}.pub"
command = "echo \"${tls_private_key.ssh.*.private_key_pem[count.index]}\" > ./ssh_keys/dns_rdir_${self.network_interface.0.access_config.0.nat_ip } && echo \"${tls_private_key.ssh.*.public_key_openssh[count.index]}\" > ./ssh_keys/dns_rdir_${self.network_interface.0.access_config.0.nat_ip}.pub"
}

provisioner "local-exec" {
when = "destroy"
command = "rm ./ssh_keys/dns_rdir_${self.network_interface.0.access_config.0.assigned_nat_ip}*"
command = "rm ./ssh_keys/dns_rdir_${self.network_interface.0.access_config.0.nat_ip}*"
}
}
2 changes: 1 addition & 1 deletion modules/google/dns-c2/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
output "ips" {
value = ["${google_compute_instance.http-rdir.*.network_interface.0.access_config.0.assigned_nat_ip}"]
value = ["${google_compute_instance.http-rdir.*.network_interface.0.access_config.0.nat_ip}"]
}
4 changes: 2 additions & 2 deletions modules/google/dns-rdir/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ resource "google_compute_instance" "dns-rdir" {
}

provisioner "local-exec" {
command = "echo \"${tls_private_key.ssh.*.private_key_pem[count.index]}\" > ./ssh_keys/dns_rdir_${self.network_interface.0.access_config.0.assigned_nat_ip } && echo \"${tls_private_key.ssh.*.public_key_openssh[count.index]}\" > ./ssh_keys/dns_rdir_${self.network_interface.0.access_config.0.assigned_nat_ip}.pub"
command = "echo \"${tls_private_key.ssh.*.private_key_pem[count.index]}\" > ./ssh_keys/dns_rdir_${self.network_interface.0.access_config.0.nat_ip } && echo \"${tls_private_key.ssh.*.public_key_openssh[count.index]}\" > ./ssh_keys/dns_rdir_${self.network_interface.0.access_config.0.nat_ip}.pub"
}

provisioner "local-exec" {
when = "destroy"
command = "rm ./ssh_keys/dns_rdir_${self.network_interface.0.access_config.0.assigned_nat_ip}*"
command = "rm ./ssh_keys/dns_rdir_${self.network_interface.0.access_config.0.nat_ip}*"
}
}
2 changes: 1 addition & 1 deletion modules/google/dns-rdir/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
output "ips" {
value = ["${google_compute_instance.http-rdir.*.network_interface.0.access_config.0.assigned_nat_ip}"]
value = ["${google_compute_instance.http-rdir.*.network_interface.0.access_config.0.nat_ip}"]
}
4 changes: 2 additions & 2 deletions modules/google/http-c2/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ resource "google_compute_instance" "http-c2" {
}

provisioner "local-exec" {
command = "echo \"${tls_private_key.ssh.*.private_key_pem[count.index]}\" > ./ssh_keys/http_c2_${self.network_interface.0.access_config.0.assigned_nat_ip} && echo \"${tls_private_key.ssh.*.public_key_openssh[count.index]}\" > ./ssh_keys/http_c2_${self.network_interface.0.access_config.0.assigned_nat_ip}.pub"
command = "echo \"${tls_private_key.ssh.*.private_key_pem[count.index]}\" > ./ssh_keys/http_c2_${self.network_interface.0.access_config.0.nat_ip} && echo \"${tls_private_key.ssh.*.public_key_openssh[count.index]}\" > ./ssh_keys/http_c2_${self.network_interface.0.access_config.0.nat_ip}.pub"
}

provisioner "local-exec" {
when = "destroy"
command = "rm ./ssh_keys/http_c2_${self.network_interface.0.access_config.0.assigned_nat_ip}*"
command = "rm ./ssh_keys/http_c2_${self.network_interface.0.access_config.0.nat_ip}*"
}
}
2 changes: 1 addition & 1 deletion modules/google/http-c2/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
output "ips" {
value = ["${google_compute_instance.http-c2.*.network_interface.0.access_config.0.assigned_nat_ip}"]
value = ["${google_compute_instance.http-c2.*.network_interface.0.access_config.0.nat_ip}"]
}
4 changes: 2 additions & 2 deletions modules/google/http-rdir/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ resource "google_compute_instance" "http-rdir" {
}

provisioner "local-exec" {
command = "echo \"${tls_private_key.ssh.*.private_key_pem[count.index]}\" > ./ssh_keys/http_rdir_${self.network_interface.0.access_config.0.assigned_nat_ip } && echo \"${tls_private_key.ssh.*.public_key_openssh[count.index]}\" > ./ssh_keys/http_rdir_${self.network_interface.0.access_config.0.assigned_nat_ip}.pub"
command = "echo \"${tls_private_key.ssh.*.private_key_pem[count.index]}\" > ./ssh_keys/http_rdir_${self.network_interface.0.access_config.0.nat_ip } && echo \"${tls_private_key.ssh.*.public_key_openssh[count.index]}\" > ./ssh_keys/http_rdir_${self.network_interface.0.access_config.0.nat_ip}.pub"
}

provisioner "local-exec" {
when = "destroy"
command = "rm ./ssh_keys/http_rdir_${self.network_interface.0.access_config.0.assigned_nat_ip}*"
command = "rm ./ssh_keys/http_rdir_${self.network_interface.0.access_config.0.nat_ip}*"
}
}
2 changes: 1 addition & 1 deletion modules/google/http-rdir/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
output "ips" {
value = ["${google_compute_instance.http-rdir.*.network_interface.0.access_config.0.assigned_nat_ip}"]
value = ["${google_compute_instance.http-rdir.*.network_interface.0.access_config.0.nat_ip}"]
}
4 changes: 2 additions & 2 deletions modules/google/phishing-server/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ resource "google_compute_instance" "phishing-server" {
}

provisioner "local-exec" {
command = "echo \"${tls_private_key.ssh.*.private_key_pem[count.index]}\" > ./ssh_keys/phishing_server_${self.network_interface.0.access_config.0.assigned_nat_ip } && echo \"${tls_private_key.ssh.*.public_key_openssh[count.index]}\" > ./ssh_keys/phishing_server_${self.network_interface.0.access_config.0.assigned_nat_ip}.pub"
command = "echo \"${tls_private_key.ssh.*.private_key_pem[count.index]}\" > ./ssh_keys/phishing_server_${self.network_interface.0.access_config.0.nat_ip } && echo \"${tls_private_key.ssh.*.public_key_openssh[count.index]}\" > ./ssh_keys/phishing_server_${self.network_interface.0.access_config.0.nat_ip}.pub"
}

provisioner "local-exec" {
when = "destroy"
command = "rm ./ssh_keys/phishing_server_${self.network_interface.0.access_config.0.assigned_nat_ip}*"
command = "rm ./ssh_keys/phishing_server_${self.network_interface.0.access_config.0.nat_ip}*"
}
}
2 changes: 1 addition & 1 deletion modules/google/phishing-server/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
output "ips" {
value = ["${google_compute_instance.http-rdir.*.network_interface.0.access_config.0.assigned_nat_ip}"]
value = ["${google_compute_instance.http-rdir.*.network_interface.0.access_config.0.nat_ip}"]
}