Skip to content

Resource: awsRedshiftserverlessResourcePolicy

Creates a new Amazon Redshift Serverless Resource Policy.

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.redshiftserverlessResourcePolicy.RedshiftserverlessResourcePolicy(
  this,
  "example",
  {
    policy:
      '${jsonencode({\n    Version = "2012-10-17"\n    Statement = [{\n      Effect = "Allow"\n      Principal = {\n        AWS = ["12345678901"]\n      }\n      Action = [\n        "redshift-serverless:RestoreFromSnapshot",\n      ]\n      Sid = ""\n    }]\n  })}',
    resourceArn: "${aws_redshiftserverless_snapshot.example.arn}",
  }
);

Argument Reference

The following arguments are supported:

  • resourceArn - (Required) The Amazon Resource Name (ARN) of the account to create or update a resource policy for.
  • policy - (Required) The policy to create or update. For example, the following policy grants a user authorization to restore a snapshot.

Attributes Reference

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

  • id - The Amazon Resource Name (ARN) of the account to create or update a resource policy for.

Import

Redshift Serverless Resource Policies can be imported using the resourceArn, e.g.,

$ terraform import aws_redshiftserverless_resource_policy.example example