Complete the code to create a Route 53 failover routing policy for disaster recovery.
resource "aws_route53_record" "failover" { zone_id = var.zone_id name = "app.example.com" type = "A" ttl = 60 set_identifier = "Primary" failover = "[1]" records = [aws_instance.primary.public_ip] }
The failover value must be set to PRIMARY for the primary resource in Route 53 failover routing.
Complete the code to set the failover routing policy for the secondary record.
resource "aws_route53_record" "failover_secondary" { zone_id = var.zone_id name = "app.example.com" type = "A" ttl = 60 set_identifier = "Secondary" failover = "[1]" records = [aws_instance.secondary.public_ip] }
The failover value must be set to SECONDARY for the secondary resource in Route 53 failover routing.
Fix the error in the health check configuration for failover routing.
resource "aws_route53_health_check" "primary_health" { fqdn = "app.example.com" port = 80 type = "[1]" resource_path = "/health" failure_threshold = 3 }
The health check type should be HTTP to check the web server's health endpoint.
Fill both blanks to correctly associate the health check with the Route 53 record and enable failover.
resource "aws_route53_record" "failover_primary" { zone_id = var.zone_id name = "app.example.com" type = "A" ttl = 60 set_identifier = "Primary" failover = "[1]" health_check_id = aws_route53_health_check.primary_health.[2] records = [aws_instance.primary.public_ip] }
The failover must be set to PRIMARY and the health check ID is accessed via id property.
Fill all three blanks to create a secondary failover record with health check association.
resource "aws_route53_record" "failover_secondary" { zone_id = var.zone_id name = "app.example.com" type = "A" ttl = 60 set_identifier = "Secondary" failover = "[1]" health_check_id = aws_route53_health_check.secondary_health.[2] records = [aws_instance.secondary.[3]] }
The failover must be SECONDARY, health check ID accessed by id, and the record uses the secondary instance's public_ip.