@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
76 lines • 2.83 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.getGlobalAddressOutput = exports.getGlobalAddress = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Get the IP address from a static address reserved for a Global Forwarding Rule which are only used for HTTP load balancing. For more information see
* the official [API](https://cloud.google.com/compute/docs/reference/latest/globalAddresses) documentation.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const myAddress = gcp.compute.getGlobalAddress({
* name: "foobar",
* });
* const prod = new gcp.dns.ManagedZone("prod", {
* name: "prod-zone",
* dnsName: "prod.mydomain.com.",
* });
* const frontend = new gcp.dns.RecordSet("frontend", {
* name: pulumi.interpolate`lb.${prod.dnsName}`,
* type: "A",
* ttl: 300,
* managedZone: prod.name,
* rrdatas: [myAddress.then(myAddress => myAddress.address)],
* });
* ```
*/
function getGlobalAddress(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("gcp:compute/getGlobalAddress:getGlobalAddress", {
"name": args.name,
"project": args.project,
}, opts);
}
exports.getGlobalAddress = getGlobalAddress;
/**
* Get the IP address from a static address reserved for a Global Forwarding Rule which are only used for HTTP load balancing. For more information see
* the official [API](https://cloud.google.com/compute/docs/reference/latest/globalAddresses) documentation.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const myAddress = gcp.compute.getGlobalAddress({
* name: "foobar",
* });
* const prod = new gcp.dns.ManagedZone("prod", {
* name: "prod-zone",
* dnsName: "prod.mydomain.com.",
* });
* const frontend = new gcp.dns.RecordSet("frontend", {
* name: pulumi.interpolate`lb.${prod.dnsName}`,
* type: "A",
* ttl: 300,
* managedZone: prod.name,
* rrdatas: [myAddress.then(myAddress => myAddress.address)],
* });
* ```
*/
function getGlobalAddressOutput(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("gcp:compute/getGlobalAddress:getGlobalAddress", {
"name": args.name,
"project": args.project,
}, opts);
}
exports.getGlobalAddressOutput = getGlobalAddressOutput;
//# sourceMappingURL=getGlobalAddress.js.map