Skip to content

fix: remove deprecated parameters #13

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

Merged
merged 2 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ Terraform module for creation Azure Network Subnet
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.0 |
| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | >= 3.40.0 |
| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | >= 3.104.2 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | >= 3.40.0 |
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | >= 3.104.2 |

## Modules

Expand Down Expand Up @@ -43,7 +43,8 @@ No modules.
| <a name="input_network"></a> [network](#input\_network) | The name of the virtual network in which the subnet is created in | `string` | n/a | yes |
| <a name="input_nsg_association_enabled"></a> [nsg\_association\_enabled](#input\_nsg\_association\_enabled) | Boolean flag that determines if NSG association would be created | `bool` | `false` | no |
| <a name="input_nsg_id"></a> [nsg\_id](#input\_nsg\_id) | The ID of the Network Security Group which should be associated with the Subnet | `string` | `null` | no |
| <a name="input_private_endpoint_network_policies_enabled"></a> [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 |
| <a name="input_private_endpoint_network_policies"></a> [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 |
| <a name="input_private_link_service_network_policies_enabled"></a> [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 |
| <a name="input_resource_group"></a> [resource\_group](#input\_resource\_group) | The name of the resource group in which to create the storage account | `string` | n/a | yes |
| <a name="input_route_table_association_enabled"></a> [route\_table\_association\_enabled](#input\_route\_table\_association\_enabled) | Boolean flag that determines if Route Table association would be created | `bool` | `false` | no |
| <a name="input_route_table_id"></a> [route\_table\_id](#input\_route\_table\_id) | ID of the Route Table which would be assigned to subnet | `string` | `null` | no |
Expand Down
13 changes: 7 additions & 6 deletions main.tf
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 8 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 3.40.0"
version = ">= 3.104.2"
}
}
}