---
title: "Create Transit Gateway"
method: POST
path: "/v2/cloud-gateways/networks/{networkId}/transit-gateways"
tags: ["Transit Gateways"]
---

# Create Transit Gateway

`POST /v2/cloud-gateways/networks/{networkId}/transit-gateways`

Creates a new transit gateway attachment for a given network. The attachment type is determined by the
`transit_gateway_attachment_config.kind` field. Supported types: `aws-transit-gateway-attachment`,
`aws-vpc-peering-attachment`, `aws-resource-endpoint-attachment`, `azure-vnet-peering-attachment`,
`azure-vhub-peering-attachment`, and `gcp-vpc-peering-attachment`. Creation is asynchronous —
the transit gateway starts in `initializing` state and transitions to `ready` once provisioned.

## Path parameters

- `networkId` string, uuid, required — The network ID to operate on. For serverless.v1 kind of cloud gateways, this field should be omitted.

## Request body

- union — Request schema for creating a transit gateway.
  - object
    - `name` string, required — Human-readable name of the transit gateway.
    - `dns_config` object[] — List of mappings from remote DNS server IP address sets to proxied internal domains, for a transit gateway attachment.
      - `remote_dns_server_ip_addresses` string[], required — Remote DNS Server IP Addresses to connect to for resolving internal DNS via a transit gateway.
      - `domain_proxy_list` string[], required — Internal domain names to proxy for DNS resolution from the listed remote DNS server IP addresses, for a transit gateway.
    - `cidr_blocks` string[], required — CIDR blocks for constructing a route table for the transit gateway, when attaching to the owning network.
    - `transit_gateway_attachment_config` AwsTransitGatewayAttachmentConfig, required
      - `kind` 'aws-transit-gateway-attachment', required
      - `transit_gateway_id` string, required — AWS Transit Gateway ID to create attachment to.
      - `ram_share_arn` string, required — Resource Share ARN to verify request to create transit gateway attachment.
  - object
    - `name` string, required — Human-readable name of the transit gateway.
    - `dns_config` object[] — List of mappings from remote DNS server IP address sets to proxied internal domains, for a transit gateway attachment.
      - `remote_dns_server_ip_addresses` string[], required — Remote DNS Server IP Addresses to connect to for resolving internal DNS via a transit gateway.
      - `domain_proxy_list` string[], required — Internal domain names to proxy for DNS resolution from the listed remote DNS server IP addresses, for a transit gateway.
    - `cidr_blocks` string[], required — CIDR blocks for constructing a route table for the transit gateway, when attaching to the owning network.
    - `transit_gateway_attachment_config` AwsVpcPeeringGatewayAttachmentConfig, required
      - `kind` 'aws-vpc-peering-attachment', required
      - `peer_account_id` string, required — AWS account ID of the peer VPC owner.
      - `peer_vpc_id` string, required — ID of the peer VPC to establish the peering connection with.
      - `peer_vpc_region` string, required — AWS region where the peer VPC is located.
  - object
    - `name` string, required — Human-readable name of the transit gateway.
    - `dns_config` object[] — List of mappings from remote DNS server IP address sets to proxied internal domains, for a transit gateway attachment.
      - `remote_dns_server_ip_addresses` string[], required — Remote DNS Server IP Addresses to connect to for resolving internal DNS via a transit gateway.
      - `domain_proxy_list` string[], required — Internal domain names to proxy for DNS resolution from the listed remote DNS server IP addresses, for a transit gateway.
    - `transit_gateway_attachment_config` AwsResourceEndpointAttachmentConfig, required
      - `kind` 'aws-resource-endpoint-attachment', required
      - `ram_share_arn` string, required — Resource Share ARN to verify request to create transit gateway attachment.
      - `resource_config` object[] — List of unique resource config mapping for aws resource endpoint.
        - `resource_config_id` string, required — Resource Config ID to uniquely identify a resource configuration.
        - `domain_name` string, required — Domain Name to uniquely identify a resource configuration.
  - object
    - `name` string, required — Human-readable name of the transit gateway.
    - `dns_config` object[] — List of mappings from remote DNS server IP address sets to proxied internal domains, for a transit gateway attachment.
      - `remote_dns_server_ip_addresses` string[], required — Remote DNS Server IP Addresses to connect to for resolving internal DNS via a transit gateway.
      - `domain_proxy_list` string[], required — Internal domain names to proxy for DNS resolution from the listed remote DNS server IP addresses, for a transit gateway.
    - `transit_gateway_attachment_config` AzureVNETPeeringAttachmentConfig, required
      - `kind` 'azure-vnet-peering-attachment', required
      - `tenant_id` string, required — Tenant ID for the Azure VNET Peering attachment.
      - `subscription_id` string, required — Subscription ID for the Azure VNET Peering attachment.
      - `resource_group_name` string, required — Resource Group Name for the Azure VNET Peering attachment.
      - `vnet_name` string, required — VNET Name for the Azure VNET Peering attachment.
  - object
    - `name` string, required — Human-readable name of the transit gateway.
    - `dns_config` object[] — List of mappings from remote DNS server IP address sets to proxied internal domains, for a transit gateway attachment.
      - `remote_dns_server_ip_addresses` string[], required — Remote DNS Server IP Addresses to connect to for resolving internal DNS via a transit gateway.
      - `domain_proxy_list` string[], required — Internal domain names to proxy for DNS resolution from the listed remote DNS server IP addresses, for a transit gateway.
    - `transit_gateway_attachment_config` AzureVHubPeeringAttachmentConfig, required
      - `kind` 'azure-vhub-peering-attachment', required
      - `tenant_id` string, required — Tenant ID of the Azure Virtual Hub resource.
      - `subscription_id` string, required — Subscription ID of the Azure Virtual Hub resource.
      - `resource_group_name` string, required — Resource Group Name of the Azure Virtual Hub resource.
      - `vhub_name` string, required — Name of the Azure Virtual Hub resource.
  - object
    - `name` string, required — Human-readable name of the transit gateway.
    - `dns_config` object[] — List of mappings from remote DNS server IP address sets to proxied internal domains, for a transit gateway attachment.
      - `remote_dns_server_ip_addresses` string[], required — Remote DNS Server IP Addresses to connect to for resolving internal DNS via a transit gateway.
      - `domain_proxy_list` string[], required — Internal domain names to proxy for DNS resolution from the listed remote DNS server IP addresses, for a transit gateway.
    - `transit_gateway_attachment_config` GCPVPCPeeringAttachmentConfig, required
      - `kind` 'gcp-vpc-peering-attachment', required
      - `peer_project_id` string, required — GCP Project ID of the peer account to create attachment to.
      - `peer_vpc_name` string, required — GCP VPC Name of the peer account to create attachment to.

