1. Packages
  2. Aiven Provider
  3. API Docs
  4. getAwsVpcPeeringConnection
Aiven v6.28.0 published on Friday, Nov 15, 2024 by Pulumi

aiven.getAwsVpcPeeringConnection

Explore with Pulumi AI

aiven logo
Aiven v6.28.0 published on Friday, Nov 15, 2024 by Pulumi

    Gets information about an AWS VPC peering connection.

    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",
    });
    const awsToAivenPeering = exampleVpc.id.apply(id => aiven.getAwsVpcPeeringConnectionOutput({
        vpcId: id,
        awsAccountId: awsId,
        awsVpcId: "vpc-1a2b3c4d5e6f7g8h9",
        awsVpcRegion: "aws-us-east-2",
    }));
    
    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")
    aws_to_aiven_peering = example_vpc.id.apply(lambda id: aiven.get_aws_vpc_peering_connection_output(vpc_id=id,
        aws_account_id=aws_id,
        aws_vpc_id="vpc-1a2b3c4d5e6f7g8h9",
        aws_vpc_region="aws-us-east-2"))
    
    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 {
    		exampleVpc, 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
    		}
    		_ = exampleVpc.ID().ApplyT(func(id string) (aiven.GetAwsVpcPeeringConnectionResult, error) {
    			return aiven.GetAwsVpcPeeringConnectionResult(interface{}(aiven.LookupAwsVpcPeeringConnectionOutput(ctx, aiven.GetAwsVpcPeeringConnectionOutputArgs{
    				VpcId:        id,
    				AwsAccountId: awsId,
    				AwsVpcId:     "vpc-1a2b3c4d5e6f7g8h9",
    				AwsVpcRegion: "aws-us-east-2",
    			}, nil))), nil
    		}).(aiven.GetAwsVpcPeeringConnectionResultOutput)
    		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",
        });
    
        var awsToAivenPeering = Aiven.GetAwsVpcPeeringConnection.Invoke(new()
        {
            VpcId = exampleVpc.Id,
            AwsAccountId = awsId,
            AwsVpcId = "vpc-1a2b3c4d5e6f7g8h9",
            AwsVpcRegion = "aws-us-east-2",
        });
    
    });
    
    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 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) {
            var exampleVpc = new ProjectVpc("exampleVpc", ProjectVpcArgs.builder()
                .project(exampleProject.project())
                .cloudName("google-europe-west1")
                .networkCidr("192.168.1.0/24")
                .build());
    
            final var awsToAivenPeering = AivenFunctions.getAwsVpcPeeringConnection(GetAwsVpcPeeringConnectionArgs.builder()
                .vpcId(exampleVpc.id())
                .awsAccountId(awsId)
                .awsVpcId("vpc-1a2b3c4d5e6f7g8h9")
                .awsVpcRegion("aws-us-east-2")
                .build());
    
        }
    }
    
    resources:
      exampleVpc:
        type: aiven:ProjectVpc
        name: example_vpc
        properties:
          project: ${exampleProject.project}
          cloudName: google-europe-west1
          networkCidr: 192.168.1.0/24
    variables:
      awsToAivenPeering:
        fn::invoke:
          Function: aiven:getAwsVpcPeeringConnection
          Arguments:
            vpcId: ${exampleVpc.id}
            awsAccountId: ${awsId}
            awsVpcId: vpc-1a2b3c4d5e6f7g8h9
            awsVpcRegion: aws-us-east-2
    

    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aiven:index/getAwsVpcPeeringConnection:getAwsVpcPeeringConnection
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AwsAccountId string
    AWS account ID. Changing this property forces recreation of the resource.
    AwsVpcId string
    AWS VPC ID. Changing this property forces recreation of the resource.
    AwsVpcRegion string
    The AWS region of the peered VPC, if different from the Aiven VPC region. Changing this property forces recreation of the resource.
    VpcId string
    The ID of the Aiven VPC. Changing this property forces recreation of the resource.
    AwsAccountId string
    AWS account ID. Changing this property forces recreation of the resource.
    AwsVpcId string
    AWS VPC ID. Changing this property forces recreation of the resource.
    AwsVpcRegion string
    The AWS region of the peered VPC, if different from the Aiven VPC region. Changing this property forces recreation of the resource.
    VpcId string
    The ID of the Aiven VPC. Changing this property forces recreation of the resource.
    awsAccountId String
    AWS account ID. Changing this property forces recreation of the resource.
    awsVpcId String
    AWS VPC ID. Changing this property forces recreation of the resource.
    awsVpcRegion String
    The AWS region of the peered VPC, if different from the Aiven VPC region. Changing this property forces recreation of the resource.
    vpcId String
    The ID of the Aiven VPC. Changing this property forces recreation of the resource.
    awsAccountId string
    AWS account ID. Changing this property forces recreation of the resource.
    awsVpcId string
    AWS VPC ID. Changing this property forces recreation of the resource.
    awsVpcRegion string
    The AWS region of the peered VPC, if different from the Aiven VPC region. Changing this property forces recreation of the resource.
    vpcId string
    The ID of the Aiven VPC. Changing this property forces recreation of the resource.
    aws_account_id str
    AWS account ID. Changing this property forces recreation of the resource.
    aws_vpc_id str
    AWS VPC ID. Changing this property forces recreation of the resource.
    aws_vpc_region str
    The AWS region of the peered VPC, if different from the Aiven VPC region. Changing this property forces recreation of the resource.
    vpc_id str
    The ID of the Aiven VPC. Changing this property forces recreation of the resource.
    awsAccountId String
    AWS account ID. Changing this property forces recreation of the resource.
    awsVpcId String
    AWS VPC ID. Changing this property forces recreation of the resource.
    awsVpcRegion String
    The AWS region of the peered VPC, if different from the Aiven VPC region. Changing this property forces recreation of the resource.
    vpcId String
    The ID of the Aiven VPC. Changing this property forces recreation of the resource.

    getAwsVpcPeeringConnection Result

    The following output properties are available:

    AwsAccountId string
    AWS account ID. Changing this property forces recreation of the resource.
    AwsVpcId string
    AWS VPC ID. Changing this property forces recreation of the resource.
    AwsVpcPeeringConnectionId string
    The ID of the AWS VPC peering connection.
    AwsVpcRegion string
    The AWS region of the peered VPC, if different from the Aiven VPC region. Changing this property forces recreation of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    The state of the peering connection.
    StateInfo Dictionary<string, string>
    State-specific help or error information.
    VpcId string
    The ID of the Aiven VPC. Changing this property forces recreation of the resource.
    AwsAccountId string
    AWS account ID. Changing this property forces recreation of the resource.
    AwsVpcId string
    AWS VPC ID. Changing this property forces recreation of the resource.
    AwsVpcPeeringConnectionId string
    The ID of the AWS VPC peering connection.
    AwsVpcRegion string
    The AWS region of the peered VPC, if different from the Aiven VPC region. Changing this property forces recreation of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    The state of the peering connection.
    StateInfo map[string]string
    State-specific help or error information.
    VpcId string
    The ID of the Aiven VPC. Changing this property forces recreation of the resource.
    awsAccountId String
    AWS account ID. Changing this property forces recreation of the resource.
    awsVpcId String
    AWS VPC ID. Changing this property forces recreation of the resource.
    awsVpcPeeringConnectionId String
    The ID of the AWS VPC peering connection.
    awsVpcRegion String
    The AWS region of the peered VPC, if different from the Aiven VPC region. Changing this property forces recreation of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    The state of the peering connection.
    stateInfo Map<String,String>
    State-specific help or error information.
    vpcId String
    The ID of the Aiven VPC. Changing this property forces recreation of the resource.
    awsAccountId string
    AWS account ID. Changing this property forces recreation of the resource.
    awsVpcId string
    AWS VPC ID. Changing this property forces recreation of the resource.
    awsVpcPeeringConnectionId string
    The ID of the AWS VPC peering connection.
    awsVpcRegion string
    The AWS region of the peered VPC, if different from the Aiven VPC region. Changing this property forces recreation of the resource.
    id string
    The provider-assigned unique ID for this managed resource.
    state string
    The state of the peering connection.
    stateInfo {[key: string]: string}
    State-specific help or error information.
    vpcId string
    The ID of the Aiven VPC. Changing this property forces recreation of the resource.
    aws_account_id str
    AWS account ID. Changing this property forces recreation of the resource.
    aws_vpc_id str
    AWS VPC ID. Changing this property forces recreation of the resource.
    aws_vpc_peering_connection_id str
    The ID of the AWS VPC peering connection.
    aws_vpc_region str
    The AWS region of the peered VPC, if different from the Aiven VPC region. Changing this property forces recreation of the resource.
    id str
    The provider-assigned unique ID for this managed resource.
    state str
    The state of the peering connection.
    state_info Mapping[str, str]
    State-specific help or error information.
    vpc_id str
    The ID of the Aiven VPC. Changing this property forces recreation of the resource.
    awsAccountId String
    AWS account ID. Changing this property forces recreation of the resource.
    awsVpcId String
    AWS VPC ID. Changing this property forces recreation of the resource.
    awsVpcPeeringConnectionId String
    The ID of the AWS VPC peering connection.
    awsVpcRegion String
    The AWS region of the peered VPC, if different from the Aiven VPC region. Changing this property forces recreation of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    The state of the peering connection.
    stateInfo Map<String>
    State-specific help or error information.
    vpcId String
    The ID of the Aiven VPC. Changing this property 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
    Aiven v6.28.0 published on Friday, Nov 15, 2024 by Pulumi