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

Fix: support more vcs-type fields in module creation #1006

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TomerHeber
Copy link
Collaborator

Issue & Steps to Reproduce / Feature Request

fixes #1002
fixes #1004

Solution

  1. Ignoring modules with isDeleted set to true (fixes env0_module resource does not detect changes in ENV0 UI #1004).
  2. Updated the acceptance tests.
  3. Added the missing is*** fields to support additional vcs types.
  4. Updated the structs to support the additional fields.

@@ -43,7 +46,10 @@ type ModuleCreatePayload struct {
TokenName string `json:"tokenName,omitempty"`
GithubInstallationId *int `json:"githubInstallationId,omitempty"`
BitbucketClientKey string `json:"bitbucketClientKey,omitempty"`
IsGitlab *bool `json:"isGitLab,omitempty"`
IsGitlab bool `json:"isGitLab"`
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

default is false. Not sure why this was ever a pointer.

@@ -12,12 +12,6 @@ import (
)

func resourceModule() *schema.Resource {
vcsExactlyOneOf := []string{
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

using conflictsWith instrad.
Due to this comment:
when isGitLabEnterprise is true the token_id and token_name should not be required

@TomerHeber
Copy link
Collaborator Author

/review

@bot-env0 bot-env0 requested a review from a team January 24, 2025 16:35
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.

env0_module resource does not detect changes in ENV0 UI Support vcs-type fields in module creation
1 participant