terraform plan
hides unchanged attributes even if they forces replacement
#575
Labels
terraform plan
hides unchanged attributes even if they forces replacement
#575
Terraform CLI and Provider Versions
Terraform Configuration
Expected Behavior
The
ready_for_renewal
attribute should be shown with aforces replacement
comment. Even though its value does not change, it forces the resource to be replaced due to this line in the provider.Actual Behavior
When running terraform plan, it is unclear why the certificate is being replaced because the attribute forcing the replacement is hidden:
Steps to Reproduce
terraform init
terraform apply
terraform plan
How much impact is this issue causing?
Low
Logs
No response
Additional Information
This can happen in a least two (edge) cases:
validity_period_hours = 0
which implies thatready_for_renewal
is alwaystrue
terraform plan -refresh=false
with a non-zerovalidity_period_hours
, which implies thatready_for_renewal
is alwaysfalse
In both cases
ready_for_renewal
does not change, hence it is hidden during plan, even though it forces a replacement.I opened hashicorp/terraform#36097, because I think that Terraform core should show attributes that force a replacement even if they are unchanged. However it is considered working as expected. It is the responsibility of the provider to never require a replacement on an unchanged attribute.
Maybe associating the requireReplace to the
validity_{start, end}_time
as well would make sense.Code of Conduct
The text was updated successfully, but these errors were encountered: