Data Source: awsElbHostedZoneId
Use this data source to get the HostedZoneId of the AWS Elastic Load Balancing HostedZoneId in a given region for the purpose of using in an AWS Route53 Alias.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const dataAwsElbHostedZoneIdMain =
new aws.dataAwsElbHostedZoneId.DataAwsElbHostedZoneId(this, "main", {});
new aws.route53Record.Route53Record(this, "www", {
alias: {
evaluateTargetHealth: true,
name: "${aws_elb.main.dns_name}",
zoneId: dataAwsElbHostedZoneIdMain.id,
},
name: "example.com",
type: "A",
zoneId: "${aws_route53_zone.primary.zone_id}",
});
Argument Reference
region
- (Optional) Name of the region whose AWS ELB HostedZoneId is desired. Defaults to the region from the AWS provider configuration.
Attributes Reference
id
- ID of the AWS ELB HostedZoneId in the selected region.