aiven.getProjectVpc
Explore with Pulumi AI
The Project VPC data source provides information about the existing Aiven Project VPC.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aiven = Pulumi.Aiven;
return await Deployment.RunAsync(() =>
{
var myvpc = Aiven.GetProjectVpc.Invoke(new()
{
Project = aiven_project.Myproject.Project,
CloudName = "google-europe-west1",
});
var myvpcId = Aiven.GetProjectVpc.Invoke(new()
{
VpcId = aiven_project_vpc.Vpc.Id,
});
});
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.LookupProjectVpc(ctx, &aiven.LookupProjectVpcArgs{
Project: pulumi.StringRef(aiven_project.Myproject.Project),
CloudName: pulumi.StringRef("google-europe-west1"),
}, nil)
if err != nil {
return err
}
_, err = aiven.LookupProjectVpc(ctx, &aiven.LookupProjectVpcArgs{
VpcId: pulumi.StringRef(aiven_project_vpc.Vpc.Id),
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aiven.AivenFunctions;
import com.pulumi.aiven.inputs.GetProjectVpcArgs;
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) {
final var myvpc = AivenFunctions.getProjectVpc(GetProjectVpcArgs.builder()
.project(aiven_project.myproject().project())
.cloudName("google-europe-west1")
.build());
final var myvpcId = AivenFunctions.getProjectVpc(GetProjectVpcArgs.builder()
.vpcId(aiven_project_vpc.vpc().id())
.build());
}
}
import pulumi
import pulumi_aiven as aiven
myvpc = aiven.get_project_vpc(project=aiven_project["myproject"]["project"],
cloud_name="google-europe-west1")
myvpc_id = aiven.get_project_vpc(vpc_id=aiven_project_vpc["vpc"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as aiven from "@pulumi/aiven";
const myvpc = aiven.getProjectVpc({
project: aiven_project.myproject.project,
cloudName: "google-europe-west1",
});
const myvpcId = aiven.getProjectVpc({
vpcId: aiven_project_vpc.vpc.id,
});
variables:
myvpc:
fn::invoke:
Function: aiven:getProjectVpc
Arguments:
project: ${aiven_project.myproject.project}
cloudName: google-europe-west1
myvpcId:
fn::invoke:
Function: aiven:getProjectVpc
Arguments:
vpcId: ${aiven_project_vpc.vpc.id}
Using getProjectVpc
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getProjectVpc(args: GetProjectVpcArgs, opts?: InvokeOptions): Promise<GetProjectVpcResult>
function getProjectVpcOutput(args: GetProjectVpcOutputArgs, opts?: InvokeOptions): Output<GetProjectVpcResult>
def get_project_vpc(cloud_name: Optional[str] = None,
project: Optional[str] = None,
vpc_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetProjectVpcResult
def get_project_vpc_output(cloud_name: Optional[pulumi.Input[str]] = None,
project: Optional[pulumi.Input[str]] = None,
vpc_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetProjectVpcResult]
func LookupProjectVpc(ctx *Context, args *LookupProjectVpcArgs, opts ...InvokeOption) (*LookupProjectVpcResult, error)
func LookupProjectVpcOutput(ctx *Context, args *LookupProjectVpcOutputArgs, opts ...InvokeOption) LookupProjectVpcResultOutput
> Note: This function is named LookupProjectVpc
in the Go SDK.
public static class GetProjectVpc
{
public static Task<GetProjectVpcResult> InvokeAsync(GetProjectVpcArgs args, InvokeOptions? opts = null)
public static Output<GetProjectVpcResult> Invoke(GetProjectVpcInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetProjectVpcResult> getProjectVpc(GetProjectVpcArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aiven:index/getProjectVpc:getProjectVpc
arguments:
# arguments dictionary
The following arguments are supported:
- Cloud
Name string Defines where the cloud provider and region where the service is hosted in. See the Service resource for additional information.
- Project string
Identifies the project this resource belongs to.
- Vpc
Id string ID of the VPC. This can be used to filter out the specific VPC if there are more than one datasource returned.
- Cloud
Name string Defines where the cloud provider and region where the service is hosted in. See the Service resource for additional information.
- Project string
Identifies the project this resource belongs to.
- Vpc
Id string ID of the VPC. This can be used to filter out the specific VPC if there are more than one datasource returned.
- cloud
Name String Defines where the cloud provider and region where the service is hosted in. See the Service resource for additional information.
- project String
Identifies the project this resource belongs to.
- vpc
Id String ID of the VPC. This can be used to filter out the specific VPC if there are more than one datasource returned.
- cloud
Name string Defines where the cloud provider and region where the service is hosted in. See the Service resource for additional information.
- project string
Identifies the project this resource belongs to.
- vpc
Id string ID of the VPC. This can be used to filter out the specific VPC if there are more than one datasource returned.
- cloud_
name str Defines where the cloud provider and region where the service is hosted in. See the Service resource for additional information.
- project str
Identifies the project this resource belongs to.
- vpc_
id str ID of the VPC. This can be used to filter out the specific VPC if there are more than one datasource returned.
- cloud
Name String Defines where the cloud provider and region where the service is hosted in. See the Service resource for additional information.
- project String
Identifies the project this resource belongs to.
- vpc
Id String ID of the VPC. This can be used to filter out the specific VPC if there are more than one datasource returned.
getProjectVpc Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Network
Cidr string Network address range used by the VPC like 192.168.0.0/24
- State string
State of the VPC. The possible values are
APPROVED
,ACTIVE
,DELETING
andDELETED
.- Cloud
Name string Defines where the cloud provider and region where the service is hosted in. See the Service resource for additional information.
- Project string
Identifies the project this resource belongs to.
- Vpc
Id string ID of the VPC. This can be used to filter out the specific VPC if there are more than one datasource returned.
- Id string
The provider-assigned unique ID for this managed resource.
- Network
Cidr string Network address range used by the VPC like 192.168.0.0/24
- State string
State of the VPC. The possible values are
APPROVED
,ACTIVE
,DELETING
andDELETED
.- Cloud
Name string Defines where the cloud provider and region where the service is hosted in. See the Service resource for additional information.
- Project string
Identifies the project this resource belongs to.
- Vpc
Id string ID of the VPC. This can be used to filter out the specific VPC if there are more than one datasource returned.
- id String
The provider-assigned unique ID for this managed resource.
- network
Cidr String Network address range used by the VPC like 192.168.0.0/24
- state String
State of the VPC. The possible values are
APPROVED
,ACTIVE
,DELETING
andDELETED
.- cloud
Name String Defines where the cloud provider and region where the service is hosted in. See the Service resource for additional information.
- project String
Identifies the project this resource belongs to.
- vpc
Id String ID of the VPC. This can be used to filter out the specific VPC if there are more than one datasource returned.
- id string
The provider-assigned unique ID for this managed resource.
- network
Cidr string Network address range used by the VPC like 192.168.0.0/24
- state string
State of the VPC. The possible values are
APPROVED
,ACTIVE
,DELETING
andDELETED
.- cloud
Name string Defines where the cloud provider and region where the service is hosted in. See the Service resource for additional information.
- project string
Identifies the project this resource belongs to.
- vpc
Id string ID of the VPC. This can be used to filter out the specific VPC if there are more than one datasource returned.
- id str
The provider-assigned unique ID for this managed resource.
- network_
cidr str Network address range used by the VPC like 192.168.0.0/24
- state str
State of the VPC. The possible values are
APPROVED
,ACTIVE
,DELETING
andDELETED
.- cloud_
name str Defines where the cloud provider and region where the service is hosted in. See the Service resource for additional information.
- project str
Identifies the project this resource belongs to.
- vpc_
id str ID of the VPC. This can be used to filter out the specific VPC if there are more than one datasource returned.
- id String
The provider-assigned unique ID for this managed resource.
- network
Cidr String Network address range used by the VPC like 192.168.0.0/24
- state String
State of the VPC. The possible values are
APPROVED
,ACTIVE
,DELETING
andDELETED
.- cloud
Name String Defines where the cloud provider and region where the service is hosted in. See the Service resource for additional information.
- project String
Identifies the project this resource belongs to.
- vpc
Id String ID of the VPC. This can be used to filter out the specific VPC if there are more than one datasource returned.
Package Details
- Repository
- Aiven pulumi/pulumi-aiven
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aiven
Terraform Provider.