aiven.AwsOrgVpcPeeringConnection
Explore with Pulumi AI
Creates and manages an AWS VPC peering connection with an Aiven Organization VPC.
This resource is in the beta stage and may change without notice. Set
the PROVIDER_AIVEN_ENABLE_BETA environment variable to use the resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aiven from "@pulumi/aiven";
const exampleVpc = new aiven.OrganizationVpc("example_vpc", {
    organizationId: example.id,
    cloudName: "aws-eu-central-1",
    networkCidr: "10.0.0.0/24",
});
const examplePeering = new aiven.AwsOrgVpcPeeringConnection("example_peering", {
    organizationId: exampleVpc.organizationId,
    organizationVpcId: exampleVpc.organizationVpcId,
    awsAccountId: awsId,
    awsVpcId: "vpc-1a2b3c4d5e6f7g8h9",
    awsVpcRegion: "aws-us-east-2",
});
import pulumi
import pulumi_aiven as aiven
example_vpc = aiven.OrganizationVpc("example_vpc",
    organization_id=example["id"],
    cloud_name="aws-eu-central-1",
    network_cidr="10.0.0.0/24")
example_peering = aiven.AwsOrgVpcPeeringConnection("example_peering",
    organization_id=example_vpc.organization_id,
    organization_vpc_id=example_vpc.organization_vpc_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.NewOrganizationVpc(ctx, "example_vpc", &aiven.OrganizationVpcArgs{
			OrganizationId: pulumi.Any(example.Id),
			CloudName:      pulumi.String("aws-eu-central-1"),
			NetworkCidr:    pulumi.String("10.0.0.0/24"),
		})
		if err != nil {
			return err
		}
		_, err = aiven.NewAwsOrgVpcPeeringConnection(ctx, "example_peering", &aiven.AwsOrgVpcPeeringConnectionArgs{
			OrganizationId:    exampleVpc.OrganizationId,
			OrganizationVpcId: exampleVpc.OrganizationVpcId,
			AwsAccountId:      pulumi.Any(awsId),
			AwsVpcId:          pulumi.String("vpc-1a2b3c4d5e6f7g8h9"),
			AwsVpcRegion:      pulumi.String("aws-us-east-2"),
		})
		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.OrganizationVpc("example_vpc", new()
    {
        OrganizationId = example.Id,
        CloudName = "aws-eu-central-1",
        NetworkCidr = "10.0.0.0/24",
    });
    var examplePeering = new Aiven.AwsOrgVpcPeeringConnection("example_peering", new()
    {
        OrganizationId = exampleVpc.OrganizationId,
        OrganizationVpcId = exampleVpc.OrganizationVpcId,
        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.OrganizationVpc;
import com.pulumi.aiven.OrganizationVpcArgs;
import com.pulumi.aiven.AwsOrgVpcPeeringConnection;
import com.pulumi.aiven.AwsOrgVpcPeeringConnectionArgs;
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 OrganizationVpc("exampleVpc", OrganizationVpcArgs.builder()
            .organizationId(example.id())
            .cloudName("aws-eu-central-1")
            .networkCidr("10.0.0.0/24")
            .build());
        var examplePeering = new AwsOrgVpcPeeringConnection("examplePeering", AwsOrgVpcPeeringConnectionArgs.builder()
            .organizationId(exampleVpc.organizationId())
            .organizationVpcId(exampleVpc.organizationVpcId())
            .awsAccountId(awsId)
            .awsVpcId("vpc-1a2b3c4d5e6f7g8h9")
            .awsVpcRegion("aws-us-east-2")
            .build());
    }
}
resources:
  exampleVpc:
    type: aiven:OrganizationVpc
    name: example_vpc
    properties:
      organizationId: ${example.id}
      cloudName: aws-eu-central-1
      networkCidr: 10.0.0.0/24
  examplePeering:
    type: aiven:AwsOrgVpcPeeringConnection
    name: example_peering
    properties:
      organizationId: ${exampleVpc.organizationId}
      organizationVpcId: ${exampleVpc.organizationVpcId}
      awsAccountId: ${awsId}
      awsVpcId: vpc-1a2b3c4d5e6f7g8h9
      awsVpcRegion: aws-us-east-2
Create AwsOrgVpcPeeringConnection Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AwsOrgVpcPeeringConnection(name: string, args: AwsOrgVpcPeeringConnectionArgs, opts?: CustomResourceOptions);@overload
def AwsOrgVpcPeeringConnection(resource_name: str,
                               args: AwsOrgVpcPeeringConnectionArgs,
                               opts: Optional[ResourceOptions] = None)
@overload
def AwsOrgVpcPeeringConnection(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               aws_account_id: Optional[str] = None,
                               aws_vpc_id: Optional[str] = None,
                               aws_vpc_region: Optional[str] = None,
                               organization_id: Optional[str] = None,
                               organization_vpc_id: Optional[str] = None)func NewAwsOrgVpcPeeringConnection(ctx *Context, name string, args AwsOrgVpcPeeringConnectionArgs, opts ...ResourceOption) (*AwsOrgVpcPeeringConnection, error)public AwsOrgVpcPeeringConnection(string name, AwsOrgVpcPeeringConnectionArgs args, CustomResourceOptions? opts = null)
public AwsOrgVpcPeeringConnection(String name, AwsOrgVpcPeeringConnectionArgs args)
public AwsOrgVpcPeeringConnection(String name, AwsOrgVpcPeeringConnectionArgs args, CustomResourceOptions options)
type: aiven:AwsOrgVpcPeeringConnection
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 AwsOrgVpcPeeringConnectionArgs
- 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 AwsOrgVpcPeeringConnectionArgs
- 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 AwsOrgVpcPeeringConnectionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AwsOrgVpcPeeringConnectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AwsOrgVpcPeeringConnectionArgs
- 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 awsOrgVpcPeeringConnectionResource = new Aiven.AwsOrgVpcPeeringConnection("awsOrgVpcPeeringConnectionResource", new()
{
    AwsAccountId = "string",
    AwsVpcId = "string",
    AwsVpcRegion = "string",
    OrganizationId = "string",
    OrganizationVpcId = "string",
});
example, err := aiven.NewAwsOrgVpcPeeringConnection(ctx, "awsOrgVpcPeeringConnectionResource", &aiven.AwsOrgVpcPeeringConnectionArgs{
	AwsAccountId:      pulumi.String("string"),
	AwsVpcId:          pulumi.String("string"),
	AwsVpcRegion:      pulumi.String("string"),
	OrganizationId:    pulumi.String("string"),
	OrganizationVpcId: pulumi.String("string"),
})
var awsOrgVpcPeeringConnectionResource = new AwsOrgVpcPeeringConnection("awsOrgVpcPeeringConnectionResource", AwsOrgVpcPeeringConnectionArgs.builder()
    .awsAccountId("string")
    .awsVpcId("string")
    .awsVpcRegion("string")
    .organizationId("string")
    .organizationVpcId("string")
    .build());
aws_org_vpc_peering_connection_resource = aiven.AwsOrgVpcPeeringConnection("awsOrgVpcPeeringConnectionResource",
    aws_account_id="string",
    aws_vpc_id="string",
    aws_vpc_region="string",
    organization_id="string",
    organization_vpc_id="string")
const awsOrgVpcPeeringConnectionResource = new aiven.AwsOrgVpcPeeringConnection("awsOrgVpcPeeringConnectionResource", {
    awsAccountId: "string",
    awsVpcId: "string",
    awsVpcRegion: "string",
    organizationId: "string",
    organizationVpcId: "string",
});
type: aiven:AwsOrgVpcPeeringConnection
properties:
    awsAccountId: string
    awsVpcId: string
    awsVpcRegion: string
    organizationId: string
    organizationVpcId: string
AwsOrgVpcPeeringConnection 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 AwsOrgVpcPeeringConnection resource accepts the following input properties:
- AwsAccount stringId 
- AWS account ID. Changing this property forces recreation of the resource.
- AwsVpc stringId 
- AWS VPC ID. Changing this property forces recreation of the resource.
- AwsVpc stringRegion 
- The AWS region of the peered VPC. For example, eu-central-1.
- OrganizationId string
- Identifier of the organization.
- OrganizationVpc stringId 
- Identifier of the organization VPC.
- AwsAccount stringId 
- AWS account ID. Changing this property forces recreation of the resource.
- AwsVpc stringId 
- AWS VPC ID. Changing this property forces recreation of the resource.
- AwsVpc stringRegion 
- The AWS region of the peered VPC. For example, eu-central-1.
- OrganizationId string
- Identifier of the organization.
- OrganizationVpc stringId 
- Identifier of the organization VPC.
- awsAccount StringId 
- AWS account ID. Changing this property forces recreation of the resource.
- awsVpc StringId 
- AWS VPC ID. Changing this property forces recreation of the resource.
- awsVpc StringRegion 
- The AWS region of the peered VPC. For example, eu-central-1.
- organizationId String
- Identifier of the organization.
- organizationVpc StringId 
- Identifier of the organization VPC.
- awsAccount stringId 
- AWS account ID. Changing this property forces recreation of the resource.
- awsVpc stringId 
- AWS VPC ID. Changing this property forces recreation of the resource.
- awsVpc stringRegion 
- The AWS region of the peered VPC. For example, eu-central-1.
- organizationId string
- Identifier of the organization.
- organizationVpc stringId 
- Identifier of the organization VPC.
- aws_account_ strid 
- AWS account ID. Changing this property forces recreation of the resource.
- aws_vpc_ strid 
- AWS VPC ID. Changing this property forces recreation of the resource.
- aws_vpc_ strregion 
- The AWS region of the peered VPC. For example, eu-central-1.
- organization_id str
- Identifier of the organization.
- organization_vpc_ strid 
- Identifier of the organization VPC.
- awsAccount StringId 
- AWS account ID. Changing this property forces recreation of the resource.
- awsVpc StringId 
- AWS VPC ID. Changing this property forces recreation of the resource.
- awsVpc StringRegion 
- The AWS region of the peered VPC. For example, eu-central-1.
- organizationId String
- Identifier of the organization.
- organizationVpc StringId 
- Identifier of the organization VPC.
Outputs
All input properties are implicitly available as output properties. Additionally, the AwsOrgVpcPeeringConnection resource produces the following output properties:
- AwsVpc stringPeering Connection Id 
- The ID of the AWS VPC peering connection.
- Id string
- The provider-assigned unique ID for this managed resource.
- PeeringConnection stringId 
- The ID of the peering connection.
- State string
- State of the peering connection. The possible values are ACTIVE,APPROVED,APPROVED_PEER_REQUESTED,DELETED,DELETED_BY_PEER,DELETING,ERROR,INVALID_SPECIFICATION,PENDING_PEERandREJECTED_BY_PEER.
- AwsVpc stringPeering Connection Id 
- The ID of the AWS VPC peering connection.
- Id string
- The provider-assigned unique ID for this managed resource.
- PeeringConnection stringId 
- The ID of the peering connection.
- State string
- State of the peering connection. The possible values are ACTIVE,APPROVED,APPROVED_PEER_REQUESTED,DELETED,DELETED_BY_PEER,DELETING,ERROR,INVALID_SPECIFICATION,PENDING_PEERandREJECTED_BY_PEER.
- awsVpc StringPeering Connection Id 
- The ID of the AWS VPC peering connection.
- id String
- The provider-assigned unique ID for this managed resource.
- peeringConnection StringId 
- The ID of the peering connection.
- state String
- State of the peering connection. The possible values are ACTIVE,APPROVED,APPROVED_PEER_REQUESTED,DELETED,DELETED_BY_PEER,DELETING,ERROR,INVALID_SPECIFICATION,PENDING_PEERandREJECTED_BY_PEER.
- awsVpc stringPeering Connection Id 
- The ID of the AWS VPC peering connection.
- id string
- The provider-assigned unique ID for this managed resource.
- peeringConnection stringId 
- The ID of the peering connection.
- state string
- State of the peering connection. The possible values are ACTIVE,APPROVED,APPROVED_PEER_REQUESTED,DELETED,DELETED_BY_PEER,DELETING,ERROR,INVALID_SPECIFICATION,PENDING_PEERandREJECTED_BY_PEER.
- aws_vpc_ strpeering_ connection_ id 
- The ID of the AWS VPC peering connection.
- id str
- The provider-assigned unique ID for this managed resource.
- peering_connection_ strid 
- The ID of the peering connection.
- state str
- State of the peering connection. The possible values are ACTIVE,APPROVED,APPROVED_PEER_REQUESTED,DELETED,DELETED_BY_PEER,DELETING,ERROR,INVALID_SPECIFICATION,PENDING_PEERandREJECTED_BY_PEER.
- awsVpc StringPeering Connection Id 
- The ID of the AWS VPC peering connection.
- id String
- The provider-assigned unique ID for this managed resource.
- peeringConnection StringId 
- The ID of the peering connection.
- state String
- State of the peering connection. The possible values are ACTIVE,APPROVED,APPROVED_PEER_REQUESTED,DELETED,DELETED_BY_PEER,DELETING,ERROR,INVALID_SPECIFICATION,PENDING_PEERandREJECTED_BY_PEER.
Look up Existing AwsOrgVpcPeeringConnection Resource
Get an existing AwsOrgVpcPeeringConnection 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?: AwsOrgVpcPeeringConnectionState, opts?: CustomResourceOptions): AwsOrgVpcPeeringConnection@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        aws_account_id: Optional[str] = None,
        aws_vpc_id: Optional[str] = None,
        aws_vpc_peering_connection_id: Optional[str] = None,
        aws_vpc_region: Optional[str] = None,
        organization_id: Optional[str] = None,
        organization_vpc_id: Optional[str] = None,
        peering_connection_id: Optional[str] = None,
        state: Optional[str] = None) -> AwsOrgVpcPeeringConnectionfunc GetAwsOrgVpcPeeringConnection(ctx *Context, name string, id IDInput, state *AwsOrgVpcPeeringConnectionState, opts ...ResourceOption) (*AwsOrgVpcPeeringConnection, error)public static AwsOrgVpcPeeringConnection Get(string name, Input<string> id, AwsOrgVpcPeeringConnectionState? state, CustomResourceOptions? opts = null)public static AwsOrgVpcPeeringConnection get(String name, Output<String> id, AwsOrgVpcPeeringConnectionState state, CustomResourceOptions options)resources:  _:    type: aiven:AwsOrgVpcPeeringConnection    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.
