1. Packages
  2. Aiven Provider
  3. API Docs
  4. getAwsVpcPeeringConnection
Viewing docs for Aiven v5.6.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
aiven logo
Viewing docs for Aiven v5.6.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    The AWS VPC Peering Connection data source provides information about the existing Aiven VPC Peering Connection.

    Example Usage

    using System.Collections.Generic;
    using Pulumi;
    using Aiven = Pulumi.Aiven;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = Aiven.GetAwsVpcPeeringConnection.Invoke(new()
        {
            VpcId = data.Aiven_project_vpc.Vpc.Id,
            AwsAccountId = "XXXXX",
            AwsVpcId = "XXXXX",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aiven/sdk/v5/go/aiven"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := aiven.LookupAwsVpcPeeringConnection(ctx, &aiven.LookupAwsVpcPeeringConnectionArgs{
    			VpcId:        data.Aiven_project_vpc.Vpc.Id,
    			AwsAccountId: "XXXXX",
    			AwsVpcId:     "XXXXX",
    		}, 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.GetAwsVpcPeeringConnectionArgs;
    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 foo = AivenFunctions.getAwsVpcPeeringConnection(GetAwsVpcPeeringConnectionArgs.builder()
                .vpcId(data.aiven_project_vpc().vpc().id())
                .awsAccountId("XXXXX")
                .awsVpcId("XXXXX")
                .build());
    
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aiven from "@pulumi/aiven";
    
    const foo = aiven.getAwsVpcPeeringConnection({
        vpcId: data.aiven_project_vpc.vpc.id,
        awsAccountId: "XXXXX",
        awsVpcId: "XXXXX",
    });
    
    import pulumi
    import pulumi_aiven as aiven
    
    foo = aiven.get_aws_vpc_peering_connection(vpc_id=data["aiven_project_vpc"]["vpc"]["id"],
        aws_account_id="XXXXX",
        aws_vpc_id="XXXXX")
    
    variables:
      foo:
        fn::invoke:
          Function: aiven:getAwsVpcPeeringConnection
          Arguments:
            vpcId: ${data.aiven_project_vpc.vpc.id}
            awsAccountId: XXXXX
            awsVpcId: XXXXX
    

    Using getAwsVpcPeeringConnection

    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 getAwsVpcPeeringConnection(args: GetAwsVpcPeeringConnectionArgs, opts?: InvokeOptions): Promise<GetAwsVpcPeeringConnectionResult>
    function getAwsVpcPeeringConnectionOutput(args: GetAwsVpcPeeringConnectionOutputArgs, opts?: InvokeOptions): Output<GetAwsVpcPeeringConnectionResult>
    def get_aws_vpc_peering_connection(aws_account_id: Optional[str] = None,
                                       aws_vpc_id: Optional[str] = None,
                                       aws_vpc_region: Optional[str] = None,
                                       vpc_id: Optional[str] = None,
                                       opts: Optional[InvokeOptions] = None) -> GetAwsVpcPeeringConnectionResult
    def get_aws_vpc_peering_connection_output(aws_account_id: Optional[pulumi.Input[str]] = None,
                                       aws_vpc_id: Optional[pulumi.Input[str]] = None,
                                       aws_vpc_region: Optional[pulumi.Input[str]] = None,
                                       vpc_id: Optional[pulumi.Input[str]] = None,
                                       opts: Optional[InvokeOptions] = None) -> Output[GetAwsVpcPeeringConnectionResult]
    func LookupAwsVpcPeeringConnection(ctx *Context, args *LookupAwsVpcPeeringConnectionArgs, opts ...InvokeOption) (*LookupAwsVpcPeeringConnectionResult, error)
    func LookupAwsVpcPeeringConnectionOutput(ctx *Context, args *LookupAwsVpcPeeringConnectionOutputArgs, opts ...InvokeOption) LookupAwsVpcPeeringConnectionResultOutput

    > Note: This function is named LookupAwsVpcPeeringConnection in the Go SDK.

    public static class GetAwsVpcPeeringConnection 
    {
        public static Task<GetAwsVpcPeeringConnectionResult> InvokeAsync(GetAwsVpcPeeringConnectionArgs args, InvokeOptions? opts = null)
        public static Output<GetAwsVpcPeeringConnectionResult> Invoke(GetAwsVpcPeeringConnectionInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAwsVpcPeeringConnectionResult> getAwsVpcPeeringConnection(GetAwsVpcPeeringConnectionArgs args, InvokeOptions options)
    public static Output<GetAwsVpcPeeringConnectionResult> getAwsVpcPeeringConnection(GetAwsVpcPeeringConnectionArgs args, InvokeOptions options)
    
    fn::invoke:
      function: aiven:index/getAwsVpcPeeringConnection:getAwsVpcPeeringConnection
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AwsAccountId string
    AWS account ID. This property cannot be changed, doing so forces recreation of the resource.
    AwsVpcId string
    AWS VPC ID. This property cannot be changed, doing so forces recreation of the resource.
    AwsVpcRegion string
    AWS region of the peered VPC (if not in the same region as Aiven VPC). This property cannot be changed, doing so forces recreation of the resource.
    VpcId string
    The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.
    AwsAccountId string
    AWS account ID. This property cannot be changed, doing so forces recreation of the resource.
    AwsVpcId string
    AWS VPC ID. This property cannot be changed, doing so forces recreation of the resource.
    AwsVpcRegion string
    AWS region of the peered VPC (if not in the same region as Aiven VPC). This property cannot be changed, doing so forces recreation of the resource.
    VpcId string
    The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.
    awsAccountId String
    AWS account ID. This property cannot be changed, doing so forces recreation of the resource.
    awsVpcId String
    AWS VPC ID. This property cannot be changed, doing so forces recreation of the resource.
    awsVpcRegion String
    AWS region of the peered VPC (if not in the same region as Aiven VPC). This property cannot be changed, doing so forces recreation of the resource.
    vpcId String
    The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.
    awsAccountId string
    AWS account ID. This property cannot be changed, doing so forces recreation of the resource.
    awsVpcId string
    AWS VPC ID. This property cannot be changed, doing so forces recreation of the resource.
    awsVpcRegion string
    AWS region of the peered VPC (if not in the same region as Aiven VPC). This property cannot be changed, doing so forces recreation of the resource.
    vpcId string
    The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.
    aws_account_id str
    AWS account ID. This property cannot be changed, doing so forces recreation of the resource.
    aws_vpc_id str
    AWS VPC ID. This property cannot be changed, doing so forces recreation of the resource.
    aws_vpc_region str
    AWS region of the peered VPC (if not in the same region as Aiven VPC). This property cannot be changed, doing so forces recreation of the resource.
    vpc_id str
    The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.
    awsAccountId String
    AWS account ID. This property cannot be changed, doing so forces recreation of the resource.
    awsVpcId String
    AWS VPC ID. This property cannot be changed, doing so forces recreation of the resource.
    awsVpcRegion String
    AWS region of the peered VPC (if not in the same region as Aiven VPC). This property cannot be changed, doing so forces recreation of the resource.
    vpcId String
    The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.

    getAwsVpcPeeringConnection Result

    The following output properties are available:

    AwsAccountId string
    AWS account ID. This property cannot be changed, doing so forces recreation of the resource.
    AwsVpcId string
    AWS VPC ID. This property cannot be changed, doing so forces recreation of the resource.
    AwsVpcPeeringConnectionId string
    AWS VPC peering connection ID
    AwsVpcRegion string
    AWS region of the peered VPC (if not in the same region as Aiven VPC). This property cannot be changed, doing so forces recreation of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    State of the peering connection
    StateInfo Dictionary<string, object>
    State-specific help or error information
    VpcId string
    The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.
    AwsAccountId string
    AWS account ID. This property cannot be changed, doing so forces recreation of the resource.
    AwsVpcId string
    AWS VPC ID. This property cannot be changed, doing so forces recreation of the resource.
    AwsVpcPeeringConnectionId string
    AWS VPC peering connection ID
    AwsVpcRegion string
    AWS region of the peered VPC (if not in the same region as Aiven VPC). This property cannot be changed, doing so forces recreation of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    State of the peering connection
    StateInfo map[string]interface{}
    State-specific help or error information
    VpcId string
    The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.
    awsAccountId String
    AWS account ID. This property cannot be changed, doing so forces recreation of the resource.
    awsVpcId String
    AWS VPC ID. This property cannot be changed, doing so forces recreation of the resource.
    awsVpcPeeringConnectionId String
    AWS VPC peering connection ID
    awsVpcRegion String
    AWS region of the peered VPC (if not in the same region as Aiven VPC). This property cannot be changed, doing so forces recreation of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    State of the peering connection
    stateInfo Map<String,Object>
    State-specific help or error information
    vpcId String
    The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.
    awsAccountId string
    AWS account ID. This property cannot be changed, doing so forces recreation of the resource.
    awsVpcId string
    AWS VPC ID. This property cannot be changed, doing so forces recreation of the resource.
    awsVpcPeeringConnectionId string
    AWS VPC peering connection ID
    awsVpcRegion string
    AWS region of the peered VPC (if not in the same region as Aiven VPC). This property cannot be changed, doing so forces recreation of the resource.
    id string
    The provider-assigned unique ID for this managed resource.
    state string
    State of the peering connection
    stateInfo {[key: string]: any}
    State-specific help or error information
    vpcId string
    The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.
    aws_account_id str
    AWS account ID. This property cannot be changed, doing so forces recreation of the resource.
    aws_vpc_id str
    AWS VPC ID. This property cannot be changed, doing so forces recreation of the resource.
    aws_vpc_peering_connection_id str
    AWS VPC peering connection ID
    aws_vpc_region str
    AWS region of the peered VPC (if not in the same region as Aiven VPC). This property cannot be changed, doing so forces recreation of the resource.
    id str
    The provider-assigned unique ID for this managed resource.
    state str
    State of the peering connection
    state_info Mapping[str, Any]
    State-specific help or error information
    vpc_id str
    The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.
    awsAccountId String
    AWS account ID. This property cannot be changed, doing so forces recreation of the resource.
    awsVpcId String
    AWS VPC ID. This property cannot be changed, doing so forces recreation of the resource.
    awsVpcPeeringConnectionId String
    AWS VPC peering connection ID
    awsVpcRegion String
    AWS region of the peered VPC (if not in the same region as Aiven VPC). This property cannot be changed, doing so forces recreation of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    State of the peering connection
    stateInfo Map<Any>
    State-specific help or error information
    vpcId String
    The VPC the peering connection belongs to. This property cannot be changed, doing so forces recreation of the resource.

    Package Details

    Repository
    Aiven pulumi/pulumi-aiven
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aiven Terraform Provider.
    aiven logo
    Viewing docs for Aiven v5.6.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.