Manages a Route53 Traffic Policy.
resource "aws_route53_traffic_policy" "example" {
name = "example"
comment = "example comment"
document = <<EOF
{
"AWSPolicyFormatVersion": "2015-10-01",
"RecordType": "A",
"Endpoints": {
"endpoint-start-NkPh": {
"Type": "value",
"Value": "10.0.0.2"
}
},
"StartEndpoint": "endpoint-start-NkPh"
}
EOF
}
The following arguments are required:
name
- (Required) Name of the traffic policy.document
- (Required) Policy document. This is a JSON formatted string. For more information about building Route53 traffic policy documents, see the AWS Route53 Traffic Policy document formatThe following arguments are optional:
comment
- (Optional) Comment for the traffic policy.This resource exports the following attributes in addition to the arguments above:
id
- ID of the traffic policytype
- DNS type of the resource record sets that Amazon Route 53 creates when you use a traffic policy to create a traffic policy instance.version
- Version number of the traffic policy. This value is automatically incremented by AWS after each update of this resource.In Terraform v1.5.0 and later, use an import
block to import Route53 Traffic Policy using the id
and version
. For example:
import {
to = aws_route53_traffic_policy.example
id = "01a52019-d16f-422a-ae72-c306d2b6df7e/1"
}
Using terraform import
, import Route53 Traffic Policy using the id
and version
. For example:
% terraform import aws_route53_traffic_policy.example 01a52019-d16f-422a-ae72-c306d2b6df7e/1