Resource: aws_redshiftserverless_resource_policy

Creates a new Amazon Redshift Serverless Resource Policy.

Example Usage

resource "aws_redshiftserverless_resource_policy" "example" {
  resource_arn = aws_redshiftserverless_snapshot.example.arn
  policy = jsonencode({
    Version = "2012-10-17"
    Statement = [{
      Effect = "Allow"
      Principal = {
        AWS = ["12345678901"]
      }
      Action = [
        "redshift-serverless:RestoreFromSnapshot",
      ]
      Sid = ""
    }]
  })
}

Argument Reference

This resource supports the following arguments:

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 Redshift Serverless Resource Policies using the resource_arn. For example:

import {
  to = aws_redshiftserverless_resource_policy.example
  id = "example"
}

Using terraform import, import Redshift Serverless Resource Policies using the resource_arn. For example:

% terraform import aws_redshiftserverless_resource_policy.example example