2018-12-19 01:35:14 +08:00
|
|
|
|
|
|
|
// Local variables
|
|
|
|
locals {
|
2019-11-27 19:41:02 +08:00
|
|
|
default_ubuntu=google_compute_instance_template.ubuntu16.self_link
|
|
|
|
default_windows=google_compute_instance_template.windows2016.self_link
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
resource "google_compute_network" "monkeyzoo" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}monkeyzoo"
|
2018-12-19 01:35:14 +08:00
|
|
|
auto_create_subnetworks = false
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "google_compute_network" "tunneling" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}tunneling"
|
2018-12-19 01:35:14 +08:00
|
|
|
auto_create_subnetworks = false
|
|
|
|
}
|
|
|
|
|
2019-08-25 23:33:21 +08:00
|
|
|
resource "google_compute_network" "tunneling2" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}tunneling2"
|
2019-08-25 23:33:21 +08:00
|
|
|
auto_create_subnetworks = false
|
|
|
|
}
|
|
|
|
|
2018-12-19 01:35:14 +08:00
|
|
|
resource "google_compute_subnetwork" "monkeyzoo-main" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}monkeyzoo-main"
|
2018-12-19 01:35:14 +08:00
|
|
|
ip_cidr_range = "10.2.2.0/24"
|
2019-11-27 19:41:02 +08:00
|
|
|
network = google_compute_network.monkeyzoo.self_link
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
resource "google_compute_subnetwork" "tunneling-main" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}tunneling-main"
|
2018-12-19 01:35:14 +08:00
|
|
|
ip_cidr_range = "10.2.1.0/28"
|
2019-11-27 19:41:02 +08:00
|
|
|
network = google_compute_network.tunneling.self_link
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
|
|
|
|
2019-08-25 23:33:21 +08:00
|
|
|
resource "google_compute_subnetwork" "tunneling2-main" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}tunneling2-main"
|
2019-08-25 23:33:21 +08:00
|
|
|
ip_cidr_range = "10.2.0.0/27"
|
2019-11-27 19:41:02 +08:00
|
|
|
network = google_compute_network.tunneling2.self_link
|
2019-08-25 23:33:21 +08:00
|
|
|
}
|
|
|
|
|
2018-12-19 01:35:14 +08:00
|
|
|
resource "google_compute_instance_from_template" "hadoop-2" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}hadoop-2"
|
2019-11-27 19:41:02 +08:00
|
|
|
source_instance_template = local.default_ubuntu
|
2018-12-19 01:35:14 +08:00
|
|
|
boot_disk{
|
|
|
|
initialize_params {
|
2019-11-27 19:41:02 +08:00
|
|
|
image = data.google_compute_image.hadoop-2.self_link
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
2018-12-19 22:28:59 +08:00
|
|
|
auto_delete = true
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
|
|
|
network_interface {
|
2019-09-04 15:19:36 +08:00
|
|
|
subnetwork="${local.resource_prefix}monkeyzoo-main"
|
2018-12-19 01:35:14 +08:00
|
|
|
network_ip="10.2.2.2"
|
|
|
|
}
|
2018-12-20 17:10:39 +08:00
|
|
|
// Add required ssh keys for hadoop service and restart it
|
|
|
|
metadata_startup_script = "[ ! -f /home/vakaris_zilius/.ssh/authorized_keys ] && sudo cat /home/vakaris_zilius/.ssh/id_rsa.pub >> /home/vakaris_zilius/.ssh/authorized_keys && sudo reboot"
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
2019-01-23 22:55:53 +08:00
|
|
|
|
2018-12-19 01:35:14 +08:00
|
|
|
resource "google_compute_instance_from_template" "hadoop-3" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}hadoop-3"
|
2019-11-27 19:41:02 +08:00
|
|
|
source_instance_template = local.default_windows
|
2018-12-19 01:35:14 +08:00
|
|
|
boot_disk{
|
|
|
|
initialize_params {
|
2019-11-27 19:41:02 +08:00
|
|
|
image = data.google_compute_image.hadoop-3.self_link
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
2018-12-19 22:28:59 +08:00
|
|
|
auto_delete = true
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
|
|
|
network_interface {
|
2019-09-04 15:19:36 +08:00
|
|
|
subnetwork="${local.resource_prefix}monkeyzoo-main"
|
2018-12-19 01:35:14 +08:00
|
|
|
network_ip="10.2.2.3"
|
|
|
|
}
|
|
|
|
}
|
2019-01-23 22:55:53 +08:00
|
|
|
|
2018-12-19 01:35:14 +08:00
|
|
|
resource "google_compute_instance_from_template" "elastic-4" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}elastic-4"
|
2019-11-27 19:41:02 +08:00
|
|
|
source_instance_template = local.default_ubuntu
|
2018-12-19 01:35:14 +08:00
|
|
|
boot_disk{
|
|
|
|
initialize_params {
|
2019-11-27 19:41:02 +08:00
|
|
|
image = data.google_compute_image.elastic-4.self_link
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
2018-12-19 22:28:59 +08:00
|
|
|
auto_delete = true
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
|
|
|
network_interface {
|
2019-09-04 15:19:36 +08:00
|
|
|
subnetwork="${local.resource_prefix}monkeyzoo-main"
|
2018-12-19 01:35:14 +08:00
|
|
|
network_ip="10.2.2.4"
|
|
|
|
}
|
|
|
|
}
|
2019-01-23 22:55:53 +08:00
|
|
|
|
2018-12-19 01:35:14 +08:00
|
|
|
resource "google_compute_instance_from_template" "elastic-5" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}elastic-5"
|
2019-11-27 19:41:02 +08:00
|
|
|
source_instance_template = local.default_windows
|
2018-12-19 01:35:14 +08:00
|
|
|
boot_disk{
|
|
|
|
initialize_params {
|
2019-11-27 19:41:02 +08:00
|
|
|
image = data.google_compute_image.elastic-5.self_link
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
2018-12-19 22:28:59 +08:00
|
|
|
auto_delete = true
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
|
|
|
network_interface {
|
2019-09-04 15:19:36 +08:00
|
|
|
subnetwork="${local.resource_prefix}monkeyzoo-main"
|
2018-12-19 01:35:14 +08:00
|
|
|
network_ip="10.2.2.5"
|
|
|
|
}
|
|
|
|
}
|
2019-01-23 22:55:53 +08:00
|
|
|
|
2018-12-20 17:10:39 +08:00
|
|
|
/* Couldn't find ubuntu packages for required samba version (too old).
|
2018-12-19 01:35:14 +08:00
|
|
|
resource "google_compute_instance_from_template" "sambacry-6" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}sambacry-6"
|
2018-12-19 01:35:14 +08:00
|
|
|
source_instance_template = "${local.default_ubuntu}"
|
|
|
|
boot_disk{
|
|
|
|
initialize_params {
|
|
|
|
image = "${data.google_compute_image.sambacry-6.self_link}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
network_interface {
|
2019-09-04 15:19:36 +08:00
|
|
|
subnetwork="${local.resource_prefix}monkeyzoo-main"
|
2018-12-19 01:35:14 +08:00
|
|
|
network_ip="10.2.2.6"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*/
|
2019-01-23 22:55:53 +08:00
|
|
|
|
2018-12-20 17:10:39 +08:00
|
|
|
/* We need custom 32 bit Ubuntu machine for this (there are no 32 bit ubuntu machines in GCP).
|
2018-12-19 01:35:14 +08:00
|
|
|
resource "google_compute_instance_from_template" "sambacry-7" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}sambacry-7"
|
2018-12-19 01:35:14 +08:00
|
|
|
source_instance_template = "${local.default_ubuntu}"
|
|
|
|
boot_disk {
|
|
|
|
initialize_params {
|
|
|
|
// Add custom image to cloud
|
|
|
|
image = "ubuntu32"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
network_interface {
|
2019-09-04 15:19:36 +08:00
|
|
|
subnetwork="${local.resource_prefix}monkeyzoo-main"
|
2018-12-19 01:35:14 +08:00
|
|
|
network_ip="10.2.2.7"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*/
|
2019-01-23 22:55:53 +08:00
|
|
|
|
2018-12-19 01:35:14 +08:00
|
|
|
resource "google_compute_instance_from_template" "shellshock-8" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}shellshock-8"
|
2019-11-27 19:41:02 +08:00
|
|
|
source_instance_template = local.default_ubuntu
|
2018-12-19 01:35:14 +08:00
|
|
|
boot_disk{
|
|
|
|
initialize_params {
|
2019-11-27 19:41:02 +08:00
|
|
|
image = data.google_compute_image.shellshock-8.self_link
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
2018-12-19 22:28:59 +08:00
|
|
|
auto_delete = true
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
|
|
|
network_interface {
|
2019-09-04 15:19:36 +08:00
|
|
|
subnetwork="${local.resource_prefix}monkeyzoo-main"
|
2018-12-19 01:35:14 +08:00
|
|
|
network_ip="10.2.2.8"
|
|
|
|
}
|
|
|
|
}
|
2019-01-23 22:55:53 +08:00
|
|
|
|
2018-12-19 01:35:14 +08:00
|
|
|
resource "google_compute_instance_from_template" "tunneling-9" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}tunneling-9"
|
2019-11-27 19:41:02 +08:00
|
|
|
source_instance_template = local.default_ubuntu
|
2018-12-19 01:35:14 +08:00
|
|
|
boot_disk{
|
|
|
|
initialize_params {
|
2019-11-27 19:41:02 +08:00
|
|
|
image = data.google_compute_image.tunneling-9.self_link
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
2018-12-19 22:28:59 +08:00
|
|
|
auto_delete = true
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
|
|
|
network_interface{
|
2019-09-04 15:19:36 +08:00
|
|
|
subnetwork="${local.resource_prefix}tunneling-main"
|
2018-12-19 01:35:14 +08:00
|
|
|
network_ip="10.2.1.9"
|
|
|
|
}
|
|
|
|
network_interface{
|
2019-09-04 15:19:36 +08:00
|
|
|
subnetwork="${local.resource_prefix}monkeyzoo-main"
|
2018-12-19 01:35:14 +08:00
|
|
|
network_ip="10.2.2.9"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "google_compute_instance_from_template" "tunneling-10" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}tunneling-10"
|
2019-11-27 19:41:02 +08:00
|
|
|
source_instance_template = local.default_ubuntu
|
2018-12-19 01:35:14 +08:00
|
|
|
boot_disk{
|
|
|
|
initialize_params {
|
2019-11-27 19:41:02 +08:00
|
|
|
image = data.google_compute_image.tunneling-10.self_link
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
2018-12-19 22:28:59 +08:00
|
|
|
auto_delete = true
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
|
|
|
network_interface{
|
2019-09-04 15:19:36 +08:00
|
|
|
subnetwork="${local.resource_prefix}tunneling-main"
|
2018-12-19 01:35:14 +08:00
|
|
|
network_ip="10.2.1.10"
|
|
|
|
}
|
2019-08-25 23:33:21 +08:00
|
|
|
network_interface{
|
2019-09-04 15:19:36 +08:00
|
|
|
subnetwork="${local.resource_prefix}tunneling2-main"
|
2019-08-25 23:33:21 +08:00
|
|
|
network_ip="10.2.0.10"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "google_compute_instance_from_template" "tunneling-11" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}tunneling-11"
|
2019-11-27 19:41:02 +08:00
|
|
|
source_instance_template = local.default_ubuntu
|
2019-08-25 23:33:21 +08:00
|
|
|
boot_disk{
|
|
|
|
initialize_params {
|
2019-11-27 19:41:02 +08:00
|
|
|
image = data.google_compute_image.tunneling-11.self_link
|
2019-08-25 23:33:21 +08:00
|
|
|
}
|
|
|
|
auto_delete = true
|
|
|
|
}
|
|
|
|
network_interface{
|
2019-09-04 15:19:36 +08:00
|
|
|
subnetwork="${local.resource_prefix}tunneling2-main"
|
2019-08-25 23:33:21 +08:00
|
|
|
network_ip="10.2.0.11"
|
|
|
|
}
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
|
|
|
|
2020-04-08 17:14:33 +08:00
|
|
|
resource "google_compute_instance_from_template" "tunneling-12" {
|
|
|
|
name = "${local.resource_prefix}tunneling-12"
|
|
|
|
source_instance_template = local.default_windows
|
|
|
|
boot_disk{
|
|
|
|
initialize_params {
|
|
|
|
image = data.google_compute_image.tunneling-12.self_link
|
|
|
|
}
|
|
|
|
auto_delete = true
|
|
|
|
}
|
|
|
|
network_interface{
|
|
|
|
subnetwork="${local.resource_prefix}tunneling2-main"
|
|
|
|
network_ip="10.2.0.12"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-12-19 01:35:14 +08:00
|
|
|
resource "google_compute_instance_from_template" "sshkeys-11" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}sshkeys-11"
|
2019-11-27 19:41:02 +08:00
|
|
|
source_instance_template = local.default_ubuntu
|
2018-12-19 01:35:14 +08:00
|
|
|
boot_disk{
|
|
|
|
initialize_params {
|
2019-11-27 19:41:02 +08:00
|
|
|
image = data.google_compute_image.sshkeys-11.self_link
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
2018-12-19 22:28:59 +08:00
|
|
|
auto_delete = true
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
|
|
|
network_interface {
|
2019-09-04 15:19:36 +08:00
|
|
|
subnetwork="${local.resource_prefix}monkeyzoo-main"
|
2018-12-19 01:35:14 +08:00
|
|
|
network_ip="10.2.2.11"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "google_compute_instance_from_template" "sshkeys-12" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}sshkeys-12"
|
2019-11-27 19:41:02 +08:00
|
|
|
source_instance_template = local.default_ubuntu
|
2018-12-19 01:35:14 +08:00
|
|
|
boot_disk{
|
|
|
|
initialize_params {
|
2019-11-27 19:41:02 +08:00
|
|
|
image = data.google_compute_image.sshkeys-12.self_link
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
2018-12-19 22:28:59 +08:00
|
|
|
auto_delete = true
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
|
|
|
network_interface {
|
2019-09-04 15:19:36 +08:00
|
|
|
subnetwork="${local.resource_prefix}monkeyzoo-main"
|
2018-12-19 01:35:14 +08:00
|
|
|
network_ip="10.2.2.12"
|
|
|
|
}
|
|
|
|
}
|
2019-01-23 22:55:53 +08:00
|
|
|
|
2018-12-19 01:35:14 +08:00
|
|
|
/*
|
|
|
|
resource "google_compute_instance_from_template" "rdpgrinder-13" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}rdpgrinder-13"
|
2018-12-19 01:35:14 +08:00
|
|
|
source_instance_template = "${local.default_windows}"
|
|
|
|
boot_disk{
|
|
|
|
initialize_params {
|
|
|
|
image = "${data.google_compute_image.rdpgrinder-13.self_link}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
network_interface {
|
2019-09-04 15:19:36 +08:00
|
|
|
subnetwork="${local.resource_prefix}monkeyzoo-main"
|
2018-12-19 01:35:14 +08:00
|
|
|
network_ip="10.2.2.13"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
|
|
|
|
resource "google_compute_instance_from_template" "mimikatz-14" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}mimikatz-14"
|
2019-11-27 19:41:02 +08:00
|
|
|
source_instance_template = local.default_windows
|
2018-12-19 01:35:14 +08:00
|
|
|
boot_disk{
|
|
|
|
initialize_params {
|
2019-11-27 19:41:02 +08:00
|
|
|
image = data.google_compute_image.mimikatz-14.self_link
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
2018-12-19 22:28:59 +08:00
|
|
|
auto_delete = true
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
|
|
|
network_interface {
|
2019-09-04 15:19:36 +08:00
|
|
|
subnetwork="${local.resource_prefix}monkeyzoo-main"
|
2018-12-19 01:35:14 +08:00
|
|
|
network_ip="10.2.2.14"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "google_compute_instance_from_template" "mimikatz-15" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}mimikatz-15"
|
2019-11-27 19:41:02 +08:00
|
|
|
source_instance_template = local.default_windows
|
2018-12-19 01:35:14 +08:00
|
|
|
boot_disk{
|
|
|
|
initialize_params {
|
2019-11-27 19:41:02 +08:00
|
|
|
image = data.google_compute_image.mimikatz-15.self_link
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
2018-12-20 17:10:39 +08:00
|
|
|
auto_delete = true
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
|
|
|
network_interface {
|
2019-09-04 15:19:36 +08:00
|
|
|
subnetwork="${local.resource_prefix}monkeyzoo-main"
|
2018-12-19 01:35:14 +08:00
|
|
|
network_ip="10.2.2.15"
|
|
|
|
}
|
|
|
|
}
|
2018-12-20 17:10:39 +08:00
|
|
|
|
2018-12-19 01:35:14 +08:00
|
|
|
resource "google_compute_instance_from_template" "mssql-16" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}mssql-16"
|
2019-11-27 19:41:02 +08:00
|
|
|
source_instance_template = local.default_windows
|
2018-12-19 01:35:14 +08:00
|
|
|
boot_disk{
|
|
|
|
initialize_params {
|
2019-11-27 19:41:02 +08:00
|
|
|
image = data.google_compute_image.mssql-16.self_link
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
2018-12-19 22:28:59 +08:00
|
|
|
auto_delete = true
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
|
|
|
network_interface {
|
2019-09-04 15:19:36 +08:00
|
|
|
subnetwork="${local.resource_prefix}monkeyzoo-main"
|
2018-12-19 01:35:14 +08:00
|
|
|
network_ip="10.2.2.16"
|
|
|
|
}
|
|
|
|
}
|
2019-01-23 22:55:53 +08:00
|
|
|
|
2018-12-20 17:10:39 +08:00
|
|
|
/* We need to alter monkey's behavior for this to upload 32-bit monkey instead of 64-bit (not yet developed)
|
2018-12-19 01:35:14 +08:00
|
|
|
resource "google_compute_instance_from_template" "upgrader-17" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}upgrader-17"
|
2018-12-19 01:35:14 +08:00
|
|
|
source_instance_template = "${local.default_windows}"
|
|
|
|
boot_disk{
|
|
|
|
initialize_params {
|
|
|
|
image = "${data.google_compute_image.upgrader-17.self_link}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
network_interface {
|
2019-09-04 15:19:36 +08:00
|
|
|
subnetwork="${local.resource_prefix}monkeyzoo-main"
|
2018-12-19 01:35:14 +08:00
|
|
|
network_ip="10.2.2.17"
|
|
|
|
access_config {
|
|
|
|
// Cheaper, non-premium routing
|
|
|
|
network_tier = "STANDARD"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*/
|
2019-01-23 22:55:53 +08:00
|
|
|
|
2018-12-19 01:35:14 +08:00
|
|
|
resource "google_compute_instance_from_template" "weblogic-18" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}weblogic-18"
|
2019-11-27 19:41:02 +08:00
|
|
|
source_instance_template = local.default_ubuntu
|
2018-12-19 01:35:14 +08:00
|
|
|
boot_disk{
|
|
|
|
initialize_params {
|
2019-11-27 19:41:02 +08:00
|
|
|
image = data.google_compute_image.weblogic-18.self_link
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
2018-12-19 22:28:59 +08:00
|
|
|
auto_delete = true
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
|
|
|
network_interface {
|
2019-09-04 15:19:36 +08:00
|
|
|
subnetwork="${local.resource_prefix}monkeyzoo-main"
|
2018-12-19 01:35:14 +08:00
|
|
|
network_ip="10.2.2.18"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "google_compute_instance_from_template" "weblogic-19" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}weblogic-19"
|
2019-11-27 19:41:02 +08:00
|
|
|
source_instance_template = local.default_windows
|
2018-12-19 01:35:14 +08:00
|
|
|
boot_disk{
|
|
|
|
initialize_params {
|
2019-11-27 19:41:02 +08:00
|
|
|
image = data.google_compute_image.weblogic-19.self_link
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
2018-12-19 22:28:59 +08:00
|
|
|
auto_delete = true
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
|
|
|
network_interface {
|
2019-09-04 15:19:36 +08:00
|
|
|
subnetwork="${local.resource_prefix}monkeyzoo-main"
|
2018-12-19 01:35:14 +08:00
|
|
|
network_ip="10.2.2.19"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "google_compute_instance_from_template" "smb-20" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}smb-20"
|
2019-11-27 19:41:02 +08:00
|
|
|
source_instance_template = local.default_windows
|
2018-12-19 01:35:14 +08:00
|
|
|
boot_disk{
|
|
|
|
initialize_params {
|
2019-11-27 19:41:02 +08:00
|
|
|
image = data.google_compute_image.smb-20.self_link
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
2018-12-19 22:28:59 +08:00
|
|
|
auto_delete = true
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
|
|
|
network_interface {
|
2019-09-04 15:19:36 +08:00
|
|
|
subnetwork="${local.resource_prefix}monkeyzoo-main"
|
2018-12-19 01:35:14 +08:00
|
|
|
network_ip="10.2.2.20"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "google_compute_instance_from_template" "scan-21" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}scan-21"
|
2019-11-27 19:41:02 +08:00
|
|
|
source_instance_template = local.default_ubuntu
|
2018-12-19 01:35:14 +08:00
|
|
|
boot_disk{
|
|
|
|
initialize_params {
|
2019-11-27 19:41:02 +08:00
|
|
|
image = data.google_compute_image.scan-21.self_link
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
|
|
|
auto_delete = true
|
|
|
|
}
|
|
|
|
network_interface {
|
2019-09-04 15:19:36 +08:00
|
|
|
subnetwork="${local.resource_prefix}monkeyzoo-main"
|
2018-12-19 01:35:14 +08:00
|
|
|
network_ip="10.2.2.21"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "google_compute_instance_from_template" "scan-22" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}scan-22"
|
2019-11-27 19:41:02 +08:00
|
|
|
source_instance_template = local.default_windows
|
2018-12-19 01:35:14 +08:00
|
|
|
boot_disk{
|
|
|
|
initialize_params {
|
2019-11-27 19:41:02 +08:00
|
|
|
image = data.google_compute_image.scan-22.self_link
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
2018-12-19 22:28:59 +08:00
|
|
|
auto_delete = true
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
|
|
|
network_interface {
|
2019-09-04 15:19:36 +08:00
|
|
|
subnetwork="${local.resource_prefix}monkeyzoo-main"
|
2018-12-19 01:35:14 +08:00
|
|
|
network_ip="10.2.2.22"
|
|
|
|
}
|
|
|
|
}
|
2019-01-23 22:55:53 +08:00
|
|
|
|
2018-12-19 01:35:14 +08:00
|
|
|
resource "google_compute_instance_from_template" "struts2-23" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}struts2-23"
|
2019-11-27 19:41:02 +08:00
|
|
|
source_instance_template = local.default_ubuntu
|
2018-12-19 01:35:14 +08:00
|
|
|
boot_disk{
|
|
|
|
initialize_params {
|
2019-11-27 19:41:02 +08:00
|
|
|
image = data.google_compute_image.struts2-23.self_link
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
2018-12-19 22:28:59 +08:00
|
|
|
auto_delete = true
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
|
|
|
network_interface {
|
2019-09-04 15:19:36 +08:00
|
|
|
subnetwork="${local.resource_prefix}monkeyzoo-main"
|
2018-12-19 01:35:14 +08:00
|
|
|
network_ip="10.2.2.23"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "google_compute_instance_from_template" "struts2-24" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}struts2-24"
|
2019-11-27 19:41:02 +08:00
|
|
|
source_instance_template = local.default_windows
|
2018-12-19 01:35:14 +08:00
|
|
|
boot_disk{
|
|
|
|
initialize_params {
|
2019-11-27 19:41:02 +08:00
|
|
|
image = data.google_compute_image.struts2-24.self_link
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
2018-12-19 22:28:59 +08:00
|
|
|
auto_delete = true
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
|
|
|
network_interface {
|
2019-09-04 15:19:36 +08:00
|
|
|
subnetwork="${local.resource_prefix}monkeyzoo-main"
|
2018-12-19 01:35:14 +08:00
|
|
|
network_ip="10.2.2.24"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-03 22:11:51 +08:00
|
|
|
resource "google_compute_instance_from_template" "zerologon-25" {
|
|
|
|
name = "${local.resource_prefix}zerologon-25"
|
|
|
|
source_instance_template = local.default_windows
|
|
|
|
boot_disk{
|
|
|
|
initialize_params {
|
|
|
|
image = data.google_compute_image.zerologon-25.self_link
|
|
|
|
}
|
|
|
|
auto_delete = true
|
|
|
|
}
|
|
|
|
network_interface {
|
|
|
|
subnetwork="${local.resource_prefix}monkeyzoo-main"
|
|
|
|
network_ip="10.2.2.25"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-08 21:54:45 +08:00
|
|
|
resource "google_compute_instance_from_template" "drupal-28" {
|
|
|
|
name = "${local.resource_prefix}drupal-28"
|
|
|
|
source_instance_template = local.default_windows
|
|
|
|
boot_disk{
|
|
|
|
initialize_params {
|
|
|
|
image = data.google_compute_image.drupal-28.self_link
|
|
|
|
}
|
|
|
|
auto_delete = true
|
|
|
|
}
|
|
|
|
network_interface {
|
|
|
|
subnetwork="${local.resource_prefix}monkeyzoo-main"
|
|
|
|
network_ip="10.2.2.28"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-12-19 01:35:14 +08:00
|
|
|
resource "google_compute_instance_from_template" "island-linux-250" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}island-linux-250"
|
2018-12-19 01:35:14 +08:00
|
|
|
machine_type = "n1-standard-2"
|
2019-01-23 22:55:53 +08:00
|
|
|
tags = ["island", "linux", "ubuntu16"]
|
2019-11-27 19:41:02 +08:00
|
|
|
source_instance_template = local.default_ubuntu
|
2018-12-19 01:35:14 +08:00
|
|
|
boot_disk{
|
|
|
|
initialize_params {
|
2019-11-27 19:41:02 +08:00
|
|
|
image = data.google_compute_image.island-linux-250.self_link
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
2018-12-19 22:28:59 +08:00
|
|
|
auto_delete = true
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
|
|
|
network_interface {
|
2019-09-04 15:19:36 +08:00
|
|
|
subnetwork="${local.resource_prefix}monkeyzoo-main"
|
2018-12-19 01:35:14 +08:00
|
|
|
network_ip="10.2.2.250"
|
|
|
|
access_config {
|
2018-12-19 03:08:00 +08:00
|
|
|
// Cheaper, non-premium routing (not available in some regions)
|
|
|
|
// network_tier = "STANDARD"
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "google_compute_instance_from_template" "island-windows-251" {
|
2019-09-03 22:22:07 +08:00
|
|
|
name = "${local.resource_prefix}island-windows-251"
|
2018-12-19 01:35:14 +08:00
|
|
|
machine_type = "n1-standard-2"
|
2019-01-23 22:55:53 +08:00
|
|
|
tags = ["island", "windows", "windowsserver2016"]
|
2019-11-27 19:41:02 +08:00
|
|
|
source_instance_template = local.default_windows
|
2018-12-19 01:35:14 +08:00
|
|
|
boot_disk{
|
|
|
|
initialize_params {
|
2019-11-27 19:41:02 +08:00
|
|
|
image = data.google_compute_image.island-windows-251.self_link
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
2018-12-19 22:28:59 +08:00
|
|
|
auto_delete = true
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
|
|
|
network_interface {
|
2019-09-04 15:19:36 +08:00
|
|
|
subnetwork="${local.resource_prefix}monkeyzoo-main"
|
2018-12-19 01:35:14 +08:00
|
|
|
network_ip="10.2.2.251"
|
|
|
|
access_config {
|
2018-12-19 03:08:00 +08:00
|
|
|
// Cheaper, non-premium routing (not available in some regions)
|
|
|
|
// network_tier = "STANDARD"
|
2018-12-19 01:35:14 +08:00
|
|
|
}
|
|
|
|
}
|
2019-08-25 23:33:21 +08:00
|
|
|
}
|