aiven.ProjectVpc
Explore with Pulumi AI
Creates and manages a VPC for an Aiven project.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aiven from "@pulumi/aiven";
const exampleVpc = new aiven.ProjectVpc("example_vpc", {
project: exampleProject.project,
cloudName: "google-europe-west1",
networkCidr: "192.168.1.0/24",
});
import pulumi
import pulumi_aiven as aiven
example_vpc = aiven.ProjectVpc("example_vpc",
project=example_project["project"],
cloud_name="google-europe-west1",
network_cidr="192.168.1.0/24")
package main
import (
"github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := aiven.NewProjectVpc(ctx, "example_vpc", &aiven.ProjectVpcArgs{
Project: pulumi.Any(exampleProject.Project),
CloudName: pulumi.String("google-europe-west1"),
NetworkCidr: pulumi.String("192.168.1.0/24"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aiven = Pulumi.Aiven;
return await Deployment.RunAsync(() =>
{
var exampleVpc = new Aiven.ProjectVpc("example_vpc", new()
{
Project = exampleProject.Project,
CloudName = "google-europe-west1",
NetworkCidr = "192.168.1.0/24",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aiven.ProjectVpc;
import com.pulumi.aiven.ProjectVpcArgs;
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 ProjectVpc("exampleVpc", ProjectVpcArgs.builder()
.project(exampleProject.project())
.cloudName("google-europe-west1")
.networkCidr("192.168.1.0/24")
.build());
}
}
resources:
exampleVpc:
type: aiven:ProjectVpc
name: example_vpc
properties:
project: ${exampleProject.project}
cloudName: google-europe-west1
networkCidr: 192.168.1.0/24
Create ProjectVpc Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ProjectVpc(name: string, args: ProjectVpcArgs, opts?: CustomResourceOptions);
@overload
def ProjectVpc(resource_name: str,
args: ProjectVpcArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ProjectVpc(resource_name: str,
opts: Optional[ResourceOptions] = None,
cloud_name: Optional[str] = None,
network_cidr: Optional[str] = None,
project: Optional[str] = None)
func NewProjectVpc(ctx *Context, name string, args ProjectVpcArgs, opts ...ResourceOption) (*ProjectVpc, error)
public ProjectVpc(string name, ProjectVpcArgs args, CustomResourceOptions? opts = null)
public ProjectVpc(String name, ProjectVpcArgs args)
public ProjectVpc(String name, ProjectVpcArgs args, CustomResourceOptions options)
type: aiven:ProjectVpc
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 ProjectVpcArgs
- 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 ProjectVpcArgs
- 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 ProjectVpcArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProjectVpcArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ProjectVpcArgs
- 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 projectVpcResource = new Aiven.ProjectVpc("projectVpcResource", new()
{
CloudName = "string",
NetworkCidr = "string",
Project = "string",
});
example, err := aiven.NewProjectVpc(ctx, "projectVpcResource", &aiven.ProjectVpcArgs{
CloudName: pulumi.String("string"),
NetworkCidr: pulumi.String("string"),
Project: pulumi.String("string"),
})
var projectVpcResource = new ProjectVpc("projectVpcResource", ProjectVpcArgs.builder()
.cloudName("string")
.networkCidr("string")
.project("string")
.build());
project_vpc_resource = aiven.ProjectVpc("projectVpcResource",
cloud_name="string",
network_cidr="string",
project="string")
const projectVpcResource = new aiven.ProjectVpc("projectVpcResource", {
cloudName: "string",
networkCidr: "string",
project: "string",
});
type: aiven:ProjectVpc
properties:
cloudName: string
networkCidr: string
project: string
ProjectVpc Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ProjectVpc resource accepts the following input properties:
- Cloud
Name string - The cloud provider and region where the service is hosted in the format
CLOUD_PROVIDER-REGION_NAME
. For example,google-europe-west1
oraws-us-east-2
. Changing this property forces recreation of the resource. - Network
Cidr string - Network address range used by the VPC. For example,
192.168.0.0/24
. - Project string
- The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- Cloud
Name string - The cloud provider and region where the service is hosted in the format
CLOUD_PROVIDER-REGION_NAME
. For example,google-europe-west1
oraws-us-east-2
. Changing this property forces recreation of the resource. - Network
Cidr string - Network address range used by the VPC. For example,
192.168.0.0/24
. - Project string
- The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- cloud
Name String - The cloud provider and region where the service is hosted in the format
CLOUD_PROVIDER-REGION_NAME
. For example,google-europe-west1
oraws-us-east-2
. Changing this property forces recreation of the resource. - network
Cidr String - Network address range used by the VPC. For example,
192.168.0.0/24
. - project String
- The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- cloud
Name string - The cloud provider and region where the service is hosted in the format
CLOUD_PROVIDER-REGION_NAME
. For example,google-europe-west1
oraws-us-east-2
. Changing this property forces recreation of the resource. - network
Cidr string - Network address range used by the VPC. For example,
192.168.0.0/24
. - project string
- The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- cloud_
name str - The cloud provider and region where the service is hosted in the format
CLOUD_PROVIDER-REGION_NAME
. For example,google-europe-west1
oraws-us-east-2
. Changing this property forces recreation of the resource. - network_
cidr str - Network address range used by the VPC. For example,
192.168.0.0/24
. - project str
- The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- cloud
Name String - The cloud provider and region where the service is hosted in the format
CLOUD_PROVIDER-REGION_NAME
. For example,google-europe-west1
oraws-us-east-2
. Changing this property forces recreation of the resource. - network
Cidr String - Network address range used by the VPC. For example,
192.168.0.0/24
. - project String
- The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the ProjectVpc resource produces the following output properties:
Look up Existing ProjectVpc Resource
Get an existing ProjectVpc 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?: ProjectVpcState, opts?: CustomResourceOptions): ProjectVpc
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cloud_name: Optional[str] = None,
network_cidr: Optional[str] = None,
project: Optional[str] = None,
state: Optional[str] = None) -> ProjectVpc
func GetProjectVpc(ctx *Context, name string, id IDInput, state *ProjectVpcState, opts ...ResourceOption) (*ProjectVpc, error)
public static ProjectVpc Get(string name, Input<string> id, ProjectVpcState? state, CustomResourceOptions? opts = null)
public static ProjectVpc get(String name, Output<String> id, ProjectVpcState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Cloud
Name string - The cloud provider and region where the service is hosted in the format
CLOUD_PROVIDER-REGION_NAME
. For example,google-europe-west1
oraws-us-east-2
. Changing this property forces recreation of the resource. - Network
Cidr string - Network address range used by the VPC. For example,
192.168.0.0/24
. - Project string
- The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- State string
- State of the VPC. The possible values are
APPROVED
,ACTIVE
,DELETING
andDELETED
.
- Cloud
Name string - The cloud provider and region where the service is hosted in the format
CLOUD_PROVIDER-REGION_NAME
. For example,google-europe-west1
oraws-us-east-2
. Changing this property forces recreation of the resource. - Network
Cidr string - Network address range used by the VPC. For example,
192.168.0.0/24
. - Project string
- The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- State string
- State of the VPC. The possible values are
APPROVED
,ACTIVE
,DELETING
andDELETED
.
- cloud
Name String - The cloud provider and region where the service is hosted in the format
CLOUD_PROVIDER-REGION_NAME
. For example,google-europe-west1
oraws-us-east-2
. Changing this property forces recreation of the resource. - network
Cidr String - Network address range used by the VPC. For example,
192.168.0.0/24
. - project String
- The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- state String
- State of the VPC. The possible values are
APPROVED
,ACTIVE
,DELETING
andDELETED
.
- cloud
Name string - The cloud provider and region where the service is hosted in the format
CLOUD_PROVIDER-REGION_NAME
. For example,google-europe-west1
oraws-us-east-2
. Changing this property forces recreation of the resource. - network
Cidr string - Network address range used by the VPC. For example,
192.168.0.0/24
. - project string
- The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- state string
- State of the VPC. The possible values are
APPROVED
,ACTIVE
,DELETING
andDELETED
.
- cloud_
name str - The cloud provider and region where the service is hosted in the format
CLOUD_PROVIDER-REGION_NAME
. For example,google-europe-west1
oraws-us-east-2
. Changing this property forces recreation of the resource. - network_
cidr str - Network address range used by the VPC. For example,
192.168.0.0/24
. - project str
- The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- state str
- State of the VPC. The possible values are
APPROVED
,ACTIVE
,DELETING
andDELETED
.
- cloud
Name String - The cloud provider and region where the service is hosted in the format
CLOUD_PROVIDER-REGION_NAME
. For example,google-europe-west1
oraws-us-east-2
. Changing this property forces recreation of the resource. - network
Cidr String - Network address range used by the VPC. For example,
192.168.0.0/24
. - project String
- The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- state String
- State of the VPC. The possible values are
APPROVED
,ACTIVE
,DELETING
andDELETED
.
Import
$ pulumi import aiven:index/projectVpc:ProjectVpc example_vpc PROJECT/ID
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Aiven pulumi/pulumi-aiven
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aiven
Terraform Provider.