@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
84 lines • 2.84 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.getZoneOutput = exports.getZone = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* `aws.route53.Zone` provides details about a specific Route 53 Hosted Zone.
*
* This data source allows to find a Hosted Zone ID given Hosted Zone name and certain search criteria.
*
* ## Example Usage
*
* The following example shows how to get a Hosted Zone from its name and from this data how to create a Record Set.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const selected = aws.route53.getZone({
* name: "test.com.",
* privateZone: true,
* });
* const www = new aws.route53.Record("www", {
* zoneId: selected.then(selected => selected.zoneId),
* name: selected.then(selected => `www.${selected.name}`),
* type: aws.route53.RecordType.A,
* ttl: 300,
* records: ["10.0.0.1"],
* });
* ```
*/
function getZone(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("aws:route53/getZone:getZone", {
"name": args.name,
"privateZone": args.privateZone,
"tags": args.tags,
"vpcId": args.vpcId,
"zoneId": args.zoneId,
}, opts);
}
exports.getZone = getZone;
/**
* `aws.route53.Zone` provides details about a specific Route 53 Hosted Zone.
*
* This data source allows to find a Hosted Zone ID given Hosted Zone name and certain search criteria.
*
* ## Example Usage
*
* The following example shows how to get a Hosted Zone from its name and from this data how to create a Record Set.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const selected = aws.route53.getZone({
* name: "test.com.",
* privateZone: true,
* });
* const www = new aws.route53.Record("www", {
* zoneId: selected.then(selected => selected.zoneId),
* name: selected.then(selected => `www.${selected.name}`),
* type: aws.route53.RecordType.A,
* ttl: 300,
* records: ["10.0.0.1"],
* });
* ```
*/
function getZoneOutput(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("aws:route53/getZone:getZone", {
"name": args.name,
"privateZone": args.privateZone,
"tags": args.tags,
"vpcId": args.vpcId,
"zoneId": args.zoneId,
}, opts);
}
exports.getZoneOutput = getZoneOutput;
//# sourceMappingURL=getZone.js.map