UNPKG

@pulumi/gcp

Version:

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

107 lines 4.77 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.PeeredDnsDomain = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Allows management of a single peered DNS domain for an existing Google Cloud Platform project. * * When using Google Cloud DNS to manage internal DNS, create peered DNS domains to make your DNS available to services like Google Cloud Build. * * For more information see [the API](https://cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.projects.global.networks.peeredDnsDomains) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const name = new gcp.servicenetworking.PeeredDnsDomain("name", { * project: "10000000", * name: "example-com", * network: "default", * dnsSuffix: "example.com.", * service: "peering-service", * }); * ``` * * ## Import * * Project peered DNS domains can be imported using the `service`, `project`, `network` and `name`, where: * * - `service` is the service connection, defaults to `servicenetworking.googleapis.com`. * * - `project` is the producer project name. * * - `network` is the consumer network name. * * - `name` is the name of your peered DNS domain. * * * `services/{service}/projects/{project}/global/networks/{network}/peeredDnsDomains/{name}` * * When using the `pulumi import` command, project peered DNS domains can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:servicenetworking/peeredDnsDomain:PeeredDnsDomain default services/{service}/projects/{project}/global/networks/{network}/peeredDnsDomains/{name} * ``` */ class PeeredDnsDomain extends pulumi.CustomResource { /** * Get an existing PeeredDnsDomain resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new PeeredDnsDomain(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of PeeredDnsDomain. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === PeeredDnsDomain.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["dnsSuffix"] = state ? state.dnsSuffix : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["network"] = state ? state.network : undefined; resourceInputs["parent"] = state ? state.parent : undefined; resourceInputs["project"] = state ? state.project : undefined; resourceInputs["service"] = state ? state.service : undefined; } else { const args = argsOrState; if ((!args || args.dnsSuffix === undefined) && !opts.urn) { throw new Error("Missing required property 'dnsSuffix'"); } if ((!args || args.network === undefined) && !opts.urn) { throw new Error("Missing required property 'network'"); } resourceInputs["dnsSuffix"] = args ? args.dnsSuffix : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["network"] = args ? args.network : undefined; resourceInputs["project"] = args ? args.project : undefined; resourceInputs["service"] = args ? args.service : undefined; resourceInputs["parent"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(PeeredDnsDomain.__pulumiType, name, resourceInputs, opts); } } exports.PeeredDnsDomain = PeeredDnsDomain; /** @internal */ PeeredDnsDomain.__pulumiType = 'gcp:servicenetworking/peeredDnsDomain:PeeredDnsDomain'; //# sourceMappingURL=peeredDnsDomain.js.map