UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

70 lines 2.47 kB
"use strict"; // *** 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.getHostedZoneIdOutput = exports.getHostedZoneId = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Use this data source to get the HostedZoneId of an AWS App Runner service deployed * in a given region for the purpose of using it in an AWS Route53 Alias record. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const main = aws.apprunner.getHostedZoneId({}); * const www = new aws.route53.Record("www", { * zoneId: primary.zoneId, * name: "example.com", * type: aws.route53.RecordType.A, * aliases: [{ * name: mainAwsApprunnerCustomDomainAssociation.dnsTarget, * zoneId: main.then(main => main.id), * evaluateTargetHealth: true, * }], * }); * ``` */ function getHostedZoneId(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("aws:apprunner/getHostedZoneId:getHostedZoneId", { "region": args.region, }, opts); } exports.getHostedZoneId = getHostedZoneId; /** * Use this data source to get the HostedZoneId of an AWS App Runner service deployed * in a given region for the purpose of using it in an AWS Route53 Alias record. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const main = aws.apprunner.getHostedZoneId({}); * const www = new aws.route53.Record("www", { * zoneId: primary.zoneId, * name: "example.com", * type: aws.route53.RecordType.A, * aliases: [{ * name: mainAwsApprunnerCustomDomainAssociation.dnsTarget, * zoneId: main.then(main => main.id), * evaluateTargetHealth: true, * }], * }); * ``` */ function getHostedZoneIdOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("aws:apprunner/getHostedZoneId:getHostedZoneId", { "region": args.region, }, opts); } exports.getHostedZoneIdOutput = getHostedZoneIdOutput; //# sourceMappingURL=getHostedZoneId.js.map