aiven.AwsVpcPeeringConnection
Explore with Pulumi AI
Creates and manages an AWS VPC peering connection with an Aiven VPC.
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: "aws-us-east-2",
networkCidr: "192.168.1.0/24",
});
const awsToAivenPeering = new aiven.AwsVpcPeeringConnection("aws_to_aiven_peering", {
vpcId: exampleVpc.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="aws-us-east-2",
network_cidr="192.168.1.0/24")
aws_to_aiven_peering = aiven.AwsVpcPeeringConnection("aws_to_aiven_peering",
vpc_id=example_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.NewProjectVpc(ctx, "example_vpc", &aiven.ProjectVpcArgs{
Project: pulumi.Any(exampleProject.Project),
CloudName: pulumi.String("aws-us-east-2"),
NetworkCidr: pulumi.String("192.168.1.0/24"),
})
if err != nil {
return err
}
_, err = aiven.NewAwsVpcPeeringConnection(ctx, "aws_to_aiven_peering", &aiven.AwsVpcPeeringConnectionArgs{
VpcId: exampleVpc.ID(),
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.ProjectVpc("example_vpc", new()
{
Project = exampleProject.Project,
CloudName = "aws-us-east-2",
NetworkCidr = "192.168.1.0/24",
});
var awsToAivenPeering = new Aiven.AwsVpcPeeringConnection("aws_to_aiven_peering", 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.AwsVpcPeeringConnection;
import com.pulumi.aiven.AwsVpcPeeringConnectionArgs;
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("aws-us-east-2")
.networkCidr("192.168.1.0/24")
.build());
var awsToAivenPeering = new AwsVpcPeeringConnection("awsToAivenPeering", AwsVpcPeeringConnectionArgs.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: aws-us-east-2
networkCidr: 192.168.1.0/24
awsToAivenPeering:
type: aiven:AwsVpcPeeringConnection
name: aws_to_aiven_peering
properties:
vpcId: ${exampleVpc.id}
awsAccountId: ${awsId}
awsVpcId: vpc-1a2b3c4d5e6f7g8h9
awsVpcRegion: aws-us-east-2
Create AwsVpcPeeringConnection Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AwsVpcPeeringConnection(name: string, args: AwsVpcPeeringConnectionArgs, opts?: CustomResourceOptions);
@overload
def AwsVpcPeeringConnection(resource_name: str,
args: AwsVpcPeeringConnectionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AwsVpcPeeringConnection(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,
vpc_id: Optional[str] = None)
func NewAwsVpcPeeringConnection(ctx *Context, name string, args AwsVpcPeeringConnectionArgs, opts ...ResourceOption) (*AwsVpcPeeringConnection, error)
public AwsVpcPeeringConnection(string name, AwsVpcPeeringConnectionArgs args, CustomResourceOptions? opts = null)
public AwsVpcPeeringConnection(String name, AwsVpcPeeringConnectionArgs args)
public AwsVpcPeeringConnection(String name, AwsVpcPeeringConnectionArgs args, CustomResourceOptions options)
type: aiven:AwsVpcPeeringConnection
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 AwsVpcPeeringConnectionArgs
- 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 AwsVpcPeeringConnectionArgs
- 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 AwsVpcPeeringConnectionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AwsVpcPeeringConnectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AwsVpcPeeringConnectionArgs
- 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 awsVpcPeeringConnectionResource = new Aiven.AwsVpcPeeringConnection("awsVpcPeeringConnectionResource", new()
{
AwsAccountId = "string",
AwsVpcId = "string",
AwsVpcRegion = "string",
VpcId = "string",
});
example, err := aiven.NewAwsVpcPeeringConnection(ctx, "awsVpcPeeringConnectionResource", &aiven.AwsVpcPeeringConnectionArgs{
AwsAccountId: pulumi.String("string"),
AwsVpcId: pulumi.String("string"),
AwsVpcRegion: pulumi.String("string"),
VpcId: pulumi.String("string"),
})
var awsVpcPeeringConnectionResource = new AwsVpcPeeringConnection("awsVpcPeeringConnectionResource", AwsVpcPeeringConnectionArgs.builder()
.awsAccountId("string")
.awsVpcId("string")
.awsVpcRegion("string")
.vpcId("string")
.build());
aws_vpc_peering_connection_resource = aiven.AwsVpcPeeringConnection("awsVpcPeeringConnectionResource",
aws_account_id="string",
aws_vpc_id="string",
aws_vpc_region="string",
vpc_id="string")
const awsVpcPeeringConnectionResource = new aiven.AwsVpcPeeringConnection("awsVpcPeeringConnectionResource", {
awsAccountId: "string",
awsVpcId: "string",
awsVpcRegion: "string",
vpcId: "string",
});
type: aiven:AwsVpcPeeringConnection
properties:
awsAccountId: string
awsVpcId: string
awsVpcRegion: string
vpcId: string
AwsVpcPeeringConnection 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 AwsVpcPeeringConnection resource accepts the following input properties:
- Aws
Account stringId - AWS account ID. Changing this property forces recreation of the resource.
- Aws
Vpc stringId - AWS VPC ID. Changing this property forces recreation of the resource.
- Aws
Vpc stringRegion - The AWS region of the peered VPC, if different from the Aiven VPC region. Changing this property forces recreation of the resource.
- Vpc
Id string - The ID of the Aiven VPC. Changing this property forces recreation of the resource.
- Aws
Account stringId - AWS account ID. Changing this property forces recreation of the resource.
- Aws
Vpc stringId - AWS VPC ID. Changing this property forces recreation of the resource.
- Aws
Vpc stringRegion - The AWS region of the peered VPC, if different from the Aiven VPC region. Changing this property forces recreation of the resource.
- Vpc
Id string - The ID of the Aiven VPC. Changing this property forces recreation of the resource.
- aws
Account StringId - AWS account ID. Changing this property forces recreation of the resource.
- aws
Vpc StringId - AWS VPC ID. Changing this property forces recreation of the resource.
- aws
Vpc StringRegion - The AWS region of the peered VPC, if different from the Aiven VPC region. Changing this property forces recreation of the resource.
- vpc
Id String - The ID of the Aiven VPC. Changing this property forces recreation of the resource.
- aws
Account stringId - AWS account ID. Changing this property forces recreation of the resource.
- aws
Vpc stringId - AWS VPC ID. Changing this property forces recreation of the resource.
- aws
Vpc stringRegion - The AWS region of the peered VPC, if different from the Aiven VPC region. Changing this property forces recreation of the resource.
- vpc
Id string - The ID of the Aiven VPC. Changing this property forces recreation of the resource.
- 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, 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.
- aws
Account StringId - AWS account ID. Changing this property forces recreation of the resource.
- aws
Vpc StringId - AWS VPC ID. Changing this property forces recreation of the resource.
- aws
Vpc StringRegion - The AWS region of the peered VPC, if different from the Aiven VPC region. Changing this property forces recreation of the resource.
- vpc
Id String - The ID of the Aiven VPC. Changing this property forces recreation of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the AwsVpcPeeringConnection resource produces the following output properties:
- Aws
Vpc stringPeering Connection Id - The ID of the AWS VPC peering connection.
- Id string
- The provider-assigned unique ID for this managed resource.
- State string
- The state of the peering connection.
- State
Info Dictionary<string, string> - State-specific help or error information.
- Aws
Vpc stringPeering Connection Id - The ID of the AWS VPC peering connection.
- Id string
- The provider-assigned unique ID for this managed resource.
- State string
- The state of the peering connection.
- State
Info map[string]string - State-specific help or error information.
- aws
Vpc StringPeering Connection Id - The ID of the AWS VPC peering connection.
- id String
- The provider-assigned unique ID for this managed resource.
- state String
- The state of the peering connection.
- state
Info Map<String,String> - State-specific help or error information.
- aws
Vpc stringPeering Connection Id - The ID of the AWS VPC peering connection.
- id string
- The provider-assigned unique ID for this managed resource.
- state string
- The state of the peering connection.
- state
Info {[key: string]: string} - State-specific help or error information.
- aws_
vpc_ strpeering_ connection_ id - The ID of the AWS VPC peering connection.
- 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.
- aws
Vpc StringPeering Connection Id - The ID of the AWS VPC peering connection.
- id String
- The provider-assigned unique ID for this managed resource.
- state String
- The state of the peering connection.
- state
Info Map<String> - State-specific help or error information.
Look up Existing AwsVpcPeeringConnection Resource
Get an existing AwsVpcPeeringConnection 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?: AwsVpcPeeringConnectionState, opts?: CustomResourceOptions): AwsVpcPeeringConnection
@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,
state: Optional[str] = None,
state_info: Optional[Mapping[str, str]] = None,
vpc_id: Optional[str] = None) -> AwsVpcPeeringConnection
func GetAwsVpcPeeringConnection(ctx *Context, name string, id IDInput, state *AwsVpcPeeringConnectionState, opts ...ResourceOption) (*AwsVpcPeeringConnection, error)
public static AwsVpcPeeringConnection Get(string name, Input<string> id, AwsVpcPeeringConnectionState? state, CustomResourceOptions? opts = null)
public static AwsVpcPeeringConnection get(String name, Output<String> id, AwsVpcPeeringConnectionState 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.
- Aws
Account stringId - AWS account ID. Changing this property forces recreation of the resource.
- Aws
Vpc stringId - AWS VPC ID. Changing this property forces recreation of the resource.
- Aws
Vpc stringPeering Connection Id - The ID of the AWS VPC peering connection.
- Aws
Vpc stringRegion - The AWS region of the peered VPC, if different from the Aiven VPC region. Changing this property forces recreation of the resource.
- State string
- The state of the peering connection.
- State
Info Dictionary<string, string> - State-specific help or error information.
- Vpc
Id string - The ID of the Aiven VPC. Changing this property forces recreation of the resource.
- Aws
Account stringId - AWS account ID. Changing this property forces recreation of the resource.
- Aws
Vpc stringId - AWS VPC ID. Changing this property forces recreation of the resource.
- Aws
Vpc stringPeering Connection Id - The ID of the AWS VPC peering connection.
- Aws
Vpc stringRegion - The AWS region of the peered VPC, if different from the Aiven VPC region. Changing this property forces recreation of the resource.
- State string
- The state of the peering connection.
- State
Info map[string]string - State-specific help or error information.
- Vpc
Id string - The ID of the Aiven VPC. Changing this property forces recreation of the resource.
- aws
Account StringId - AWS account ID. Changing this property forces recreation of the resource.
- aws
Vpc StringId - AWS VPC ID. Changing this property forces recreation of the resource.
- aws
Vpc StringPeering Connection Id - The ID of the AWS VPC peering connection.
- aws
Vpc StringRegion - The AWS region of the peered VPC, if different from the Aiven VPC region. Changing this property forces recreation of the resource.
- state String
- The state of the peering connection.
- state
Info Map<String,String> - State-specific help or error information.
- vpc
Id String - The ID of the Aiven VPC. Changing this property forces recreation of the resource.
- aws
Account stringId - AWS account ID. Changing this property forces recreation of the resource.
- aws
Vpc stringId - AWS VPC ID. Changing this property forces recreation of the resource.
- aws
Vpc stringPeering Connection Id - The ID of the AWS VPC peering connection.
- aws
Vpc stringRegion - The AWS region of the peered VPC, if different from the Aiven VPC region. Changing this property forces recreation of the resource.
- state string
- The state of the peering connection.
- state
Info {[key: string]: string} - State-specific help or error information.
- vpc
Id string - The ID of the Aiven VPC. Changing this property forces recreation of the resource.
- 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, if different from the Aiven VPC region. Changing this property forces recreation of the 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.
- aws
Account StringId - AWS account ID. Changing this property forces recreation of the resource.
- aws
Vpc StringId - AWS VPC ID. Changing this property forces recreation of the resource.
- aws
Vpc StringPeering Connection Id - The ID of the AWS VPC peering connection.
- aws
Vpc StringRegion - The AWS region of the peered VPC, if different from the Aiven VPC region. Changing this property forces recreation of the resource.
- state String
- The state of the peering connection.
- state
Info Map<String> - State-specific help or error information.
- vpc
Id String - The ID of the Aiven VPC. Changing this property forces recreation of the resource.
Import
$ pulumi import aiven:index/awsVpcPeeringConnection:AwsVpcPeeringConnection aws_to_aiven_peering PROJECT/VPC_ID/AWS_ACCOUNT_ID/AWS_VPC_ID/AWS_VPC_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
aiven
Terraform Provider.