diff --git a/modules/google/dns-c2/main.tf b/modules/google/dns-c2/main.tf index 49c9960..2533e9b 100644 --- a/modules/google/dns-c2/main.tf +++ b/modules/google/dns-c2/main.tf @@ -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}*" } } diff --git a/modules/google/dns-c2/outputs.tf b/modules/google/dns-c2/outputs.tf index 9c8acb4..670cd34 100644 --- a/modules/google/dns-c2/outputs.tf +++ b/modules/google/dns-c2/outputs.tf @@ -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}"] } diff --git a/modules/google/dns-rdir/main.tf b/modules/google/dns-rdir/main.tf index ad5eebc..fe75ca0 100644 --- a/modules/google/dns-rdir/main.tf +++ b/modules/google/dns-rdir/main.tf @@ -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}*" } } diff --git a/modules/google/dns-rdir/outputs.tf b/modules/google/dns-rdir/outputs.tf index 9c8acb4..670cd34 100644 --- a/modules/google/dns-rdir/outputs.tf +++ b/modules/google/dns-rdir/outputs.tf @@ -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}"] } diff --git a/modules/google/http-c2/main.tf b/modules/google/http-c2/main.tf index 3fb9574..dd024ee 100644 --- a/modules/google/http-c2/main.tf +++ b/modules/google/http-c2/main.tf @@ -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}*" } } diff --git a/modules/google/http-c2/outputs.tf b/modules/google/http-c2/outputs.tf index 87ef556..2dc732b 100644 --- a/modules/google/http-c2/outputs.tf +++ b/modules/google/http-c2/outputs.tf @@ -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}"] } diff --git a/modules/google/http-rdir/main.tf b/modules/google/http-rdir/main.tf index 3fa1251..79f6aa7 100644 --- a/modules/google/http-rdir/main.tf +++ b/modules/google/http-rdir/main.tf @@ -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}*" } } diff --git a/modules/google/http-rdir/outputs.tf b/modules/google/http-rdir/outputs.tf index 9c8acb4..670cd34 100644 --- a/modules/google/http-rdir/outputs.tf +++ b/modules/google/http-rdir/outputs.tf @@ -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}"] } diff --git a/modules/google/phishing-server/main.tf b/modules/google/phishing-server/main.tf index ecf308e..5c7148c 100644 --- a/modules/google/phishing-server/main.tf +++ b/modules/google/phishing-server/main.tf @@ -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}*" } } diff --git a/modules/google/phishing-server/outputs.tf b/modules/google/phishing-server/outputs.tf index 9c8acb4..670cd34 100644 --- a/modules/google/phishing-server/outputs.tf +++ b/modules/google/phishing-server/outputs.tf @@ -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}"] }