Terraform resource for managing an AWS Global Accelerator Cross Account Attachment.
resource "aws_globalaccelerator_cross_account_attachment" "example" {
name = "example-cross-account-attachment"
}
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"
}
}
The following arguments are required:
name
- (Required) Name of the Cross Account Attachment.The following arguments are optional:
principals
- (Optional) List of AWS account IDs that are allowed to associate resources with the accelerator.resource
- (Optional) List of resources to be associated with the accelerator.
endpoint_id
- (Optional) The endpoint ID for the endpoint that is specified as a AWS resource.region
- (Optional) The AWS Region where a shared endpoint resource is located.tags
- (Optional) A map of tags to assign to the resource. If configured with a provider default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.This resource exports the following attributes in addition to the arguments above:
arn
- ARN of the Cross Account Attachment.id
- ID of the Cross Account Attachment.created_time
- Creation Time when the Cross Account Attachment.last_modified_time
- Last modified time of the Cross Account Attachment.tags_all
- A map of tags assigned to the resource, including those inherited from the provider default_tags
configuration block.create
- (Default 30m
)update
- (Default 30m
)delete
- (Default 30m
)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