Skip to content

Feature/private dns zone #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 36 commits into
base: main
Choose a base branch
from

Conversation

payasam-raghuramakrishna-nttd

No description provided.

@payasam-raghuramakrishna-nttd payasam-raghuramakrishna-nttd requested a review from a team as a code owner August 18, 2025 13:17
Copilot

This comment was marked as outdated.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: payasam-raghuramakrishna-nttd <340229@nttdata.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: payasam-raghuramakrishna-nttd <340229@nttdata.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: payasam-raghuramakrishna-nttd <340229@nttdata.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: payasam-raghuramakrishna-nttd <340229@nttdata.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: payasam-raghuramakrishna-nttd <340229@nttdata.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: payasam-raghuramakrishna-nttd <340229@nttdata.com>
Copilot

This comment was marked as outdated.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: payasam-raghuramakrishna-nttd <340229@nttdata.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: payasam-raghuramakrishna-nttd <340229@nttdata.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: payasam-raghuramakrishna-nttd <340229@nttdata.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: payasam-raghuramakrishna-nttd <340229@nttdata.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: payasam-raghuramakrishna-nttd <340229@nttdata.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: payasam-raghuramakrishna-nttd <340229@nttdata.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: payasam-raghuramakrishna-nttd <340229@nttdata.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: payasam-raghuramakrishna-nttd <340229@nttdata.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: payasam-raghuramakrishna-nttd <340229@nttdata.com>
Copilot

This comment was marked as outdated.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces private DNS zone management functionality to a Terraform module, specifically focusing on Azure Postgres database private endpoints. The changes enable creation and management of private DNS zones with configurable options and provide outputs for integration with other infrastructure components.

Key Changes:

  • Added default Postgres private DNS zone configuration with conditional enablement
  • Enhanced outputs to provide DNS zone IDs in multiple formats for flexible consumption
  • Introduced targeted DNS zone output capability for specific zone retrieval

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.

File Description
variables.tf Added default Postgres DNS zone, new variables for zone enablement and targeted output selection
outputs.tf Added comprehensive DNS zone ID outputs including mapped, set, and Postgres-specific formats
main.tf Minor formatting cleanup removing empty line in private DNS zones module

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

default = null
description = "If set, outputs the ID for just this zone name from private_dns_zone_ids_by_name."
}

Copy link
Preview

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable target_private_dns_zone_name is defined but not used in any of the outputs or module logic shown. This creates confusion about its purpose and may indicate incomplete implementation.

Suggested change

Copilot uses AI. Check for mistakes.

}

variable "private_dns_zone_enabled" {
description = "Enable or disable the creation of the Postgres private DNS zone."
Copy link
Preview

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable private_dns_zone_enabled is not used in the module configuration. If this is meant to conditionally control DNS zone creation, it should be integrated with the for_each logic in the private_dns_zones module.

Suggested change
description = "Enable or disable the creation of the Postgres private DNS zone."
description = "Enable or disable the creation of the Postgres private DNS zone. This variable should be used in the for_each or count argument of the private_dns_zones resource/module to conditionally control DNS zone creation."

Copilot uses AI. Check for mistakes.

default = []
default = [
"privatelink.postgres.database.azure.com"
]
Copy link
Preview

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having a hardcoded default DNS zone conflicts with the private_dns_zone_enabled variable. Consider making the default an empty list and using the enabled flag to conditionally include the Postgres zone, or remove the enabled flag if the default is always desired.

Suggested change
]
default = []

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants