@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
114 lines • 3.4 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.getIpsOutput = exports.getIps = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Gets information about multiple Flexible IPs.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumi/scaleway";
* import * as scaleway from "@pulumiverse/scaleway";
*
* // Find ips that share the same tags
* const fipsByTags = scaleway.elasticmetal.getIps({
* tags: ["a tag"],
* });
* // Find ips that share the same Server ID
* const myOffer = scaleway.elasticmetal.getOffer({
* name: "EM-B112X-SSD",
* });
* const base = new scaleway.elasticmetal.Server("base", {
* name: "MyServer",
* offer: myOffer.then(myOffer => myOffer.offerId),
* installConfigAfterward: true,
* });
* const first = new scaleway.elasticmetal.Ip("first", {
* serverId: base.id,
* tags: [
* "foo",
* "first",
* ],
* });
* const second = new scaleway.elasticmetal.Ip("second", {
* serverId: base.id,
* tags: [
* "foo",
* "second",
* ],
* });
* const fipsByServerId = scaleway.elasticmetal.getIpsOutput({
* serverIds: [base.id],
* });
* ```
*/
function getIps(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("scaleway:elasticmetal/getIps:getIps", {
"projectId": args.projectId,
"serverIds": args.serverIds,
"tags": args.tags,
"zone": args.zone,
}, opts);
}
exports.getIps = getIps;
/**
* Gets information about multiple Flexible IPs.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumi/scaleway";
* import * as scaleway from "@pulumiverse/scaleway";
*
* // Find ips that share the same tags
* const fipsByTags = scaleway.elasticmetal.getIps({
* tags: ["a tag"],
* });
* // Find ips that share the same Server ID
* const myOffer = scaleway.elasticmetal.getOffer({
* name: "EM-B112X-SSD",
* });
* const base = new scaleway.elasticmetal.Server("base", {
* name: "MyServer",
* offer: myOffer.then(myOffer => myOffer.offerId),
* installConfigAfterward: true,
* });
* const first = new scaleway.elasticmetal.Ip("first", {
* serverId: base.id,
* tags: [
* "foo",
* "first",
* ],
* });
* const second = new scaleway.elasticmetal.Ip("second", {
* serverId: base.id,
* tags: [
* "foo",
* "second",
* ],
* });
* const fipsByServerId = scaleway.elasticmetal.getIpsOutput({
* serverIds: [base.id],
* });
* ```
*/
function getIpsOutput(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("scaleway:elasticmetal/getIps:getIps", {
"projectId": args.projectId,
"serverIds": args.serverIds,
"tags": args.tags,
"zone": args.zone,
}, opts);
}
exports.getIpsOutput = getIpsOutput;
//# sourceMappingURL=getIps.js.map