UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

69 lines 2.32 kB
"use strict"; // *** 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.getSubnetOutput = exports.getSubnet = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides details about a specific VPC subnet. * * This resource can prove useful when a module accepts a subnet id as an input variable and needs to, for example, * determine the id of the VPC that the subnet belongs to. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as huaweicloud from "@pulumi/huaweicloud"; * * const subnet = huaweicloud.Vpc.getSubnet({ * id: _var.subnet_id, * }); * export const subnetVpcId = subnet.then(subnet => subnet.vpcId); * ``` * ## **Attributes Reference** * * In addition to all arguments above, the following attributes are exported: * * * `dnsList` - The IP address list of DNS servers on the subnet. * * * `dhcpEnable` - Whether the DHCP is enabled. * * * `description` - The description of the subnet. * * * `ipv4SubnetId` - The ID of the IPv4 subnet (Native OpenStack API). * * * `ipv6Enable` - Whether the IPv6 is enabled. * * * `ipv6SubnetId` - The ID of the IPv6 subnet (Native OpenStack API). * * * `ipv6Cidr` - The IPv6 subnet CIDR block. * * * `ipv6Gateway` - The IPv6 subnet gateway. */ function getSubnet(args, opts) { args = args || {}; if (!opts) { opts = {}; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); return pulumi.runtime.invoke("huaweicloud:Vpc/getSubnet:getSubnet", { "availabilityZone": args.availabilityZone, "cidr": args.cidr, "gatewayIp": args.gatewayIp, "id": args.id, "name": args.name, "primaryDns": args.primaryDns, "region": args.region, "secondaryDns": args.secondaryDns, "status": args.status, "vpcId": args.vpcId, }, opts); } exports.getSubnet = getSubnet; function getSubnetOutput(args, opts) { return pulumi.output(args).apply(a => getSubnet(a, opts)); } exports.getSubnetOutput = getSubnetOutput; //# sourceMappingURL=getSubnet.js.map