Skip to content

Commit 82a2741

Browse files
authored
Merge pull request #7 from Snowflake-Labs/SNOW-780555-public-dns-decommission
SNOW-780555: Add option to use private dns zone for external traffic, i.e for VPN
2 parents 262e4ff + ad52a27 commit 82a2741

File tree

5 files changed

+17
-3
lines changed

5 files changed

+17
-3
lines changed

helm_external_dns.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ resource "helm_release" "external_dns" {
1313
"${path.module}/templates/external_dns_values.yaml",
1414
{
1515
aws_region = "${var.aws_region}",
16-
aws_zone_type = "public",
16+
aws_zone_type = "${var.aws_public_hosted_zone_type}",
1717
aws_public_hosted_zone = "${local.public_hosted_zone_id}"
1818
external_dns_eks_service_account = "${aws_iam_role.external_dns_role[0].name}",
1919
aws_iam_role_external_dns = "${aws_iam_role.external_dns_role[0].name}",

helm_external_dns_private.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ resource "helm_release" "external_dns_private" {
1313
"${path.module}/templates/external_dns_private_values.yaml",
1414
{
1515
aws_region = "${var.aws_region}",
16+
aws_zone_type = "${var.aws_private_hosted_zone_type}",
1617
aws_private_hosted_zone = "${local.private_hosted_zone_id}",
1718
external_dns_eks_service_account = "${aws_iam_role.external_dns_private_role[0].name}",
1819
aws_iam_role_external_dns = "${aws_iam_role.external_dns_private_role[0].name}",

templates/external_dns_private_values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
provider: aws
22
aws:
33
region: ${aws_region}
4-
zoneType: private
4+
zoneType: ${aws_zone_type}
55
sources:
66
- service
77
- ingress

templates/external_dns_values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
provider: aws
22
aws:
33
region: ${aws_region}
4-
zoneType: public
4+
zoneType: ${aws_zone_type}
55
sources:
66
- service
77
- ingress

variables.tf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,25 @@ variable "aws_public_hosted_zone" {
3636
default = null
3737
}
3838

39+
variable "aws_public_hosted_zone_type" {
40+
description = "Public hosted zone type - public or private."
41+
type = string
42+
default = "public"
43+
}
44+
3945
variable "aws_private_hosted_zone" {
4046
description = "Private Hosted zone subdomain."
4147
type = string
4248
default = null
4349
}
4450

51+
variable "aws_private_hosted_zone_type" {
52+
description = "Private hosted zone type - public or private."
53+
type = string
54+
default = "private"
55+
}
56+
57+
4558
# Optional
4659
variable "arn_format" {
4760
type = string

0 commit comments

Comments
 (0)