## Response `201`

Response format for creating a transit gateway.

- union
  - AwsTransitGatewayResponse
    - `name` string, required — Human-readable name of the transit gateway.
    - `dns_config` object[], required — List of mappings from remote DNS server IP address sets to proxied internal domains, for a transit gateway attachment.
      - `remote_dns_server_ip_addresses` string[], required — Remote DNS Server IP Addresses to connect to for resolving internal DNS via a transit gateway.
      - `domain_proxy_list` string[], required — Internal domain names to proxy for DNS resolution from the listed remote DNS server IP addresses, for a transit gateway.
    - `cidr_blocks` string[], required — CIDR blocks for constructing a route table for the transit gateway, when attaching to the owning network.
    - `transit_gateway_attachment_config` AwsTransitGatewayAttachmentConfigForResponse, required
      - `kind` 'aws-transit-gateway-attachment', required
      - `transit_gateway_id` string, required — AWS Transit Gateway ID to create attachment to.
      - `ram_share_arn` string, required — Resource Share ARN to verify request to create transit gateway attachment.
      - `attachment_id` string, nullable — ID of the AWS Transit Gateway attachment.
    - `id` string, uuid, required
    - `state` 'created' | 'initializing' | 'pending-acceptance' | 'pending-user-action' | 'ready' | 'terminating' | 'terminated' | 'error', required — The current state of the Transit Gateway. Possible values: - `created` - The attachment has been created but is not attached to transit gateway. - `initializing` - The attachment is in the process of being initialized and is setting up necessary resources. - `pending-acceptance` The attachment request is awaiting acceptance in customer VPC. - `pending-user-action` The attachment request is awaiting user action in customer VPC. - `ready` - The transit gateway attachment is fully operational and can route traffic as configured. - `terminating` - The attachment is in the process of being deleted and is no longer accepting new traffic. - `terminated` - The attachment has been fully deleted and is no longer available. - `error` - The attachment is in an error state.
    - `state_metadata` object — Metadata describing the backing state of the transit gateway and why it may be in an erroneous state.
      - `reported_status` string — Reported status of the transit gateway from backing infrastructure.
      - `reason` string — Reason why the transit gateway may be in an erroneous state, reported from backing infrastructure.
    - `entity_version` integer, required — Monotonically-increasing version count of the transit gateway, to indicate the order of updates to the transit gateway.
    - `created_at` string, date-time, required — An RFC-3339 timestamp representation of transit gateway creation date.
    - `updated_at` string, date-time, required — An RFC-3339 timestamp representation of transit gateway update date.
  - AwsVpcPeeringGatewayResponse
    - `name` string, required — Human-readable name of the transit gateway.
    - `dns_config` object[], required — List of mappings from remote DNS server IP address sets to proxied internal domains, for a transit gateway attachment.
      - `remote_dns_server_ip_addresses` string[], required — Remote DNS Server IP Addresses to connect to for resolving internal DNS via a transit gateway.
      - `domain_proxy_list` string[], required — Internal domain names to proxy for DNS resolution from the listed remote DNS server IP addresses, for a transit gateway.
    - `cidr_blocks` string[], required — CIDR blocks for constructing a route table for the transit gateway, when attaching to the owning network.
    - `transit_gateway_attachment_config` AwsVpcPeeringGatewayAttachmentConfigForResponse, required
      - `kind` 'aws-vpc-peering-attachment', required
      - `peer_account_id` string, required — AWS account ID of the peer VPC owner.
      - `peer_vpc_id` string, required — ID of the peer VPC to establish the peering connection with.
      - `peer_vpc_region` string, required — AWS region where the peer VPC is located.
      - `peering_connection_id` string, nullable — ID of the AWS VPC peering connection, assigned after the peering request is accepted.
    - `id` string, uuid, required
    - `state` 'created' | 'initializing' | 'pending-acceptance' | 'pending-user-action' | 'ready' | 'terminating' | 'terminated' | 'error', required — The current state of the Transit Gateway. Possible values: - `created` - The attachment has been created but is not attached to transit gateway. - `initializing` - The attachment is in the process of being initialized and is setting up necessary resources. - `pending-acceptance` The attachment request is awaiting acceptance in customer VPC. - `pending-user-action` The attachment request is awaiting user action in customer VPC. - `ready` - The transit gateway attachment is fully operational and can route traffic as configured. - `terminating` - The attachment is in the process of being deleted and is no longer accepting new traffic. - `terminated` - The attachment has been fully deleted and is no longer available. - `error` - The attachment is in an error state.
    - `state_metadata` object — Metadata describing the backing state of the transit gateway and why it may be in an erroneous state.
      - `reported_status` string — Reported status of the transit gateway from backing infrastructure.
      - `reason` string — Reason why the transit gateway may be in an erroneous state, reported from backing infrastructure.
    - `entity_version` integer, required — Monotonically-increasing version count of the transit gateway, to indicate the order of updates to the transit gateway.
    - `created_at` string, date-time, required — An RFC-3339 timestamp representation of transit gateway creation date.
    - `updated_at` string, date-time, required — An RFC-3339 timestamp representation of transit gateway update date.
  - AzureTransitGatewayResponse
    - `name` string, required — Human-readable name of the transit gateway.
    - `dns_config` object[], required — List of mappings from remote DNS server IP address sets to proxied internal domains, for a transit gateway attachment.
      - `remote_dns_server_ip_addresses` string[], required — Remote DNS Server IP Addresses to connect to for resolving internal DNS via a transit gateway.
      - `domain_proxy_list` string[], required — Internal domain names to proxy for DNS resolution from the listed remote DNS server IP addresses, for a transit gateway.
    - `transit_gateway_attachment_config` AzureVNETPeeringAttachmentConfig, required
      - `kind` 'azure-vnet-peering-attachment', required
      - `tenant_id` string, required — Tenant ID for the Azure VNET Peering attachment.
      - `subscription_id` string, required — Subscription ID for the Azure VNET Peering attachment.
      - `resource_group_name` string, required — Resource Group Name for the Azure VNET Peering attachment.
      - `vnet_name` string, required — VNET Name for the Azure VNET Peering attachment.
    - `id` string, uuid, required
    - `state` 'created' | 'initializing' | 'pending-acceptance' | 'pending-user-action' | 'ready' | 'terminating' | 'terminated' | 'error', required — The current state of the Transit Gateway. Possible values: - `created` - The attachment has been created but is not attached to transit gateway. - `initializing` - The attachment is in the process of being initialized and is setting up necessary resources. - `pending-acceptance` The attachment request is awaiting acceptance in customer VPC. - `pending-user-action` The attachment request is awaiting user action in customer VPC. - `ready` - The transit gateway attachment is fully operational and can route traffic as configured. - `terminating` - The attachment is in the process of being deleted and is no longer accepting new traffic. - `terminated` - The attachment has been fully deleted and is no longer available. - `error` - The attachment is in an error state.
    - `state_metadata` object — Metadata describing the backing state of the transit gateway and why it may be in an erroneous state.
      - `reported_status` string — Reported status of the transit gateway from backing infrastructure.
      - `reason` string — Reason why the transit gateway may be in an erroneous state, reported from backing infrastructure.
    - `entity_version` integer, required — Monotonically-increasing version count of the transit gateway, to indicate the order of updates to the transit gateway.
    - `created_at` string, date-time, required — An RFC-3339 timestamp representation of transit gateway creation date.
    - `updated_at` string, date-time, required — An RFC-3339 timestamp representation of transit gateway update date.
  - AzureVHubPeeringGatewayResponse
    - `name` string, required — Human-readable name of the transit gateway.
    - `dns_config` object[], required — List of mappings from remote DNS server IP address sets to proxied internal domains, for a transit gateway attachment.
      - `remote_dns_server_ip_addresses` string[], required — Remote DNS Server IP Addresses to connect to for resolving internal DNS via a transit gateway.
      - `domain_proxy_list` string[], required — Internal domain names to proxy for DNS resolution from the listed remote DNS server IP addresses, for a transit gateway.
    - `transit_gateway_attachment_config` AzureVHubPeeringAttachmentConfig, required
      - `kind` 'azure-vhub-peering-attachment', required
      - `tenant_id` string, required — Tenant ID of the Azure Virtual Hub resource.
      - `subscription_id` string, required — Subscription ID of the Azure Virtual Hub resource.
      - `resource_group_name` string, required — Resource Group Name of the Azure Virtual Hub resource.
      - `vhub_name` string, required — Name of the Azure Virtual Hub resource.
    - `id` string, uuid, required
    - `state` 'created' | 'initializing' | 'pending-acceptance' | 'pending-user-action' | 'ready' | 'terminating' | 'terminated' | 'error', required — The current state of the Transit Gateway. Possible values: - `created` - The attachment has been created but is not attached to transit gateway. - `initializing` - The attachment is in the process of being initialized and is setting up necessary resources. - `pending-acceptance` The attachment request is awaiting acceptance in customer VPC. - `pending-user-action` The attachment request is awaiting user action in customer VPC. - `ready` - The transit gateway attachment is fully operational and can route traffic as configured. - `terminating` - The attachment is in the process of being deleted and is no longer accepting new traffic. - `terminated` - The attachment has been fully deleted and is no longer available. - `error` - The attachment is in an error state.
    - `state_metadata` object — Metadata describing the backing state of the transit gateway and why it may be in an erroneous state.
      - `reported_status` string — Reported status of the transit gateway from backing infrastructure.
      - `reason` string — Reason why the transit gateway may be in an erroneous state, reported from backing infrastructure.
    - `entity_version` integer, required — Monotonically-increasing version count of the transit gateway, to indicate the order of updates to the transit gateway.
    - `created_at` string, date-time, required — An RFC-3339 timestamp representation of transit gateway creation date.
    - `updated_at` string, date-time, required — An RFC-3339 timestamp representation of transit gateway update date.
  - GCPVPCPeeringGatewayResponse
    - `name` string, required — Human-readable name of the transit gateway.
    - `dns_config` object[], required — List of mappings from remote DNS server IP address sets to proxied internal domains, for a transit gateway attachment.
      - `remote_dns_server_ip_addresses` string[], required — Remote DNS Server IP Addresses to connect to for resolving internal DNS via a transit gateway.
      - `domain_proxy_list` string[], required — Internal domain names to proxy for DNS resolution from the listed remote DNS server IP addresses, for a transit gateway.
    - `transit_gateway_attachment_config` GCPVPCPeeringAttachmentConfig, required
      - `kind` 'gcp-vpc-peering-attachment', required
      - `peer_project_id` string, required — GCP Project ID of the peer account to create attachment to.
      - `peer_vpc_name` string, required — GCP VPC Name of the peer account to create attachment to.
    - `id` string, uuid, required
    - `state` 'created' | 'initializing' | 'pending-acceptance' | 'pending-user-action' | 'ready' | 'terminating' | 'terminated' | 'error', required — The current state of the Transit Gateway. Possible values: - `created` - The attachment has been created but is not attached to transit gateway. - `initializing` - The attachment is in the process of being initialized and is setting up necessary resources. - `pending-acceptance` The attachment request is awaiting acceptance in customer VPC. - `pending-user-action` The attachment request is awaiting user action in customer VPC. - `ready` - The transit gateway attachment is fully operational and can route traffic as configured. - `terminating` - The attachment is in the process of being deleted and is no longer accepting new traffic. - `terminated` - The attachment has been fully deleted and is no longer available. - `error` - The attachment is in an error state.
    - `state_metadata` object — Metadata describing the backing state of the transit gateway and why it may be in an erroneous state.
      - `reported_status` string — Reported status of the transit gateway from backing infrastructure.
      - `reason` string — Reason why the transit gateway may be in an erroneous state, reported from backing infrastructure.
    - `entity_version` integer, required — Monotonically-increasing version count of the transit gateway, to indicate the order of updates to the transit gateway.
    - `created_at` string, date-time, required — An RFC-3339 timestamp representation of transit gateway creation date.
    - `updated_at` string, date-time, required — An RFC-3339 timestamp representation of transit gateway update date.
  - AwsResourceEndpointGatewayResponse
    - `name` string, required — Human-readable name of the transit gateway.
    - `dns_config` object[], required — List of mappings from remote DNS server IP address sets to proxied internal domains, for a transit gateway attachment.
      - `remote_dns_server_ip_addresses` string[], required — Remote DNS Server IP Addresses to connect to for resolving internal DNS via a transit gateway.
      - `domain_proxy_list` string[], required — Internal domain names to proxy for DNS resolution from the listed remote DNS server IP addresses, for a transit gateway.
    - `transit_gateway_attachment_config` AwsResourceEndpointAttachmentConfigResponse, required
      - `kind` 'aws-resource-endpoint-attachment', required
      - `ram_share_arn` string, required — Resource Share ARN to verify request to create transit gateway attachment.
      - `resource_config` object[], required — List of unique resource config mapping for aws resource endpoint.
        - `resource_config_id` string, required — Resource Config ID to uniquely identify a resource configuration.
        - `domain_name` string, required — Domain Name to uniquely identify a resource configuration.
        - `state` 'initializing' | 'missing' | 'ready' | 'error' | 'terminating', required — The current state of the resource config in AWS Resource Endpoint. Possible values: - `initializing` - The config is in the process of being initialized and is setting up necessary resources. - `missing` - The config is missing and is no longer accepting new traffic. - `ready` - The config is fully operational and can route traffic as configured. - `error` - The config is in an error state, and is not operational. - `terminating` - The config is in the process of being deleted and is no longer accepting new traffic.
    - `id` string, uuid, required
    - `state` 'created' | 'initializing' | 'pending-acceptance' | 'pending-user-action' | 'ready' | 'terminating' | 'terminated' | 'error', required — The current state of the Transit Gateway. Possible values: - `created` - The attachment has been created but is not attached to transit gateway. - `initializing` - The attachment is in the process of being initialized and is setting up necessary resources. - `pending-acceptance` The attachment request is awaiting acceptance in customer VPC. - `pending-user-action` The attachment request is awaiting user action in customer VPC. - `ready` - The transit gateway attachment is fully operational and can route traffic as configured. - `terminating` - The attachment is in the process of being deleted and is no longer accepting new traffic. - `terminated` - The attachment has been fully deleted and is no longer available. - `error` - The attachment is in an error state.
    - `state_metadata` object — Metadata describing the backing state of the transit gateway and why it may be in an erroneous state.
      - `reported_status` string — Reported status of the transit gateway from backing infrastructure.
      - `reason` string — Reason why the transit gateway may be in an erroneous state, reported from backing infrastructure.
    - `entity_version` integer, required — Monotonically-increasing version count of the transit gateway, to indicate the order of updates to the transit gateway.
    - `created_at` string, date-time, required — An RFC-3339 timestamp representation of transit gateway creation date.
    - `updated_at` string, date-time, required — An RFC-3339 timestamp representation of transit gateway update date.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `409` — Conflict

---

[API](https://skmtc.net/kong/apis/konnect-api.md) · [All operations](https://skmtc.net/kong/apis/konnect-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kong/konnect-api/versions/06734a9c491f/schema)
