You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
resource "aws_route53_record" "www" {
zone_id = var.route53_zone_id
name = "vpn.example.com"
type = "A"
alias {
name = aviatrix_gateway.avx_vpn_gw.elb_dns_name
zone_id = aviatrix_gateway.avx_vpn_gw.elb_zone_id ????
evaluate_target_health = true
}
}
A temporary workaround is to use something like this:
data "aws_lb" "vpn_gw_lb" {
count = var.enable_elb ? 1 : 0
name = var.elb_name
depends_on = [aviatrix_gateway.avx_vpn_gw]
}
resource "aws_route53_record" "avx_vpn_gw_lb" {
count = var.create_gateways && var.enable_elb && var.dns_zone_id != null && var.dns_zone_name != null ? 1 : 0
name = "vpn.${var.dns_zone_name}"
zone_id = var.dns_zone_id
type = "A"
alias {
name = aviatrix_gateway.avx_vpn_gw[0].elb_dns_name
zone_id = data.aws_lb.vpn_gw_lb[0].zone_id
evaluate_target_health = true
}
depends_on = [aviatrix_gateway.avx_vpn_gw]
}
Then use this datasource in the alias->zone_id, but it would be better to have the LB zone_id output since using a datasource creates a perpetual TF plan/apply change on each run.
The text was updated successfully, but these errors were encountered:
Hi @Merlz,
Thanks for bringing up this feature request! I have created a ticket in our internal issue tracker and we will aim to get this feature added in a future release. Thanks!
If you want to add a Route53 Alias entry for the LB (optionally) created by aviatrix_gateway module, then the load balancer zone_id needs to be used in the Route53 Alias record zone_id
Example:
A temporary workaround is to use something like this:
Then use this datasource in the alias->zone_id, but it would be better to have the LB zone_id output since using a datasource creates a perpetual TF plan/apply change on each run.
The text was updated successfully, but these errors were encountered: