Skip to content

Commit 631f0c5

Browse files
Updated root\main.tf with public_network_access_enabled line (#26)
* Updated root\main.tf with public_network_access_enabled line Recommended change by Longtan Li from WSF team * terraform-docs: automated action --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent a2f0572 commit 631f0c5

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,21 +149,21 @@ No modules.
149149
| <a name="input_db_delegated_subnet_id"></a> [db\_delegated\_subnet\_id](#input\_db\_delegated\_subnet\_id) | The ID of the virtual network subnet to create the Flexible Server. | `string` | `null` | no |
150150
| <a name="input_db_engine"></a> [db\_engine](#input\_db\_engine) | Database engine for Azure database instance. | `string` | `"postgres"` | no |
151151
| <a name="input_db_engine_version"></a> [db\_engine\_version](#input\_db\_engine\_version) | Database engine version for the Azure database instance. | `string` | `"14"` | no |
152-
| <a name="input_db_firewall_rules"></a> [db\_firewall\_rules](#input\_db\_firewall\_rules) | Map of IP ranges that (if specified) will create firewall rules for the server to access those addresses. | <pre>list(object({<br> name = string<br> start_ip_address = optional(string)<br> end_ip_address = optional(string)<br> }))</pre> | `[]` | no |
152+
| <a name="input_db_firewall_rules"></a> [db\_firewall\_rules](#input\_db\_firewall\_rules) | Map of IP ranges that (if specified) will create firewall rules for the server to access those addresses. | <pre>list(object({<br/> name = string<br/> start_ip_address = optional(string)<br/> end_ip_address = optional(string)<br/> }))</pre> | `[]` | no |
153153
| <a name="input_db_geo_backup_enabled"></a> [db\_geo\_backup\_enabled](#input\_db\_geo\_backup\_enabled) | Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster | `bool` | `false` | no |
154154
| <a name="input_db_ha_mode"></a> [db\_ha\_mode](#input\_db\_ha\_mode) | The high availability mode for the Flexible Server. Possibles values are ZoneRedundant. | `string` | `"ZoneRedundant"` | no |
155155
| <a name="input_db_ha_standby_zone"></a> [db\_ha\_standby\_zone](#input\_db\_ha\_standby\_zone) | Specifies the Availability Zone in which the standby Flexible Server should be located. Possible values are 1, 2 and 3. | `string` | `"1"` | no |
156156
| <a name="input_db_maintenance_day"></a> [db\_maintenance\_day](#input\_db\_maintenance\_day) | The day of week for maintenance window. | `string` | `null` | no |
157157
| <a name="input_db_maintenance_hour"></a> [db\_maintenance\_hour](#input\_db\_maintenance\_hour) | The start hour for maintenance window. | `string` | `null` | no |
158158
| <a name="input_db_maintenance_minute"></a> [db\_maintenance\_minute](#input\_db\_maintenance\_minute) | The start minute for maintenance window. | `string` | `null` | no |
159159
| <a name="input_db_name"></a> [db\_name](#input\_db\_name) | Name of the database that will be created on the flexible instance. If this is specified then a database will be created as a part of the instance provisioning process. | `string` | `null` | no |
160-
| <a name="input_db_parameters"></a> [db\_parameters](#input\_db\_parameters) | Intel Cloud optimizations for Xeon processors | <pre>object({<br> postgres = optional(object({<br> max_connections = optional(object({<br> value = optional(string, "256")<br> }))<br> shared_buffers = optional(object({<br> value = optional(string, "6291456")<br> }))<br> huge_pages = optional(object({<br> value = optional(string, "on")<br> }))<br> temp_buffers = optional(object({<br> value = optional(string, "4000")<br> }))<br> work_mem = optional(object({<br> value = optional(string, "2097151")<br> }))<br> maintenance_work_mem = optional(object({<br> value = optional(string, "512000")<br> }))<br> autovacuum_work_mem = optional(object({<br> value = optional(string, "-1")<br> }))<br> effective_io_concurrency = optional(object({<br> value = optional(string, "32")<br> }))<br> wal_level = optional(object({<br> value = optional(string, "logical")<br> }))<br> wal_buffers = optional(object({<br> value = optional(string, "512")<br> }))<br> cpu_tuple_cost = optional(object({<br> value = optional(string, "0.03")<br> }))<br> effective_cache_size = optional(object({<br> value = optional(string, "350000000")<br> }))<br> random_page_cost = optional(object({<br> value = optional(string, "1.1")<br> }))<br> checkpoint_timeout = optional(object({<br> value = optional(string, "3600")<br> }))<br> checkpoint_completion_target = optional(object({<br> value = optional(string, "0.9")<br> }))<br> checkpoint_warning = optional(object({<br> value = optional(string, "1")<br> }))<br> log_min_messages = optional(object({<br> value = optional(string, "error")<br> }))<br> log_min_error_statement = optional(object({<br> value = optional(string, "error")<br> }))<br> autovacuum = optional(object({<br> value = optional(string, "on")<br> }))<br> autovacuum_max_workers = optional(object({<br> value = optional(string, "10")<br> }))<br> autovacuum_vacuum_cost_limit = optional(object({<br> value = optional(string, "3000")<br> }))<br> datestyle = optional(object({<br> value = optional(string, "ISO, DMY")<br> }))<br> lc_monetary = optional(object({<br> value = optional(string, "en_US.utf-8")<br> }))<br> lc_numeric = optional(object({<br> value = optional(string, "en_US.utf-8")<br> }))<br> default_text_search_config = optional(object({<br> value = optional(string, "pg_catalog.english")<br> }))<br> max_locks_per_transaction = optional(object({<br> value = optional(string, "64")<br> }))<br> max_wal_senders = optional(object({<br> value = optional(string, "5")<br> }))<br> min_wal_size = optional(object({<br> value = optional(string, "8192")<br> }))<br> max_wal_size = optional(object({<br> value = optional(string, "65536")<br> }))<br> }))<br> # This parameter is READ-Only in Azure Portal and defaults to ON<br> # "synchronous_commit" = "on",<br><br> # Below set of PostgreSQL are recommended on the Xeon Tunning Guide but are not currently not supported by Azure PostgreSQL flexible server<br> # "max_stack_depth" = 7,<br> # "dynamic_shared_memory_type" = "posix",<br> # "max_files_per_process" = 4000,<br> # "max_pred_locks_per_transaction" = 64,<br> # "archive_mode" = "off",<br> # "lc_time" = "en_US.UTF-8",<br> # "lc_messages" = "en_US.UTF-8",<br> })</pre> | <pre>{<br> "postgres": {<br> "autovacuum": {},<br> "autovacuum_max_workers": {},<br> "autovacuum_vacuum_cost_limit": {},<br> "autovacuum_work_mem": {},<br> "checkpoint_completion_target": {},<br> "checkpoint_timeout": {},<br> "checkpoint_warning": {},<br> "cpu_tuple_cost": {},<br> "datestyle": {},<br> "default_text_search_config": {},<br> "effective_cache_size": {},<br> "effective_io_concurrency": {},<br> "huge_pages": {},<br> "lc_monetary": {},<br> "lc_numeric": {},<br> "log_min_error_statement": {},<br> "log_min_messages": {},<br> "maintenance_work_mem": {},<br> "max_connections": {},<br> "max_locks_per_transaction": {},<br> "max_wal_senders": {},<br> "max_wal_size": {},<br> "min_wal_size": {},<br> "random_page_cost": {},<br> "shared_buffers": {},<br> "temp_buffers": {},<br> "wal_buffers": {},<br> "wal_level": {},<br> "work_mem": {}<br> }<br>}</pre> | no |
160+
| <a name="input_db_parameters"></a> [db\_parameters](#input\_db\_parameters) | Intel Cloud optimizations for Xeon processors | <pre>object({<br/> postgres = optional(object({<br/> max_connections = optional(object({<br/> value = optional(string, "256")<br/> }))<br/> shared_buffers = optional(object({<br/> value = optional(string, "6291456")<br/> }))<br/> huge_pages = optional(object({<br/> value = optional(string, "on")<br/> }))<br/> temp_buffers = optional(object({<br/> value = optional(string, "4000")<br/> }))<br/> work_mem = optional(object({<br/> value = optional(string, "2097151")<br/> }))<br/> maintenance_work_mem = optional(object({<br/> value = optional(string, "512000")<br/> }))<br/> autovacuum_work_mem = optional(object({<br/> value = optional(string, "-1")<br/> }))<br/> effective_io_concurrency = optional(object({<br/> value = optional(string, "32")<br/> }))<br/> wal_level = optional(object({<br/> value = optional(string, "logical")<br/> }))<br/> wal_buffers = optional(object({<br/> value = optional(string, "512")<br/> }))<br/> cpu_tuple_cost = optional(object({<br/> value = optional(string, "0.03")<br/> }))<br/> effective_cache_size = optional(object({<br/> value = optional(string, "350000000")<br/> }))<br/> random_page_cost = optional(object({<br/> value = optional(string, "1.1")<br/> }))<br/> checkpoint_timeout = optional(object({<br/> value = optional(string, "3600")<br/> }))<br/> checkpoint_completion_target = optional(object({<br/> value = optional(string, "0.9")<br/> }))<br/> checkpoint_warning = optional(object({<br/> value = optional(string, "1")<br/> }))<br/> log_min_messages = optional(object({<br/> value = optional(string, "error")<br/> }))<br/> log_min_error_statement = optional(object({<br/> value = optional(string, "error")<br/> }))<br/> autovacuum = optional(object({<br/> value = optional(string, "on")<br/> }))<br/> autovacuum_max_workers = optional(object({<br/> value = optional(string, "10")<br/> }))<br/> autovacuum_vacuum_cost_limit = optional(object({<br/> value = optional(string, "3000")<br/> }))<br/> datestyle = optional(object({<br/> value = optional(string, "ISO, DMY")<br/> }))<br/> lc_monetary = optional(object({<br/> value = optional(string, "en_US.utf-8")<br/> }))<br/> lc_numeric = optional(object({<br/> value = optional(string, "en_US.utf-8")<br/> }))<br/> default_text_search_config = optional(object({<br/> value = optional(string, "pg_catalog.english")<br/> }))<br/> max_locks_per_transaction = optional(object({<br/> value = optional(string, "64")<br/> }))<br/> max_wal_senders = optional(object({<br/> value = optional(string, "5")<br/> }))<br/> min_wal_size = optional(object({<br/> value = optional(string, "8192")<br/> }))<br/> max_wal_size = optional(object({<br/> value = optional(string, "65536")<br/> }))<br/> }))<br/> # This parameter is READ-Only in Azure Portal and defaults to ON<br/> # "synchronous_commit" = "on",<br/><br/> # Below set of PostgreSQL are recommended on the Xeon Tunning Guide but are not currently not supported by Azure PostgreSQL flexible server<br/> # "max_stack_depth" = 7,<br/> # "dynamic_shared_memory_type" = "posix",<br/> # "max_files_per_process" = 4000,<br/> # "max_pred_locks_per_transaction" = 64,<br/> # "archive_mode" = "off",<br/> # "lc_time" = "en_US.UTF-8",<br/> # "lc_messages" = "en_US.UTF-8",<br/> })</pre> | <pre>{<br/> "postgres": {<br/> "autovacuum": {},<br/> "autovacuum_max_workers": {},<br/> "autovacuum_vacuum_cost_limit": {},<br/> "autovacuum_work_mem": {},<br/> "checkpoint_completion_target": {},<br/> "checkpoint_timeout": {},<br/> "checkpoint_warning": {},<br/> "cpu_tuple_cost": {},<br/> "datestyle": {},<br/> "default_text_search_config": {},<br/> "effective_cache_size": {},<br/> "effective_io_concurrency": {},<br/> "huge_pages": {},<br/> "lc_monetary": {},<br/> "lc_numeric": {},<br/> "log_min_error_statement": {},<br/> "log_min_messages": {},<br/> "maintenance_work_mem": {},<br/> "max_connections": {},<br/> "max_locks_per_transaction": {},<br/> "max_wal_senders": {},<br/> "max_wal_size": {},<br/> "min_wal_size": {},<br/> "random_page_cost": {},<br/> "shared_buffers": {},<br/> "temp_buffers": {},<br/> "wal_buffers": {},<br/> "wal_level": {},<br/> "work_mem": {}<br/> }<br/>}</pre> | no |
161161
| <a name="input_db_password"></a> [db\_password](#input\_db\_password) | Password for the master database user. | `string` | n/a | yes |
162162
| <a name="input_db_private_dns_zone_id"></a> [db\_private\_dns\_zone\_id](#input\_db\_private\_dns\_zone\_id) | The ID of the private DNS zone to create the Flexible Server. | `string` | `null` | no |
163163
| <a name="input_db_restore_time"></a> [db\_restore\_time](#input\_db\_restore\_time) | When create\_mode is PointInTimeRestore, specifies the point in time to restore from creation\_source\_server\_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z. | `string` | `null` | no |
164164
| <a name="input_db_server_name"></a> [db\_server\_name](#input\_db\_server\_name) | Name of the server that will be created. | `string` | n/a | yes |
165165
| <a name="input_db_server_sku"></a> [db\_server\_sku](#input\_db\_server\_sku) | Instance SKU, see comments above for guidance | `string` | `"MO_Standard_E8ds_v4"` | no |
166-
| <a name="input_db_timeouts"></a> [db\_timeouts](#input\_db\_timeouts) | Map of timeouts that can be adjusted when executing the module. This allows you to customize how long certain operations are allowed to take before being considered to have failed. | <pre>object({<br> create = optional(string, null)<br> delete = optional(string, null)<br> update = optional(string, null)<br> read = optional(string, null)<br> })</pre> | <pre>{<br> "db_timeouts": {}<br>}</pre> | no |
166+
| <a name="input_db_timeouts"></a> [db\_timeouts](#input\_db\_timeouts) | Map of timeouts that can be adjusted when executing the module. This allows you to customize how long certain operations are allowed to take before being considered to have failed. | <pre>object({<br/> create = optional(string, null)<br/> delete = optional(string, null)<br/> update = optional(string, null)<br/> read = optional(string, null)<br/> })</pre> | <pre>{<br/> "db_timeouts": {}<br/>}</pre> | no |
167167
| <a name="input_db_username"></a> [db\_username](#input\_db\_username) | Username for the master database user. | `string` | `"pgadmin"` | no |
168168
| <a name="input_db_zone"></a> [db\_zone](#input\_db\_zone) | Specifies the Availability Zone in which this Flexible Server should be located. Possible values are 1, 2 and 3. | `string` | `"2"` | no |
169169
| <a name="input_resource_group_name"></a> [resource\_group\_name](#input\_resource\_group\_name) | Existing Resource Group where resource will be created. | `string` | n/a | yes |

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ resource "azurerm_postgresql_flexible_server" "postgres" {
4141
zone = var.db_zone
4242
private_dns_zone_id = var.db_private_dns_zone_id
4343
delegated_subnet_id = var.db_private_dns_zone_id != null ? var.db_delegated_subnet_id : null
44+
public_network_access_enabled = delegated_subnet_id != null && private_dns_zone_id != null ? false : true
4445

4546

4647
source_server_id = var.db_create_source_id

0 commit comments

Comments
 (0)