Skip to content

Commit d124550

Browse files
authored
feat: add dns zone id output (#35)
* feat: remove default deploy type variable and related policies for AutoMQ BYOC * feat: remove unused output for AutoMQ BYOC EKS node role ARN * feat: refactor DNS assignment to use local variable for AutoMQ instance * feat: add dns_zone_id output for AutoMQ environment deployment * fix: correct indentation for zone_id in locals block
1 parent 5aeb053 commit d124550

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

aws.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ locals {
165165
automq_byoc_env_console_public_subnet_id = var.create_new_vpc ? element(module.automq_byoc_vpc[0].public_subnets, 0) : var.automq_byoc_env_console_public_subnet_id
166166
automq_data_bucket = var.automq_byoc_data_bucket_name == "" ? module.automq_byoc_data_bucket_name.s3_bucket_id : "${var.automq_byoc_data_bucket_name}"
167167
automq_ops_bucket = var.automq_byoc_ops_bucket_name == "" ? module.automq_byoc_ops_bucket_name.s3_bucket_id : "${var.automq_byoc_ops_bucket_name}"
168+
zone_id = aws_route53_zone.private_r53.zone_id
168169
}
169170

170171
data "aws_vpc" "vpc_id" {

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ resource "aws_instance" "automq_byoc_console" {
2727
automq_data_bucket = local.automq_data_bucket,
2828
automq_ops_bucket = local.automq_ops_bucket,
2929
instance_security_group_id = aws_security_group.automq_byoc_console_sg.id,
30-
instance_dns = aws_route53_zone.private_r53.zone_id,
30+
instance_dns = local.zone_id,
3131
instance_profile_arn = aws_iam_instance_profile.automq_byoc_instance_profile.arn,
3232
environment_id = var.automq_byoc_env_id
3333
})

outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ output "private_subnets" {
4848
value = try(module.automq_byoc_vpc[0].private_subnets, [])
4949
}
5050

51+
output "dns_zone_id" {
52+
description = "The Route53 zone id for the AutoMQ environment deployment."
53+
value = aws_route53_zone.private_r53.zone_id
54+
}
55+
5156
/*
5257
output "automq_byoc_data_bucket_name" {
5358
description = "The object storage bucket for that used to store message data generated by applications. The message data Bucket must be separate from the Ops Bucket."

0 commit comments

Comments
 (0)