From 86fe33e32728840cdb1573f9bbd9f03cff12e163 Mon Sep 17 00:00:00 2001 From: Myroslav Levchyk Date: Fri, 24 May 2024 10:01:35 +0300 Subject: [PATCH 1/2] fix: remove deprecated parameters --- main.tf | 13 +++++++------ variables.tf | 10 ++++++++-- versions.tf | 2 +- 3 files changed, 16 insertions(+), 9 deletions(-) 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" } } } From e48696378ba5287a4b78a5e39b2d5aa4e93c5ee4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 24 May 2024 07:02:32 +0000 Subject: [PATCH 2/2] terraform-docs: automated action --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 |