@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
82 lines • 3.06 kB
JavaScript
;
// *** 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.getTensorflowVersionsOutput = exports.getTensorflowVersions = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Get TensorFlow versions available for a project. For more information see the [official documentation](https://cloud.google.com/tpu/docs/) and [API](https://cloud.google.com/tpu/docs/reference/rest/v1/projects.locations.tensorflowVersions).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const available = gcp.tpu.getTensorflowVersions({});
* ```
*
* ### Configure Basic TPU Node With Available Version
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const available = gcp.tpu.getTensorflowVersions({});
* const tpu = new gcp.tpu.Node("tpu", {
* name: "test-tpu",
* zone: "us-central1-b",
* acceleratorType: "v3-8",
* tensorflowVersion: available.then(available => available.versions?.[0]),
* cidrBlock: "10.2.0.0/29",
* });
* ```
*/
function getTensorflowVersions(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("gcp:tpu/getTensorflowVersions:getTensorflowVersions", {
"project": args.project,
"zone": args.zone,
}, opts);
}
exports.getTensorflowVersions = getTensorflowVersions;
/**
* Get TensorFlow versions available for a project. For more information see the [official documentation](https://cloud.google.com/tpu/docs/) and [API](https://cloud.google.com/tpu/docs/reference/rest/v1/projects.locations.tensorflowVersions).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const available = gcp.tpu.getTensorflowVersions({});
* ```
*
* ### Configure Basic TPU Node With Available Version
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const available = gcp.tpu.getTensorflowVersions({});
* const tpu = new gcp.tpu.Node("tpu", {
* name: "test-tpu",
* zone: "us-central1-b",
* acceleratorType: "v3-8",
* tensorflowVersion: available.then(available => available.versions?.[0]),
* cidrBlock: "10.2.0.0/29",
* });
* ```
*/
function getTensorflowVersionsOutput(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("gcp:tpu/getTensorflowVersions:getTensorflowVersions", {
"project": args.project,
"zone": args.zone,
}, opts);
}
exports.getTensorflowVersionsOutput = getTensorflowVersionsOutput;
//# sourceMappingURL=getTensorflowVersions.js.map