Problem
When you run terraform apply after modifying a resource attribute, Terraform reports no changes to apply, and the infrastructure remains unchanged.
Cause
This behavior occurs when the modified attribute is listed in the ignore_changes argument within a lifecycle configuration block for that resource. The ignore_changes argument explicitly tells Terraform to disregard any modifications to the specified attributes during planning and applying operations.
For example, the following configuration prevents Terraform from managing changes to the desired_size attribute.
lifecycle {
create_before_destroy = true
ignore_changes = [
scaling_config[0].desired_size,
]
}Solution
To allow Terraform to manage the attribute again, you must remove its entry from the ignore_changes list within the lifecycle block.
After removing the attribute from the list, running terraform apply will detect the change and update the resource as expected.