Skip to content

Commit

Permalink
r/aws_redshift_cluster: deprecate snapshot_copy
Browse files Browse the repository at this point in the history
This argument is deprecated in favor of the new, standalone `aws_redshift_snapshot_copy` resource.
  • Loading branch information
jar-b committed Apr 10, 2024
1 parent 9b4ee1b commit 4673418
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion internal/service/redshift/cluster.go
Expand Up @@ -363,7 +363,9 @@ func ResourceCluster() *schema.Resource {
ForceNew: true,
},
"snapshot_copy": {
Type: schema.TypeList,
Type: schema.TypeList,
Deprecated: "Use the aws_redshift_snapshot_copy resource instead. " +
"This argument will be removed in a future major version.",
MaxItems: 1,
Optional: true,
Computed: true,
Expand Down
4 changes: 3 additions & 1 deletion website/docs/r/redshift_cluster.html.markdown
Expand Up @@ -103,7 +103,7 @@ This resource supports the following arguments:
* `logging` - (Optional) Logging, documented below.
* `maintenance_track_name` - (Optional) The name of the maintenance track for the restored cluster. When you take a snapshot, the snapshot inherits the MaintenanceTrack value from the cluster. The snapshot might be on a different track than the cluster that was the source for the snapshot. For example, suppose that you take a snapshot of a cluster that is on the current track and then change the cluster to be on the trailing track. In this case, the snapshot and the source cluster are on different tracks. Default value is `current`.
* `manual_snapshot_retention_period` - (Optional) The default number of days to retain a manual snapshot. If the value is -1, the snapshot is retained indefinitely. This setting doesn't change the retention period of existing snapshots. Valid values are between `-1` and `3653`. Default value is `-1`.
* `snapshot_copy` - (Optional) Configuration of automatic copy of snapshots from one region to another. Documented below.
* `snapshot_copy` - (Optional, **Deprecated**) Configuration of automatic copy of snapshots from one region to another. Documented below.
* `tags` - (Optional) A map of tags to assign to the resource. If configured with a provider [`default_tags` configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level.

### Nested Blocks
Expand All @@ -119,6 +119,8 @@ For more information on the permissions required for the bucket, please read the

#### `snapshot_copy`

~> The `snapshot_copy` argument is deprecated. Use the [`aws_redshift_snapshot_copy`](./redshift_snapshot_copy.html.markdown) resource instead. This argument will be removed in a future major version.

* `destination_region` - (Required) The destination region that you want to copy snapshots to.
* `retention_period` - (Optional) The number of days to retain automated snapshots in the destination region after they are copied from the source region. Defaults to `7`.
* `grant_name` - (Optional) The name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to the destination region.
Expand Down

0 comments on commit 4673418

Please sign in to comment.