Skip to content

Commit

Permalink
feat: Support enforce_private_link_endpoint_network_policies
Browse files Browse the repository at this point in the history
  • Loading branch information
dploeger committed Apr 7, 2022
1 parent 9ee9168 commit 2d4158f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ Type:

```hcl
map(object({
cidr = list(string)
service_endpoints = list(string)
cidr = list(string)
service_endpoints = list(string)
enforce_private_link_endpoint_network_policies = bool
rules = map(object({
priority = number,
source_address_prefixes = list(string),
Expand Down
13 changes: 7 additions & 6 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ resource "azurerm_virtual_network" "virtual-network" {
resource "azurerm_subnet" "subnet" {
for_each = var.subnets

address_prefixes = each.value.cidr
name = each.key
resource_group_name = var.resource_group
virtual_network_name = azurerm_virtual_network.virtual-network.name
service_endpoints = each.value.service_endpoints
}
address_prefixes = each.value.cidr
name = each.key
resource_group_name = var.resource_group
virtual_network_name = azurerm_virtual_network.virtual-network.name
service_endpoints = each.value.service_endpoints
enforce_private_link_endpoint_network_policies = each.value.enforce_private_link_endpoint_network_policies
}
7 changes: 4 additions & 3 deletions vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ variable "peering_remote_virtual_network_id" {

variable "subnets" {
type = map(object({
cidr = list(string)
service_endpoints = list(string)
cidr = list(string)
service_endpoints = list(string)
enforce_private_link_endpoint_network_policies = bool
rules = map(object({
priority = number,
source_address_prefixes = list(string),
Expand All @@ -43,4 +44,4 @@ variable "subnets" {
}))
}))
description = "A map of subnets (with a map of rules for each subnet to apply to the network security group of the virtual network for each of the subnets)"
}
}

0 comments on commit 2d4158f

Please sign in to comment.