You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A bit later, we decide to replace the offer_id by offer (to handle offer name and UUID in the same attribute). After depreciating the offer_id field during some releases, we decide to remove it with the Schema.Removed field:
The terraform [validate|plan] command will throw this error:
Error: Missing required argument
on example.tf line 15, in resource "scaleway_bla" "bla":
15: resource "scaleway_test" "test" {
The argument "offer" is required, but no definition was found.
The user does not understand why the offer attribute is required, he already has an offer_id attribute. If the removed validation was done before the required one, the user would have this error:
Error: "offer_id": [REMOVED] Please use offer attribute instead
on example.tf line 15, in resource "scaleway_bla" "bla":
15: resource "scaleway_test" "test" {
In this way, the user will understand easily that the offer_id attribute has been replaced by the offer one.
The text was updated successfully, but these errors were encountered:
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
ghost
locked and limited conversation to collaborators
May 28, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
Validate the removed attributes before the required ones would allow a better UX.
Example
Here is the first version of a test schema:
A bit later, we decide to replace the
offer_id
byoffer
(to handle offer name and UUID in the same attribute). After depreciating theoffer_id
field during some releases, we decide to remove it with theSchema.Removed
field:After the provider update, the user will still have this old configuration:
The
terraform [validate|plan]
command will throw this error:The user does not understand why the
offer
attribute is required, he already has anoffer_id
attribute. If the removed validation was done before the required one, the user would have this error:In this way, the user will understand easily that the
offer_id
attribute has been replaced by theoffer
one.The text was updated successfully, but these errors were encountered: