Skip to content

Commit

Permalink
Dev utils dns (#1117)
Browse files Browse the repository at this point in the history
* update

* graylog dns

* Updating graylog url

* graylog dns update

* Adding vpc_id dependency to DNS in other envs

* Adding chekov ignores
  • Loading branch information
ben851 authored Jan 16, 2024
1 parent 3409eec commit 7a907d6
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 1 deletion.
3 changes: 2 additions & 1 deletion aws/dns/dev.notification.cdssandbox.xyz.tf
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,5 @@ resource "aws_route53_record" "bounce-dev-notification-sandbox-TXT" {
type = "TXT"
ttl = "300"
records = ["v=spf1 include:amazonses.com ~all"]
}
}

31 changes: 31 additions & 0 deletions aws/dns/dev.notification.internal.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#checkov:skip=CKV2_AWS_38:This is an internal DNS and thus DNSSEC not required
#checkov:skip=CKV2_AWS_39:DNS Query Logging is not supported for internal DNS
resource "aws_route53_zone" "dev_internal_dns" {
count = var.env == "dev" ? 1 : 0
name = "dev.notification.internal"

vpc {
vpc_id = var.vpc_id
}
}

# Dev Tools DNS

resource "aws_route53_record" "pgadmin_internal_CNAME" {
count = var.env == "dev" ? 1 : 0
zone_id = aws_route53_zone.dev_internal_dns[0].zone_id
name = "pgadmin.dev.notification.internal"
type = "CNAME"
ttl = "60"
records = ["internal-a83839c0acb264ff7b00f69e94dc3ca3-2136659269.ca-central-1.elb.amazonaws.com"]
}

resource "aws_route53_record" "graylog_internal_CNAME" {
count = var.env == "dev" ? 1 : 0
zone_id = aws_route53_zone.dev_internal_dns[0].zone_id
name = "graylog.dev.notification.internal"
type = "CNAME"
ttl = "60"
records = ["internal-a82ca1c11dea44ac5a264c3615f1b2cf-1155384976.ca-central-1.elb.amazonaws.com"]
}

5 changes: 5 additions & 0 deletions aws/dns/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,9 @@ variable "route_53_zone_arn" {
type = string
description = "Used by the scratch environment to reference cdssandbox in staging"
default = "/hostedzone/Z04028033PLSHVOO9ZJ1Z"
}

variable "vpc_id" {
type = string
description = "Used to associate the internal DNS with the VPC"
}
20 changes: 20 additions & 0 deletions env/dev/dns/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions env/dev/dns/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ include {

inputs = {
notification_canada_ca_ses_callback_arn = dependency.common.outputs.notification_canada_ca_ses_callback_arn
vpc_id = dependency.common.outputs.vpc_id
ses_custom_sending_domains = ["custom-sending-domain.dev.notification.cdssandbox.xyz"]
lambda_ses_receiving_emails_image_arn = dependency.ses_receiving_emails.outputs.lambda_ses_receiving_emails_image_arn
}
Expand Down
1 change: 1 addition & 0 deletions env/production/dns/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ include {

inputs = {
notification_canada_ca_ses_callback_arn = dependency.common.outputs.notification_canada_ca_ses_callback_arn
vpc_id = dependency.common.outputs.vpc_id
ses_custom_sending_domains = ["notification.gov.bc.ca", "notify.novascotia.ca"]
lambda_ses_receiving_emails_image_arn = dependency.ses_receiving_emails.outputs.lambda_ses_receiving_emails_image_arn
}
1 change: 1 addition & 0 deletions env/scratch/dns/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ include {

inputs = {
notification_canada_ca_ses_callback_arn = dependency.common.outputs.notification_canada_ca_ses_callback_arn
vpc_id = dependency.common.outputs.vpc_id
ses_custom_sending_domains = ["custom-sending-domain.scratch.notification.cdssandbox.xyz"]
lambda_ses_receiving_emails_image_arn = dependency.ses_receiving_emails.outputs.lambda_ses_receiving_emails_image_arn
}
Expand Down
1 change: 1 addition & 0 deletions env/staging/dns/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ include {

inputs = {
notification_canada_ca_ses_callback_arn = dependency.common.outputs.notification_canada_ca_ses_callback_arn
vpc_id = dependency.common.outputs.vpc_id
ses_custom_sending_domains = ["custom-sending-domain.staging.notification.cdssandbox.xyz"]
lambda_ses_receiving_emails_image_arn = dependency.ses_receiving_emails.outputs.lambda_ses_receiving_emails_image_arn
}
Expand Down

0 comments on commit 7a907d6

Please sign in to comment.