Fix Terraform
This commit is contained in:
@@ -4,5 +4,4 @@ locals {
|
|||||||
ata_url = "https://${azurerm_public_ip.wef-publicip.ip_address}"
|
ata_url = "https://${azurerm_public_ip.wef-publicip.ip_address}"
|
||||||
guacamole_url = "http://${azurerm_public_ip.logger-publicip.ip_address}:8080/guacamole"
|
guacamole_url = "http://${azurerm_public_ip.logger-publicip.ip_address}:8080/guacamole"
|
||||||
velociraptor_url = "https://${azurerm_public_ip.logger-publicip.ip_address}:9999"
|
velociraptor_url = "https://${azurerm_public_ip.logger-publicip.ip_address}:9999"
|
||||||
exchange_url = "https://${azurerm_public_ip.exchange-publicip.ip_address}"
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -377,7 +377,7 @@ resource "azurerm_network_interface" "exchange-nic" {
|
|||||||
subnet_id = azurerm_subnet.detectionlab-subnet.id
|
subnet_id = azurerm_subnet.detectionlab-subnet.id
|
||||||
private_ip_address_allocation = "Static"
|
private_ip_address_allocation = "Static"
|
||||||
private_ip_address = "192.168.38.106"
|
private_ip_address = "192.168.38.106"
|
||||||
public_ip_address_id = azurerm_public_ip.exchange-publicip.id
|
public_ip_address_id = azurerm_public_ip.exchange-publicip[count.index].id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -511,7 +511,7 @@ resource "azurerm_virtual_machine" "exchange" {
|
|||||||
name = "exchange.windomain.local"
|
name = "exchange.windomain.local"
|
||||||
location = var.region
|
location = var.region
|
||||||
resource_group_name = azurerm_resource_group.detectionlab.name
|
resource_group_name = azurerm_resource_group.detectionlab.name
|
||||||
network_interface_ids = [azurerm_network_interface.exchange-nic.id]
|
network_interface_ids = [azurerm_network_interface.exchange-nic[count.index].id]
|
||||||
vm_size = "Standard_D3_v2"
|
vm_size = "Standard_D3_v2"
|
||||||
|
|
||||||
delete_os_disk_on_termination = true
|
delete_os_disk_on_termination = true
|
||||||
@@ -619,4 +619,4 @@ resource "azurerm_virtual_machine" "win10" {
|
|||||||
tags = {
|
tags = {
|
||||||
role = "win10"
|
role = "win10"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,10 +18,6 @@ output "win10_public_ip" {
|
|||||||
value = azurerm_public_ip.win10-publicip.ip_address
|
value = azurerm_public_ip.win10-publicip.ip_address
|
||||||
}
|
}
|
||||||
|
|
||||||
output "exchange_public_ip" {
|
|
||||||
value = azurerm_public_ip.exchange-publicip.ip_address
|
|
||||||
}
|
|
||||||
|
|
||||||
output "ata_url" {
|
output "ata_url" {
|
||||||
value = local.ata_url
|
value = local.ata_url
|
||||||
}
|
}
|
||||||
@@ -44,4 +40,4 @@ output "velociraptor_url" {
|
|||||||
|
|
||||||
output "exchange_url" {
|
output "exchange_url" {
|
||||||
value = local.velociraptor_url
|
value = local.velociraptor_url
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ TF_OUTPUT=$(terraform output)
|
|||||||
DC_IP=$(echo "$TF_OUTPUT" | grep -E -o "dc_public_ip = ([0-9]{1,3}[\.]){3}[0-9]{1,3}" | cut -d '=' -f 2 | tr -d ' ')
|
DC_IP=$(echo "$TF_OUTPUT" | grep -E -o "dc_public_ip = ([0-9]{1,3}[\.]){3}[0-9]{1,3}" | cut -d '=' -f 2 | tr -d ' ')
|
||||||
WEF_IP=$(echo "$TF_OUTPUT" | grep -E -o "wef_public_ip = ([0-9]{1,3}[\.]){3}[0-9]{1,3}" | cut -d '=' -f 2 | tr -d ' ')
|
WEF_IP=$(echo "$TF_OUTPUT" | grep -E -o "wef_public_ip = ([0-9]{1,3}[\.]){3}[0-9]{1,3}" | cut -d '=' -f 2 | tr -d ' ')
|
||||||
WIN10_IP=$(echo "$TF_OUTPUT" | grep -E -o "win10_public_ip = ([0-9]{1,3}[\.]){3}[0-9]{1,3}" | cut -d '=' -f 2 | tr -d ' ')
|
WIN10_IP=$(echo "$TF_OUTPUT" | grep -E -o "win10_public_ip = ([0-9]{1,3}[\.]){3}[0-9]{1,3}" | cut -d '=' -f 2 | tr -d ' ')
|
||||||
|
# Code needs to be added for exchange
|
||||||
|
|
||||||
|
|
||||||
# Don't update unless there's default values in inventory.yml
|
# Don't update unless there's default values in inventory.yml
|
||||||
GREP_COUNT=$(grep -E -c 'x\.x\.x\.x|y\.y\.y\.y|z\.z\.z\.z' ../Ansible/inventory.yml)
|
GREP_COUNT=$(grep -E -c 'x\.x\.x\.x|y\.y\.y\.y|z\.z\.z\.z' ../Ansible/inventory.yml)
|
||||||
|
|||||||
Reference in New Issue
Block a user