-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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: Send correct values when resizing #3127
resource/aws_redshift_cluster: Send correct values when resizing #3127
Conversation
@@ -342,6 +342,47 @@ func TestAccAWSRedshiftCluster_updateNodeCount(t *testing.T) { | |||
testAccCheckAWSRedshiftClusterExists("aws_redshift_cluster.default", &v), | |||
resource.TestCheckResourceAttr( | |||
"aws_redshift_cluster.default", "number_of_nodes", "2"), | |||
resource.TestCheckResourceAttr( | |||
"aws_redshift_cluster.default", "cluster-type", "multi-node"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For all uses in the testing here, the cluster-type
attribute should be cluster_type
and node-type
should be node_type
to match the resource schema, otherwise testing fails. e.g.:
=== RUN TestAccAWSRedshiftCluster_updateNodeCount
--- FAIL: TestAccAWSRedshiftCluster_updateNodeCount (2421.66s)
testing.go:513: Step 1 error: Check failed: Check 3/4 error: aws_redshift_cluster.default: Attribute 'cluster-type' not found
=== RUN TestAccAWSRedshiftCluster_updateNodeType
--- FAIL: TestAccAWSRedshiftCluster_updateNodeType (923.17s)
testing.go:513: Step 0 error: Check failed: Check 2/2 error: aws_redshift_cluster.default: Attribute 'node-type' not found
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, I was having issues getting the test to run locally, so I missed that, thanks!
@bflad Fixed the test cases, thanks for pointing that out. |
Hmm, I'm getting this strange error when running the acceptance testing now. I will try to look into it later today if I have time.
|
My team is hitting this now, FYI, thanks for the effort. |
+1 just encountered this. Anything pending to merge this fix, @bflad? |
When resizing a Redshift cluster, the AWS API is expecting the Cluster Type, Node Type, and Number of Nodes regardless of which value changed. If not passed it will error out with `[WARN] Error modifying Redshift Cluster (navistone-public-cluster): InvalidParameterCombination: Number of nodes for cluster type multi-node must be greater than or equal to 2` Now we send all values if any one of them change. Signed-off-by: Ken Herner <kherner@navistone.com>
Signed-off-by: Ken Herner <kherner@navistone.com>
d8ea4cf
to
0524ea9
Compare
0524ea9
to
2589a63
Compare
Change the node type from dc2.8xlarge to dc2.large to pass E2E testing. Signed-off-by: Ken Herner <kherner@navistone.com>
2589a63
to
db956b5
Compare
@bflad I should have fixed the acceptance test issue with the node type now, could you retest acceptance? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great -- thanks so much for this @chosenken! 🚀
14 tests passed (all tests)
=== RUN TestAccAWSRedshiftCluster_tags
--- PASS: TestAccAWSRedshiftCluster_tags (789.99s)
=== RUN TestAccAWSRedshiftCluster_basic
--- PASS: TestAccAWSRedshiftCluster_basic (843.02s)
=== RUN TestAccAWSRedshiftCluster_loggingEnabledDeprecated
--- PASS: TestAccAWSRedshiftCluster_loggingEnabledDeprecated (902.67s)
=== RUN TestAccAWSRedshiftCluster_importBasic
--- PASS: TestAccAWSRedshiftCluster_importBasic (924.90s)
=== RUN TestAccAWSRedshiftCluster_kmsKey
--- PASS: TestAccAWSRedshiftCluster_kmsKey (951.25s)
=== RUN TestAccAWSRedshiftCluster_loggingEnabled
--- PASS: TestAccAWSRedshiftCluster_loggingEnabled (994.20s)
=== RUN TestAccAWSRedshiftCluster_snapshotCopy
--- PASS: TestAccAWSRedshiftCluster_snapshotCopy (1029.16s)
=== RUN TestAccAWSRedshiftCluster_iamRoles
--- PASS: TestAccAWSRedshiftCluster_iamRoles (1056.28s)
=== RUN TestAccAWSRedshiftCluster_publiclyAccessible
--- PASS: TestAccAWSRedshiftCluster_publiclyAccessible (1067.33s)
=== RUN TestAccAWSRedshiftCluster_enhancedVpcRoutingEnabled
--- PASS: TestAccAWSRedshiftCluster_enhancedVpcRoutingEnabled (1086.62s)
=== RUN TestAccAWSRedshiftCluster_withFinalSnapshot
--- PASS: TestAccAWSRedshiftCluster_withFinalSnapshot (1189.87s)
=== RUN TestAccAWSRedshiftCluster_forceNewUsername
--- PASS: TestAccAWSRedshiftCluster_forceNewUsername (2073.58s)
=== RUN TestAccAWSRedshiftCluster_updateNodeType
--- PASS: TestAccAWSRedshiftCluster_updateNodeType (2789.65s)
=== RUN TestAccAWSRedshiftCluster_updateNodeCount
--- PASS: TestAccAWSRedshiftCluster_updateNodeCount (3435.63s)
This has been released in version 1.18.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
When resizing a Redshift cluster, the AWS API is expecting the Cluster
Type, Node Type, and Number of Nodes regardless of which value changed.
If not passed it will error out with
[WARN] Error modifying Redshift Cluster (navistone-public-cluster): InvalidParameterCombination: Number of nodes for cluster type multi-node must be greater than or equal to 2
Now we send all values if any one of them change. Closes #484
Signed-off-by: Ken Herner kherner@navistone.com