1. Packages
  2. Flexibleengine Provider
  3. API Docs
  4. VpcV1
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

flexibleengine.VpcV1

Explore with Pulumi AI

Manages a VPC resource within FlexibleEngine.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";

const exampleVpc = new flexibleengine.VpcV1("exampleVpc", {cidr: "192.168.0.0/16"});
const exampleVpcWithTags = new flexibleengine.VpcV1("exampleVpcWithTags", {
    cidr: "192.168.0.0/16",
    tags: {
        foo: "bar",
        key: "value",
    },
});
Copy
import pulumi
import pulumi_flexibleengine as flexibleengine

example_vpc = flexibleengine.VpcV1("exampleVpc", cidr="192.168.0.0/16")
example_vpc_with_tags = flexibleengine.VpcV1("exampleVpcWithTags",
    cidr="192.168.0.0/16",
    tags={
        "foo": "bar",
        "key": "value",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := flexibleengine.NewVpcV1(ctx, "exampleVpc", &flexibleengine.VpcV1Args{
			Cidr: pulumi.String("192.168.0.0/16"),
		})
		if err != nil {
			return err
		}
		_, err = flexibleengine.NewVpcV1(ctx, "exampleVpcWithTags", &flexibleengine.VpcV1Args{
			Cidr: pulumi.String("192.168.0.0/16"),
			Tags: pulumi.StringMap{
				"foo": pulumi.String("bar"),
				"key": pulumi.String("value"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;

return await Deployment.RunAsync(() => 
{
    var exampleVpc = new Flexibleengine.VpcV1("exampleVpc", new()
    {
        Cidr = "192.168.0.0/16",
    });

    var exampleVpcWithTags = new Flexibleengine.VpcV1("exampleVpcWithTags", new()
    {
        Cidr = "192.168.0.0/16",
        Tags = 
        {
            { "foo", "bar" },
            { "key", "value" },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.VpcV1;
import com.pulumi.flexibleengine.VpcV1Args;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var exampleVpc = new VpcV1("exampleVpc", VpcV1Args.builder()
            .cidr("192.168.0.0/16")
            .build());

        var exampleVpcWithTags = new VpcV1("exampleVpcWithTags", VpcV1Args.builder()
            .cidr("192.168.0.0/16")
            .tags(Map.ofEntries(
                Map.entry("foo", "bar"),
                Map.entry("key", "value")
            ))
            .build());

    }
}
Copy
resources:
  exampleVpc:
    type: flexibleengine:VpcV1
    properties:
      cidr: 192.168.0.0/16
  exampleVpcWithTags:
    type: flexibleengine:VpcV1
    properties:
      cidr: 192.168.0.0/16
      tags:
        foo: bar
        key: value
Copy

Create VpcV1 Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new VpcV1(name: string, args: VpcV1Args, opts?: CustomResourceOptions);
@overload
def VpcV1(resource_name: str,
          args: VpcV1Args,
          opts: Optional[ResourceOptions] = None)

@overload
def VpcV1(resource_name: str,
          opts: Optional[ResourceOptions] = None,
          cidr: Optional[str] = None,
          description: Optional[str] = None,
          enterprise_project_id: Optional[str] = None,
          name: Optional[str] = None,
          region: Optional[str] = None,
          secondary_cidr: Optional[str] = None,
          tags: Optional[Mapping[str, str]] = None,
          timeouts: Optional[VpcV1TimeoutsArgs] = None,
          vpc_v1_id: Optional[str] = None)
func NewVpcV1(ctx *Context, name string, args VpcV1Args, opts ...ResourceOption) (*VpcV1, error)
public VpcV1(string name, VpcV1Args args, CustomResourceOptions? opts = null)
public VpcV1(String name, VpcV1Args args)
public VpcV1(String name, VpcV1Args args, CustomResourceOptions options)
type: flexibleengine:VpcV1
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. VpcV1Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. VpcV1Args
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. VpcV1Args
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. VpcV1Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. VpcV1Args
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var vpcV1Resource = new Flexibleengine.VpcV1("vpcV1Resource", new()
{
    Cidr = "string",
    Description = "string",
    EnterpriseProjectId = "string",
    Name = "string",
    Region = "string",
    SecondaryCidr = "string",
    Tags = 
    {
        { "string", "string" },
    },
    Timeouts = new Flexibleengine.Inputs.VpcV1TimeoutsArgs
    {
        Create = "string",
        Delete = "string",
    },
    VpcV1Id = "string",
});
Copy
example, err := flexibleengine.NewVpcV1(ctx, "vpcV1Resource", &flexibleengine.VpcV1Args{
Cidr: pulumi.String("string"),
Description: pulumi.String("string"),
EnterpriseProjectId: pulumi.String("string"),
Name: pulumi.String("string"),
Region: pulumi.String("string"),
SecondaryCidr: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
Timeouts: &.VpcV1TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
VpcV1Id: pulumi.String("string"),
})
Copy
var vpcV1Resource = new VpcV1("vpcV1Resource", VpcV1Args.builder()
    .cidr("string")
    .description("string")
    .enterpriseProjectId("string")
    .name("string")
    .region("string")
    .secondaryCidr("string")
    .tags(Map.of("string", "string"))
    .timeouts(VpcV1TimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .build())
    .vpcV1Id("string")
    .build());
Copy
vpc_v1_resource = flexibleengine.VpcV1("vpcV1Resource",
    cidr="string",
    description="string",
    enterprise_project_id="string",
    name="string",
    region="string",
    secondary_cidr="string",
    tags={
        "string": "string",
    },
    timeouts={
        "create": "string",
        "delete": "string",
    },
    vpc_v1_id="string")
Copy
const vpcV1Resource = new flexibleengine.VpcV1("vpcV1Resource", {
    cidr: "string",
    description: "string",
    enterpriseProjectId: "string",
    name: "string",
    region: "string",
    secondaryCidr: "string",
    tags: {
        string: "string",
    },
    timeouts: {
        create: "string",
        "delete": "string",
    },
    vpcV1Id: "string",
});
Copy
type: flexibleengine:VpcV1
properties:
    cidr: string
    description: string
    enterpriseProjectId: string
    name: string
    region: string
    secondaryCidr: string
    tags:
        string: string
    timeouts:
        create: string
        delete: string
    vpcV1Id: string
Copy

VpcV1 Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The VpcV1 resource accepts the following input properties:

Cidr This property is required. string
Specifies the range of available subnets in the VPC. The value ranges from 10.0.0.0/8 to 10.255.255.0/24, 172.16.0.0/12 to 172.31.255.0/24, or 192.168.0.0/16 to 192.168.255.0/24.
Description string
Specifies supplementary information about the VPC. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
EnterpriseProjectId string
Name string
Specifies the name of the VPC. The name must be unique for a tenant. The value is a string of no more than 64 characters and can contain digits, letters, underscores (_), and hyphens (-).
Region string
Specifies the region in which to create the VPC. If omitted, the provider-level region will be used. Changing this creates a new VPC resource.
SecondaryCidr string
Tags Dictionary<string, string>
Specifies the key/value pairs to associate with the VPC.
Timeouts VpcV1Timeouts
VpcV1Id string
The VPC ID in UUID format.
Cidr This property is required. string
Specifies the range of available subnets in the VPC. The value ranges from 10.0.0.0/8 to 10.255.255.0/24, 172.16.0.0/12 to 172.31.255.0/24, or 192.168.0.0/16 to 192.168.255.0/24.
Description string
Specifies supplementary information about the VPC. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
EnterpriseProjectId string
Name string
Specifies the name of the VPC. The name must be unique for a tenant. The value is a string of no more than 64 characters and can contain digits, letters, underscores (_), and hyphens (-).
Region string
Specifies the region in which to create the VPC. If omitted, the provider-level region will be used. Changing this creates a new VPC resource.
SecondaryCidr string
Tags map[string]string
Specifies the key/value pairs to associate with the VPC.
Timeouts VpcV1TimeoutsArgs
VpcV1Id string
The VPC ID in UUID format.
cidr This property is required. String
Specifies the range of available subnets in the VPC. The value ranges from 10.0.0.0/8 to 10.255.255.0/24, 172.16.0.0/12 to 172.31.255.0/24, or 192.168.0.0/16 to 192.168.255.0/24.
description String
Specifies supplementary information about the VPC. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
enterpriseProjectId String
name String
Specifies the name of the VPC. The name must be unique for a tenant. The value is a string of no more than 64 characters and can contain digits, letters, underscores (_), and hyphens (-).
region String
Specifies the region in which to create the VPC. If omitted, the provider-level region will be used. Changing this creates a new VPC resource.
secondaryCidr String
tags Map<String,String>
Specifies the key/value pairs to associate with the VPC.
timeouts VpcV1Timeouts
vpcV1Id String
The VPC ID in UUID format.
cidr This property is required. string
Specifies the range of available subnets in the VPC. The value ranges from 10.0.0.0/8 to 10.255.255.0/24, 172.16.0.0/12 to 172.31.255.0/24, or 192.168.0.0/16 to 192.168.255.0/24.
description string
Specifies supplementary information about the VPC. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
enterpriseProjectId string
name string
Specifies the name of the VPC. The name must be unique for a tenant. The value is a string of no more than 64 characters and can contain digits, letters, underscores (_), and hyphens (-).
region string
Specifies the region in which to create the VPC. If omitted, the provider-level region will be used. Changing this creates a new VPC resource.
secondaryCidr string
tags {[key: string]: string}
Specifies the key/value pairs to associate with the VPC.
timeouts VpcV1Timeouts
vpcV1Id string
The VPC ID in UUID format.
cidr This property is required. str
Specifies the range of available subnets in the VPC. The value ranges from 10.0.0.0/8 to 10.255.255.0/24, 172.16.0.0/12 to 172.31.255.0/24, or 192.168.0.0/16 to 192.168.255.0/24.
description str
Specifies supplementary information about the VPC. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
enterprise_project_id str
name str
Specifies the name of the VPC. The name must be unique for a tenant. The value is a string of no more than 64 characters and can contain digits, letters, underscores (_), and hyphens (-).
region str
Specifies the region in which to create the VPC. If omitted, the provider-level region will be used. Changing this creates a new VPC resource.
secondary_cidr str
tags Mapping[str, str]
Specifies the key/value pairs to associate with the VPC.
timeouts VpcV1TimeoutsArgs
vpc_v1_id str
The VPC ID in UUID format.
cidr This property is required. String
Specifies the range of available subnets in the VPC. The value ranges from 10.0.0.0/8 to 10.255.255.0/24, 172.16.0.0/12 to 172.31.255.0/24, or 192.168.0.0/16 to 192.168.255.0/24.
description String
Specifies supplementary information about the VPC. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
enterpriseProjectId String
name String
Specifies the name of the VPC. The name must be unique for a tenant. The value is a string of no more than 64 characters and can contain digits, letters, underscores (_), and hyphens (-).
region String
Specifies the region in which to create the VPC. If omitted, the provider-level region will be used. Changing this creates a new VPC resource.
secondaryCidr String
tags Map<String>
Specifies the key/value pairs to associate with the VPC.
timeouts Property Map
vpcV1Id String
The VPC ID in UUID format.

Outputs

All input properties are implicitly available as output properties. Additionally, the VpcV1 resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Routes List<VpcV1Route>

Deprecated: Deprecated

Status string
The current status of the VPC. Possible values are as follows: CREATING, OK or ERROR.
Id string
The provider-assigned unique ID for this managed resource.
Routes []VpcV1Route

Deprecated: Deprecated

Status string
The current status of the VPC. Possible values are as follows: CREATING, OK or ERROR.
id String
The provider-assigned unique ID for this managed resource.
routes List<VpcV1Route>

Deprecated: Deprecated

status String
The current status of the VPC. Possible values are as follows: CREATING, OK or ERROR.
id string
The provider-assigned unique ID for this managed resource.
routes VpcV1Route[]

Deprecated: Deprecated

status string
The current status of the VPC. Possible values are as follows: CREATING, OK or ERROR.
id str
The provider-assigned unique ID for this managed resource.
routes Sequence[VpcV1Route]

Deprecated: Deprecated

status str
The current status of the VPC. Possible values are as follows: CREATING, OK or ERROR.
id String
The provider-assigned unique ID for this managed resource.
routes List<Property Map>

Deprecated: Deprecated

status String
The current status of the VPC. Possible values are as follows: CREATING, OK or ERROR.

Look up Existing VpcV1 Resource

Get an existing VpcV1 resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: VpcV1State, opts?: CustomResourceOptions): VpcV1
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cidr: Optional[str] = None,
        description: Optional[str] = None,
        enterprise_project_id: Optional[str] = None,
        name: Optional[str] = None,
        region: Optional[str] = None,
        routes: Optional[Sequence[VpcV1RouteArgs]] = None,
        secondary_cidr: Optional[str] = None,
        status: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        timeouts: Optional[VpcV1TimeoutsArgs] = None,
        vpc_v1_id: Optional[str] = None) -> VpcV1
func GetVpcV1(ctx *Context, name string, id IDInput, state *VpcV1State, opts ...ResourceOption) (*VpcV1, error)
public static VpcV1 Get(string name, Input<string> id, VpcV1State? state, CustomResourceOptions? opts = null)
public static VpcV1 get(String name, Output<String> id, VpcV1State state, CustomResourceOptions options)
resources:  _:    type: flexibleengine:VpcV1    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Cidr string
Specifies the range of available subnets in the VPC. The value ranges from 10.0.0.0/8 to 10.255.255.0/24, 172.16.0.0/12 to 172.31.255.0/24, or 192.168.0.0/16 to 192.168.255.0/24.
Description string
Specifies supplementary information about the VPC. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
EnterpriseProjectId string
Name string
Specifies the name of the VPC. The name must be unique for a tenant. The value is a string of no more than 64 characters and can contain digits, letters, underscores (_), and hyphens (-).
Region string
Specifies the region in which to create the VPC. If omitted, the provider-level region will be used. Changing this creates a new VPC resource.
Routes List<VpcV1Route>

Deprecated: Deprecated

SecondaryCidr string
Status string
The current status of the VPC. Possible values are as follows: CREATING, OK or ERROR.
Tags Dictionary<string, string>
Specifies the key/value pairs to associate with the VPC.
Timeouts VpcV1Timeouts
VpcV1Id string
The VPC ID in UUID format.
Cidr string
Specifies the range of available subnets in the VPC. The value ranges from 10.0.0.0/8 to 10.255.255.0/24, 172.16.0.0/12 to 172.31.255.0/24, or 192.168.0.0/16 to 192.168.255.0/24.
Description string
Specifies supplementary information about the VPC. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
EnterpriseProjectId string
Name string
Specifies the name of the VPC. The name must be unique for a tenant. The value is a string of no more than 64 characters and can contain digits, letters, underscores (_), and hyphens (-).
Region string
Specifies the region in which to create the VPC. If omitted, the provider-level region will be used. Changing this creates a new VPC resource.
Routes []VpcV1RouteArgs

Deprecated: Deprecated

SecondaryCidr string
Status string
The current status of the VPC. Possible values are as follows: CREATING, OK or ERROR.
Tags map[string]string
Specifies the key/value pairs to associate with the VPC.
Timeouts VpcV1TimeoutsArgs
VpcV1Id string
The VPC ID in UUID format.
cidr String
Specifies the range of available subnets in the VPC. The value ranges from 10.0.0.0/8 to 10.255.255.0/24, 172.16.0.0/12 to 172.31.255.0/24, or 192.168.0.0/16 to 192.168.255.0/24.
description String
Specifies supplementary information about the VPC. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
enterpriseProjectId String
name String
Specifies the name of the VPC. The name must be unique for a tenant. The value is a string of no more than 64 characters and can contain digits, letters, underscores (_), and hyphens (-).
region String
Specifies the region in which to create the VPC. If omitted, the provider-level region will be used. Changing this creates a new VPC resource.
routes List<VpcV1Route>

Deprecated: Deprecated

secondaryCidr String
status String
The current status of the VPC. Possible values are as follows: CREATING, OK or ERROR.
tags Map<String,String>
Specifies the key/value pairs to associate with the VPC.
timeouts VpcV1Timeouts
vpcV1Id String
The VPC ID in UUID format.
cidr string
Specifies the range of available subnets in the VPC. The value ranges from 10.0.0.0/8 to 10.255.255.0/24, 172.16.0.0/12 to 172.31.255.0/24, or 192.168.0.0/16 to 192.168.255.0/24.
description string
Specifies supplementary information about the VPC. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
enterpriseProjectId string
name string
Specifies the name of the VPC. The name must be unique for a tenant. The value is a string of no more than 64 characters and can contain digits, letters, underscores (_), and hyphens (-).
region string
Specifies the region in which to create the VPC. If omitted, the provider-level region will be used. Changing this creates a new VPC resource.
routes VpcV1Route[]

Deprecated: Deprecated

secondaryCidr string
status string
The current status of the VPC. Possible values are as follows: CREATING, OK or ERROR.
tags {[key: string]: string}
Specifies the key/value pairs to associate with the VPC.
timeouts VpcV1Timeouts
vpcV1Id string
The VPC ID in UUID format.
cidr str
Specifies the range of available subnets in the VPC. The value ranges from 10.0.0.0/8 to 10.255.255.0/24, 172.16.0.0/12 to 172.31.255.0/24, or 192.168.0.0/16 to 192.168.255.0/24.
description str
Specifies supplementary information about the VPC. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
enterprise_project_id str
name str
Specifies the name of the VPC. The name must be unique for a tenant. The value is a string of no more than 64 characters and can contain digits, letters, underscores (_), and hyphens (-).
region str
Specifies the region in which to create the VPC. If omitted, the provider-level region will be used. Changing this creates a new VPC resource.
routes Sequence[VpcV1RouteArgs]

Deprecated: Deprecated

secondary_cidr str
status str
The current status of the VPC. Possible values are as follows: CREATING, OK or ERROR.
tags Mapping[str, str]
Specifies the key/value pairs to associate with the VPC.
timeouts VpcV1TimeoutsArgs
vpc_v1_id str
The VPC ID in UUID format.
cidr String
Specifies the range of available subnets in the VPC. The value ranges from 10.0.0.0/8 to 10.255.255.0/24, 172.16.0.0/12 to 172.31.255.0/24, or 192.168.0.0/16 to 192.168.255.0/24.
description String
Specifies supplementary information about the VPC. The value is a string of no more than 255 characters and cannot contain angle brackets (< or >).
enterpriseProjectId String
name String
Specifies the name of the VPC. The name must be unique for a tenant. The value is a string of no more than 64 characters and can contain digits, letters, underscores (_), and hyphens (-).
region String
Specifies the region in which to create the VPC. If omitted, the provider-level region will be used. Changing this creates a new VPC resource.
routes List<Property Map>

Deprecated: Deprecated

secondaryCidr String
status String
The current status of the VPC. Possible values are as follows: CREATING, OK or ERROR.
tags Map<String>
Specifies the key/value pairs to associate with the VPC.
timeouts Property Map
vpcV1Id String
The VPC ID in UUID format.

Supporting Types

VpcV1Route
, VpcV1RouteArgs

Destination This property is required. string
Nexthop This property is required. string
Destination This property is required. string
Nexthop This property is required. string
destination This property is required. String
nexthop This property is required. String
destination This property is required. string
nexthop This property is required. string
destination This property is required. str
nexthop This property is required. str
destination This property is required. String
nexthop This property is required. String

VpcV1Timeouts
, VpcV1TimeoutsArgs

Create string
Delete string
Create string
Delete string
create String
delete String
create string
delete string
create str
delete str
create String
delete String

Import

VPCs can be imported using the id, e.g.

$ pulumi import flexibleengine:index/vpcV1:VpcV1 vpc_v1 7117d38e-4c8f-4624-a505-bd96b97d024c
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
License
Notes
This Pulumi package is based on the flexibleengine Terraform Provider.