Skip to content

Resource: awsRamResourceAssociation

Manages a Resource Access Manager (RAM) Resource Association.

\~> NOTE: Certain AWS resources (e.g., EC2 Subnets) can only be shared in an AWS account that is a member of an AWS Organizations organization with organization-wide Resource Access Manager functionality enabled. See the Resource Access Manager User Guide and AWS service specific documentation for additional information.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.ramResourceAssociation.RamResourceAssociation(this, "example", {
  resourceArn: "${aws_subnet.example.arn}",
  resourceShareArn: "${aws_ram_resource_share.example.arn}",
});

Argument Reference

The following arguments are supported:

  • resourceArn - (Required) Amazon Resource Name (ARN) of the resource to associate with the RAM Resource Share.
  • resourceShareArn - (Required) Amazon Resource Name (ARN) of the RAM Resource Share.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • id - The Amazon Resource Name (ARN) of the resource share.

Import

RAM Resource Associations can be imported using their Resource Share ARN and Resource ARN separated by a comma, e.g.,

$ 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