terraform-provider-azuredevops
terraform-provider-azuredevops copied to clipboard
New Resource: Azure Service Connection for Visual Studio Marketplace
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Description
Similar to other service endpoints, it would be helpful to be able to describe a Visual Studio Marketplace service connection. When describing it as a generic service connection it is successfully imported and when running terraform plan
it does not complain. However, if you try to apply a change it fails with the following error:
The pipeline is not valid. Job Job1: Step PublishAzureDevOpsExtension input connectedServiceName expects a service connection of type VstsMarketplacePublishing but the provided service connection serviceendpoint is of type generic.
New or Affected Resource(s)
- azuredevops_serviceendpoint_visualstudiomarketplace
Potential Terraform Configuration
resource "azuredevops_project" "project" {
name = "Sample Project"
visibility = "private"
version_control = "Git"
work_item_template = "Agile"
}
resource "azuredevops_serviceendpoint_visualstudiomarketplace" "serviceendpoint" {
project_id = azuredevops_project.project.id
marketplace_url = "https://some-server.example.com"
personal_access_token = "Personal access token"
service_endpoint_name = "Sample Generic"
description = "Managed by Terraform"
}
When describing it as a generic service connection it is successfully imported and when running terraform plan it does not complain. However, if you try to apply a change it fails with the following error:
The pipeline is not valid. Job Job1: Step PublishAzureDevOpsExtension input connectedServiceName expects a service connection of type VstsMarketplacePublishing but the provided service connection serviceendpoint is of type generic.
Sounds like a bug to me...
@lindhe All service connection have fixed type and parameter scheme, the generic service connection
won't to able to handle this new service connection.
I agree that it is unreasonable to have a visualstudiomarketplace
type service connection handled by a generic service connection
type Terraform object. That's why I consider it a bug that Daniel was able to successfully terraform import
the object and run terraform plan
without an issue.
@lindhe Different service connection may have same parameter structure, but the type is different, this may be the reason why you can apply the import
and plan
command.
Would it be possible for the provider to catch that earlier, before terraform apply
?
@lindhe I need do some investigation to figured if we can trigger the error earlier, eg tarraform plan
.