-
Notifications
You must be signed in to change notification settings - Fork 280
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
Feature: Add JFrog V2 Service Endpoint Data Source (Issue #1231) #1232
base: main
Are you sure you want to change the base?
Conversation
|
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.
@jasonouellet Except for the properties used to retrieve resource, other properties should marked with compute=true
in the scheme. You can take data_serviceendpoint_azurecr example. I only commented data_serviceendpoint_jfrog_artifactory_v2.go
, all the resources needs to be updated.
Once those are fixed up I can take another look.
azuredevops/internal/service/serviceendpoint/data_serviceendpoint_jfrog_artifactory_v2.go
Outdated
Show resolved
Hide resolved
azuredevops/internal/service/serviceendpoint/data_serviceendpoint_jfrog_artifactory_v2.go
Outdated
Show resolved
Hide resolved
azuredevops/internal/service/serviceendpoint/data_serviceendpoint_jfrog_artifactory_v2.go
Outdated
Show resolved
Hide resolved
azuredevops/internal/service/serviceendpoint/data_serviceendpoint_jfrog_artifactory_v2.go
Outdated
Show resolved
Hide resolved
azuredevops/internal/service/serviceendpoint/data_serviceendpoint_jfrog_artifactory_v2.go
Outdated
Show resolved
Hide resolved
"url": { | ||
Type: schema.TypeString, | ||
Required: true, | ||
ValidateFunc: validate.Url, | ||
Computed: true, | ||
Optional: true, | ||
MinItems: 1, | ||
MaxItems: 1, | ||
Elem: &schema.Resource{ | ||
Schema: map[string]*schema.Schema{ | ||
"token": { | ||
Description: "The JFrog Artifactory access token.", | ||
Type: schema.TypeString, | ||
Required: true, | ||
Sensitive: true, | ||
}, | ||
}, | ||
}, | ||
ExactlyOneOf: []string{"authentication_basic", "authentication_token"}, |
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.
"url": { | |
Type: schema.TypeString, | |
Required: true, | |
ValidateFunc: validate.Url, | |
Computed: true, | |
Optional: true, | |
MinItems: 1, | |
MaxItems: 1, | |
Elem: &schema.Resource{ | |
Schema: map[string]*schema.Schema{ | |
"token": { | |
Description: "The JFrog Artifactory access token.", | |
Type: schema.TypeString, | |
Required: true, | |
Sensitive: true, | |
}, | |
}, | |
}, | |
ExactlyOneOf: []string{"authentication_basic", "authentication_token"}, | |
"url": { | |
Type: schema.TypeString, | |
Computed: true, | |
}, |
"url": { | ||
Type: schema.TypeString, | ||
Required: true, | ||
ValidateFunc: validate.Url, | ||
Description: "Url for the JFrog Artifactory Server", | ||
Computed: true, | ||
}, |
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.
"url": { | |
Type: schema.TypeString, | |
Required: true, | |
ValidateFunc: validate.Url, | |
Description: "Url for the JFrog Artifactory Server", | |
Computed: true, | |
}, | |
"url": { | |
Type: schema.TypeString, | |
Computed: true, | |
}, |
"url": { | ||
Type: schema.TypeString, | ||
Required: true, | ||
ValidateFunc: validate.Url, | ||
Description: "Url for the JFrog Artifactory Server", | ||
Computed: true, | ||
}, |
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.
"url": { | |
Type: schema.TypeString, | |
Required: true, | |
ValidateFunc: validate.Url, | |
Description: "Url for the JFrog Artifactory Server", | |
Computed: true, | |
}, | |
"url": { | |
Type: schema.TypeString, | |
Computed: true, | |
}, |
"url": { | ||
Type: schema.TypeString, | ||
Required: true, | ||
ValidateFunc: validate.Url, | ||
Description: "Url for the JFrog Artifactory Server", | ||
Computed: true, | ||
}, |
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.
"url": { | |
Type: schema.TypeString, | |
Required: true, | |
ValidateFunc: validate.Url, | |
Description: "Url for the JFrog Artifactory Server", | |
Computed: true, | |
}, | |
"url": { | |
Type: schema.TypeString, | |
Computed: true, | |
}, |
if err = checkServiceConnection(serviceEndpoint); err != nil { | ||
return err | ||
} | ||
flattenServiceEndpointArtifactoryV2(d, serviceEndpoint) |
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.
flattenServiceEndpointArtifactoryV2(d, serviceEndpoint) | |
d.Set("url", serviceEndpoint.Url) |
if err = checkServiceConnection(serviceEndpoint); err != nil { | ||
return err | ||
} | ||
flattenServiceEndpointArtifactoryV2(d, serviceEndpoint) |
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.
flattenServiceEndpointArtifactoryV2(d, serviceEndpoint) | |
d.Set("url", serviceEndpoint.Url) |
|
||
In addition to the Arguments list above - the following Attributes are exported: | ||
|
||
* `authorization` - Specifies the Authorization Scheme Map. |
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.
* `authorization` - Specifies the Authorization Scheme Map. | |
* `url` - The URL of the Artifactory server to connect with. |
|
||
In addition to the Arguments list above - the following Attributes are exported: | ||
|
||
* `authorization` - Specifies the Authorization Scheme Map. |
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.
* `authorization` - Specifies the Authorization Scheme Map. | |
* `url` - The URL of the Artifactory server to connect with. |
|
||
In addition to the Arguments list above - the following Attributes are exported: | ||
|
||
* `authorization` - Specifies the Authorization Scheme Map. |
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.
* `authorization` - Specifies the Authorization Scheme Map. | |
* `url` - The URL of the Artifactory server to connect with. |
|
||
In addition to the Arguments list above - the following Attributes are exported: | ||
|
||
* `authorization` - Specifies the Authorization Scheme Map. |
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.
* `authorization` - Specifies the Authorization Scheme Map. | |
* `url` - The URL of the Artifactory server to connect with. |
All Submissions:
What about the current behavior has changed?
Issue Number: #1231
Ading data source:
Does this introduce a change to
go.mod
,go.sum
orvendor/
?Does this introduce a breaking change?
Any relevant logs, error output, etc?
(If it’s long, please paste to https://ghostbin.com/ and insert the link here.)
Other information