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

Bitbucket source broken #21938

Closed
RafiGreenberg opened this issue Jun 28, 2019 · 6 comments · Fixed by #21948
Closed

Bitbucket source broken #21938

RafiGreenberg opened this issue Jun 28, 2019 · 6 comments · Fixed by #21948
Assignees

Comments

@RafiGreenberg
Copy link

RafiGreenberg commented Jun 28, 2019

All of a sudden today my modules that live in Bitbucket repos broke. I'm 99.9% sure that it's due to the removal of their 1.0 apis: https://developer.atlassian.com/cloud/bitbucket/deprecation-notice-v1-apis/

https://api.bitbucket.org/1.0/repositories/ returns:

{
  "type": "error",
  "error": {
    "message": "Resource removed",
    "detail": "This API is no longer supported.\n\nFor information about its removal, please refer to the 
      deprecation notice at: https://developer.atlassian.com/cloud/bitbucket/deprecation-notice-v1-apis/"
  }
}

Terraform is trying to hit that API here:

infoUrl := "https://api.bitbucket.org/1.0/repositories" + u.Path

This is a major problem as I can't apply anything. I've tried switching to the generic git source syntax and that does not work either.

Terraform Version

Terraform v0.11.13

Terraform Configuration Files

module "foo" {
  source = "bitbucket.org/example/my-repo-name"
  ...
}

Debug Output

Error downloading modules: Error loading modules: module foo: unknown BitBucket SCM type:

Expected Behavior

Module gets initialized per https://www.terraform.io/docs/modules/sources.html#bitbucket

Actual Behavior

Module initialization fails.

Steps to Reproduce

  1. terraform init

Additional Context

Today is the first time I've hit this issue however. This should be an easy fix, as the 2.0 API repository API is unchanged from what I can tell. So the endpoint just needs to be updated. I'd file a PR, but I'm at work and don't really have time at the moment.

References

@phinze phinze added the bug label Jul 1, 2019
@phinze
Copy link
Contributor

phinze commented Jul 1, 2019

Hi @mackoftrack - thanks for the report - it does look on first glance like it's tripping over that deprecation. We'll dig into this and follow up.

@bflad
Copy link
Contributor

bflad commented Jul 1, 2019

I believe this has been fixed upstream in go-getter (hashicorp/go-getter#189), but a release of that library has not been cut yet.

@bflad bflad added the upstream label Jul 1, 2019
@RafiGreenberg
Copy link
Author

Suggestions for a workaround? It seems that when I switch to the generic git syntax it does in fact clone the module into .terraform/ but terraform is still throwing an error, preventing me from plan and apply

@RafiGreenberg
Copy link
Author

Sorry to bump this, but I'm just wondering what I can do to work around this until the next release happens.

@phinze
Copy link
Contributor

phinze commented Jul 2, 2019

Hi @mackoftrack - we expect to be cutting a release in the next week or so, but in the meantime you're welcome to build from the master branch by following these instructions.

@ghost
Copy link

ghost commented Aug 13, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Aug 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants