Skip to content
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

Build Definition does not create #65

Closed
GaborEH opened this issue Jul 9, 2020 · 8 comments
Closed

Build Definition does not create #65

GaborEH opened this issue Jul 9, 2020 · 8 comments
Assignees
Labels

Comments

@GaborEH
Copy link

GaborEH commented Jul 9, 2020

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
@EliiseS
Copy link
Member

EliiseS commented Jul 9, 2020

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

@GaborEH
Copy link
Author

GaborEH commented Jul 9, 2020

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

@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.

@xuzhang3
Copy link
Collaborator

Hi @GaborEH This is a breaking change of API . We have located the problem and will fix this soon. Thanks for your feedback.

@xuzhang3 xuzhang3 added the bug label Jul 10, 2020
@xuzhang3 xuzhang3 self-assigned this Jul 10, 2020
@GaborEH
Copy link
Author

GaborEH commented Jul 10, 2020

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

@AlanOuyang
Copy link

👍 Please kindly fix this bug.

@xuzhang3
Copy link
Collaborator

Closing as this issue has been fixed in #105

@GaborEH
Copy link
Author

GaborEH commented Jul 28, 2020

Thank you @xuzhang3 and @EliiseS

@siftercoder2
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants