-
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
Custom service endpoint support #683
base: main
Are you sure you want to change the base?
Conversation
Added custom data attribute to allow more attributes to be passed Added the plugin to the provider unit tests
@microsoft-github-policy-service agree |
azuredevops/internal/service/serviceendpoint/resource_serviceendpoint_custom.go
Show resolved
Hide resolved
Type: schema.TypeMap, | ||
Description: "Optional payload required for the creation of the endpoint", | ||
} | ||
secretHashKey, secretHashSchema := tfhelper.GenerateSecreteMemoSchema("password") |
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.
Hash keys can be deleted. This functions has be deprecated.
function has been deprecated
@Bug-Solver Can you add some test case for this resource? The document should be documented in azuredevops.erb |
Description: "The password or token key to use for the Custom service connection.", | ||
Sensitive: true, | ||
Optional: true, | ||
DiffSuppressFunc: tfhelper.DiffFuncSuppressSecretChanged, |
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.
recommend remove the DiffSuppressFunc
as this functions used to handle the hash encoded data which has ben deprecated and no hash key defined for password
in this schema.
d.Set("server_url", *serviceEndpoint.Url) | ||
d.Set("username", (*serviceEndpoint.Authorization.Parameters)["username"]) | ||
d.Set("data", *serviceEndpoint.Data) | ||
tfhelper.HelpFlattenSecret(d, "password") |
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.
tfhelper.HelpFlattenSecret(d, "password")
can be delete
All Submissions:
What about the current behavior has changed?
Added behavior to allow the creation of "custom" service endpoints. It is possible to write custom extensions for Azure DevOps. However, the creation cannot be automated through Terraform as ever type of service connection has been hard coded.
This PR is a copy of #628 which appears to have gone stale after the initial PR.
That later version has been expanded upon and the failing unit test have been enhanced to include the new functionality
Issue Number:
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