From 4673418f5b81a19f377132a2793da9252ed3c79d Mon Sep 17 00:00:00 2001 From: Jared Baker Date: Tue, 9 Apr 2024 13:35:46 -0400 Subject: [PATCH] r/aws_redshift_cluster: deprecate snapshot_copy This argument is deprecated in favor of the new, standalone `aws_redshift_snapshot_copy` resource. --- internal/service/redshift/cluster.go | 4 +++- website/docs/r/redshift_cluster.html.markdown | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/service/redshift/cluster.go b/internal/service/redshift/cluster.go index eeb2ed9b3fad..1120218e940d 100644 --- a/internal/service/redshift/cluster.go +++ b/internal/service/redshift/cluster.go @@ -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, diff --git a/website/docs/r/redshift_cluster.html.markdown b/website/docs/r/redshift_cluster.html.markdown index 4cd8a9325c88..d9dc6d4befe1 100644 --- a/website/docs/r/redshift_cluster.html.markdown +++ b/website/docs/r/redshift_cluster.html.markdown @@ -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 @@ -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.