Closed billbirchatcoles closed 5 days ago
Hi @billbirchatcoles Normally, we do not recommend users change the resource configurations outside of Terraform, unpredictable. This issue might caused by the d.Set("authentication_token", xxx)
at https://github.com/microsoft/terraform-provider-azuredevops/blob/master/azuredevops/internal/service/serviceendpoint/resource_serviceendpoint_artifactory.go#L151
@xuzhang3, last commented was Jul 19, 2021. It's been more than an year the issue remain open. any update on the fixes. looking forward to be hearing from you
@thatham #656 will fix this bug. Service will return the sensitive data password/token etc. as empty string or null, this cause the second update change the token to null even user not update the HCL.
@xuzhang3 I'm still getting below error Error: Error creating service endpoint in Azure DevOps: Unable to find service connection type 'artifactoryService' using authentication scheme 'Token'.
@thatham you need install the JFrom Artificatory extension( https://marketplace.visualstudio.com/items?itemName=JFrog.jfrog-artifactory-vsts-extension) for your ORG, this extension was not enabled by default.
@xuzhang3 we had installed JFrom Artificatory extension in our Azure DevOps, this is error
Error: Error creating service endpoint in Azure DevOps: Unable to find service connection type 'artifactoryService' using authentication scheme 'Token'. β β with module.jfrog_service_connections["0"].azuredevops_serviceendpoint_artifactory.distribution, β on modules/jfrog/distribution.tf line 1, in resource "azuredevops_serviceendpoint_artifactory" "distribution": β 1: resource "azuredevops_serviceendpoint_artifactory" "distribution" { β β΅ β· β Error: Error creating service endpoint in Azure DevOps: Unable to find service connection type 'artifactoryService' using authentication scheme 'Token'. β β with module.jfrog_service_connections["0"].azuredevops_serviceendpoint_artifactory.artifactory, β on modules/jfrog/main.tf line 1, in resource "azuredevops_serviceendpoint_artifactory" "artifactory": β 1: resource "azuredevops_serviceendpoint_artifactory" "artifactory" { β β΅ β· β Error: Error creating service endpoint in Azure DevOps: Unable to find service connection type 'artifactoryService' using authentication scheme 'Token'. β β with module.jfrog_service_connections["0"].azuredevops_serviceendpoint_artifactory.platform, β on modules/jfrog/platform.tf line 1, in resource "azuredevops_serviceendpoint_artifactory" "platform": β 1: resource "azuredevops_serviceendpoint_artifactory" "platform" { β β΅ β· β Error: Error creating service endpoint in Azure DevOps: Unable to find service connection type 'artifactoryService' using authentication scheme 'Token'. β β with module.jfrog_service_connections["0"].azuredevops_serviceendpoint_artifactory.xray, β on modules/jfrog/xray.tf line 1, in resource "azuredevops_serviceendpoint_artifactory" "xray": β 1: resource "azuredevops_serviceendpoint_artifactory" "xray" {
@thatham can you check that the extension correctly installed?
@xuzhang3, we have installed this extension which has all service connection modules
@thatham a bit different from my extension,
you need install this extension:
I will update the doc to include the requirement.
@xuzhang3 Jfrog Artifactory extension is using old version. if you refer my previous screenshots there's distinct difference between these two extension. https://www.jfrog.com/confluence/display/JFROG/Artifactory+Azure+DevOps+Extension https://www.jfrog.com/confluence/display/JFROG/JFrog+Azure+DevOps+Extension (using V2)
@thatham current resource only support the old version. A new resource need to added to support Artifactory v2
@thatham current resource only support the old version. A new resource need to added to support Artifactory v2
@xuzhang3, any plan to upgrade or create a set of resources and datasources with new versions ?. Looking forward to be hearing from you.
@xuzhang3, there's a PR #705 update to Jfrog V2, could you please review and merge. Appreciate your response timely
Community Note
Terraform (and Azure DevOps Provider) Version
v0.14.11
Affected Resource(s)
azuredevops_serviceendpoint_artifactory
Terraform Configuration Files
Debug Output
At this point Terraform has set the internal token to βnullβ instead of the token. Here's the proof, taken from the arguments passed into the jfrog executable in the pipeline which uses the Service Connection :
Expected Behavior
The access token in the Service Connection should not be set to
"null"
Actual Behavior
The access token in the Service Connection was set to
"null"
when Terraform apply ran.Steps to Reproduce
This defect only appears after the following sequence of events:
User modifies Artifactory Service Connection via the web UI, changes the URL or description, but not the token. (Use Save without verify).
User runs the terraform plan and apply. This applies a plan:
[Notice the plan makes no mention of intent to update the secret access token.]
Note
I will be working on a fix for this myself in the next couple of days...