Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#40 Feature to add virtual network to Terraform template for shared services #51

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update variables for vnet and subnet
  • Loading branch information
manojvazirani committed Apr 3, 2019
commit f4f3b672dc29c61e33a1d83b5c5753e9880a2f15
4 changes: 2 additions & 2 deletions shared/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ resource "azurerm_key_vault" "keyvault" {

resource "azurerm_virtual_network" "vnet" {
name = "core-${local.location_suffix}-vnet-${var.company}"
address_space = ["10.0.0.0/16"]
address_space = ["${var.virtual_network_address_space}"]
location = "${azurerm_resource_group.rg_core.location}"
resource_group_name = "${azurerm_resource_group.rg_core.name}"
}
Expand All @@ -80,5 +80,5 @@ resource "azurerm_subnet" "subnet" {
name = "core-${local.location_suffix}-subnet-${var.company}"
resource_group_name = "${azurerm_resource_group.rg_core.name}"
virtual_network_name = "${azurerm_virtual_network.vnet.name}"
address_prefix = "10.0.1.0/24"
address_prefix = "${var.subnet_address_prefix}"
}
12 changes: 12 additions & 0 deletions shared/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,15 @@ variable "keyvault_sku" {
description = "SKU of the keyvault to create"
default = "standard"
}

variable "virtual_network_address_space" {
type = "string",
description = "The virtual network address space"
default = "10.0.0.0/16"
}

variable "subnet_address_prefix" {
type = "string",
description = "The virtual network subnet address prefix"
default = "10.0.1.0/24"
}