diff --git a/README.md b/README.md
index bbf5a95..8f71fc5 100644
--- a/README.md
+++ b/README.md
@@ -9,13 +9,13 @@ Terraform module for creation Azure Network Subnet
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.0.0 |
-| [azurerm](#requirement\_azurerm) | >= 3.40.0 |
+| [azurerm](#requirement\_azurerm) | >= 3.104.2 |
## Providers
| Name | Version |
|------|---------|
-| [azurerm](#provider\_azurerm) | >= 3.40.0 |
+| [azurerm](#provider\_azurerm) | >= 3.104.2 |
## Modules
@@ -43,7 +43,8 @@ No modules.
| [network](#input\_network) | The name of the virtual network in which the subnet is created in | `string` | n/a | yes |
| [nsg\_association\_enabled](#input\_nsg\_association\_enabled) | Boolean flag that determines if NSG association would be created | `bool` | `false` | no |
| [nsg\_id](#input\_nsg\_id) | The ID of the Network Security Group which should be associated with the Subnet | `string` | `null` | no |
-| [private\_endpoint\_network\_policies\_enabled](#input\_private\_endpoint\_network\_policies\_enabled) | Enable or Disable network policies for the private link endpoint on the subnet. Setting this to true will Disable the policy and setting this to false will Enable the policy: [true\|false] | `bool` | `true` | no |
+| [private\_endpoint\_network\_policies](#input\_private\_endpoint\_network\_policies) | Enable or Disable network policies for the private endpoint on the subnet. Possible values: [Disabled\|Enabled\|NetworkSecurityGroupEnabled\|RouteTableEnabled] | `string` | `"Enabled"` | no |
+| [private\_link\_service\_network\_policies\_enabled](#input\_private\_link\_service\_network\_policies\_enabled) | Enable or Disable network policies for the private link service on the subnet. Setting this to true will Enable the policy and setting this to false will Disable the policy: [true\|false] | `bool` | `true` | no |
| [resource\_group](#input\_resource\_group) | The name of the resource group in which to create the storage account | `string` | n/a | yes |
| [route\_table\_association\_enabled](#input\_route\_table\_association\_enabled) | Boolean flag that determines if Route Table association would be created | `bool` | `false` | no |
| [route\_table\_id](#input\_route\_table\_id) | ID of the Route Table which would be assigned to subnet | `string` | `null` | no |
diff --git a/main.tf b/main.tf
index 6ae57da..dbfbc57 100644
--- a/main.tf
+++ b/main.tf
@@ -1,12 +1,13 @@
resource "azurerm_subnet" "this" {
count = var.export_subnet_id == null ? 1 : 0
- name = var.name
- resource_group_name = var.resource_group
- virtual_network_name = var.network
- private_endpoint_network_policies_enabled = var.private_endpoint_network_policies_enabled
- service_endpoints = var.service_endpoints
- address_prefixes = [var.cidr]
+ name = var.name
+ resource_group_name = var.resource_group
+ virtual_network_name = var.network
+ private_endpoint_network_policies = var.private_endpoint_network_policies
+ private_link_service_network_policies_enabled = var.private_link_service_network_policies_enabled
+ service_endpoints = var.service_endpoints
+ address_prefixes = [var.cidr]
dynamic "delegation" {
for_each = var.delegations
diff --git a/variables.tf b/variables.tf
index 5be6a03..cb18b91 100644
--- a/variables.tf
+++ b/variables.tf
@@ -18,9 +18,15 @@ variable "cidr" {
description = "The address prefixes to use for the subnet"
}
-variable "private_endpoint_network_policies_enabled" {
+variable "private_endpoint_network_policies" {
+ type = string
+ description = "Enable or Disable network policies for the private endpoint on the subnet. Possible values: [Disabled|Enabled|NetworkSecurityGroupEnabled|RouteTableEnabled]"
+ default = "Enabled"
+}
+
+variable "private_link_service_network_policies_enabled" {
type = bool
- description = "Enable or Disable network policies for the private link endpoint on the subnet. Setting this to true will Disable the policy and setting this to false will Enable the policy: [true|false]"
+ description = "Enable or Disable network policies for the private link service on the subnet. Setting this to true will Enable the policy and setting this to false will Disable the policy: [true|false]"
default = true
}
diff --git a/versions.tf b/versions.tf
index 1bc56d6..d059dc5 100644
--- a/versions.tf
+++ b/versions.tf
@@ -4,7 +4,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
- version = ">= 3.40.0"
+ version = ">= 3.104.2"
}
}
}