Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw an error in time_rotating resource when an attribute is updated with an unknown value in the configuration #227

Open
1 task done
SBGoods opened this issue Aug 2, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@SBGoods
Copy link
Contributor

SBGoods commented Aug 2, 2023

Terraform CLI and Provider Versions

Time v3.2.1

Use Cases or Problem Statement

Relates #146, #149, #218

The time_rotating resource currently throws an Error: Provider produced inconsistent final plan error whenever an attribute is updated with an unknown value. This is due to the resource calculating attribute values during planning, so when the previously unknown values become known during the update, the final calculated values are inconsistent with the previously planned values.

Proposal

Normally, resolving this issue involves skipping the calculation of values during planning and only setting the attributes during apply. However, this approach will trigger a resource change before the scheduled rotation even if the final calculated attribute values result in no change in configuration.

Therefore, the resource should throw an error when this situation occurs indicating to practitioners that only known values may be used when updating the resource's configuration.

This should be implemented in the resource's ModifyPlan() method by checking for unknown values in the configuration after checking that the state is not null (indicating an update).

How much impact is this issue causing?

Low

Additional Information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@SBGoods SBGoods added the enhancement New feature or request label Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant