@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
64 lines • 2.43 kB
JavaScript
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.getBackendServiceOutput = exports.getBackendService = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provide access to a Backend Service's attribute. For more information
* see [the official documentation](https://cloud.google.com/compute/docs/load-balancing/http/backend-service)
* and the [API](https://cloud.google.com/compute/docs/reference/latest/backendServices).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const baz = gcp.compute.getBackendService({
* name: "foobar",
* });
* const _default = new gcp.compute.BackendService("default", {
* name: "backend-service",
* healthChecks: baz.then(baz => baz.healthChecks?.[0]),
* });
* ```
*/
function getBackendService(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("gcp:compute/getBackendService:getBackendService", {
"name": args.name,
"project": args.project,
}, opts);
}
exports.getBackendService = getBackendService;
/**
* Provide access to a Backend Service's attribute. For more information
* see [the official documentation](https://cloud.google.com/compute/docs/load-balancing/http/backend-service)
* and the [API](https://cloud.google.com/compute/docs/reference/latest/backendServices).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const baz = gcp.compute.getBackendService({
* name: "foobar",
* });
* const _default = new gcp.compute.BackendService("default", {
* name: "backend-service",
* healthChecks: baz.then(baz => baz.healthChecks?.[0]),
* });
* ```
*/
function getBackendServiceOutput(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("gcp:compute/getBackendService:getBackendService", {
"name": args.name,
"project": args.project,
}, opts);
}
exports.getBackendServiceOutput = getBackendServiceOutput;
//# sourceMappingURL=getBackendService.js.map
;