Skip to content
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

Dns refactory #130

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open

Dns refactory #130

wants to merge 22 commits into from

Conversation

renato-rudnicki
Copy link
Owner

No description provided.

module.dns_hub_vpc.network_self_link
]
target_name_server_addresses = data.google_compute_network.vpc_dns_hub.self_link
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

missing empty line at the end of file

advertised_ip_ranges = [{ range = local.private_googleapis_cidr }]
advertised_ip_ranges = [
{ range = local.private_googleapis_cidr },
{ range = "35.199.192.0/19" }
Copy link
Collaborator

Choose a reason for hiding this comment

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

{ range = "35.199.192.0/19" } is conditional on the network being the one that will access the dns server in the on-prem infrastructure

advertised_ip_ranges = [{ range = local.restricted_googleapis_cidr }]
advertised_ip_ranges = [
{ range = local.restricted_googleapis_cidr },
{ range = "35.199.192.0/19" }
Copy link
Collaborator

Choose a reason for hiding this comment

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

{ range = "35.199.192.0/19" } is conditional on the network being the one that will access the dns server in the on-prem infrastructure

Comment on lines 167 to 170
advertised_ip_ranges = concat(
[{ range = local.private_googleapis_cidr }],
var.private_service_cidr != null ? [{ range = "35.199.192.0/19" }] : []
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is the same value for each router.
this could be on a local

Copy link
Collaborator

Choose a reason for hiding this comment

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

@renato-rudnicki renato-rudnicki force-pushed the review-dns-refactory branch 2 times, most recently from 2ab1b6e to f7c4d14 Compare November 27, 2024 19:35
Copy link
Collaborator

@daniel-cit daniel-cit left a comment

Choose a reason for hiding this comment

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

in the 3-networks-hub-and-spoke case the variable target_name_server_addresses is only used in the shared environment, so it does not need to exist in dev/nonprod/prod

changes:

  • in the base_env it should have an empty value default so that it would not be required
  • it should ne removed from dev/nonprod/prod

@@ -126,7 +127,7 @@ module "region1_router1" {
bgp = {
asn = var.bgp_asn_subnet
advertised_groups = ["ALL_SUBNETS"]
advertised_ip_ranges = [{ range = local.private_googleapis_cidr }]
advertised_ip_ranges = var.private_service_cidr == null ? [{ range = local.google_private_service_range }] : [{ range = local.private_googleapis_cidr }]
Copy link
Collaborator

Choose a reason for hiding this comment

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

this should be in a local since it is duplicated 4 times

@@ -130,7 +131,7 @@ module "region1_router1" {
bgp = {
asn = var.bgp_asn_subnet
advertised_groups = ["ALL_SUBNETS"]
advertised_ip_ranges = [{ range = local.restricted_googleapis_cidr }]
advertised_ip_ranges = var.private_service_cidr == null ? [{ range = local.google_private_service_range }] : [{ range = local.restricted_googleapis_cidr }]
Copy link
Collaborator

Choose a reason for hiding this comment

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

this should be in a local since it is duplicated 4 times

@renato-rudnicki renato-rudnicki changed the base branch from review-dns-refactory to master December 13, 2024 15:03
Copy link

@caetano-colin caetano-colin left a comment

Choose a reason for hiding this comment

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

Did a first check and have some suggestions,

if you're making a change is in the 3-networks-dual-svpc directory, make sure you replicate those to 3-networks-hub-and-spoke

3-networks-dual-svpc/README.md Show resolved Hide resolved
3-networks-dual-svpc/envs/production/main.tf Outdated Show resolved Hide resolved
3-networks-dual-svpc/modules/base_shared_vpc/dns.tf Outdated Show resolved Hide resolved
3-networks-dual-svpc/modules/base_shared_vpc/dns.tf Outdated Show resolved Hide resolved
3-networks-dual-svpc/modules/base_env/remote.tf Outdated Show resolved Hide resolved
3-networks-dual-svpc/modules/restricted_shared_vpc/dns.tf Outdated Show resolved Hide resolved
3-networks-dual-svpc/modules/base_env/outputs.tf Outdated Show resolved Hide resolved
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.

3 participants