This template creates a MACSec key association using a Direct Connect connection with specified CKN and CAK values.

Terraform Template

data "aws_dx_connection" "example" {
  name = "tf-dx-connection"
}

resource "aws_dx_macsec_key_association" "test" {
  cak = "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789"
  ckn = "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
  connection_id = data.aws_dx_connection.example.id
}