Skip to content

Build Definition does not create #65

Closed
@GaborEH

Description

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

Terraform (and Azure DevOps Provider) Version

Terraform v0.12.28

  • provider.azuredevops v0.0.1

Affected Resource(s)

  • azuredevops_build_definition

Terraform Configuration Files

terraform {
  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
  }
}

Debug Output

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

Expected Behavior

A new Azure Devops pipeline created.

Actual Behavior

terraform apply fails with the following error:

Error: error creating resource Build Definition: Invalid URI: The URI is empty.

Steps to Reproduce

  1. terraform apply

Important Factoids

If I switch from GitHub.com to the build in Azure git repository in the repository block, terraform apply succeeds.

References

N/A

  • #0000

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions