supplying cluster_type to an aws_redshift_cluster resource can cause the resource to always be "changed" on subsequent apply operations #11275
Labels
service/redshift
Issues and PRs that pertain to the redshift service.
This issue was originally opened by @mmccord-mdbuyline as hashicorp/terraform#23660. It was migrated here as a result of the provider split. The original body of the issue is below.
@stack72 @bsiegel -- The change associated with this issue appears to have introduced a slight bug with the
aws_redshift_cluster
resource. If you create a cluster by supplying the resource with acluster_type
ofsingle-node
andnumber_of_nodes
with1
and then resize the cluster by supplying acluster_type
ofmulti-node
andnumber_of_nodes
with2
then the resource will always be listed as "changed" in any subsequentapply
operations.In the plan output of any subsequent apply operations it will show
cluster_type
as changing frommulti-node
tomulti-node
and then try to execute a resize operation with the AWS API (which AWS will dutifully carry out even if the actual size of the cluster hasn't changed, thus taking the cluster down in the process). Re-worded: Essentially supplying acluster_type
in this way will continuously taint the cluster resource on apply.The work around is to simply remove the supplied
cluster_type
entirely and allow it to be computed vianumber_of_nodes
. I'm not sure what the suggested behavior here should be, but the current behavior is certainly surprising when you first encounter it. I was able to find the source issue fairly easily, but others may not be so lucky and resize operations do take down the cluster.Whatever the code change is here I also suspect that some addition to the documentation is in order given that the below don't really fully explain the computed relationship.
and
documentation for convenience
original code change that seems to have caused the issue
The text was updated successfully, but these errors were encountered: