diff --git a/builtin/providers/aws/resource_aws_redshift_cluster.go b/builtin/providers/aws/resource_aws_redshift_cluster.go index c068eb161..e9d4b2e1e 100644 --- a/builtin/providers/aws/resource_aws_redshift_cluster.go +++ b/builtin/providers/aws/resource_aws_redshift_cluster.go @@ -245,6 +245,11 @@ func resourceAwsRedshiftCluster() *schema.Resource { Optional: true, }, + "owner_account": { + Type: schema.TypeString, + Optional: true, + }, + "tags": tagsSchema(), }, } @@ -274,6 +279,10 @@ func resourceAwsRedshiftClusterCreate(d *schema.ResourceData, meta interface{}) AutomatedSnapshotRetentionPeriod: aws.Int64(int64(d.Get("automated_snapshot_retention_period").(int))), } + if v, ok := d.GetOk("owner_account"); ok { + restoreOpts.OwnerAccount = aws.String(v.(string)) + } + if v, ok := d.GetOk("snapshot_cluster_identifier"); ok { restoreOpts.SnapshotClusterIdentifier = aws.String(v.(string)) } diff --git a/website/source/docs/providers/aws/r/redshift_cluster.html.markdown b/website/source/docs/providers/aws/r/redshift_cluster.html.markdown index e3946df12..d4801b676 100644 --- a/website/source/docs/providers/aws/r/redshift_cluster.html.markdown +++ b/website/source/docs/providers/aws/r/redshift_cluster.html.markdown @@ -62,6 +62,7 @@ string. * `final_snapshot_identifier` - (Optional) The identifier of the final snapshot that is to be created immediately before deleting the cluster. If this parameter is provided, `skip_final_snapshot` must be false. * `snapshot_identifier` - (Optional) The name of the snapshot from which to create the new cluster. * `snapshot_cluster_identifier` - (Optional) The name of the cluster the source snapshot was created from. +* `owner_account` - (Optional) The AWS customer account used to create or copy the snapshot. Required if you are restoring a snapshot you do not own, optional if you own the snapshot. * `iam_roles` - (Optional) A list of IAM Role ARNs to associate with the cluster. A Maximum of 10 can be associated to the cluster at any time. * `enable_logging` - (Optional) Enables logging information such as queries and connection attempts, for the specified Amazon Redshift cluster. Defaults to `false`. * `bucket_name` - (Optional, required when `enable_logging` is `true`) The name of an existing S3 bucket where the log files are to be stored. Must be in the same region as the cluster and the cluster must have read bucket and put object permissions.