Skip to content

Commit 2ce2c4b

Browse files
committed
fix: force pulbic network access to false
1 parent a0cdb6a commit 2ce2c4b

File tree

2 files changed

+19
-12
lines changed

2 files changed

+19
-12
lines changed

main.tf

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@
22
##########
33
## Core
44
resource "azurerm_postgresql_flexible_server" "this" {
5-
name = var.name
6-
resource_group_name = var.resource_group_name
7-
location = var.location
8-
version = var.pg_version
9-
delegated_subnet_id = var.create_subnet ? azurerm_subnet.this[0].id : var.delegated_subnet_id
10-
private_dns_zone_id = azurerm_private_dns_zone.this.id
11-
administrator_login = var.administrator_login
12-
administrator_password = random_password.this.result
13-
sku_name = var.sku_name
14-
storage_mb = var.storage_mb
15-
backup_retention_days = var.backup_retention_days
16-
geo_redundant_backup_enabled = var.geo_redundant_backup_enabled
5+
name = var.name
6+
resource_group_name = var.resource_group_name
7+
location = var.location
8+
version = var.pg_version
9+
delegated_subnet_id = var.create_subnet ? azurerm_subnet.this[0].id : var.delegated_subnet_id
10+
private_dns_zone_id = azurerm_private_dns_zone.this.id
11+
public_network_access_enabled = var.public_network_access_enabled
12+
administrator_login = var.administrator_login
13+
administrator_password = random_password.this.result
14+
sku_name = var.sku_name
15+
storage_mb = var.storage_mb
16+
backup_retention_days = var.backup_retention_days
17+
geo_redundant_backup_enabled = var.geo_redundant_backup_enabled
1718
maintenance_window {
1819
day_of_week = var.maintenance_window.day_of_week
1920
start_hour = var.maintenance_window.start_hour

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ variable "private_dns_zone_name_prefix" {
100100
default = null
101101
}
102102

103+
variable "public_network_access_enabled" {
104+
description = "Is public network access enabled on the PostgreSQL Flexible Server."
105+
type = bool
106+
default = false
107+
}
108+
103109
variable "subnet_name_prefix" {
104110
description = "Subnet name prefix, if undefined then `name` is used"
105111
type = string

0 commit comments

Comments
 (0)