Skip to content

Commit

Permalink
Fix: default true for requires approval. (was false) (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
liranfarage89 committed Nov 21, 2021
1 parent 5718ddf commit 05a763d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions env0/resource_project_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func resourcePolicy() *schema.Resource {
Type: schema.TypeBool,
Description: "Requires approval default value when creating a new environment in the project",
Optional: true,
Default: true,
},
"include_cost_estimation": {
Type: schema.TypeBool,
Expand Down
3 changes: 1 addition & 2 deletions env0/resource_project_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ func TestUnitPolicyResource(t *testing.T) {
ProjectId: "project0",
NumberOfEnvironments: 1,
NumberOfEnvironmentsTotal: 1,
RequiresApprovalDefault: true,
IncludeCostEstimation: true,
SkipApplyWhenPlanIsEmpty: true,
DisableDestroyEnvironments: true,
Expand Down Expand Up @@ -62,7 +61,7 @@ func TestUnitPolicyResource(t *testing.T) {
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttr(accessor, "project_id", policy.ProjectId),
resource.TestCheckResourceAttr(accessor, "number_of_environments", strconv.Itoa(policy.NumberOfEnvironments)),
// resource.TestCheckResourceAttr(accessor, "number_of_environments_total", strconv.Itoa(policy.NumberOfEnvironmentsTotal)),
resource.TestCheckResourceAttr(accessor, "number_of_environments_total", strconv.Itoa(policy.NumberOfEnvironmentsTotal)),
resource.TestCheckResourceAttr(accessor, "requires_approval_default", strconv.FormatBool(policy.RequiresApprovalDefault)),
resource.TestCheckResourceAttr(accessor, "include_cost_estimation", strconv.FormatBool(policy.IncludeCostEstimation)),
resource.TestCheckResourceAttr(accessor, "skip_apply_when_plan_is_empty", strconv.FormatBool(policy.SkipApplyWhenPlanIsEmpty)),
Expand Down

0 comments on commit 05a763d

Please sign in to comment.