confluent_transit_gateway_attachment Resource

General Availability

confluent_transit_gateway_attachment provides a Transit Gateway Attachment resource that enables creating, editing, and deleting Transit Gateway Attachments on Confluent Cloud.

Example Usage

Example Transit Gateway Attachment on AWS

resource "confluent_environment" "development" {
  display_name = "Development"
}

resource "confluent_network" "aws-transit-gateway-attachment" {
  display_name     = "AWS Transit Gateway Attachment Network"
  cloud            = "AWS"
  region           = "us-east-2"
  cidr             = "10.10.0.0/16"
  connection_types = ["TRANSITGATEWAY"]
  environment {
    id = confluent_environment.development.id
  }

  lifecycle {
    prevent_destroy = true
  }
}

resource "confluent_transit_gateway_attachment" "aws" {
  display_name = "AWS Transit Gateway Attachment"
  aws {
    ram_resource_share_arn = "arn:aws:ram:us-east-2:000000000000:resource-share/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx"
    transit_gateway_id     = "tgw-xxxxxxxxxxxxxxxxx"
    routes                 = ["192.168.0.0/16", "172.16.0.0/12", "100.64.0.0/10", "10.0.0.0/8"]
  }
  environment {
    id = confluent_environment.development.id
  }
  network {
    id = confluent_network.aws-transit-gateway-attachment.id
  }

  lifecycle {
    prevent_destroy = true
  }
}

Argument Reference

The following arguments are supported:

Attributes Reference

In addition to the preceding arguments, the following attributes are exported:

Import

You can import a Transit Gateway Attachment by using Environment ID and Transit Gateway Attachment ID, in the format <Environment ID>/<Transit Gateway Attachment ID>. The following example shows how to import a Transit Gateway Attachment:

$ export CONFLUENT_CLOUD_API_KEY="<cloud_api_key>"
$ export CONFLUENT_CLOUD_API_SECRET="<cloud_api_secret>"
$ terraform import confluent_transit_gateway_attachment.my_tgwa env-abc123/tgwa-abc123

Getting Started

The following end-to-end examples might help to get started with confluent_transit_gateway_attachment resource: