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",
},
});
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",
})
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
})
}
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" },
},
});
});
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());
}
}
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
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)
type: flexibleengine:VpcV1
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args VpcV1Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args VpcV1Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VpcV1Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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: &flexibleengine.VpcV1TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
VpcV1Id: pulumi.String("string"),
})
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());
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")
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",
});
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
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 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 >).
- Enterprise
Project stringId - 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.
- Secondary
Cidr string - Dictionary<string, string>
- Specifies the key/value pairs to associate with the VPC.
- Timeouts
Vpc
V1Timeouts - Vpc
V1Id 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 >).
- Enterprise
Project stringId - 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.
- Secondary
Cidr string - map[string]string
- Specifies the key/value pairs to associate with the VPC.
- Timeouts
Vpc
V1Timeouts Args - Vpc
V1Id 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 >).
- enterprise
Project StringId - 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.
- secondary
Cidr String - Map<String,String>
- Specifies the key/value pairs to associate with the VPC.
- timeouts
Vpc
V1Timeouts - vpc
V1Id 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 >).
- enterprise
Project stringId - 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.
- secondary
Cidr string - {[key: string]: string}
- Specifies the key/value pairs to associate with the VPC.
- timeouts
Vpc
V1Timeouts - vpc
V1Id 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_ strid - 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 - Mapping[str, str]
- Specifies the key/value pairs to associate with the VPC.
- timeouts
Vpc
V1Timeouts Args - vpc_
v1_ strid - 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 >).
- enterprise
Project StringId - 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.
- secondary
Cidr String - Map<String>
- Specifies the key/value pairs to associate with the VPC.
- timeouts Property Map
- vpc
V1Id 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<Vpc
V1Route> - 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
[]Vpc
V1Route - 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<Vpc
V1Route> - 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
Vpc
V1Route[] - 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[Vpc
V1Route] - 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>
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- 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 >).
- Enterprise
Project stringId - 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<Vpc
V1Route> - Secondary
Cidr string - Status string
- The current status of the VPC. Possible values are as follows: CREATING, OK or ERROR.
- Dictionary<string, string>
- Specifies the key/value pairs to associate with the VPC.
- Timeouts
Vpc
V1Timeouts - Vpc
V1Id 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 >).
- Enterprise
Project stringId - 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
[]Vpc
V1Route Args - Secondary
Cidr string - Status string
- The current status of the VPC. Possible values are as follows: CREATING, OK or ERROR.
- map[string]string
- Specifies the key/value pairs to associate with the VPC.
- Timeouts
Vpc
V1Timeouts Args - Vpc
V1Id 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 >).
- enterprise
Project StringId - 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<Vpc
V1Route> - secondary
Cidr String - status String
- The current status of the VPC. Possible values are as follows: CREATING, OK or ERROR.
- Map<String,String>
- Specifies the key/value pairs to associate with the VPC.
- timeouts
Vpc
V1Timeouts - vpc
V1Id 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 >).
- enterprise
Project stringId - 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
Vpc
V1Route[] - secondary
Cidr string - status string
- The current status of the VPC. Possible values are as follows: CREATING, OK or ERROR.
- {[key: string]: string}
- Specifies the key/value pairs to associate with the VPC.
- timeouts
Vpc
V1Timeouts - vpc
V1Id 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_ strid - 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[Vpc
V1Route Args] - secondary_
cidr str - status str
- The current status of the VPC. Possible values are as follows: CREATING, OK or ERROR.
- Mapping[str, str]
- Specifies the key/value pairs to associate with the VPC.
- timeouts
Vpc
V1Timeouts Args - vpc_
v1_ strid - 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 >).
- enterprise
Project StringId - 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>
- secondary
Cidr String - status String
- The current status of the VPC. Possible values are as follows: CREATING, OK or ERROR.
- Map<String>
- Specifies the key/value pairs to associate with the VPC.
- timeouts Property Map
- vpc
V1Id String - The VPC ID in UUID format.
Supporting Types
VpcV1Route, VpcV1RouteArgs
- Destination string
- Nexthop string
- Destination string
- Nexthop string
- destination String
- nexthop String
- destination string
- nexthop string
- destination str
- nexthop str
- destination String
- nexthop String
VpcV1Timeouts, VpcV1TimeoutsArgs
Import
VPCs can be imported using the id
, e.g.
$ pulumi import flexibleengine:index/vpcV1:VpcV1 vpc_v1 7117d38e-4c8f-4624-a505-bd96b97d024c
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.