UNPKG

@pulumi/gcp

Version:

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

92 lines 4.04 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.getEngineVersionsOutput = exports.getEngineVersions = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = 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