Skip to content

Commit

Permalink
resource/aws_redshift_cluster: Increase default Update timeout to 75 …
Browse files Browse the repository at this point in the history
…minutes and remove arbitrary lower create timeout in testing

Reference: #14754

Previously (inconsistently):

```
=== CONT  TestAccAWSRedshiftCluster_basic
TestAccAWSRedshiftCluster_basic: resource_aws_redshift_cluster_test.go:69: Step 1/2 error: terraform failed: exit status 1
stderr:
Error: Error waiting for Redshift Cluster state to be "available": timeout while waiting for state to become 'available' (last state: 'creating', timeout: 30m0s)

=== CONT  TestAccAWSRedshiftCluster_changeEncryption1
TestAccAWSRedshiftCluster_changeEncryption1: resource_aws_redshift_cluster_test.go:526: Step 1/2 error: terraform failed: exit status 1
stderr:
Error: Error waiting for Redshift Cluster state to be "available": timeout while waiting for state to become 'available' (last state: 'creating', timeout: 30m0s)

=== CONT  TestAccAWSRedshiftCluster_updateNodeCount
TestAccAWSRedshiftCluster_updateNodeCount: resource_aws_redshift_cluster_test.go:353: Step 1/2 error: terraform failed: exit status 1
stderr:
Error: Error waiting for Redshift Cluster state to be "available": timeout while waiting for state to become 'available' (last state: 'creating', timeout: 30m0s)

=== CONT  TestAccAWSRedshiftCluster_updateNodeType
TestAccAWSRedshiftCluster_updateNodeType: resource_aws_redshift_cluster_test.go:390: Step 1/2 error: terraform failed: exit status 1
stderr:
Error: Error waiting for Redshift Cluster state to be "available": timeout while waiting for state to become 'available' (last state: 'creating', timeout: 30m0s)

=== CONT  TestAccAWSRedshiftCluster_updateNodeCount
TestAccAWSRedshiftCluster_updateNodeCount: resource_aws_redshift_cluster_test.go:353: Step 2/2 error: terraform failed: exit status 1
stderr:
Error: Error Modifying Redshift Cluster (tf-redshift-cluster-7778138192916979662): timeout while waiting for state to become 'available' (last state: 'resizing', timeout: 40m0s)
```

The 75 minute update timeout value is chosen to match the create timeout value.

Output from acceptance testing:

```
... pending ...
```
  • Loading branch information
bflad committed Sep 24, 2020
1 parent f1619ff commit 9391841
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion aws/resource_aws_redshift_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func resourceAwsRedshiftCluster() *schema.Resource {

Timeouts: &schema.ResourceTimeout{
Create: schema.DefaultTimeout(75 * time.Minute),
Update: schema.DefaultTimeout(40 * time.Minute),
Update: schema.DefaultTimeout(75 * time.Minute),
Delete: schema.DefaultTimeout(40 * time.Minute),
},

Expand Down
4 changes: 0 additions & 4 deletions aws/resource_aws_redshift_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -765,10 +765,6 @@ resource "aws_redshift_cluster" "default" {
automated_snapshot_retention_period = 0
allow_version_upgrade = false
skip_final_snapshot = true
timeouts {
create = "30m"
}
}
`, rInt))
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/redshift_cluster.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ string.
[Timeouts](/docs/configuration/resources.html#timeouts) configuration options:

- `create` - (Default `75 minutes`) Used for creating Clusters.
- `update` - (Default `40 minutes`) Used for Cluster Argument changes.
- `update` - (Default `75 minutes`) Used for updating Clusters.
- `delete` - (Default `40 minutes`) Used for destroying Clusters.

### Nested Blocks
Expand Down

0 comments on commit 9391841

Please sign in to comment.