Creates a new Amazon Redshift Resource Policy.
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 = ""
}]
})
}
This resource supports the following arguments:
resource_arn
- (Required) The Amazon Resource Name (ARN) of the account to create or update a resource policy for.policy
- (Required) The content of the resource policy being updated.This resource exports the following attributes in addition to the arguments above:
id
- The Amazon Resource Name (ARN) of the account to create or update a resource policy for.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