UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

88 lines 3.04 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.getKeysOutput = exports.getKeys = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Get the DNSKEY and DS records of DNSSEC-signed managed zones. * * For more information see the * [official documentation](https://cloud.google.com/dns/docs/dnskeys/) * and [API](https://cloud.google.com/dns/docs/reference/v1/dnsKeys). * * > A gcp.dns.ManagedZone resource must have DNSSEC enabled in order * to contain any DNSKEYs. Queries to managed zones without this setting * enabled will result in a 404 error as the collection of DNSKEYs does * not exist in the DNS API. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const foo = new gcp.dns.ManagedZone("foo", { * name: "foobar", * dnsName: "foo.bar.", * dnssecConfig: { * state: "on", * nonExistence: "nsec3", * }, * }); * const fooDnsKeys = gcp.dns.getKeysOutput({ * managedZone: foo.id, * }); * export const fooDnsDsRecord = fooDnsKeys.apply(fooDnsKeys => fooDnsKeys.keySigningKeys?.[0]?.dsRecord); * ``` */ function getKeys(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("gcp:dns/getKeys:getKeys", { "managedZone": args.managedZone, "project": args.project, }, opts); } exports.getKeys = getKeys; /** * Get the DNSKEY and DS records of DNSSEC-signed managed zones. * * For more information see the * [official documentation](https://cloud.google.com/dns/docs/dnskeys/) * and [API](https://cloud.google.com/dns/docs/reference/v1/dnsKeys). * * > A gcp.dns.ManagedZone resource must have DNSSEC enabled in order * to contain any DNSKEYs. Queries to managed zones without this setting * enabled will result in a 404 error as the collection of DNSKEYs does * not exist in the DNS API. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const foo = new gcp.dns.ManagedZone("foo", { * name: "foobar", * dnsName: "foo.bar.", * dnssecConfig: { * state: "on", * nonExistence: "nsec3", * }, * }); * const fooDnsKeys = gcp.dns.getKeysOutput({ * managedZone: foo.id, * }); * export const fooDnsDsRecord = fooDnsKeys.apply(fooDnsKeys => fooDnsKeys.keySigningKeys?.[0]?.dsRecord); * ``` */ function getKeysOutput(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("gcp:dns/getKeys:getKeys", { "managedZone": args.managedZone, "project": args.project, }, opts); } exports.getKeysOutput = getKeysOutput; //# sourceMappingURL=getKeys.js.map