Resource: aws_globalaccelerator_cross_account_attachment

Terraform resource for managing an AWS Global Accelerator Cross Account Attachment.

Example Usage

Basic Usage

resource "aws_globalaccelerator_cross_account_attachment" "example" {
  name = "example-cross-account-attachment"
}

Usage with Optional Arguments

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"
  }
}

Argument Reference

The following arguments are required:

The following arguments are optional:

Attribute Reference

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

Timeouts

Configuration options:

Import

In Terraform v1.5.0 and later, use an import block to import Global Accelerator Cross Account Attachment using the example_id_arg. For example:

import {
  to = aws_globalaccelerator_cross_account_attachment.example
  id = "arn:aws:globalaccelerator::012345678910:attachment/01234567-abcd-8910-efgh-123456789012"
}

Using terraform import, import Global Accelerator Cross Account Attachment using the example_id_arg. For example:

% terraform import aws_globalaccelerator_cross_account_attachment.example arn:aws:globalaccelerator::012345678910:attachment/01234567-abcd-8910-efgh-123456789012