An example demonstrating the setup of an AWS Global Accelerator Cross Account Attachment with additional optional arguments including principals and resource details.

Terraform Template

resource "aws_globalaccelerator_cross_account_attachment" "example" {
  name = "example-cross-account-attachment"
  principals = ["123456789012"]

  resource {
    endpoint_id = "arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188"
    region = "us-west-2"
  }
}