Terraform v0.12.28
azuredevops_build_definitionterraform {
required_version = "= 0.12.28"
}
data "azuredevops_project" "mycloud" {
project_name = "mycloud"
}
resource "azuredevops_serviceendpoint_github" "myservice" {
project_id = data.azuredevops_project.mycloud.project_name
service_endpoint_name = "myservice-pipelines"
auth_personal {}
}
resource "azuredevops_build_definition" "myservice" {
project_id = data.azuredevops_project.myservice.id
name = "myservice-pipeline"
path = "\\pipelines\\myservice"
agent_pool_name = "Azure Pipelines"
ci_trigger {
use_yaml = true
}
repository {
repo_type = "GitHub"
branch_name = "master"
repo_id = "GaborEH/myservice"
yml_path = "pipeline.yml"
service_connection_id = azuredevops_serviceendpoint_github.myservice.id
}
}
azuredevops_serviceendpoint_github.myservice: Creation complete after 0s [id=ebca5239-39ae-4661-a47d-91a9226ee542]
azuredevops_build_definition.myservice: Creating...
2020/07/09 16:23:29 [DEBUG] azuredevops_build_definition.myservice: applying the planned Create change
2020/07/09 16:23:31 [DEBUG] azuredevops_build_definition.myservice: apply errored, but we're indicating that via the Error pointer rather than returning it: error creating resource Build Definition: Invalid URI: The URI is empty.
2020/07/09 16:23:31 [ERROR] <root>: eval: *terraform.EvalApplyPost, err: error creating resource Build Definition: Invalid URI: The URI is empty.
2020/07/09 16:23:31 [ERROR] <root>: eval: *terraform.EvalSequence, err: error creating resource Build Definition: Invalid URI: The URI is empty.
Error: error creating resource Build Definition: Invalid URI: The URI is empty.
on main.tf line 15, in resource "azuredevops_build_definition" "myservice":
1: resource "azuredevops_build_definition" "myservice" {
2020-07-09T16:23:31.764+1000 [DEBUG] plugin: plugin process exited: path="/Users/.terraform/plugins/darwin_amd64/terraform-provider-azuredevops_v0.0.1_x4" pid=31808
2020-07-09T16:23:31.765+1000 [DEBUG] plugin: plugin exited
A new Azure Devops pipeline created.
terraform apply fails with the following error:
Error: error creating resource Build Definition: Invalid URI: The URI is empty.
terraform applyIf I switch from GitHub.com to the build in Azure git repository in the repository block, terraform apply succeeds.
N/A
Shouldn't this:
project_id = data.azuredevops_project.CloudServices.id
be this:
project_id = data.azuredevops_project.mycloud.id
Not sure if that's the root cause
Shouldn't this:
project_id = data.azuredevops_project.CloudServices.idbe this:
project_id = data.azuredevops_project.mycloud.idNot sure if that's the root cause
@EliiseS: Good morning – My apologies but that was a copy-paste error and the actual code does have the correct and matching resource names. Anyways, I corrected the naming in my original bug report and I can confirm that it still does fail to run.
Hi @GaborEH This is a breaking change of API . We have located the problem and will fix this soon. Thanks for your feedback.
Hi @GaborEH This is a breaking change of API . We have located the problem and will fix this soon. Thanks for your feedback.
Thank you @xuzhang3
👍 Please kindly fix this bug.
Closing as this issue has been fixed in #105
Thank you @xuzhang3 and @EliiseS
I could not find a release where this change has been incorporated. currently, we are forking this repo and creating our own releases. please update releases after 0.0.1.
Most helpful comment
Hi @GaborEH This is a breaking change of API . We have located the problem and will fix this soon. Thanks for your feedback.