1. Packages
  2. Timescale Provider
  3. API Docs
  4. PeeringConnection
timescale 2.3.0 published on Thursday, Jun 12, 2025 by timescale

timescale.PeeringConnection

Explore with Pulumi AI

timescale logo
timescale 2.3.0 published on Thursday, Jun 12, 2025 by timescale

    Schema for a peering connection (VPC or Transit Gateway). Import can be done with peering_connection_id,timescale_vpc_id format. Both internal IDs can be retrieved using the timescale.Vpcs datasource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    import * as time from "@pulumi/time";
    import * as timescale from "@pulumi/timescale";
    
    const config = new pulumi.Config();
    const tsProjectId = config.require("tsProjectId");
    const tsAccessKey = config.require("tsAccessKey");
    const tsSecretKey = config.require("tsSecretKey");
    // Create a Timescale VPC
    const ts_test = new timescale.Vpcs("ts-test", {
        cidr: "10.0.0.0/24",
        regionCode: "us-east-1",
    });
    // Creating a test VPC in eu-central-1
    const main = new aws.index.Aws_vpc("main", {
        cidrBlock: "11.0.0.0/24",
        tags: {
            Name: "tf-test-vpc-peering",
        },
    });
    // Requester's side of the VPC peering connection (Timescale).
    const vpcPeerPeeringConnection = new timescale.PeeringConnection("vpcPeerPeeringConnection", {
        peerAccountId: "000000000000",
        peerRegionCode: "eu-central-1",
        peerVpcId: main.id,
        peerCidrBlocks: [
            "12.0.0.0/24",
            "12.1.0.0/24",
        ],
        timescaleVpcId: ts_test.vpcsId,
    });
    // Acceptor's side of the VPC peering connection (AWS).
    const vpcPeeraws_vpc_peering_connection_accepter = new aws.index.Aws_vpc_peering_connection_accepter("vpcPeeraws_vpc_peering_connection_accepter", {
        vpcPeeringConnectionId: vpcPeerPeeringConnection.provisionedId,
        autoAccept: true,
    });
    // ========================================
    // Transit Gateway Peering Example
    // ========================================
    // Wait for VPC peering to be fully established before creating TGW peering
    const waitForVpcPeering = new time.index.Time_sleep("waitForVpcPeering", {createDuration: "120s"}, {
        dependsOn: [vpcPeeraws_vpc_peering_connection_accepter],
    });
    // Create a test Transit Gateway in eu-central-1
    const tgw = new aws.index.Aws_ec2_transit_gateway("tgw", {
        description: "TGW for Timescale peering",
        tags: {
            Name: "tf-test-tgw",
        },
    });
    // Create Transit Gateway peering with Timescale
    const tgwPeerPeeringConnection = new timescale.PeeringConnection("tgwPeerPeeringConnection", {
        peerAccountId: "000000000000",
        peerRegionCode: "eu-central-1",
        peerTgwId: tgw.id,
        peerCidrBlocks: [
            "16.0.0.0/24",
            "16.1.0.0/24",
        ],
        timescaleVpcId: ts_test.vpcsId,
    }, {
        dependsOn: [waitForVpcPeering],
    });
    // Wait for TGW peering attachment to propagate to AWS
    const waitForTgwAttachment = new time.index.Time_sleep("waitForTgwAttachment", {createDuration: "120s"}, {
        dependsOn: [tgwPeerPeeringConnection],
    });
    // Accept the Transit Gateway attachment
    const tgwPeeraws_ec2_transit_gateway_peering_attachment_accepter = new aws.index.Aws_ec2_transit_gateway_peering_attachment_accepter("tgwPeeraws_ec2_transit_gateway_peering_attachment_accepter", {transitGatewayAttachmentId: tgwPeerPeeringConnection.provisionedId}, {
        dependsOn: [waitForTgwAttachment],
    });
    
    import pulumi
    import pulumi_aws as aws
    import pulumi_time as time
    import pulumi_timescale as timescale
    
    config = pulumi.Config()
    ts_project_id = config.require("tsProjectId")
    ts_access_key = config.require("tsAccessKey")
    ts_secret_key = config.require("tsSecretKey")
    # Create a Timescale VPC
    ts_test = timescale.Vpcs("ts-test",
        cidr="10.0.0.0/24",
        region_code="us-east-1")
    # Creating a test VPC in eu-central-1
    main = aws.index.Aws_vpc("main",
        cidr_block=11.0.0.0/24,
        tags={
            Name: tf-test-vpc-peering,
        })
    # Requester's side of the VPC peering connection (Timescale).
    vpc_peer_peering_connection = timescale.PeeringConnection("vpcPeerPeeringConnection",
        peer_account_id="000000000000",
        peer_region_code="eu-central-1",
        peer_vpc_id=main["id"],
        peer_cidr_blocks=[
            "12.0.0.0/24",
            "12.1.0.0/24",
        ],
        timescale_vpc_id=ts_test.vpcs_id)
    # Acceptor's side of the VPC peering connection (AWS).
    vpc_peeraws_vpc_peering_connection_accepter = aws.index.Aws_vpc_peering_connection_accepter("vpcPeeraws_vpc_peering_connection_accepter",
        vpc_peering_connection_id=vpc_peer_peering_connection.provisioned_id,
        auto_accept=True)
    # ========================================
    # Transit Gateway Peering Example
    # ========================================
    # Wait for VPC peering to be fully established before creating TGW peering
    wait_for_vpc_peering = time.index.Time_sleep("waitForVpcPeering", create_duration=120s,
    opts = pulumi.ResourceOptions(depends_on=[vpc_peeraws_vpc_peering_connection_accepter]))
    # Create a test Transit Gateway in eu-central-1
    tgw = aws.index.Aws_ec2_transit_gateway("tgw",
        description=TGW for Timescale peering,
        tags={
            Name: tf-test-tgw,
        })
    # Create Transit Gateway peering with Timescale
    tgw_peer_peering_connection = timescale.PeeringConnection("tgwPeerPeeringConnection",
        peer_account_id="000000000000",
        peer_region_code="eu-central-1",
        peer_tgw_id=tgw["id"],
        peer_cidr_blocks=[
            "16.0.0.0/24",
            "16.1.0.0/24",
        ],
        timescale_vpc_id=ts_test.vpcs_id,
        opts = pulumi.ResourceOptions(depends_on=[wait_for_vpc_peering]))
    # Wait for TGW peering attachment to propagate to AWS
    wait_for_tgw_attachment = time.index.Time_sleep("waitForTgwAttachment", create_duration=120s,
    opts = pulumi.ResourceOptions(depends_on=[tgw_peer_peering_connection]))
    # Accept the Transit Gateway attachment
    tgw_peeraws_ec2_transit_gateway_peering_attachment_accepter = aws.index.Aws_ec2_transit_gateway_peering_attachment_accepter("tgwPeeraws_ec2_transit_gateway_peering_attachment_accepter", transit_gateway_attachment_id=tgw_peer_peering_connection.provisioned_id,
    opts = pulumi.ResourceOptions(depends_on=[wait_for_tgw_attachment]))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/go/aws"
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/timescale/v2/timescale"
    	"github.com/pulumi/pulumi-time/sdk/go/time"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		tsProjectId := cfg.Require("tsProjectId")
    		tsAccessKey := cfg.Require("tsAccessKey")
    		tsSecretKey := cfg.Require("tsSecretKey")
    		// Create a Timescale VPC
    		ts_test, err := timescale.NewVpcs(ctx, "ts-test", &timescale.VpcsArgs{
    			Cidr:       pulumi.String("10.0.0.0/24"),
    			RegionCode: pulumi.String("us-east-1"),
    		})
    		if err != nil {
    			return err
    		}
    		// Creating a test VPC in eu-central-1
    		main, err := aws.NewAws_vpc(ctx, "main", &aws.Aws_vpcArgs{
    			CidrBlock: "11.0.0.0/24",
    			Tags: map[string]interface{}{
    				"Name": "tf-test-vpc-peering",
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// Requester's side of the VPC peering connection (Timescale).
    		vpcPeerPeeringConnection, err := timescale.NewPeeringConnection(ctx, "vpcPeerPeeringConnection", &timescale.PeeringConnectionArgs{
    			PeerAccountId:  pulumi.String("000000000000"),
    			PeerRegionCode: pulumi.String("eu-central-1"),
    			PeerVpcId:      main.Id,
    			PeerCidrBlocks: pulumi.StringArray{
    				pulumi.String("12.0.0.0/24"),
    				pulumi.String("12.1.0.0/24"),
    			},
    			TimescaleVpcId: ts_test.VpcsId,
    		})
    		if err != nil {
    			return err
    		}
    		// Acceptor's side of the VPC peering connection (AWS).
    		vpcPeeraws_vpc_peering_connection_accepter, err := aws.NewAws_vpc_peering_connection_accepter(ctx, "vpcPeeraws_vpc_peering_connection_accepter", &aws.Aws_vpc_peering_connection_accepterArgs{
    			VpcPeeringConnectionId: vpcPeerPeeringConnection.ProvisionedId,
    			AutoAccept:             true,
    		})
    		if err != nil {
    			return err
    		}
    		// Wait for VPC peering to be fully established before creating TGW peering
    		waitForVpcPeering, err := time.NewTime_sleep(ctx, "waitForVpcPeering", &time.Time_sleepArgs{
    			CreateDuration: "120s",
    		}, pulumi.DependsOn([]pulumi.Resource{
    			vpcPeeraws_vpc_peering_connection_accepter,
    		}))
    		if err != nil {
    			return err
    		}
    		// Create a test Transit Gateway in eu-central-1
    		tgw, err := aws.NewAws_ec2_transit_gateway(ctx, "tgw", &aws.Aws_ec2_transit_gatewayArgs{
    			Description: "TGW for Timescale peering",
    			Tags: map[string]interface{}{
    				"Name": "tf-test-tgw",
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// Create Transit Gateway peering with Timescale
    		tgwPeerPeeringConnection, err := timescale.NewPeeringConnection(ctx, "tgwPeerPeeringConnection", &timescale.PeeringConnectionArgs{
    			PeerAccountId:  pulumi.String("000000000000"),
    			PeerRegionCode: pulumi.String("eu-central-1"),
    			PeerTgwId:      tgw.Id,
    			PeerCidrBlocks: pulumi.StringArray{
    				pulumi.String("16.0.0.0/24"),
    				pulumi.String("16.1.0.0/24"),
    			},
    			TimescaleVpcId: ts_test.VpcsId,
    		}, pulumi.DependsOn([]pulumi.Resource{
    			waitForVpcPeering,
    		}))
    		if err != nil {
    			return err
    		}
    		// Wait for TGW peering attachment to propagate to AWS
    		waitForTgwAttachment, err := time.NewTime_sleep(ctx, "waitForTgwAttachment", &time.Time_sleepArgs{
    			CreateDuration: "120s",
    		}, pulumi.DependsOn([]pulumi.Resource{
    			tgwPeerPeeringConnection,
    		}))
    		if err != nil {
    			return err
    		}
    		// Accept the Transit Gateway attachment
    		_, err = aws.NewAws_ec2_transit_gateway_peering_attachment_accepter(ctx, "tgwPeeraws_ec2_transit_gateway_peering_attachment_accepter", &aws.Aws_ec2_transit_gateway_peering_attachment_accepterArgs{
    			TransitGatewayAttachmentId: tgwPeerPeeringConnection.ProvisionedId,
    		}, pulumi.DependsOn([]pulumi.Resource{
    			waitForTgwAttachment,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    using Time = Pulumi.Time;
    using Timescale = Pulumi.Timescale;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var tsProjectId = config.Require("tsProjectId");
        var tsAccessKey = config.Require("tsAccessKey");
        var tsSecretKey = config.Require("tsSecretKey");
        // Create a Timescale VPC
        var ts_test = new Timescale.Vpcs("ts-test", new()
        {
            Cidr = "10.0.0.0/24",
            RegionCode = "us-east-1",
        });
    
        // Creating a test VPC in eu-central-1
        var main = new Aws.Index.Aws_vpc("main", new()
        {
            CidrBlock = "11.0.0.0/24",
            Tags = 
            {
                { "Name", "tf-test-vpc-peering" },
            },
        });
    
        // Requester's side of the VPC peering connection (Timescale).
        var vpcPeerPeeringConnection = new Timescale.PeeringConnection("vpcPeerPeeringConnection", new()
        {
            PeerAccountId = "000000000000",
            PeerRegionCode = "eu-central-1",
            PeerVpcId = main.Id,
            PeerCidrBlocks = new[]
            {
                "12.0.0.0/24",
                "12.1.0.0/24",
            },
            TimescaleVpcId = ts_test.VpcsId,
        });
    
        // Acceptor's side of the VPC peering connection (AWS).
        var vpcPeeraws_vpc_peering_connection_accepter = new Aws.Index.Aws_vpc_peering_connection_accepter("vpcPeeraws_vpc_peering_connection_accepter", new()
        {
            VpcPeeringConnectionId = vpcPeerPeeringConnection.ProvisionedId,
            AutoAccept = true,
        });
    
        // ========================================
        // Transit Gateway Peering Example
        // ========================================
        // Wait for VPC peering to be fully established before creating TGW peering
        var waitForVpcPeering = new Time.Index.Time_sleep("waitForVpcPeering", new()
        {
            CreateDuration = "120s",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                vpcPeeraws_vpc_peering_connection_accepter,
            },
        });
    
        // Create a test Transit Gateway in eu-central-1
        var tgw = new Aws.Index.Aws_ec2_transit_gateway("tgw", new()
        {
            Description = "TGW for Timescale peering",
            Tags = 
            {
                { "Name", "tf-test-tgw" },
            },
        });
    
        // Create Transit Gateway peering with Timescale
        var tgwPeerPeeringConnection = new Timescale.PeeringConnection("tgwPeerPeeringConnection", new()
        {
            PeerAccountId = "000000000000",
            PeerRegionCode = "eu-central-1",
            PeerTgwId = tgw.Id,
            PeerCidrBlocks = new[]
            {
                "16.0.0.0/24",
                "16.1.0.0/24",
            },
            TimescaleVpcId = ts_test.VpcsId,
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                waitForVpcPeering,
            },
        });
    
        // Wait for TGW peering attachment to propagate to AWS
        var waitForTgwAttachment = new Time.Index.Time_sleep("waitForTgwAttachment", new()
        {
            CreateDuration = "120s",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                tgwPeerPeeringConnection,
            },
        });
    
        // Accept the Transit Gateway attachment
        var tgwPeeraws_ec2_transit_gateway_peering_attachment_accepter = new Aws.Index.Aws_ec2_transit_gateway_peering_attachment_accepter("tgwPeeraws_ec2_transit_gateway_peering_attachment_accepter", new()
        {
            TransitGatewayAttachmentId = tgwPeerPeeringConnection.ProvisionedId,
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                waitForTgwAttachment,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.timescale.Vpcs;
    import com.pulumi.timescale.VpcsArgs;
    import com.pulumi.aws.aws_vpc;
    import com.pulumi.aws.Aws_vpcArgs;
    import com.pulumi.timescale.PeeringConnection;
    import com.pulumi.timescale.PeeringConnectionArgs;
    import com.pulumi.aws.aws_vpc_peering_connection_accepter;
    import com.pulumi.aws.Aws_vpc_peering_connection_accepterArgs;
    import com.pulumi.time.time_sleep;
    import com.pulumi.time.Time_sleepArgs;
    import com.pulumi.aws.aws_ec2_transit_gateway;
    import com.pulumi.aws.Aws_ec2_transit_gatewayArgs;
    import com.pulumi.aws.aws_ec2_transit_gateway_peering_attachment_accepter;
    import com.pulumi.aws.Aws_ec2_transit_gateway_peering_attachment_accepterArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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 config = ctx.config();
            final var tsProjectId = config.get("tsProjectId");
            final var tsAccessKey = config.get("tsAccessKey");
            final var tsSecretKey = config.get("tsSecretKey");
            // Create a Timescale VPC
            var ts_test = new Vpcs("ts-test", VpcsArgs.builder()
                .cidr("10.0.0.0/24")
                .regionCode("us-east-1")
                .build());
    
            // Creating a test VPC in eu-central-1
            var main = new Aws_vpc("main", Aws_vpcArgs.builder()
                .cidrBlock("11.0.0.0/24")
                .tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
                .build());
    
            // Requester's side of the VPC peering connection (Timescale).
            var vpcPeerPeeringConnection = new PeeringConnection("vpcPeerPeeringConnection", PeeringConnectionArgs.builder()
                .peerAccountId("000000000000")
                .peerRegionCode("eu-central-1")
                .peerVpcId(main.id())
                .peerCidrBlocks(            
                    "12.0.0.0/24",
                    "12.1.0.0/24")
                .timescaleVpcId(ts_test.vpcsId())
                .build());
    
            // Acceptor's side of the VPC peering connection (AWS).
            var vpcPeeraws_vpc_peering_connection_accepter = new Aws_vpc_peering_connection_accepter("vpcPeeraws_vpc_peering_connection_accepter", Aws_vpc_peering_connection_accepterArgs.builder()
                .vpcPeeringConnectionId(vpcPeerPeeringConnection.provisionedId())
                .autoAccept(true)
                .build());
    
            // ========================================
            // Transit Gateway Peering Example
            // ========================================
            // Wait for VPC peering to be fully established before creating TGW peering
            var waitForVpcPeering = new Time_sleep("waitForVpcPeering", Time_sleepArgs.builder()
                .createDuration("120s")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(vpcPeeraws_vpc_peering_connection_accepter)
                    .build());
    
            // Create a test Transit Gateway in eu-central-1
            var tgw = new Aws_ec2_transit_gateway("tgw", Aws_ec2_transit_gatewayArgs.builder()
                .description("TGW for Timescale peering")
                .tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
                .build());
    
            // Create Transit Gateway peering with Timescale
            var tgwPeerPeeringConnection = new PeeringConnection("tgwPeerPeeringConnection", PeeringConnectionArgs.builder()
                .peerAccountId("000000000000")
                .peerRegionCode("eu-central-1")
                .peerTgwId(tgw.id())
                .peerCidrBlocks(            
                    "16.0.0.0/24",
                    "16.1.0.0/24")
                .timescaleVpcId(ts_test.vpcsId())
                .build(), CustomResourceOptions.builder()
                    .dependsOn(waitForVpcPeering)
                    .build());
    
            // Wait for TGW peering attachment to propagate to AWS
            var waitForTgwAttachment = new Time_sleep("waitForTgwAttachment", Time_sleepArgs.builder()
                .createDuration("120s")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(tgwPeerPeeringConnection)
                    .build());
    
            // Accept the Transit Gateway attachment
            var tgwPeeraws_ec2_transit_gateway_peering_attachment_accepter = new Aws_ec2_transit_gateway_peering_attachment_accepter("tgwPeeraws_ec2_transit_gateway_peering_attachment_accepter", Aws_ec2_transit_gateway_peering_attachment_accepterArgs.builder()
                .transitGatewayAttachmentId(tgwPeerPeeringConnection.provisionedId())
                .build(), CustomResourceOptions.builder()
                    .dependsOn(waitForTgwAttachment)
                    .build());
    
        }
    }
    
    configuration:
      tsProjectId:
        type: string
      tsAccessKey:
        type: string
      tsSecretKey:
        type: string
    resources:
      # Create a Timescale VPC
      ts-test:
        type: timescale:Vpcs
        properties:
          cidr: 10.0.0.0/24
          regionCode: us-east-1
      # Creating a test VPC in eu-central-1
      main:
        type: aws:aws_vpc
        properties:
          cidrBlock: 11.0.0.0/24
          tags:
            Name: tf-test-vpc-peering
      # Requester's side of the VPC peering connection (Timescale).
      vpcPeerPeeringConnection:
        type: timescale:PeeringConnection
        properties:
          peerAccountId: '000000000000'
          peerRegionCode: eu-central-1
          peerVpcId: ${main.id}
          peerCidrBlocks:
            - 12.0.0.0/24
            - 12.1.0.0/24
          # Optional for VPC peering
          timescaleVpcId: ${["ts-test"].vpcsId}
      # Acceptor's side of the VPC peering connection (AWS).
      vpcPeeraws_vpc_peering_connection_accepter: # ========================================
      # Transit Gateway Peering Example
      # ========================================
        type: aws:aws_vpc_peering_connection_accepter
        properties:
          vpcPeeringConnectionId: ${vpcPeerPeeringConnection.provisionedId}
          autoAccept: true
      # Wait for VPC peering to be fully established before creating TGW peering
      waitForVpcPeering:
        type: time:time_sleep
        properties:
          createDuration: 120s
        options:
          dependsOn:
            - ${vpcPeeraws_vpc_peering_connection_accepter}
      # Create a test Transit Gateway in eu-central-1
      tgw:
        type: aws:aws_ec2_transit_gateway
        properties:
          description: TGW for Timescale peering
          tags:
            Name: tf-test-tgw
      # Create Transit Gateway peering with Timescale
      tgwPeerPeeringConnection:
        type: timescale:PeeringConnection
        properties:
          peerAccountId: '000000000000'
          peerRegionCode: eu-central-1
          peerTgwId: ${tgw.id}
          peerCidrBlocks:
            - 16.0.0.0/24
            - 16.1.0.0/24
          # Required for TGW peering.
          timescaleVpcId: ${["ts-test"].vpcsId}
        options:
          dependsOn:
            - ${waitForVpcPeering}
      # Wait for TGW peering attachment to propagate to AWS
      waitForTgwAttachment:
        type: time:time_sleep
        properties:
          createDuration: 120s
        options:
          dependsOn:
            - ${tgwPeerPeeringConnection}
      # Accept the Transit Gateway attachment
      tgwPeeraws_ec2_transit_gateway_peering_attachment_accepter:
        type: aws:aws_ec2_transit_gateway_peering_attachment_accepter
        properties:
          transitGatewayAttachmentId: ${tgwPeerPeeringConnection.provisionedId}
        options:
          dependsOn:
            - ${waitForTgwAttachment}
    

    Create PeeringConnection Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new PeeringConnection(name: string, args: PeeringConnectionArgs, opts?: CustomResourceOptions);
    @overload
    def PeeringConnection(resource_name: str,
                          args: PeeringConnectionArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def PeeringConnection(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          peer_account_id: Optional[str] = None,
                          peer_region_code: Optional[str] = None,
                          timescale_vpc_id: Optional[float] = None,
                          peer_cidr_blocks: Optional[Sequence[str]] = None,
                          peer_tgw_id: Optional[str] = None,
                          peer_vpc_id: Optional[str] = None)
    func NewPeeringConnection(ctx *Context, name string, args PeeringConnectionArgs, opts ...ResourceOption) (*PeeringConnection, error)
    public PeeringConnection(string name, PeeringConnectionArgs args, CustomResourceOptions? opts = null)
    public PeeringConnection(String name, PeeringConnectionArgs args)
    public PeeringConnection(String name, PeeringConnectionArgs args, CustomResourceOptions options)
    
    type: timescale:PeeringConnection
    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 PeeringConnectionArgs
    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 PeeringConnectionArgs
    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 PeeringConnectionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PeeringConnectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PeeringConnectionArgs
    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 peeringConnectionResource = new Timescale.PeeringConnection("peeringConnectionResource", new()
    {
        PeerAccountId = "string",
        PeerRegionCode = "string",
        TimescaleVpcId = 0,
        PeerCidrBlocks = new[]
        {
            "string",
        },
        PeerTgwId = "string",
        PeerVpcId = "string",
    });
    
    example, err := timescale.NewPeeringConnection(ctx, "peeringConnectionResource", &timescale.PeeringConnectionArgs{
    	PeerAccountId:  pulumi.String("string"),
    	PeerRegionCode: pulumi.String("string"),
    	TimescaleVpcId: pulumi.Float64(0),
    	PeerCidrBlocks: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	PeerTgwId: pulumi.String("string"),
    	PeerVpcId: pulumi.String("string"),
    })
    
    var peeringConnectionResource = new PeeringConnection("peeringConnectionResource", PeeringConnectionArgs.builder()
        .peerAccountId("string")
        .peerRegionCode("string")
        .timescaleVpcId(0.0)
        .peerCidrBlocks("string")
        .peerTgwId("string")
        .peerVpcId("string")
        .build());
    
    peering_connection_resource = timescale.PeeringConnection("peeringConnectionResource",
        peer_account_id="string",
        peer_region_code="string",
        timescale_vpc_id=0,
        peer_cidr_blocks=["string"],
        peer_tgw_id="string",
        peer_vpc_id="string")
    
    const peeringConnectionResource = new timescale.PeeringConnection("peeringConnectionResource", {
        peerAccountId: "string",
        peerRegionCode: "string",
        timescaleVpcId: 0,
        peerCidrBlocks: ["string"],
        peerTgwId: "string",
        peerVpcId: "string",
    });
    
    type: timescale:PeeringConnection
    properties:
        peerAccountId: string
        peerCidrBlocks:
            - string
        peerRegionCode: string
        peerTgwId: string
        peerVpcId: string
        timescaleVpcId: 0
    

    PeeringConnection 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 PeeringConnection resource accepts the following input properties:

    PeerAccountId string
    AWS account ID where the VPC or Transit Gateway to be paired is located
    PeerRegionCode string
    Region code for the VPC or Transit Gateway to be paired
    TimescaleVpcId double
    Timescale internal ID for a vpc
    PeerCidrBlocks List<string>
    List of CIDR blocks for the peering connection. Required for Transit Gateway peering, optional for VPC peering
    PeerTgwId string
    AWS ID for the Transit Gateway to be paired. Mutually exclusive with peervpcid
    PeerVpcId string
    AWS ID for the VPC to be paired. Mutually exclusive with peertgwid
    PeerAccountId string
    AWS account ID where the VPC or Transit Gateway to be paired is located
    PeerRegionCode string
    Region code for the VPC or Transit Gateway to be paired
    TimescaleVpcId float64
    Timescale internal ID for a vpc
    PeerCidrBlocks []string
    List of CIDR blocks for the peering connection. Required for Transit Gateway peering, optional for VPC peering
    PeerTgwId string
    AWS ID for the Transit Gateway to be paired. Mutually exclusive with peervpcid
    PeerVpcId string
    AWS ID for the VPC to be paired. Mutually exclusive with peertgwid
    peerAccountId String
    AWS account ID where the VPC or Transit Gateway to be paired is located
    peerRegionCode String
    Region code for the VPC or Transit Gateway to be paired
    timescaleVpcId Double
    Timescale internal ID for a vpc
    peerCidrBlocks List<String>
    List of CIDR blocks for the peering connection. Required for Transit Gateway peering, optional for VPC peering
    peerTgwId String
    AWS ID for the Transit Gateway to be paired. Mutually exclusive with peervpcid
    peerVpcId String
    AWS ID for the VPC to be paired. Mutually exclusive with peertgwid
    peerAccountId string
    AWS account ID where the VPC or Transit Gateway to be paired is located
    peerRegionCode string
    Region code for the VPC or Transit Gateway to be paired
    timescaleVpcId number
    Timescale internal ID for a vpc
    peerCidrBlocks string[]
    List of CIDR blocks for the peering connection. Required for Transit Gateway peering, optional for VPC peering
    peerTgwId string
    AWS ID for the Transit Gateway to be paired. Mutually exclusive with peervpcid
    peerVpcId string
    AWS ID for the VPC to be paired. Mutually exclusive with peertgwid
    peer_account_id str
    AWS account ID where the VPC or Transit Gateway to be paired is located
    peer_region_code str
    Region code for the VPC or Transit Gateway to be paired
    timescale_vpc_id float
    Timescale internal ID for a vpc
    peer_cidr_blocks Sequence[str]
    List of CIDR blocks for the peering connection. Required for Transit Gateway peering, optional for VPC peering
    peer_tgw_id str
    AWS ID for the Transit Gateway to be paired. Mutually exclusive with peervpcid
    peer_vpc_id str
    AWS ID for the VPC to be paired. Mutually exclusive with peertgwid
    peerAccountId String
    AWS account ID where the VPC or Transit Gateway to be paired is located
    peerRegionCode String
    Region code for the VPC or Transit Gateway to be paired
    timescaleVpcId Number
    Timescale internal ID for a vpc
    peerCidrBlocks List<String>
    List of CIDR blocks for the peering connection. Required for Transit Gateway peering, optional for VPC peering
    peerTgwId String
    AWS ID for the Transit Gateway to be paired. Mutually exclusive with peervpcid
    peerVpcId String
    AWS ID for the VPC to be paired. Mutually exclusive with peertgwid

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PeeringConnection resource produces the following output properties:

    ErrorMessage string
    Id string
    The provider-assigned unique ID for this managed resource.
    PeerCidr string
    CIDR for the VPC to be paired

    Deprecated: Deprecated

    PeeringConnectionId double
    Timescale internal ID for a peering connection
    PeeringType string
    Type of peering connection (vpc or tgw)
    ProvisionedId string
    AWS ID of the peering connection (starts with pcx-... for VPC peering or tgw-... for TGW.)
    Status string
    Peering connection status
    VpcId string
    AWS VPC ID of the timescale instance VPC
    ErrorMessage string
    Id string
    The provider-assigned unique ID for this managed resource.
    PeerCidr string
    CIDR for the VPC to be paired

    Deprecated: Deprecated

    PeeringConnectionId float64
    Timescale internal ID for a peering connection
    PeeringType string
    Type of peering connection (vpc or tgw)
    ProvisionedId string
    AWS ID of the peering connection (starts with pcx-... for VPC peering or tgw-... for TGW.)
    Status string
    Peering connection status
    VpcId string
    AWS VPC ID of the timescale instance VPC
    errorMessage String
    id String
    The provider-assigned unique ID for this managed resource.
    peerCidr String
    CIDR for the VPC to be paired

    Deprecated: Deprecated

    peeringConnectionId Double
    Timescale internal ID for a peering connection
    peeringType String
    Type of peering connection (vpc or tgw)
    provisionedId String
    AWS ID of the peering connection (starts with pcx-... for VPC peering or tgw-... for TGW.)
    status String
    Peering connection status
    vpcId String
    AWS VPC ID of the timescale instance VPC
    errorMessage string
    id string
    The provider-assigned unique ID for this managed resource.
    peerCidr string
    CIDR for the VPC to be paired

    Deprecated: Deprecated

    peeringConnectionId number
    Timescale internal ID for a peering connection
    peeringType string
    Type of peering connection (vpc or tgw)
    provisionedId string
    AWS ID of the peering connection (starts with pcx-... for VPC peering or tgw-... for TGW.)
    status string
    Peering connection status
    vpcId string
    AWS VPC ID of the timescale instance VPC
    error_message str
    id str
    The provider-assigned unique ID for this managed resource.
    peer_cidr str
    CIDR for the VPC to be paired

    Deprecated: Deprecated

    peering_connection_id float
    Timescale internal ID for a peering connection
    peering_type str
    Type of peering connection (vpc or tgw)
    provisioned_id str
    AWS ID of the peering connection (starts with pcx-... for VPC peering or tgw-... for TGW.)
    status str
    Peering connection status
    vpc_id str
    AWS VPC ID of the timescale instance VPC
    errorMessage String
    id String
    The provider-assigned unique ID for this managed resource.
    peerCidr String
    CIDR for the VPC to be paired

    Deprecated: Deprecated

    peeringConnectionId Number
    Timescale internal ID for a peering connection
    peeringType String
    Type of peering connection (vpc or tgw)
    provisionedId String
    AWS ID of the peering connection (starts with pcx-... for VPC peering or tgw-... for TGW.)
    status String
    Peering connection status
    vpcId String
    AWS VPC ID of the timescale instance VPC

    Look up Existing PeeringConnection Resource

    Get an existing PeeringConnection 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?: PeeringConnectionState, opts?: CustomResourceOptions): PeeringConnection
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            error_message: Optional[str] = None,
            peer_account_id: Optional[str] = None,
            peer_cidr: Optional[str] = None,
            peer_cidr_blocks: Optional[Sequence[str]] = None,
            peer_region_code: Optional[str] = None,
            peer_tgw_id: Optional[str] = None,
            peer_vpc_id: Optional[str] = None,
            peering_connection_id: Optional[float] = None,
            peering_type: Optional[str] = None,
            provisioned_id: Optional[str] = None,
            status: Optional[str] = None,
            timescale_vpc_id: Optional[float] = None,
            vpc_id: Optional[str] = None) -> PeeringConnection
    func GetPeeringConnection(ctx *Context, name string, id IDInput, state *PeeringConnectionState, opts ...ResourceOption) (*PeeringConnection, error)
    public static PeeringConnection Get(string name, Input<string> id, PeeringConnectionState? state, CustomResourceOptions? opts = null)
    public static PeeringConnection get(String name, Output<String> id, PeeringConnectionState state, CustomResourceOptions options)
    resources:  _:    type: timescale:PeeringConnection    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.
    The following state arguments are supported:
    ErrorMessage string
    PeerAccountId string
    AWS account ID where the VPC or Transit Gateway to be paired is located
    PeerCidr string
    CIDR for the VPC to be paired

    Deprecated: Deprecated

    PeerCidrBlocks List<string>
    List of CIDR blocks for the peering connection. Required for Transit Gateway peering, optional for VPC peering
    PeerRegionCode string
    Region code for the VPC or Transit Gateway to be paired
    PeerTgwId string
    AWS ID for the Transit Gateway to be paired. Mutually exclusive with peervpcid
    PeerVpcId string
    AWS ID for the VPC to be paired. Mutually exclusive with peertgwid
    PeeringConnectionId double
    Timescale internal ID for a peering connection
    PeeringType string
    Type of peering connection (vpc or tgw)
    ProvisionedId string
    AWS ID of the peering connection (starts with pcx-... for VPC peering or tgw-... for TGW.)
    Status string
    Peering connection status
    TimescaleVpcId double
    Timescale internal ID for a vpc
    VpcId string
    AWS VPC ID of the timescale instance VPC
    ErrorMessage string
    PeerAccountId string
    AWS account ID where the VPC or Transit Gateway to be paired is located
    PeerCidr string
    CIDR for the VPC to be paired

    Deprecated: Deprecated

    PeerCidrBlocks []string
    List of CIDR blocks for the peering connection. Required for Transit Gateway peering, optional for VPC peering
    PeerRegionCode string
    Region code for the VPC or Transit Gateway to be paired
    PeerTgwId string
    AWS ID for the Transit Gateway to be paired. Mutually exclusive with peervpcid
    PeerVpcId string
    AWS ID for the VPC to be paired. Mutually exclusive with peertgwid
    PeeringConnectionId float64
    Timescale internal ID for a peering connection
    PeeringType string
    Type of peering connection (vpc or tgw)
    ProvisionedId string
    AWS ID of the peering connection (starts with pcx-... for VPC peering or tgw-... for TGW.)
    Status string
    Peering connection status
    TimescaleVpcId float64
    Timescale internal ID for a vpc
    VpcId string
    AWS VPC ID of the timescale instance VPC
    errorMessage String
    peerAccountId String
    AWS account ID where the VPC or Transit Gateway to be paired is located
    peerCidr String
    CIDR for the VPC to be paired

    Deprecated: Deprecated

    peerCidrBlocks List<String>
    List of CIDR blocks for the peering connection. Required for Transit Gateway peering, optional for VPC peering
    peerRegionCode String
    Region code for the VPC or Transit Gateway to be paired
    peerTgwId String
    AWS ID for the Transit Gateway to be paired. Mutually exclusive with peervpcid
    peerVpcId String
    AWS ID for the VPC to be paired. Mutually exclusive with peertgwid
    peeringConnectionId Double
    Timescale internal ID for a peering connection
    peeringType String
    Type of peering connection (vpc or tgw)
    provisionedId String
    AWS ID of the peering connection (starts with pcx-... for VPC peering or tgw-... for TGW.)
    status String
    Peering connection status
    timescaleVpcId Double
    Timescale internal ID for a vpc
    vpcId String
    AWS VPC ID of the timescale instance VPC
    errorMessage string
    peerAccountId string
    AWS account ID where the VPC or Transit Gateway to be paired is located
    peerCidr string
    CIDR for the VPC to be paired

    Deprecated: Deprecated

    peerCidrBlocks string[]
    List of CIDR blocks for the peering connection. Required for Transit Gateway peering, optional for VPC peering
    peerRegionCode string
    Region code for the VPC or Transit Gateway to be paired
    peerTgwId string
    AWS ID for the Transit Gateway to be paired. Mutually exclusive with peervpcid
    peerVpcId string
    AWS ID for the VPC to be paired. Mutually exclusive with peertgwid
    peeringConnectionId number
    Timescale internal ID for a peering connection
    peeringType string
    Type of peering connection (vpc or tgw)
    provisionedId string
    AWS ID of the peering connection (starts with pcx-... for VPC peering or tgw-... for TGW.)
    status string
    Peering connection status
    timescaleVpcId number
    Timescale internal ID for a vpc
    vpcId string
    AWS VPC ID of the timescale instance VPC
    error_message str
    peer_account_id str
    AWS account ID where the VPC or Transit Gateway to be paired is located
    peer_cidr str
    CIDR for the VPC to be paired

    Deprecated: Deprecated

    peer_cidr_blocks Sequence[str]
    List of CIDR blocks for the peering connection. Required for Transit Gateway peering, optional for VPC peering
    peer_region_code str
    Region code for the VPC or Transit Gateway to be paired
    peer_tgw_id str
    AWS ID for the Transit Gateway to be paired. Mutually exclusive with peervpcid
    peer_vpc_id str
    AWS ID for the VPC to be paired. Mutually exclusive with peertgwid
    peering_connection_id float
    Timescale internal ID for a peering connection
    peering_type str
    Type of peering connection (vpc or tgw)
    provisioned_id str
    AWS ID of the peering connection (starts with pcx-... for VPC peering or tgw-... for TGW.)
    status str
    Peering connection status
    timescale_vpc_id float
    Timescale internal ID for a vpc
    vpc_id str
    AWS VPC ID of the timescale instance VPC
    errorMessage String
    peerAccountId String
    AWS account ID where the VPC or Transit Gateway to be paired is located
    peerCidr String
    CIDR for the VPC to be paired

    Deprecated: Deprecated

    peerCidrBlocks List<String>
    List of CIDR blocks for the peering connection. Required for Transit Gateway peering, optional for VPC peering
    peerRegionCode String
    Region code for the VPC or Transit Gateway to be paired
    peerTgwId String
    AWS ID for the Transit Gateway to be paired. Mutually exclusive with peervpcid
    peerVpcId String
    AWS ID for the VPC to be paired. Mutually exclusive with peertgwid
    peeringConnectionId Number
    Timescale internal ID for a peering connection
    peeringType String
    Type of peering connection (vpc or tgw)
    provisionedId String
    AWS ID of the peering connection (starts with pcx-... for VPC peering or tgw-... for TGW.)
    status String
    Peering connection status
    timescaleVpcId Number
    Timescale internal ID for a vpc
    vpcId String
    AWS VPC ID of the timescale instance VPC

    Package Details

    Repository
    timescale timescale/terraform-provider-timescale
    License
    Notes
    This Pulumi package is based on the timescale Terraform Provider.
    timescale logo
    timescale 2.3.0 published on Thursday, Jun 12, 2025 by timescale