Resource: aws_redshift_resource_policy

Creates a new Amazon Redshift Resource Policy.

Example Usage

resource "aws_redshift_resource_policy" "example" {
  resource_arn = aws_redshift_cluster.example.cluster_namespace_arn
  policy = jsonencode({
    Version = "2012-10-17"
    Statement = [{
      Effect = "Allow"
      Principal = {
        AWS = "arn:aws:iam::12345678901:root"
      }
      Action   = "redshift:CreateInboundIntegration"
      Resource = aws_redshift_cluster.example.cluster_namespace_arn
      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 Resource Policies using the resource_arn. For example:

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

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

% terraform import aws_redshift_resource_policy.example example