Manages a Resource Access Manager (RAM) Resource Association.
resource "aws_ram_resource_association" "example" {
resource_arn = aws_subnet.example.arn
resource_share_arn = aws_ram_resource_share.example.arn
}
This resource supports the following arguments:
resource_arn
- (Required) Amazon Resource Name (ARN) of the resource to associate with the RAM Resource Share.resource_share_arn
- (Required) Amazon Resource Name (ARN) of the RAM Resource Share.This resource exports the following attributes in addition to the arguments above:
id
- The Amazon Resource Name (ARN) of the resource share.In Terraform v1.5.0 and later, use an import
block to import RAM Resource Associations using their Resource Share ARN and Resource ARN separated by a comma. For example:
import {
to = aws_ram_resource_association.example
id = "arn:aws:ram:eu-west-1:123456789012:resource-share/73da1ab9-b94a-4ba3-8eb4-45917f7f4b12,arn:aws:ec2:eu-west-1:123456789012:subnet/subnet-12345678"
}
Using terraform import
, import RAM Resource Associations using their Resource Share ARN and Resource ARN separated by a comma. For example:
% terraform import aws_ram_resource_association.example arn:aws:ram:eu-west-1:123456789012:resource-share/73da1ab9-b94a-4ba3-8eb4-45917f7f4b12,arn:aws:ec2:eu-west-1:123456789012:subnet/subnet-12345678