Complete the code to create a Route 53 hosted zone with the correct domain name.
resource "aws_route53_zone" "primary" { name = "[1]" }
The name field must be the domain name you want to manage in Route 53, like example.com.
Complete the code to create an A record pointing to an IP address in Route 53.
resource "aws_route53_record" "web" { zone_id = aws_route53_zone.primary.zone_id name = "www" type = "A" ttl = 300 records = ["[1]"] }
The records field for an A record must be an IP address, like 192.0.2.44.
Fix the error in the code by selecting the correct record type for a domain alias to an S3 website endpoint.
resource "aws_route53_record" "alias" { zone_id = aws_route53_zone.primary.zone_id name = "static" type = "[1]" alias { name = aws_s3_bucket.website.website_endpoint zone_id = aws_s3_bucket.website.hosted_zone_id evaluate_target_health = false } }
Alias records to AWS resources like S3 website endpoints must use type A in Route 53.
Fill both blanks to create a health check that monitors an HTTP endpoint on port 80.
resource "aws_route53_health_check" "web_health" { type = "[1]" resource_path = "/" failure_threshold = 3 port = [2] request_interval = 30 ip_address = "192.0.2.44" }
The health check type for HTTP is HTTP and the port for HTTP is 80.
Fill all three blanks to create a Route 53 record that routes traffic to an Elastic Load Balancer.
resource "aws_route53_record" "elb_alias" { zone_id = aws_route53_zone.primary.zone_id name = "app" type = "[1]" alias { name = aws_lb.app.dns_name zone_id = aws_lb.app.zone_id evaluate_target_health = [2] } ttl = [3] }
Alias records to ELB use type A. The evaluate_target_health is usually set to true to check ELB health. TTL is commonly set to 300 seconds.