1. Packages
  2. Timescale Provider
  3. API Docs
  4. PeeringConnection
timescale 2.7.0 published on Monday, Dec 22, 2025 by timescale
timescale logo
timescale 2.7.0 published on Monday, Dec 22, 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",
        name: "tf-test",
        regionCode: "us-east-1",
    });
    // ========================================
    // VPC Peering Example (Cross-Region)
    // ========================================
    // Creating a test VPC in eu-central-1
    const main = new aws.index.Vpc("main", {
        cidrBlock: "11.0.0.0/24",
        tags: {
            name: "tf-test-vpc-peering",
        },
    });
    // Requester's side of the VPC peering connection (Timescale).
    const vpcPeer = new timescale.PeeringConnection("vpc_peer", {
        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 vpcPeerVpcPeeringConnectionAccepter = new aws.index.VpcPeeringConnectionAccepter("vpc_peer", {
        vpcPeeringConnectionId: vpcPeer.accepterProvisionedId,
        autoAccept: true,
    });
    // ========================================
    // Transit Gateway Peering Example
    // ========================================
    // Wait for VPC peering to be fully established before creating TGW peering
    const waitForVpcPeering = new time.index.Sleep("wait_for_vpc_peering", {createDuration: "120s"}, {
        dependsOn: [vpcPeerVpcPeeringConnectionAccepter],
    });
    // Create a test Transit Gateway in eu-central-1
    const tgw = new aws.index.Ec2TransitGateway("tgw", {
        description: "TGW for Timescale peering",
        tags: {
            name: "tf-test-tgw",
        },
    });
    // Create Transit Gateway peering with Timescale
    const tgwPeer = new timescale.PeeringConnection("tgw_peer", {
        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.Sleep("wait_for_tgw_attachment", {createDuration: "120s"}, {
        dependsOn: [tgwPeer],
    });
    // Accept the Transit Gateway attachment
    const tgwPeerEc2TransitGatewayPeeringAttachmentAccepter = new aws.index.Ec2TransitGatewayPeeringAttachmentAccepter("tgw_peer", {transitGatewayAttachmentId: tgwPeer.accepterProvisionedId}, {
        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",
        name="tf-test",
        region_code="us-east-1")
    # ========================================
    # VPC Peering Example (Cross-Region)
    # ========================================
    # Creating a test VPC in eu-central-1
    main = aws.index.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 = timescale.PeeringConnection("vpc_peer",
        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_peer_vpc_peering_connection_accepter = aws.index.VpcPeeringConnectionAccepter("vpc_peer",
        vpc_peering_connection_id=vpc_peer.accepter_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.Sleep("wait_for_vpc_peering", create_duration=120s,
    opts = pulumi.ResourceOptions(depends_on=[vpc_peer_vpc_peering_connection_accepter]))
    # Create a test Transit Gateway in eu-central-1
    tgw = aws.index.Ec2TransitGateway("tgw",
        description=TGW for Timescale peering,
        tags={
            name: tf-test-tgw,
        })
    # Create Transit Gateway peering with Timescale
    tgw_peer = timescale.PeeringConnection("tgw_peer",
        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.Sleep("wait_for_tgw_attachment", create_duration=120s,
    opts = pulumi.ResourceOptions(depends_on=[tgw_peer]))
    # Accept the Transit Gateway attachment
    tgw_peer_ec2_transit_gateway_peering_attachment_accepter = aws.index.Ec2TransitGatewayPeeringAttachmentAccepter("tgw_peer", transit_gateway_attachment_id=tgw_peer.accepter_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"),
    			Name:       pulumi.String("tf-test"),
    			RegionCode: pulumi.String("us-east-1"),
    		})
    		if err != nil {
    			return err
    		}
    		// Creating a test VPC in eu-central-1
    		main, err := aws.NewVpc(ctx, "main", &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).
    		vpcPeer, err := timescale.NewPeeringConnection(ctx, "vpc_peer", &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).
    		vpcPeerVpcPeeringConnectionAccepter, err := aws.NewVpcPeeringConnectionAccepter(ctx, "vpc_peer", &aws.VpcPeeringConnectionAccepterArgs{
    			VpcPeeringConnectionId: vpcPeer.AccepterProvisionedId,
    			AutoAccept:             true,
    		})
    		if err != nil {
    			return err
    		}
    		// Wait for VPC peering to be fully established before creating TGW peering
    		waitForVpcPeering, err := time.NewSleep(ctx, "wait_for_vpc_peering", &time.SleepArgs{
    			CreateDuration: "120s",
    		}, pulumi.DependsOn([]pulumi.Resource{
    			vpcPeerVpcPeeringConnectionAccepter,
    		}))
    		if err != nil {
    			return err
    		}
    		// Create a test Transit Gateway in eu-central-1
    		tgw, err := aws.NewEc2TransitGateway(ctx, "tgw", &aws.Ec2TransitGatewayArgs{
    			Description: "TGW for Timescale peering",
    			Tags: map[string]interface{}{
    				"name": "tf-test-tgw",
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// Create Transit Gateway peering with Timescale
    		tgwPeer, err := timescale.NewPeeringConnection(ctx, "tgw_peer", &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.NewSleep(ctx, "wait_for_tgw_attachment", &time.SleepArgs{
    			CreateDuration: "120s",
    		}, pulumi.DependsOn([]pulumi.Resource{
    			tgwPeer,
    		}))
    		if err != nil {
    			return err
    		}
    		// Accept the Transit Gateway attachment
    		_, err = aws.NewEc2TransitGatewayPeeringAttachmentAccepter(ctx, "tgw_peer", &aws.Ec2TransitGatewayPeeringAttachmentAccepterArgs{
    			TransitGatewayAttachmentId: tgwPeer.AccepterProvisionedId,
    		}, 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",
            Name = "tf-test",
            RegionCode = "us-east-1",
        });
    
        // ========================================
        // VPC Peering Example (Cross-Region)
        // ========================================
        // Creating a test VPC in eu-central-1
        var main = new Aws.Index.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 vpcPeer = new Timescale.PeeringConnection("vpc_peer", 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 vpcPeerVpcPeeringConnectionAccepter = new Aws.Index.VpcPeeringConnectionAccepter("vpc_peer", new()
        {
            VpcPeeringConnectionId = vpcPeer.AccepterProvisionedId,
            AutoAccept = true,
        });
    
        // ========================================
        // Transit Gateway Peering Example
        // ========================================
        // Wait for VPC peering to be fully established before creating TGW peering
        var waitForVpcPeering = new Time.Index.Sleep("wait_for_vpc_peering", new()
        {
            CreateDuration = "120s",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                vpcPeerVpcPeeringConnectionAccepter,
            },
        });
    
        // Create a test Transit Gateway in eu-central-1
        var tgw = new Aws.Index.Ec2TransitGateway("tgw", new()
        {
            Description = "TGW for Timescale peering",
            Tags = 
            {
                { "name", "tf-test-tgw" },
            },
        });
    
        // Create Transit Gateway peering with Timescale
        var tgwPeer = new Timescale.PeeringConnection("tgw_peer", 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.Sleep("wait_for_tgw_attachment", new()
        {
            CreateDuration = "120s",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                tgwPeer,
            },
        });
    
        // Accept the Transit Gateway attachment
        var tgwPeerEc2TransitGatewayPeeringAttachmentAccepter = new Aws.Index.Ec2TransitGatewayPeeringAttachmentAccepter("tgw_peer", new()
        {
            TransitGatewayAttachmentId = tgwPeer.AccepterProvisionedId,
        }, 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.Vpc;
    import com.pulumi.aws.VpcArgs;
    import com.pulumi.timescale.PeeringConnection;
    import com.pulumi.timescale.PeeringConnectionArgs;
    import com.pulumi.aws.VpcPeeringConnectionAccepter;
    import com.pulumi.aws.VpcPeeringConnectionAccepterArgs;
    import com.pulumi.time.Sleep;
    import com.pulumi.time.SleepArgs;
    import com.pulumi.aws.Ec2TransitGateway;
    import com.pulumi.aws.Ec2TransitGatewayArgs;
    import com.pulumi.aws.Ec2TransitGatewayPeeringAttachmentAccepter;
    import com.pulumi.aws.Ec2TransitGatewayPeeringAttachmentAccepterArgs;
    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")
                .name("tf-test")
                .regionCode("us-east-1")
                .build());
    
            // ========================================
            // VPC Peering Example (Cross-Region)
            // ========================================
            // Creating a test VPC in eu-central-1
            var main = new Vpc("main", VpcArgs.builder()
                .cidrBlock("11.0.0.0/24")
                .tags(Map.of("name", "tf-test-vpc-peering"))
                .build());
    
            // Requester's side of the VPC peering connection (Timescale).
            var vpcPeer = new PeeringConnection("vpcPeer", 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 vpcPeerVpcPeeringConnectionAccepter = new VpcPeeringConnectionAccepter("vpcPeerVpcPeeringConnectionAccepter", VpcPeeringConnectionAccepterArgs.builder()
                .vpcPeeringConnectionId(vpcPeer.accepterProvisionedId())
                .autoAccept(true)
                .build());
    
            // ========================================
            // Transit Gateway Peering Example
            // ========================================
            // Wait for VPC peering to be fully established before creating TGW peering
            var waitForVpcPeering = new Sleep("waitForVpcPeering", SleepArgs.builder()
                .createDuration("120s")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(List.of(vpcPeerVpcPeeringConnectionAccepter))
                    .build());
    
            // Create a test Transit Gateway in eu-central-1
            var tgw = new Ec2TransitGateway("tgw", Ec2TransitGatewayArgs.builder()
                .description("TGW for Timescale peering")
                .tags(Map.of("name", "tf-test-tgw"))
                .build());
    
            // Create Transit Gateway peering with Timescale
            var tgwPeer = new PeeringConnection("tgwPeer", 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 Sleep("waitForTgwAttachment", SleepArgs.builder()
                .createDuration("120s")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(List.of(tgwPeer))
                    .build());
    
            // Accept the Transit Gateway attachment
            var tgwPeerEc2TransitGatewayPeeringAttachmentAccepter = new Ec2TransitGatewayPeeringAttachmentAccepter("tgwPeerEc2TransitGatewayPeeringAttachmentAccepter", Ec2TransitGatewayPeeringAttachmentAccepterArgs.builder()
                .transitGatewayAttachmentId(tgwPeer.accepterProvisionedId())
                .build(), CustomResourceOptions.builder()
                    .dependsOn(List.of(waitForTgwAttachment))
                    .build());
    
        }
    }
    
    configuration:
      tsProjectId:
        type: string
      tsAccessKey:
        type: string
      tsSecretKey:
        type: string
    resources:
      # Create a Timescale VPC
      ts-test: # ========================================
      # VPC Peering Example (Cross-Region)
      # ========================================
        type: timescale:Vpcs
        properties:
          cidr: 10.0.0.0/24
          name: tf-test
          regionCode: us-east-1
      # Creating a test VPC in eu-central-1
      main:
        type: aws:Vpc
        properties:
          cidrBlock: 11.0.0.0/24
          tags:
            name: tf-test-vpc-peering
      # Requester's side of the VPC peering connection (Timescale).
      vpcPeer:
        type: timescale:PeeringConnection
        name: vpc_peer
        properties:
          peerAccountId: '000000000000'
          peerRegionCode: eu-central-1
          peerVpcId: ${main.id}
          peerCidrBlocks: # Optional for VPC peering
            - 12.0.0.0/24
            - 12.1.0.0/24
          timescaleVpcId: ${["ts-test"].vpcsId}
      # Acceptor's side of the VPC peering connection (AWS).
      vpcPeerVpcPeeringConnectionAccepter: # ========================================
      # Transit Gateway Peering Example
      # ========================================
        type: aws:VpcPeeringConnectionAccepter
        name: vpc_peer
        properties:
          vpcPeeringConnectionId: ${vpcPeer.accepterProvisionedId}
          autoAccept: true
      # Wait for VPC peering to be fully established before creating TGW peering
      waitForVpcPeering:
        type: time:Sleep
        name: wait_for_vpc_peering
        properties:
          createDuration: 120s
        options:
          dependsOn:
            - ${vpcPeerVpcPeeringConnectionAccepter}
      # Create a test Transit Gateway in eu-central-1
      tgw:
        type: aws:Ec2TransitGateway
        properties:
          description: TGW for Timescale peering
          tags:
            name: tf-test-tgw
      # Create Transit Gateway peering with Timescale
      tgwPeer:
        type: timescale:PeeringConnection
        name: tgw_peer
        properties:
          peerAccountId: '000000000000'
          peerRegionCode: eu-central-1
          peerTgwId: ${tgw.id}
          peerCidrBlocks: # Required for TGW peering.
            - 16.0.0.0/24
            - 16.1.0.0/24
          timescaleVpcId: ${["ts-test"].vpcsId}
        options:
          dependsOn:
            - ${waitForVpcPeering}
      # Wait for TGW peering attachment to propagate to AWS
      waitForTgwAttachment:
        type: time:Sleep
        name: wait_for_tgw_attachment
        properties:
          createDuration: 120s
        options:
          dependsOn:
            - ${tgwPeer}
      # Accept the Transit Gateway attachment
      tgwPeerEc2TransitGatewayPeeringAttachmentAccepter:
        type: aws:Ec2TransitGatewayPeeringAttachmentAccepter
        name: tgw_peer
        properties:
          transitGatewayAttachmentId: ${tgwPeer.accepterProvisionedId}
        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:

    AccepterProvisionedId string
    AWS ID of the peering connection accepter (starts with pcx-... for VPC peering or tgw-attach-... for TGW.)
    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 requester (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
    AccepterProvisionedId string
    AWS ID of the peering connection accepter (starts with pcx-... for VPC peering or tgw-attach-... for TGW.)
    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 requester (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
    accepterProvisionedId String
    AWS ID of the peering connection accepter (starts with pcx-... for VPC peering or tgw-attach-... for TGW.)
    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 requester (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
    accepterProvisionedId string
    AWS ID of the peering connection accepter (starts with pcx-... for VPC peering or tgw-attach-... for TGW.)
    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 requester (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
    accepter_provisioned_id str
    AWS ID of the peering connection accepter (starts with pcx-... for VPC peering or tgw-attach-... for TGW.)
    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 requester (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
    accepterProvisionedId String
    AWS ID of the peering connection accepter (starts with pcx-... for VPC peering or tgw-attach-... for TGW.)
    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 requester (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,
            accepter_provisioned_id: Optional[str] = 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:
    AccepterProvisionedId string
    AWS ID of the peering connection accepter (starts with pcx-... for VPC peering or tgw-attach-... for TGW.)
    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 requester (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
    AccepterProvisionedId string
    AWS ID of the peering connection accepter (starts with pcx-... for VPC peering or tgw-attach-... for TGW.)
    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 requester (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
    accepterProvisionedId String
    AWS ID of the peering connection accepter (starts with pcx-... for VPC peering or tgw-attach-... for TGW.)
    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 requester (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
    accepterProvisionedId string
    AWS ID of the peering connection accepter (starts with pcx-... for VPC peering or tgw-attach-... for TGW.)
    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 requester (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
    accepter_provisioned_id str
    AWS ID of the peering connection accepter (starts with pcx-... for VPC peering or tgw-attach-... for TGW.)
    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 requester (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
    accepterProvisionedId String
    AWS ID of the peering connection accepter (starts with pcx-... for VPC peering or tgw-attach-... for TGW.)
    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 requester (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.7.0 published on Monday, Dec 22, 2025 by timescale
      Meet Neo: Your AI Platform Teammate