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

Expand Environment Data #178

Merged
merged 11 commits into from
Dec 13, 2021
Merged

Expand Environment Data #178

merged 11 commits into from
Dec 13, 2021

Conversation

eranelbaz
Copy link
Member

@eranelbaz eranelbaz commented Dec 12, 2021

Issue & Steps to Reproduce / Feature Request

currently our data "env0_environment" is very minimal

Solution

generate docs
add harness tests
expand to include

id
name
project_id
approve_plan_automatically
run_plan_on_pull_requests
auto_deploy_on_path_changes_only
deploy_on_push
status
latest_deployment_log_id
template_id
revision

@eranelbaz
Copy link
Member Author

Environment Data source

@@ -7,7 +7,7 @@ require (
github.com/golang/mock v1.4.3
github.com/google/uuid v1.2.0
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
github.com/hashicorp/terraform-json v0.12.0 // indirect
github.com/hashicorp/terraform-json v0.13.0 // indirect
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

had to make this upgrade
we had a problem where we got

Ran 9 of 9 Specs in 0.006 seconds
SUCCESS! -- 9 Passed | 0 Failed | 0 Pending | 0 Skipped
--- PASS: TestHttpClient (0.01s)
PASS
ok  	github.com/env0/terraform-provider-env0/client/http	0.018s
=== RUN   TestUnitConfigurationVariableData
=== RUN   TestUnitConfigurationVariableData/ScopeGlobal
    test_reporter.go:43: Step 1/2 error: unsupported state format version: expected ["0.1" "0.2"], got "1.0"
FAIL	github.com/env0/terraform-provider-env0/env0	4.159s
?   	github.com/env0/terraform-provider-env0/tests	[no test files]
?   	github.com/env0/terraform-provider-env0/utils	[no test files]
FAIL

and we fixed that as part of #132
now i got it once again and the upgrade fixes that problem

Comment on lines +20 to +23
RequiresApproval: &boolean,
PullRequestPlanDeployments: &boolean,
AutoDeployOnPathChangesOnly: &boolean,
ContinuousDeployment: &boolean,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since the type is *bool which means we are looking for a pointer value,
i had to set the value here to a pointer for a boolean

Copy link
Contributor

@roni-frantchi roni-frantchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eranelbaz eranelbaz marked this pull request as ready for review December 13, 2021 10:54
@eranelbaz eranelbaz merged commit e6793d8 into main Dec 13, 2021
@eranelbaz eranelbaz deleted the chore-environment-data branch December 13, 2021 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants