Resource: aws_dx_connection

Provides a Connection of Direct Connect.

Example Usage

Create a connection

resource "aws_dx_connection" "hoge" {
  name      = "tf-dx-connection"
  bandwidth = "1Gbps"
  location  = "EqDC2"
}

Request a MACsec-capable connection

resource "aws_dx_connection" "example" {
  name           = "tf-dx-connection"
  bandwidth      = "10Gbps"
  location       = "EqDA2"
  request_macsec = true
}

Configure encryption mode for MACsec-capable connections

resource "aws_dx_connection" "example" {
  name            = "tf-dx-connection"
  bandwidth       = "10Gbps"
  location        = "EqDC2"
  request_macsec  = true
  encryption_mode = "must_encrypt"
}

Argument Reference

This resource supports the following arguments:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import Direct Connect connections using the connection id. For example:

import {
  to = aws_dx_connection.test_connection
  id = "dxcon-ffre0ec3"
}

Using terraform import, import Direct Connect connections using the connection id. For example:

% terraform import aws_dx_connection.test_connection dxcon-ffre0ec3