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

Have a good default for approval flow on workflows #1023

Open
weinguy-env0 opened this issue Mar 23, 2025 · 3 comments · May be fixed by #1029
Open

Have a good default for approval flow on workflows #1023

weinguy-env0 opened this issue Mar 23, 2025 · 3 comments · May be fixed by #1029
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@weinguy-env0
Copy link

weinguy-env0 commented Mar 23, 2025

Describe the bug
Today when deploying a basic workflow environment with the provider it's common to get the error

╷
│ Error: could not create environment: 400 Bad Request: approval flow can't be enabled on workflow environments
│
│   with env0_environment.provider_workflow,
│   on main.tf line 22, in resource "env0_environment" "provider_workflow":
│   22: resource "env0_environment" "provider_workflow" {
│

This can be fixed by setting approve_plan_automatically = true

To Reproduce
Deploy a basic workflow environment with the environment without specifying approve_plan_automatically

Expected behavior
The environment should be created even without specifying approve_plan_automatically

Provider Version
E.g.: 1.25.1

@weinguy-env0 weinguy-env0 added bug Something isn't working enhancement New feature or request labels Mar 23, 2025
@TomerHeber
Copy link
Collaborator

Hi,

@weinguy-env0 - this means that we will be changing the default to 'true'.
At the moment, the default is unset. Are you sure you would like to proceed with that? This could break other things.

If users must set 'approve_plan_automatically' to 'true' when it's a workflow environment, why not just enforce that in the schema level?

@weinguy-env0
Copy link
Author

  • it's a hidden requirement that catches users by surprise
  • forcing users to set a specific value is redundant

@TomerHeber
Copy link
Collaborator

TomerHeber commented Mar 23, 2025

@weinguy-env0 - I understand the problem. But I would like to confirm what the "ask is".

At the moment, the default is unset. Would you like me to proceed with setting the default to "true" ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

3 participants