@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
74 lines • 3.16 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.getImageOutput = exports.getImage = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Get information about a Google Compute Image. Check that your service account has the `compute.imageUser` role if you want to share [custom images](https://cloud.google.com/compute/docs/images/sharing-images-across-projects) from another project. If you want to use [public images][pubimg], do not forget to specify the dedicated project. For more information see
* [the official documentation](https://cloud.google.com/compute/docs/images) and its [API](https://cloud.google.com/compute/docs/reference/latest/images).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const myImage = gcp.compute.getImage({
* family: "debian-11",
* project: "debian-cloud",
* });
* const _default = new gcp.compute.Instance("default", {bootDisk: {
* initializeParams: {
* image: myImage.then(myImage => myImage.selfLink),
* },
* }});
* ```
*/
function getImage(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("gcp:compute/getImage:getImage", {
"family": args.family,
"filter": args.filter,
"mostRecent": args.mostRecent,
"name": args.name,
"project": args.project,
}, opts);
}
exports.getImage = getImage;
/**
* Get information about a Google Compute Image. Check that your service account has the `compute.imageUser` role if you want to share [custom images](https://cloud.google.com/compute/docs/images/sharing-images-across-projects) from another project. If you want to use [public images][pubimg], do not forget to specify the dedicated project. For more information see
* [the official documentation](https://cloud.google.com/compute/docs/images) and its [API](https://cloud.google.com/compute/docs/reference/latest/images).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const myImage = gcp.compute.getImage({
* family: "debian-11",
* project: "debian-cloud",
* });
* const _default = new gcp.compute.Instance("default", {bootDisk: {
* initializeParams: {
* image: myImage.then(myImage => myImage.selfLink),
* },
* }});
* ```
*/
function getImageOutput(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("gcp:compute/getImage:getImage", {
"family": args.family,
"filter": args.filter,
"mostRecent": args.mostRecent,
"name": args.name,
"project": args.project,
}, opts);
}
exports.getImageOutput = getImageOutput;
//# sourceMappingURL=getImage.js.map