Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
gareda committed Jan 5, 2024
1 parent 77145e5 commit 02215ca
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
9 changes: 7 additions & 2 deletions examples/virtual-network-with-ddos-protection-plan/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@ resource "azurerm_network_ddos_protection_plan" "ddos" {

module "virtual_network" {
source = "aztfm/virtual-network/azurerm"
version = ">=3.0.0"
version = ">=4.0.0"
name = "virtual-network"
resource_group_name = azurerm_resource_group.rg.name
location = azurerm_resource_group.rg.location
address_space = ["10.0.0.0/16"]
ddos_protection_plan_id = azurerm_network_ddos_protection_plan.ddos.id
subnets = [{ name = "subnet1", address_prefixes = ["10.0.0.0/24"] }]
subnets = [
{
name = "subnet1"
address_prefixes = ["10.0.0.0/24"]
}
]
}
21 changes: 17 additions & 4 deletions examples/virtual-network-with-multiple-subnets/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,27 @@ resource "azurerm_resource_group" "rg" {

module "virtual_network" {
source = "aztfm/virtual-network/azurerm"
version = ">=3.0.0"
version = ">=4.0.0"
name = "virtual-network"
resource_group_name = azurerm_resource_group.rg.name
location = azurerm_resource_group.rg.location
address_space = ["10.0.0.0/16"]
subnets = [
{ name = "subnet1", address_prefixes = ["10.1.0.0/24"], delegation = "Microsoft.Sql/managedInstances" },
{ name = "subnet2", address_prefixes = ["10.2.0.0/24"], service_endpoints = ["Microsoft.Sql"] },
{ name = "subnet3", address_prefixes = ["10.3.0.0/24"], service_endpoints = ["Microsoft.Storage", "Microsoft.Web"], delegation = "Microsoft.Web/serverFarms" }
{
name = "subnet1"
address_prefixes = ["10.1.0.0/24"]
delegation = "Microsoft.Sql/managedInstances"
},
{
name = "subnet2"
address_prefixes = ["10.2.0.0/24"]
service_endpoints = ["Microsoft.Sql"]
},
{
name = "subnet3"
address_prefixes = ["10.3.0.0/24"]
service_endpoints = ["Microsoft.Storage", "Microsoft.Web"]
delegation = "Microsoft.Web/serverFarms"
}
]
}

0 comments on commit 02215ca

Please sign in to comment.