@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
281 lines (280 loc) • 8.31 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Provides a resource to manage vpc
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as volcengine from "@pulumi/volcengine";
* import * as volcengine from "@volcengine/pulumi";
*
* const fooZones = volcengine.ecs.getZones({});
* // create vpc
* const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
* vpcName: "acc-test-vpc",
* cidrBlock: "172.16.0.0/16",
* dnsServers: [
* "8.8.8.8",
* "114.114.114.114",
* ],
* projectName: "default",
* });
* // create subnet
* const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
* subnetName: "acc-test-subnet",
* cidrBlock: "172.16.0.0/24",
* zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
* vpcId: fooVpc.id,
* });
* // create security group
* const fooSecurityGroup = new volcengine.vpc.SecurityGroup("fooSecurityGroup", {
* securityGroupName: "acc-test-security-group",
* vpcId: fooVpc.id,
* });
* ```
*
* ## Import
*
* VPC can be imported using the id, e.g.
*
* ```sh
* $ pulumi import volcengine:vpc/vpc:Vpc default vpc-mizl7m1kqccg5smt1bdpijuj
* ```
*/
export declare class Vpc extends pulumi.CustomResource {
/**
* Get an existing Vpc resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: VpcState, opts?: pulumi.CustomResourceOptions): Vpc;
/**
* Returns true if the given object is an instance of Vpc. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is Vpc;
/**
* The account ID of VPC.
*/
readonly accountId: pulumi.Output<string>;
/**
* The associate cen list of VPC.
*/
readonly associateCens: pulumi.Output<outputs.vpc.VpcAssociateCen[]>;
/**
* The auxiliary cidr block list of VPC.
*/
readonly auxiliaryCidrBlocks: pulumi.Output<string[]>;
/**
* A network address block which should be a subnet of the three internal network segments (10.0.0.0/16, 172.16.0.0/12 and 192.168.0.0/16).
*/
readonly cidrBlock: pulumi.Output<string>;
/**
* Creation time of VPC.
*/
readonly creationTime: pulumi.Output<string>;
/**
* The description of the VPC.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* The DNS server list of the VPC. And you can specify 0 to 5 servers to this list.
*/
readonly dnsServers: pulumi.Output<string[] | undefined>;
/**
* Specifies whether to enable the IPv6 CIDR block of the VPC.
*/
readonly enableIpv6: pulumi.Output<boolean>;
/**
* The IPv6 CIDR block of the VPC.
*/
readonly ipv6CidrBlock: pulumi.Output<string>;
/**
* The nat gateway ID list of VPC.
*/
readonly natGatewayIds: pulumi.Output<string[]>;
/**
* The ProjectName of the VPC.
*/
readonly projectName: pulumi.Output<string>;
/**
* The route table ID list of VPC.
*/
readonly routeTableIds: pulumi.Output<string[]>;
/**
* The secondary cidr block list of VPC.
*/
readonly secondaryCidrBlocks: pulumi.Output<string[]>;
/**
* The security group ID list of VPC.
*/
readonly securityGroupIds: pulumi.Output<string[]>;
/**
* Status of VPC.
*/
readonly status: pulumi.Output<string>;
/**
* The subnet ID list of VPC.
*/
readonly subnetIds: pulumi.Output<string[]>;
/**
* Tags.
*/
readonly tags: pulumi.Output<outputs.vpc.VpcTag[] | undefined>;
/**
* The update time of VPC.
*/
readonly updateTime: pulumi.Output<string>;
/**
* The user cidr block list of VPC.
*/
readonly userCidrBlocks: pulumi.Output<string[]>;
/**
* The ID of VPC.
*/
readonly vpcId: pulumi.Output<string>;
/**
* The name of the VPC.
*/
readonly vpcName: pulumi.Output<string>;
/**
* Create a Vpc resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: VpcArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Vpc resources.
*/
export interface VpcState {
/**
* The account ID of VPC.
*/
accountId?: pulumi.Input<string>;
/**
* The associate cen list of VPC.
*/
associateCens?: pulumi.Input<pulumi.Input<inputs.vpc.VpcAssociateCen>[]>;
/**
* The auxiliary cidr block list of VPC.
*/
auxiliaryCidrBlocks?: pulumi.Input<pulumi.Input<string>[]>;
/**
* A network address block which should be a subnet of the three internal network segments (10.0.0.0/16, 172.16.0.0/12 and 192.168.0.0/16).
*/
cidrBlock?: pulumi.Input<string>;
/**
* Creation time of VPC.
*/
creationTime?: pulumi.Input<string>;
/**
* The description of the VPC.
*/
description?: pulumi.Input<string>;
/**
* The DNS server list of the VPC. And you can specify 0 to 5 servers to this list.
*/
dnsServers?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies whether to enable the IPv6 CIDR block of the VPC.
*/
enableIpv6?: pulumi.Input<boolean>;
/**
* The IPv6 CIDR block of the VPC.
*/
ipv6CidrBlock?: pulumi.Input<string>;
/**
* The nat gateway ID list of VPC.
*/
natGatewayIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The ProjectName of the VPC.
*/
projectName?: pulumi.Input<string>;
/**
* The route table ID list of VPC.
*/
routeTableIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The secondary cidr block list of VPC.
*/
secondaryCidrBlocks?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The security group ID list of VPC.
*/
securityGroupIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Status of VPC.
*/
status?: pulumi.Input<string>;
/**
* The subnet ID list of VPC.
*/
subnetIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Tags.
*/
tags?: pulumi.Input<pulumi.Input<inputs.vpc.VpcTag>[]>;
/**
* The update time of VPC.
*/
updateTime?: pulumi.Input<string>;
/**
* The user cidr block list of VPC.
*/
userCidrBlocks?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The ID of VPC.
*/
vpcId?: pulumi.Input<string>;
/**
* The name of the VPC.
*/
vpcName?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Vpc resource.
*/
export interface VpcArgs {
/**
* A network address block which should be a subnet of the three internal network segments (10.0.0.0/16, 172.16.0.0/12 and 192.168.0.0/16).
*/
cidrBlock: pulumi.Input<string>;
/**
* The description of the VPC.
*/
description?: pulumi.Input<string>;
/**
* The DNS server list of the VPC. And you can specify 0 to 5 servers to this list.
*/
dnsServers?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies whether to enable the IPv6 CIDR block of the VPC.
*/
enableIpv6?: pulumi.Input<boolean>;
/**
* The IPv6 CIDR block of the VPC.
*/
ipv6CidrBlock?: pulumi.Input<string>;
/**
* The ProjectName of the VPC.
*/
projectName?: pulumi.Input<string>;
/**
* Tags.
*/
tags?: pulumi.Input<pulumi.Input<inputs.vpc.VpcTag>[]>;
/**
* The name of the VPC.
*/
vpcName?: pulumi.Input<string>;
}