Resource: aws_dynamodb_resource_policy

Terraform resource for managing an AWS DynamoDB Resource Policy.

Example Usage

Basic Usage

resource "aws_dynamodb_resource_policy" "example" {
  resource_arn = aws_dynamodb_table.example.arn
  policy       = data.aws_iam_policy_document.test.json
}

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:

Import

In Terraform v1.5.0 and later, use an import block to import DynamoDB Resource Policy using the example_id_arg. For example:

import {
  to = aws_dynamodb_resource_policy.example
  id = "arn:aws:dynamodb:us-east-1:1234567890:table/my-table"
}

Using terraform import, import DynamoDB Resource Policy using the example_id_arg. For example:

% terraform import aws_dynamodb_resource_policy.example arn:aws:dynamodb:us-east-1:1234567890:table/my-table