Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resource/aws_redshift_cluster: Acceptance tests fixes #31612

Merged
merged 3 commits into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions internal/service/redshift/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ func ResourceCluster() *schema.Resource {
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice(redshift.AquaConfigurationStatus_Values(), false),
Deprecated: "This parameter is no longer supported by the AWS API. It will be removed in the next major version of the provider.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to add a CHANGELOG entry for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we should

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And the bug fix, too

DiffSuppressFunc: func(k, oldValue, newValue string, d *schema.ResourceData) bool {
return true
},
},
"arn": {
Type: schema.TypeString,
Expand Down
6 changes: 3 additions & 3 deletions internal/service/redshift/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func TestAccRedshiftCluster_aqua(t *testing.T) {
Config: testAccClusterConfig_aqua(rName, "enabled"),
Check: resource.ComposeTestCheckFunc(
testAccCheckClusterExists(ctx, resourceName, &v),
resource.TestCheckResourceAttr(resourceName, "aqua_configuration_status", "enabled"),
resource.TestCheckResourceAttr(resourceName, "aqua_configuration_status", "auto"),
),
},
{
Expand All @@ -97,14 +97,14 @@ func TestAccRedshiftCluster_aqua(t *testing.T) {
Config: testAccClusterConfig_aqua(rName, "disabled"),
Check: resource.ComposeTestCheckFunc(
testAccCheckClusterExists(ctx, resourceName, &v),
resource.TestCheckResourceAttr(resourceName, "aqua_configuration_status", "disabled"),
resource.TestCheckResourceAttr(resourceName, "aqua_configuration_status", "auto"),
),
},
{
Config: testAccClusterConfig_aqua(rName, "enabled"),
Check: resource.ComposeTestCheckFunc(
testAccCheckClusterExists(ctx, resourceName, &v),
resource.TestCheckResourceAttr(resourceName, "aqua_configuration_status", "enabled"),
resource.TestCheckResourceAttr(resourceName, "aqua_configuration_status", "auto"),
),
},
},
Expand Down
2 changes: 1 addition & 1 deletion internal/service/redshift/wait.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func waitClusterCreated(ctx context.Context, conn *redshift.Redshift, id string,

func waitClusterDeleted(ctx context.Context, conn *redshift.Redshift, id string, timeout time.Duration) (*redshift.Cluster, error) {
stateConf := &retry.StateChangeConf{
Pending: []string{clusterAvailabilityStatusModifying},
Pending: []string{clusterAvailabilityStatusMaintenance, clusterAvailabilityStatusModifying},
Target: []string{},
Refresh: statusClusterAvailability(ctx, conn, id),
Timeout: timeout,
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 @@ -61,7 +61,9 @@ The following arguments are supported:
The version selected runs on all the nodes in the cluster.
* `allow_version_upgrade` - (Optional) If true , major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster. Default is `true`.
* `apply_immediately` - (Optional) Specifies whether any cluster modifications are applied immediately, or during the next maintenance window. Default is `false`.
* `aqua_configuration_status` - (Optional) The value represents how the cluster is configured to use AQUA (Advanced Query Accelerator) after the cluster is restored. Possible values are `enabled`, `disabled`, and `auto`. Requires Cluster reboot.
* `aqua_configuration_status` - (Optional, **Deprecated**) The value represents how the cluster is configured to use AQUA (Advanced Query Accelerator) after the cluster is restored.
No longer supported by the AWS API.
Always returns `auto`.
* `number_of_nodes` - (Optional) The number of compute nodes in the cluster. This parameter is required when the ClusterType parameter is specified as multi-node. Default is 1.
* `publicly_accessible` - (Optional) If true, the cluster can be accessed from a public network. Default is `true`.
* `encrypted` - (Optional) If true , the data in the cluster is encrypted at rest.
Expand Down