Skip to content

Commit

Permalink
added private dns registration
Browse files Browse the repository at this point in the history
  • Loading branch information
mamari90 committed Nov 6, 2023
1 parent bf656ee commit 5d81078
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
16 changes: 8 additions & 8 deletions postgres_flexible_server/04_variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -293,26 +293,26 @@ variable "tags" {
}

variable "private_dns_registration" {
type = bool
default = false
type = bool
default = false
description = "(Optional) If true, creates a cname record for the newly created postgreSQL db fqdn into the provided private dns zone"
}

variable "private_dns_zone_name" {
type = string
default = null
type = string
default = null
description = "(Optional) if 'private_dns_registration' is true, defines the private dns zone name in which the server fqdn should be registered"
}

variable "private_dns_zone_rg_name" {
type = string
default = null
type = string
default = null
description = "(Optional) if 'private_dns_registration' is true, defines the private dns zone resource group name of the dns zone in which the server fqdn should be registered"
}

variable "private_dns_cname" {
type = string
default = null
type = string
default = null
description = "(Optional) if 'private_dns_registration' is true, defines the private dns CNAME used to register this server FQDN"
}

Expand Down
6 changes: 6 additions & 0 deletions postgres_flexible_server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ module "postgres_flexible_server_private" {
private_dns_registration = true
private_dns_zone_name = "${var.env_short}.internal.postgresql.pagopa.it"
private_dns_zone_rg_name = data.azurerm_resource_group.data_rg.name
private_dns_cname = "my-service-db"
}
Expand Down Expand Up @@ -304,6 +305,7 @@ No modules.
| [azurerm_monitor_metric_alert.this](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/monitor_metric_alert) | resource |
| [azurerm_postgresql_flexible_server.this](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/postgresql_flexible_server) | resource |
| [azurerm_postgresql_flexible_server_configuration.pgbouncer_enabled](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/postgresql_flexible_server_configuration) | resource |
| [azurerm_private_dns_cname_record.example](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/private_dns_cname_record) | resource |
| [null_resource.ha_sku_check](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
| [null_resource.pgbouncer_check](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |

Expand Down Expand Up @@ -333,7 +335,11 @@ No modules.
| <a name="input_name"></a> [name](#input\_name) | (Required) The name which should be used for this PostgreSQL Flexible Server. Changing this forces a new PostgreSQL Flexible Server to be created. | `string` | n/a | yes |
| <a name="input_pgbouncer_enabled"></a> [pgbouncer\_enabled](#input\_pgbouncer\_enabled) | Is PgBouncer enabled into configurations? | `bool` | `true` | no |
| <a name="input_primary_user_assigned_identity_id"></a> [primary\_user\_assigned\_identity\_id](#input\_primary\_user\_assigned\_identity\_id) | Manages a User Assigned Identity | `string` | `null` | no |
| <a name="input_private_dns_cname"></a> [private\_dns\_cname](#input\_private\_dns\_cname) | (Optional) if 'private\_dns\_registration' is true, defines the private dns CNAME used to register this server FQDN | `string` | `null` | no |
| <a name="input_private_dns_registration"></a> [private\_dns\_registration](#input\_private\_dns\_registration) | (Optional) If true, creates a cname record for the newly created postgreSQL db fqdn into the provided private dns zone | `bool` | `false` | no |
| <a name="input_private_dns_zone_id"></a> [private\_dns\_zone\_id](#input\_private\_dns\_zone\_id) | (Optional) The ID of the private dns zone to create the PostgreSQL Flexible Server. Changing this forces a new PostgreSQL Flexible Server to be created. | `string` | `null` | no |
| <a name="input_private_dns_zone_name"></a> [private\_dns\_zone\_name](#input\_private\_dns\_zone\_name) | (Optional) if 'private\_dns\_registration' is true, defines the private dns zone name in which the server fqdn should be registered | `string` | `null` | no |
| <a name="input_private_dns_zone_rg_name"></a> [private\_dns\_zone\_rg\_name](#input\_private\_dns\_zone\_rg\_name) | (Optional) if 'private\_dns\_registration' is true, defines the private dns zone resource group name of the dns zone in which the server fqdn should be registered | `string` | `null` | no |
| <a name="input_private_endpoint_enabled"></a> [private\_endpoint\_enabled](#input\_private\_endpoint\_enabled) | Is this instance private only? | `bool` | n/a | yes |
| <a name="input_resource_group_name"></a> [resource\_group\_name](#input\_resource\_group\_name) | (Required) The name of the Resource Group where the PostgreSQL Flexible Server should exist. | `string` | n/a | yes |
| <a name="input_sku_name"></a> [sku\_name](#input\_sku\_name) | The SKU Name for the PostgreSQL Flexible Server. The name of the SKU, follows the tier + name pattern (e.g. B\_Standard\_B1ms, GP\_Standard\_D2s\_v3, MO\_Standard\_E4s\_v3). | `string` | n/a | yes |
Expand Down

0 comments on commit 5d81078

Please sign in to comment.