@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
51 lines • 1.6 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.getVpcsOutput = exports.getVpcs = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Use this data source to get a list of VPC.
*
* ## Example Usage
*
* An example filter by name and tag
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as huaweicloud from "@pulumi/huaweicloud";
*
* const config = new pulumi.Config();
* const vpcName = config.requireObject("vpcName");
* const vpc = huaweicloud.Vpc.getVpcs({
* name: vpcName,
* tags: {
* foo: "bar",
* },
* });
* export const vpcIds = [vpc.then(vpc => vpc.vpcs)].map(__item => __item?.id);
* ```
*/
function getVpcs(args, opts) {
args = args || {};
if (!opts) {
opts = {};
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
return pulumi.runtime.invoke("huaweicloud:Vpc/getVpcs:getVpcs", {
"cidr": args.cidr,
"enterpriseProjectId": args.enterpriseProjectId,
"id": args.id,
"name": args.name,
"region": args.region,
"status": args.status,
"tags": args.tags,
}, opts);
}
exports.getVpcs = getVpcs;
function getVpcsOutput(args, opts) {
return pulumi.output(args).apply(a => getVpcs(a, opts));
}
exports.getVpcsOutput = getVpcsOutput;
//# sourceMappingURL=getVpcs.js.map