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

Feat: env0_environment with project_id property #742

Merged
merged 1 commit into from
Nov 12, 2023

Conversation

TomerHeber
Copy link
Collaborator

Issue & Steps to Reproduce / Feature Request

resolves #737

Solution

  1. Updated the schema to make project_id optional and not just computed.
  2. Added an acceptance test for the new use-case. (Failed before adding code, passed updating code).
  3. Updated code to filter out if project_id is set.

@@ -1058,7 +1058,7 @@ func getConfigurationVariableFromSchema(variable map[string]interface{}) client.
return configurationVariable
}

func getEnvironmentByName(name interface{}, meta interface{}, excludeArchived bool) (client.Environment, diag.Diagnostics) {
func getEnvironmentByName(meta interface{}, name string, projectId string, excludeArchived bool) (client.Environment, diag.Diagnostics) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added a new field and changed the order of the variables.
In case more variables are added, I'll convert it to a "struct filter".

@github-actions github-actions bot added ready to merge PR approved - can be merged once the PR owner is ready and removed pending final review labels Nov 5, 2023
@TomerHeber TomerHeber merged commit ab87d91 into main Nov 12, 2023
9 checks passed
@TomerHeber TomerHeber deleted the feat-env-project-id-#737 branch November 12, 2023 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature provider ready to merge PR approved - can be merged once the PR owner is ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

env0_environment with project_id property
3 participants