Skip to content

Commit

Permalink
remove unused terraform variables (#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
glennmusa authored Jul 6, 2021
1 parent 3829ec1 commit 9931d2c
Show file tree
Hide file tree
Showing 13 changed files with 143 additions and 342 deletions.
31 changes: 6 additions & 25 deletions src/terraform/mlz/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ module "hub-network" {
vnet_address_space = var.hub_vnet_address_space
client_address_space = var.hub_client_address_space
management_address_space = var.hub_management_address_space
routetable_name = var.hub_management_routetable_name

log_analytics_workspace_resource_id = azurerm_log_analytics_workspace.laws.id

Expand Down Expand Up @@ -265,20 +264,14 @@ module "spoke-network-t0" {

location = azurerm_resource_group.tier0.location

hub_subid = var.hub_subid
hub_rgname = module.hub-network.resource_group_name
hub_vnetname = module.hub-network.virtual_network_name
firewall_private_ip = module.firewall.firewall_private_ip

laws_name = azurerm_log_analytics_workspace.laws.name
laws_location = var.mlz_location
laws_workspace_id = azurerm_log_analytics_workspace.laws.workspace_id
laws_resource_id = azurerm_log_analytics_workspace.laws.id

spoke_subid = var.tier0_subid
spoke_rgname = var.tier0_rgname
spoke_vnetname = var.tier0_vnetname

spoke_rgname = var.tier0_rgname
spoke_vnetname = var.tier0_vnetname
spoke_vnet_address_space = var.tier0_vnet_address_space
subnets = var.tier0_subnets

Expand Down Expand Up @@ -318,20 +311,14 @@ module "spoke-network-t1" {

location = azurerm_resource_group.tier1.location

hub_subid = var.hub_subid
hub_rgname = module.hub-network.resource_group_name
hub_vnetname = module.hub-network.virtual_network_name
firewall_private_ip = module.firewall.firewall_private_ip

laws_name = azurerm_log_analytics_workspace.laws.name
laws_location = var.mlz_location
laws_workspace_id = azurerm_log_analytics_workspace.laws.workspace_id
laws_resource_id = azurerm_log_analytics_workspace.laws.id

spoke_subid = var.tier1_subid
spoke_rgname = var.tier1_rgname
spoke_vnetname = var.tier1_vnetname

spoke_rgname = var.tier1_rgname
spoke_vnetname = var.tier1_vnetname
spoke_vnet_address_space = var.tier1_vnet_address_space
subnets = var.tier1_subnets

Expand Down Expand Up @@ -371,20 +358,14 @@ module "spoke-network-t2" {

location = azurerm_resource_group.tier2.location

hub_subid = var.hub_subid
hub_rgname = module.hub-network.resource_group_name
hub_vnetname = module.hub-network.virtual_network_name
firewall_private_ip = module.firewall.firewall_private_ip

laws_name = azurerm_log_analytics_workspace.laws.name
laws_location = var.mlz_location
laws_workspace_id = azurerm_log_analytics_workspace.laws.workspace_id
laws_resource_id = azurerm_log_analytics_workspace.laws.id

spoke_subid = var.tier2_subid
spoke_rgname = var.tier2_rgname
spoke_vnetname = var.tier2_vnetname

spoke_rgname = var.tier2_rgname
spoke_vnetname = var.tier2_vnetname
spoke_vnet_address_space = var.tier2_vnet_address_space
subnets = var.tier2_subnets

Expand Down
46 changes: 22 additions & 24 deletions src/terraform/mlz/minimum.tfvars.sample
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
mlz_clientid=""
mlz_clientsecret=""
mlz_objectid=""
tf_environment = ""
deploymentname = ""
mlz_tenantid = ""
mlz_location = ""
mlz_metadatahost = ""
mlz_clientid = ""
mlz_clientsecret = ""
mlz_objectid = ""

tf_environment=""
mlz_cloud=""
mlz_tenantid=""
mlz_location=""
mlz_metadatahost=""
hub_subid = ""
hub_rgname = ""
hub_vnetname = ""
tier0_subid = ""
tier0_rgname = ""
tier0_vnetname = ""
tier1_subid = ""
tier1_rgname = ""
tier1_vnetname = ""
mlz_lawsname = ""
tier2_subid = ""
tier2_rgname = ""
tier2_vnetname = ""

deploymentname = ""
hub_subid = ""
hub_rgname = ""
hub_vnetname = ""
mlz_lawsname = ""
tier0_subid = ""
tier0_rgname = ""
tier0_vnetname = ""
tier1_subid = ""
tier1_rgname = ""
tier1_vnetname = ""
tier2_subid = ""
tier2_rgname = ""
tier2_vnetname = ""

create_bastion_jumpbox = false
create_bastion_jumpbox = false
163 changes: 53 additions & 110 deletions src/terraform/mlz/mlz.tfvars.sample
Original file line number Diff line number Diff line change
@@ -1,38 +1,49 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

#################################
# Saca Configuration
# Global Configuration
#################################

deploymentname = "{SACA_DEPLOYMENTNAME}"
saca_subid = "{SACA_SUBID}"
saca_rgname = "{SACA_RGNAME}"
saca_vnetname = "{SACA_VNETNAME}"
saca_lawsname = "{SACA_LAWSNAME}"
vnet_address_space = ["{SACA_VNETSPACE}"]
tf_environment ="{TF_ENVIRONMENT}"
deploymentname ="{DEPLOYMENTNAME}"
mlz_tenantid ="{MLZ_TENANTID}"
mlz_location ="{MLZ_LOCATION}"
mlz_metadatahost ="{MLZ_METADATAHOST}"
mlz_clientid ="{MLZ_CLIENTID}"
mlz_clientsecret ="{MLZ_CLIENTSECRET}"
mlz_objectid ="{MLZ_OBJECTID}"

#################################
# Hub Configuration
#################################

hub_subid = "{HUB_SUBID}"
hub_rgname = "{HUB_RGNAME}"
hub_vnetname = "{HUB_VNETNAME}"
hub_vnet_address_space = ["{HUB_VNET_ADDRESS_SPACE}"]
hub_client_address_space = "{HUB_CLIENT_ADDRESS_SPACE}"
hub_management_address_space = "{HUB_MANAGEMENT_ADDRESS_SPACE}"

#################################
# Firewall configuration section
#################################

client_address_space = "{FIREWALL_CLIENT_SPACE}"
management_address_space = "{FIREWALL_MANAGEMENT_SPACE}"
firewall_name = "{FIREWALL_NAME}"
firewall_policy_name = "{FIREWALL_POLICY_NAME}"
client_ipconfig_name = "{FIREWALL_CLIENT_IPCONFIG_NAME}"
client_publicip_name = "{FIREWALL_CLIENT_PUBLICIP_NAME}"
management_ipconfig_name = "{FIREWALL_MANAGEMENT_IPCONFIG_NAME}"7
management_publicip_name = "{FIREWALL_MANAGEMENT_PUBLICIP_NAME}"
management_routetable_name = "{FIREWALL_MANAGEMENT_ROUTE_TABLE_NAME}"
firewall_name = "{FIREWALL_NAME}"
firewall_policy_name = "{FIREWALL_POLICY_NAME}"
client_ipconfig_name = "{CLIENT_IPCONFIG_NAME}"
client_publicip_name = "{CLIENT_PUBLICIP_NAME}"
management_ipconfig_name = "{MANAGEMENT_IPCONFIG_NAME}"
management_publicip_name = "{MANAGEMENT_PUBLICIP_NAME}"

#################################
# Bastion Host Configuration
#################################

create_bastion_jumpbox = "{CREATE_BASTION_JUMPBOX}"
bastion_host_name = "{BASTION_HOST_NAME}",
bastion_address_space = "{BASTION_ADDRESS_SPACE}",
bastion_public_ip_name = "{BASTION_PUBLIC_IP_NAME}",
bastion_host_name = "{BASTION_HOST_NAME}"
bastion_address_space = "{BASTION_ADDRESS_SPACE}"
bastion_public_ip_name = "{BASTION_PUBLIC_IP_NAME}"
bastion_ipconfig_name = "{BASTION_IPCONFIG_NAME}"

#################################
Expand All @@ -59,7 +70,7 @@ jumpbox_subnet = {
destination_port_range = ""
source_address_prefix = "*"
destination_address_prefix = ""
},
}
"allow_rdp" = {
name = "allow_rdp"
priority = "200"
Expand All @@ -76,20 +87,19 @@ jumpbox_subnet = {
routetable_name = "{JUMPBOX_SUBNET_RT_NAME}"
}

jumpbox_keyvault_name = "{JUMPBOX_KEYVAULT_NAME}"
jumpbox_windows_vm_name = "{JUMPBOX_WINDOWS_VM_NAME}"
jumpbox_windows_vm_size = "{JUMPBOX_WINDOWS_VM_SIZE}"
jumpbox_keyvault_name = "{JUMPBOX_KEYVAULT_NAME}"
jumpbox_windows_vm_name = "{JUMPBOX_WINDOWS_VM_NAME}"
jumpbox_windows_vm_size = "{JUMPBOX_WINDOWS_VM_SIZE}"
jumpbox_windows_vm_publisher = "{JUMPBOX_WINDOWS_VM_PUBLISHER}"
jumpbox_windows_vm_offer = "{JUMPBOX_WINDOWS_VM_OFFER}"
jumpbox_windows_vm_sku = "{JUMPBOX_WINDOWS_VM_SKU}"
jumpbox_windows_vm_version = "{JUMPBOX_WINDOWS_VM_VERSION}"
jumpbox_linux_vm_name = "{JUMPBOX_LINUX_VM_NAME}"
jumpbox_linux_vm_size = "{JUMPBOX_LINUX_VM_SIZE}"
jumpbox_linux_vm_publisher = "{JUMPBOX_LINUX_VM_PUBLISHER}"
jumpbox_linux_vm_offer = "{JUMPBOX_LINUX_VM_OFFER}"
jumpbox_linux_vm_sku = "{JUMPBOX_LINUX_VM_SKU}"
jumpbox_linux_vm_version = "{JUMPBOX_LINUX_VM_VERSION}"

jumpbox_windows_vm_offer = "{JUMPBOX_WINDOWS_VM_OFFER}"
jumpbox_windows_vm_sku = "{JUMPBOX_WINDOWS_VM_SKU}"
jumpbox_windows_vm_version = "{JUMPBOX_WINDOWS_VM_VERSION}"
jumpbox_linux_vm_name = "{JUMPBOX_LINUX_VM_NAME}"
jumpbox_linux_vm_size = "{JUMPBOX_LINUX_VM_SIZE}"
jumpbox_linux_vm_publisher = "{JUMPBOX_LINUX_VM_PUBLISHER}"
jumpbox_linux_vm_offer = "{JUMPBOX_LINUX_VM_OFFER}"
jumpbox_linux_vm_sku = "{JUMPBOX_LINUX_VM_SKU}"
jumpbox_linux_vm_version = "{JUMPBOX_LINUX_VM_VERSION}"

#################################
# Tier 0 Configuration
Expand All @@ -99,11 +109,7 @@ tier0_subid = "{TIER0_SUBID}"
tier0_rgname = "{TIER0_RGNAME}"
tier0_vnetname = "{TIER0_VNETNAME}"

#################################
# Tier 0 Network configuration section
#################################

tier0_vnet_address_space = ["{TIER0_VNETSPACE}"]
tier0_vnet_address_space = ["{TIER0_VNET_ADDRESS_SPACE}"]

tier0_subnets = {
"{TIER0_SUBNETVM_NAME}" = {
Expand Down Expand Up @@ -148,16 +154,12 @@ tier0_subnets = {
# Tier 1 Network configuration section
#################################

tier1_sub_id = = "{TIER1_SUBID}"
tier1_rgname = "{TIER1_RGNAME}"
tier1_vnetname = "{TIER1_VNETNAME}"


#################################
# Network configuration section
#################################
tier1_subid = "{TIER1_SUBID}"
tier1_rgname = "{TIER1_RGNAME}"
tier1_vnetname = "{TIER1_VNETNAME}"
mlz_lawsname = "{MLZ_LAWSNAME}

tier1_vnet_address_space = ["{TIER1_VNETSPACE}"]
tier1_vnet_address_space = ["{TIER1_VNET_ADDRESS_SPACE}"]

tier1_subnets = {
"{TIER1_SUBNETVM_NAME}" = {
Expand Down Expand Up @@ -202,16 +204,11 @@ tier1_subnets = {
# Tier 2 Network configuration section
#################################

tier2_sub_id = = "{TIER2_SUBID}"
tier2_rgname = "{TIER2_RGNAME}"
tier2_vnetname = "{TIER2_VNETNAME}"
tier2_subid = "{TIER2_SUBID}"
tier2_rgname = "{TIER2_RGNAME}"
tier2_vnetname = "{TIER2_VNETNAME}"


#################################
# Network configuration section
#################################

tier2_vnet_address_space = ["{TIER2_VNETSPACE}"]
tier2_vnet_address_space = ["{TIER2_VNET_ADDRESS_SPACE}"]

tier2_subnets = {
"{TIER2_SUBNETVM_NAME}" = {
Expand Down Expand Up @@ -251,57 +248,3 @@ tier2_subnets = {
routetable_name = "{TIER2_SUBNETVM_RTNAME}"
}
}


#################################
# Tier 3 Network configuration section
#################################

tier3_subid = "{TIER3_SUBID}"
tier3_rgname = "{TIER3_RGNAME}"
tier3_vnetname = "{TIER3_VNETNAME}"

#################################
# Network configuration section
#################################

tier3_vnet_address_space = ["{TIER3_VNETSPACE}"]

subnets = {
"{TIER3_SUBNETVM_NAME}" = {
name = "{TIER3_SUBNETVM_NAME}"
address_prefixes = ["{TIER3_SUBNETVM_ADDRESSPREFIXLIST}"]
service_endpoints = ["{TIER3_SUBNETVM_SERVICEENDPOINTLIST}"]

enforce_private_link_endpoint_network_policies = {TIER3_SUBNETVM_ENABLEPRIVATELINKENDPOINT}
enforce_private_link_service_network_policies = {TIER3_SUBNETVM_ENABLEPRIVATELINKSERVICE}

nsg_name = "{TIER3_SUBNETVM_NSGNAME}"
nsg_rules = {
"allow_ssh" = {
name = "allow_ssh"
priority = "100"
direction = "Inbound"
access = "Allow"
protocol = "Tcp"
source_port_range = ""
destination_port_range = "22"
source_address_prefix = "*"
destination_address_prefix = ""
}
"allow_rdp" = {
name = "allow_rdp"
priority = "200"
direction = "Inbound"
access = "Allow"
protocol = "Tcp"
source_port_range = ""
destination_port_range = "3389"
source_address_prefix = "*"
destination_address_prefix = ""
}
}

routetable_name = "{TIER3_SUBNETVM_RTNAME}"
}
}
Loading

0 comments on commit 9931d2c

Please sign in to comment.