UNPKG

@pulumi/gcp

Version:

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

115 lines 5.07 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! *** var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.getEngineVersionsOutput = exports.getEngineVersions = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("../utilities")); /** * Provides access to available Google Kubernetes Engine versions in a zone or region for a given project. * * To get more information about GKE versions, see: * * [The API reference](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations/getServerConfig) * * > If you are using the `gcp.container.getEngineVersions` datasource with a * regional cluster, ensure that you have provided a region as the `location` to * the datasource. A region can have a different set of supported versions than * its component zones, and not all zones in a region are guaranteed to * support the same version. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const central1b = gcp.container.getEngineVersions({ * location: "us-central1-b", * versionPrefix: "1.12.", * }); * const foo = new gcp.container.Cluster("foo", { * name: "test-cluster", * location: "us-central1-b", * nodeVersion: central1b.then(central1b => central1b.latestNodeVersion), * initialNodeCount: 1, * }); * export const stableChannelDefaultVersion = central1b.then(central1b => central1b.releaseChannelDefaultVersion?.STABLE); * export const stableChannelLatestVersion = central1b.then(central1b => central1b.releaseChannelLatestVersion?.STABLE); * ``` */ function getEngineVersions(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("gcp:container/getEngineVersions:getEngineVersions", { "location": args.location, "project": args.project, "versionPrefix": args.versionPrefix, }, opts); } exports.getEngineVersions = getEngineVersions; /** * Provides access to available Google Kubernetes Engine versions in a zone or region for a given project. * * To get more information about GKE versions, see: * * [The API reference](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations/getServerConfig) * * > If you are using the `gcp.container.getEngineVersions` datasource with a * regional cluster, ensure that you have provided a region as the `location` to * the datasource. A region can have a different set of supported versions than * its component zones, and not all zones in a region are guaranteed to * support the same version. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const central1b = gcp.container.getEngineVersions({ * location: "us-central1-b", * versionPrefix: "1.12.", * }); * const foo = new gcp.container.Cluster("foo", { * name: "test-cluster", * location: "us-central1-b", * nodeVersion: central1b.then(central1b => central1b.latestNodeVersion), * initialNodeCount: 1, * }); * export const stableChannelDefaultVersion = central1b.then(central1b => central1b.releaseChannelDefaultVersion?.STABLE); * export const stableChannelLatestVersion = central1b.then(central1b => central1b.releaseChannelLatestVersion?.STABLE); * ``` */ function getEngineVersionsOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("gcp:container/getEngineVersions:getEngineVersions", { "location": args.location, "project": args.project, "versionPrefix": args.versionPrefix, }, opts); } exports.getEngineVersionsOutput = getEngineVersionsOutput; //# sourceMappingURL=getEngineVersions.js.map