- AwsAccount stringId 
- AWS account ID. Changing this property forces recreation of the resource.
- AwsVpc stringId 
- AWS VPC ID. Changing this property forces recreation of the resource.
- AwsVpc stringPeering Connection Id 
- The ID of the AWS VPC peering connection.
- AwsVpc stringRegion 
- The AWS region of the peered VPC. For example, eu-central-1.
- OrganizationId string
- Identifier of the organization.
- OrganizationVpc stringId 
- Identifier of the organization VPC.
- PeeringConnection stringId 
- The ID of the peering connection.
- State string
- State of the peering connection. The possible values are ACTIVE,APPROVED,APPROVED_PEER_REQUESTED,DELETED,DELETED_BY_PEER,DELETING,ERROR,INVALID_SPECIFICATION,PENDING_PEERandREJECTED_BY_PEER.
- AwsAccount stringId 
- AWS account ID. Changing this property forces recreation of the resource.
- AwsVpc stringId 
- AWS VPC ID. Changing this property forces recreation of the resource.
- AwsVpc stringPeering Connection Id 
- The ID of the AWS VPC peering connection.
- AwsVpc stringRegion 
- The AWS region of the peered VPC. For example, eu-central-1.
- OrganizationId string
- Identifier of the organization.
- OrganizationVpc stringId 
- Identifier of the organization VPC.
- PeeringConnection stringId 
- The ID of the peering connection.
- State string
- State of the peering connection. The possible values are ACTIVE,APPROVED,APPROVED_PEER_REQUESTED,DELETED,DELETED_BY_PEER,DELETING,ERROR,INVALID_SPECIFICATION,PENDING_PEERandREJECTED_BY_PEER.
- awsAccount StringId 
- AWS account ID. Changing this property forces recreation of the resource.
- awsVpc StringId 
- AWS VPC ID. Changing this property forces recreation of the resource.
- awsVpc StringPeering Connection Id 
- The ID of the AWS VPC peering connection.
- awsVpc StringRegion 
- The AWS region of the peered VPC. For example, eu-central-1.
- organizationId String
- Identifier of the organization.
- organizationVpc StringId 
- Identifier of the organization VPC.
- peeringConnection StringId 
- The ID of the peering connection.
- state String
- State of the peering connection. The possible values are ACTIVE,APPROVED,APPROVED_PEER_REQUESTED,DELETED,DELETED_BY_PEER,DELETING,ERROR,INVALID_SPECIFICATION,PENDING_PEERandREJECTED_BY_PEER.
- awsAccount stringId 
- AWS account ID. Changing this property forces recreation of the resource.
- awsVpc stringId 
- AWS VPC ID. Changing this property forces recreation of the resource.
- awsVpc stringPeering Connection Id 
- The ID of the AWS VPC peering connection.
- awsVpc stringRegion 
- The AWS region of the peered VPC. For example, eu-central-1.
- organizationId string
- Identifier of the organization.
- organizationVpc stringId 
- Identifier of the organization VPC.
- peeringConnection stringId 
- The ID of the peering connection.
- state string
- State of the peering connection. The possible values are ACTIVE,APPROVED,APPROVED_PEER_REQUESTED,DELETED,DELETED_BY_PEER,DELETING,ERROR,INVALID_SPECIFICATION,PENDING_PEERandREJECTED_BY_PEER.
- aws_account_ strid 
- AWS account ID. Changing this property forces recreation of the resource.
- aws_vpc_ strid 
- AWS VPC ID. Changing this property forces recreation of the resource.
- aws_vpc_ strpeering_ connection_ id 
- The ID of the AWS VPC peering connection.
- aws_vpc_ strregion 
- The AWS region of the peered VPC. For example, eu-central-1.
- organization_id str
- Identifier of the organization.
- organization_vpc_ strid 
- Identifier of the organization VPC.
- peering_connection_ strid 
- The ID of the peering connection.
- state str
- State of the peering connection. The possible values are ACTIVE,APPROVED,APPROVED_PEER_REQUESTED,DELETED,DELETED_BY_PEER,DELETING,ERROR,INVALID_SPECIFICATION,PENDING_PEERandREJECTED_BY_PEER.
- awsAccount StringId 
- AWS account ID. Changing this property forces recreation of the resource.
- awsVpc StringId 
- AWS VPC ID. Changing this property forces recreation of the resource.
- awsVpc StringPeering Connection Id 
- The ID of the AWS VPC peering connection.
- awsVpc StringRegion 
- The AWS region of the peered VPC. For example, eu-central-1.
- organizationId String
- Identifier of the organization.
- organizationVpc StringId 
- Identifier of the organization VPC.
- peeringConnection StringId 
- The ID of the peering connection.
- state String
- State of the peering connection. The possible values are ACTIVE,APPROVED,APPROVED_PEER_REQUESTED,DELETED,DELETED_BY_PEER,DELETING,ERROR,INVALID_SPECIFICATION,PENDING_PEERandREJECTED_BY_PEER.
Import
$ pulumi import aiven:index/awsOrgVpcPeeringConnection:AwsOrgVpcPeeringConnection example ORGANIZATION_ID/ORGANIZATION_VPC_ID/AWS_ACCOUNT_ID/AWS_VPC_ID/AWS_REGION
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 aivenTerraform Provider.