OCI Resource Manager: implementing Terraform Plan Not Recognizing Variable Changes
I'm optimizing some code but I've been banging my head against this for hours. I'm using OCI Resource Manager with Terraform to manage my cloud infrastructure, specifically OCI compute instances and networking resources. Recently, I updated some variable values in my `variables.tf` file, but when I run `terraform plan`, I notice that it does not recognize these changes. Instead, it shows no changes detected and suggests that everything is up to date. Here’s the relevant part of my `variables.tf`: ```hcl variable "instance_shape" { description = "The shape of the instance" default = "VM.Standard.E2.1.Micro" } variable "instance_count" { description = "Number of instances" default = 2 } ``` After changing the default value for `instance_count` to 3, I expected Terraform to reflect this change in the next plan execution. However, I'm still seeing the old value being used: ```bash $ terraform plan No changes. Your infrastructure matches the configuration. ``` I’ve tried running `terraform apply` just to see if it would force any updates, but that also resulted in no changes. I verified that my Terraform version is 1.0.11 and the OCI provider is at 3.0.0. I also checked my backend configuration to ensure I'm not looking at a cached state. I’ve tried running `terraform refresh` as well, but the values do not update in the state file. I’m unsure if I need to adjust any settings in my `main.tf` or if there’s a specific way to force Terraform to recognize changes to the variable defaults. Can anyone guide to identify what could be going wrong here? Any help would be greatly appreciated! I recently upgraded to Hcl latest.