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
Describe the bug
Given an env0 Environment that is marked as "Waiting for approval", updates to env0_environment.template_id incorrectly return a success status after tofu apply. Despite the success status, the template_id does not actually get updated on the Env0 Environment, and it will continue to appear as drift on subsequent deployments.
Overall, it makes sense that Env0 would not update the template_id of an environment that is marked "Waiting for approval." Ideally, that failed update would get returned as a clear error on the tofu apply run, which would prompt an engineer to either approve or cancel the Env0 Environment.
To Reproduce
Put an existing environment into a "Waiting for approval" state
Update the template_id for the env0_environment resource to be a new value
tofu plan shows a template_id update
tofu apply shows a success
Check the Environment in Env0 Portal, it has the old template_id and not the new one
Expected behavior tofu apply should return a clear error and exit if the env0_environment.template_id cannot be updated. Ideally something like:
Error: failed deploying environment: 400 Bad Request: Environment is waiting for approval
That would be aligned with how Env0 already handles locked environments today:
Error: failed deploying environment: 400 Bad Request: Environment is locked
Workaround
If you notice an Env0 environment that continually shows drift, check to see if it's "Waiting for Approval". After it's either approved or cancelled, the the template_id update should work on the next tofu apply
Provider Version
v1.24.1
The text was updated successfully, but these errors were encountered:
Describe the bug
Given an env0 Environment that is marked as "Waiting for approval", updates to env0_environment.template_id incorrectly return a success status after
tofu apply
. Despite the success status, the template_id does not actually get updated on the Env0 Environment, and it will continue to appear as drift on subsequent deployments.Overall, it makes sense that Env0 would not update the template_id of an environment that is marked "Waiting for approval." Ideally, that failed update would get returned as a clear error on the
tofu apply
run, which would prompt an engineer to either approve or cancel the Env0 Environment.To Reproduce
tofu plan
shows a template_id updatetofu apply
shows a successtemplate_id
and not the new oneExpected behavior
tofu apply
should return a clear error and exit if the env0_environment.template_id cannot be updated. Ideally something like:That would be aligned with how Env0 already handles locked environments today:
Workaround
If you notice an Env0 environment that continually shows drift, check to see if it's "Waiting for Approval". After it's either approved or cancelled, the the template_id update should work on the next
tofu apply
Provider Version
v1.24.1
The text was updated successfully, but these errors were encountered: