-
Notifications
You must be signed in to change notification settings - Fork 14
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
Conversation
@@ -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"` |
There was a problem hiding this comment.
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{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using conflictsWith instead.
Due to this comment:
when isGitLabEnterprise is true the token_id and token_name should not be required
/review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
@@ -119,6 +113,30 @@ func resourceModule() *schema.Resource { | |||
Optional: true, | |||
Default: false, | |||
}, | |||
"is_gitlab": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not using conflictsWith for these as well?
GL can't be BBS for example, seems like a good validation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure!
Issue & Steps to Reproduce / Feature Request
fixes #1002
fixes #1004
Solution