Closed RiaanRossouw closed 6 years ago
Temporarily looks like ignore works for this one. ignore_changes = ["node_count"]
Can you clarify, are you leaving node_count
empty or specifically setting node_count=0
? Can you include the relevant snippet of the .tf file please?
Sorry for the delayed response. I am setting node count = 1. DBSystem.tf node_count = "${var.DevTestDB01-NodeCount}" variables.tf variable "DevTestDB01-NodeCount" { default = "1" }
@RiaanRossouw Thanks for the extra info.
I noticed that you hit this issue with the v2.0.6 provider. Can you try with the latest version provider (https://github.com/oracle/terraform-provider-oci/releases/tag/v2.1.1)?
In v2.0.6, the Terraform state file's value for node_count
could be erroneously set to 0 due to it being omitted from a state refresh request to the service.
The latest provider's behavior is to continue to store the config value in state if the Terraform refresh omits the node_count
. This should help avoid undesirable diffs in this scenario.
Thanks for the update I will verify in a new environment as the one I reported this issue on is now semi production and I cant mess around much in there. I will report back once verified.
Another note worth mentioning. The node_count
property doesn't apply to Dense and HighIO shapes because the node count can only be 1 for such shapes.
So you could also avoid this issue by the removing the node_count
field from the config.
Good idea. It happens to be BM.DenseIO1.36. I plan to test your suggestions on Monday.
Hi.
Initially I reported using version v2.0.6. Since I was on v2.0.7 currently I tested: A) With node_count configured still triggers a change stating node count 0 ==> 1. B) Removing node_count completely in my tests works and no change triggered.
I also updated to v2.1.1 and the same is true as for v2.0.7 above. $ tf version Terraform v0.11.3
Thanks for the information @RiaanRossouw . The recommendation here is to avoid specifying node_count
when specifying Dense or HighIO shapes.
Please let us know if you have any other concerns. Otherwise, we can close this issue.
Closing the issue. The recommendation for the DBSystem resources is not to specify "node_count" for Dense or HighIO shapes.
@RiaanRossouw , let us know if you have other questions.
Terraform Version
Terraform v0.11.2
Description:
Deploying a DBSystem works for us. BUT every subsequent terraform plan shows it wants to destroy and re-create based on node count changing from 0 => 1. I am not making a change.
Terraform Plan