Skip to content

Commit 5f77e5a

Browse files
authored
Merge pull request #143 from athiththan11/main-4.14.0
Update Firewall and PostgreSQL-Flexible-Server modules to support AzureRM 4.x.x
2 parents ef95f4a + 6dd704b commit 5f77e5a

File tree

7 files changed

+44
-27
lines changed

7 files changed

+44
-27
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ All notable changes to this project will be documented in this file.
1616

1717
### Security
1818

19+
## [v2.5.0] - 2025-01-28
20+
21+
### Added
22+
23+
### Changed
24+
25+
- Update Firewall and PostgreSQL-Flexible-Server modules to support AzureRM 4.x.x
26+
27+
### Fixed
28+
1929
## [v2.4.0] - 2025-01-26
2030

2131
### Added

modules/azurerm/Firewall/network.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
# --------------------------------------------------------------------------------------
1111

1212
resource "azurerm_subnet" "firewall_subnet" {
13-
name = "AzureFirewallSubnet"
14-
resource_group_name = var.resource_group_name
15-
virtual_network_name = var.virtual_network_name
16-
address_prefixes = [var.subnet_address_prefixes]
17-
private_endpoint_network_policies_enabled = var.firewall_subnet_enforce_private_link_endpoint_network_policies
13+
name = "AzureFirewallSubnet"
14+
resource_group_name = var.resource_group_name
15+
virtual_network_name = var.virtual_network_name
16+
address_prefixes = [var.subnet_address_prefixes]
17+
private_endpoint_network_policies = var.private_endpoint_network_policies
1818
}

modules/azurerm/Firewall/variables.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ variable "public_ip_prefixes" {
6565
}))
6666
}
6767

68-
variable "firewall_subnet_enforce_private_link_endpoint_network_policies" {
69-
default = false
70-
description = "Enable or Disable network policies for the private link endpoint on the firewall subnet"
71-
type = bool
68+
variable "private_endpoint_network_policies" {
69+
default = "Disabled"
70+
description = "Enable or Disable network policies for the private endpoint on the subnet. Possible values are Disabled, Enabled, NetworkSecurityGroupEnabled and RouteTableEnabled"
71+
type = string
7272
}

modules/azurerm/Firewall/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ terraform {
1414
required_providers {
1515
azurerm = {
1616
source = "hashicorp/azurerm"
17-
version = ">= 3.0.0"
17+
version = ">= 4.0.0"
1818
}
1919
}
2020
}

modules/azurerm/PostgreSQL-Flexible-Server/postgresql_server.tf

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,23 @@
1010
# --------------------------------------------------------------------------------------
1111

1212
resource "azurerm_postgresql_flexible_server" "postgresql_flexible_server" {
13-
name = join("-", ["postgresql", var.server_name])
14-
resource_group_name = var.resource_group_name
15-
location = var.location
16-
version = var.postgresql_server_version
17-
delegated_subnet_id = var.subnet_id
18-
private_dns_zone_id = var.private_dns_zone_id
19-
administrator_login = var.postgresql_server_admin_username
20-
administrator_password = var.postgresql_server_admin_password
21-
zone = var.availability_zone
22-
storage_mb = var.storage_size
23-
geo_redundant_backup_enabled = var.geo_redundant_backup_enabled
24-
sku_name = var.sku_name
25-
backup_retention_days = var.backup_retention_days
26-
create_mode = var.create_mode
27-
source_server_id = var.source_server_id
28-
tags = var.tags
13+
name = join("-", ["postgresql", var.server_name])
14+
resource_group_name = var.resource_group_name
15+
location = var.location
16+
version = var.postgresql_server_version
17+
delegated_subnet_id = var.subnet_id
18+
private_dns_zone_id = var.private_dns_zone_id
19+
administrator_login = var.postgresql_server_admin_username
20+
administrator_password = var.postgresql_server_admin_password
21+
zone = var.availability_zone
22+
storage_mb = var.storage_size
23+
geo_redundant_backup_enabled = var.geo_redundant_backup_enabled
24+
sku_name = var.sku_name
25+
backup_retention_days = var.backup_retention_days
26+
create_mode = var.create_mode
27+
source_server_id = var.source_server_id
28+
public_network_access_enabled = var.public_network_access_enabled
29+
tags = var.tags
2930

3031
dynamic "high_availability" {
3132
for_each = var.high_availability_mode != null ? [1] : []

modules/azurerm/PostgreSQL-Flexible-Server/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,9 @@ variable "high_availability_standby_availability_zone" {
130130
description = "Specifies the Availability Zone in which the standby Flexible Server should be located."
131131
type = number
132132
}
133+
134+
variable "public_network_access_enabled" {
135+
default = false
136+
description = "Enable or disable public network access to the PostgreSQL Server"
137+
type = bool
138+
}

modules/azurerm/PostgreSQL-Flexible-Server/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ terraform {
1414
required_providers {
1515
azurerm = {
1616
source = "hashicorp/azurerm"
17-
version = ">= 3.52.0"
17+
version = ">= 4.0.0"
1818
}
1919
}
2020
}

0 commit comments

Comments
 (0)