Skip to content

Commit 37d0787

Browse files
updated files
1 parent 3df34d9 commit 37d0787

File tree

2 files changed

+27
-34
lines changed

2 files changed

+27
-34
lines changed

main.tf

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -45,31 +45,31 @@ module "postgresql_server" {
4545
resource_group_name = module.resource_group.name
4646
location = var.location
4747

48-
create_mode = var.create_mode
49-
postgres_version = var.postgres_version
50-
sku_name = var.sku_name
51-
storage_mb = var.storage_mb
52-
storage_tier = var.storage_tier
48+
create_mode = var.create_mode
49+
postgres_version = var.postgres_version
50+
sku_name = var.sku_name
51+
storage_mb = var.storage_mb
52+
storage_tier = var.storage_tier
5353

54-
identity_ids = var.identity_ids
54+
identity_ids = var.identity_ids
5555

56-
authentication = var.authentication
57-
administrator_login = var.administrator_login
56+
authentication = var.authentication
57+
administrator_login = var.administrator_login
5858
administrator_password = var.administrator_password
5959

6060
delegated_subnet_id = var.delegated_subnet_id
6161
private_dns_zone_id = var.private_dns_zone_id
6262
public_network_access_enabled = var.public_network_access_enabled
6363

64-
high_availability = var.high_availability
64+
high_availability = var.high_availability
6565

66-
backup_retention_days = var.backup_retention_days
67-
geo_redundant_backup_enabled = var.geo_redundant_backup_enabled
66+
backup_retention_days = var.backup_retention_days
67+
geo_redundant_backup_enabled = var.geo_redundant_backup_enabled
6868

69-
maintenance_window = var.maintenance_window
69+
maintenance_window = var.maintenance_window
7070

71-
source_server_id = var.source_server_id
72-
zone = var.zone
71+
source_server_id = var.source_server_id
72+
zone = var.zone
7373

7474
tags = merge(var.tags, { resource_name = module.resource_names["postgresql_server"].standard })
7575
}
@@ -95,11 +95,11 @@ module "postgresql_server_ad_administrator" {
9595
postgresql_server_name = module.postgresql_server.name
9696
resource_group_name = module.resource_group.name
9797

98-
tenant_id = var.ad_administrator.tenant_id
99-
object_id = var.ad_administrator.object_id
98+
tenant_id = var.ad_administrator.tenant_id
99+
object_id = var.ad_administrator.object_id
100100

101-
principal_name = var.ad_administrator.principal_name
102-
principal_type = var.ad_administrator.principal_type
101+
principal_name = var.ad_administrator.principal_name
102+
principal_type = var.ad_administrator.principal_type
103103
}
104104

105105
module "private_endpoint" {
@@ -109,22 +109,15 @@ module "private_endpoint" {
109109
count = var.public_network_access_enabled ? 0 : 1
110110

111111
endpoint_name = local.endpoint_name
112-
# endpoint_name = module.resource_names["private_endpoint"].standard
113-
# resource_group_name = local.resource_group_name
114-
resource_group_name = module.resource_names["resource_group"].standard
112+
resource_group_name = module.resource_names["resource_group"].standard
115113
region = var.location
116114
subnet_id = var.subnet_id
117115
private_dns_zone_group_name = var.private_dns_zone_group_name
118-
private_dns_zone_ids = var.private_dns_zone_ids[0]
116+
private_dns_zone_ids = [var.private_dns_zone_id]
119117
is_manual_connection = var.is_manual_connection
120118
private_connection_resource_id = module.postgresql_server.id
121119
subresource_names = var.subresource_names
122120
request_message = var.request_message
123121
tags = local.private_endpoint_tags
124122
private_service_connection_name = module.resource_names["private_service_connection"].standard
125-
# resource_name = module.resource_names["private_endpoint"].standard
126-
127-
# Do NOT set private_connection_resource_alias at all
128-
# depends_on = [module.postgresql_server]
129-
}
130-
123+
}

variables.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,18 +162,18 @@ variable "private_dns_zone_group_name" {
162162
}
163163

164164

165-
variable "private_dns_zone_ids" {
166-
description = "A list of Private DNS Zone IDs to link with the Private Endpoint."
167-
type = list(string)
168-
default = []
169-
}
170-
171165
variable "private_dns_zone_id" {
172166
description = "The ID of the private DNS zone. Required when `delegated_subnet_id` is set"
173167
type = string
174168
default = null
175169
}
176170

171+
variable "private_dns_zone_ids" {
172+
description = "A list of Private DNS Zone IDs to link with the Private Endpoint."
173+
type = list(string)
174+
default = []
175+
}
176+
177177
variable "is_manual_connection" {
178178
description = <<EOT
179179
Does the Private Endpoint require Manual Approval from the remote resource owner? Changing this forces a new resource

0 commit comments

Comments
 (0)