From 6c541be8bbaee48c28160ffd5ef6b63cda3077e3 Mon Sep 17 00:00:00 2001 From: decfox Date: Wed, 18 Dec 2024 13:01:41 +0530 Subject: [PATCH] refactor: changes to allow terraform to apply cleanly --- tf/environments/dev/main.tf | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/tf/environments/dev/main.tf b/tf/environments/dev/main.tf index 4480a7a..0b5b885 100644 --- a/tf/environments/dev/main.tf +++ b/tf/environments/dev/main.tf @@ -414,7 +414,7 @@ module "ooniapi_reverseproxy" { ) } -module "ooni_backendproxy" { +module "ooni_clickhouse_proxy" { source = "../../modules/ec2" stage = local.environment @@ -427,7 +427,7 @@ module "ooni_backendproxy" { key_name = module.adm_iam_roles.oonidevops_key_name instance_type = "t3a.nano" - name = "oonibkprx" + name = "oonickprx" ingress_rules = [{ from_port = 22, to_port = 22, @@ -457,15 +457,26 @@ module "ooni_backendproxy" { ipv6_cidr_blocks = ["::/0"] }] - sg_prefix = "oobkprx" - tg_prefix = "bkprx" + sg_prefix = "oockprx" + tg_prefix = "ckpr" tags = merge( local.tags, - { Name = "ooni-tier0-backendproxy" } + { Name = "ooni-tier0-clickhouseproxy" } ) } +resource "aws_route53_record" "clickhouse_proxy_alias" { + zone_id = local.dns_zone_ooni_io + name = "clickhouseproxy.${local.environment}.ooni.io" + type = "CNAME" + ttl = 300 + + records = [ + module.ooni_clickhouse_proxy.aws_instance_public_dns + ] +} + #### OONI Run service module "ooniapi_oonirun_deployer" {