env0 / terraform-provider-env0

Terraform Provider for env0
https://env0.com
Mozilla Public License 2.0
39 stars 14 forks source link

allow is_remote_apply on env0_environment creation #933

Closed away168 closed 2 months ago

away168 commented 2 months ago

Is your feature request related to a problem? Please describe.

│ Error: is_remote_apply_enabled cannot be set when creating a new environment. Set this value after the environment is created

Turn off requirement that an environment needs to be created before setting this value.

Describe the solution you'd like

Ability to set is_remote_apply_enabled with the creation of the environment.

Describe alternatives you've considered n/a

Additional context

resource "env0_environment" "foo" {
  name        = "foo"
  project_id  = "..."
  template_id = "..."

  is_remote_apply_enabled    = true
  is_remote_backend          = true 
  approve_plan_automatically = true

if is_remote_apply_enabled then is_remote_backend and approve_plan_automatically should both also be enabled.