Skip to content

Commit

Permalink
r/aws_redshift_cluster: deprecate logging
Browse files Browse the repository at this point in the history
This argument is deprecated in favor of the new, standalone `aws_redshift_logging` resource.
  • Loading branch information
jar-b committed Apr 11, 2024
1 parent b7a7383 commit 844693a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changelog/36862.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
```release-note:new-resource
aws_redshift_logging
```
```release-note:note
resource/aws_redshift_cluster: The `logging` argument is now deprecated. Use the `aws_redshift_logging` resource instead.
```
4 changes: 3 additions & 1 deletion internal/service/redshift/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,9 @@ func ResourceCluster() *schema.Resource {
ValidateFunc: verify.ValidARN,
},
"logging": {
Type: schema.TypeList,
Type: schema.TypeList,
Deprecated: "Use the aws_redshift_logging 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
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ This resource supports the following arguments:
* `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.
* `logging` - (Optional) Logging, documented below.
* `logging` - (Optional, **Deprecated**) 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, **Deprecated**) Configuration of automatic copy of snapshots from one region to another. Documented below.
Expand All @@ -110,6 +110,8 @@ This resource supports the following arguments:

#### `logging`

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

* `enable` - (Required) Enables logging information such as queries and connection attempts, for the specified Amazon Redshift cluster.
* `bucket_name` - (Optional, required when `enable` is `true` and `log_destination_type` is `s3`) 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.
For more information on the permissions required for the bucket, please read the AWS [documentation](http://docs.aws.amazon.com/redshift/latest/mgmt/db-auditing.html#db-auditing-enable-logging)
Expand Down

0 comments on commit 844693a

Please sign in to comment.