UNPKG

@pulumi/gcp

Version:

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

64 lines 2.44 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.getClusterOutput = exports.getCluster = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Get info about a GKE cluster from its name and location. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const myCluster = gcp.container.getCluster({ * name: "my-cluster", * location: "us-east1-a", * }); * export const endpoint = myCluster.then(myCluster => myCluster.endpoint); * export const instanceGroupUrls = myCluster.then(myCluster => myCluster.nodePools?.[0]?.instanceGroupUrls); * export const nodeConfig = myCluster.then(myCluster => myCluster.nodeConfigs); * export const nodePools = myCluster.then(myCluster => myCluster.nodePools); * ``` */ function getCluster(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("gcp:container/getCluster:getCluster", { "location": args.location, "name": args.name, "project": args.project, }, opts); } exports.getCluster = getCluster; /** * Get info about a GKE cluster from its name and location. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const myCluster = gcp.container.getCluster({ * name: "my-cluster", * location: "us-east1-a", * }); * export const endpoint = myCluster.then(myCluster => myCluster.endpoint); * export const instanceGroupUrls = myCluster.then(myCluster => myCluster.nodePools?.[0]?.instanceGroupUrls); * export const nodeConfig = myCluster.then(myCluster => myCluster.nodeConfigs); * export const nodePools = myCluster.then(myCluster => myCluster.nodePools); * ``` */ function getClusterOutput(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("gcp:container/getCluster:getCluster", { "location": args.location, "name": args.name, "project": args.project, }, opts); } exports.getClusterOutput = getClusterOutput; //# sourceMappingURL=getCluster.js.map