-
Notifications
You must be signed in to change notification settings - Fork 0
/
vmseries.tf
76 lines (61 loc) · 2.38 KB
/
vmseries.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# --------------------------------------------------------------------------------------------------------------------------
# Create bootstrap bucket for VM-Series and create VM-Series firewalls. \
module "vmseries_common" {
source = "./modules/vmseries/"
image_prefix_uri = "https://www.googleapis.com/compute/v1/projects/panw-gcp-team-testing/global/images/"
image_name = var.fw_image_name
machine_type = var.fw_machine_type
create_instance_group = true
project = var.project_id
ssh_key = fileexists(var.public_key_path) ? "admin:${file(var.public_key_path)}" : ""
instances = {
vmseries01 = {
name = "${local.prefix}-vmseries01"
zone = data.google_compute_zones.main.names[0]
bootstrap_bucket = "" #var.fw_bootstrap_bucket
network_interfaces = [
{
subnetwork = module.vpc_untrust.subnet_self_link["untrust-${var.region}"]
public_nat = true
},
{
subnetwork = module.vpc_mgmt.subnet_self_link["mgmt-${var.region}"]
public_nat = true
},
{
subnetwork = module.vpc_trust.subnet_self_link["trust-${var.region}"]
public_nat = false
}
]
}
}
depends_on = []
}
# --------------------------------------------------------------------------------------------------------------------------
# Set default route to VM-Series within the trust VPC network
resource "google_compute_route" "route_common" {
name = "${local.prefix}-route"
dest_range = "0.0.0.0/0"
network = module.vpc_trust.vpc_id
next_hop_instance = module.vmseries_common.self_links["vmseries01"]
priority = 1000
}
# --------------------------------------------------------------------------------------------------------------------------
# Outputs to terminal
# output "WEB_VM_NETWORK_A" {
# value = "http://${module.vmseries_common.nic0_ips["vmseries01"]}"
# }
output "SSH_TO_NETWORK_C" {
value = "ssh paloalto@${module.vmseries_common.nic0_ips["vmseries01"]}"
}
output "VMSERIES_ACCESS" {
value = "https://${module.vmseries_common.nic1_ips["vmseries01"]}"
}
output "VM_USERNAME" {
value = "paloalto"
}
output "VM_PASSWORD" {
value = "Pal0Alt0@123"
}
# wget www.eicar.org/download/eicar.com.txt
# curl http://10.1.0.10/cgi-bin/../../../..//bin/cat%20/etc/passwd