hashicorp / terraform-provider-bitbucket

This Terraform provider is archived per our provider archiving process: https://terraform.io/docs/internals/archiving.html
https://registry.terraform.io
Mozilla Public License 2.0
31 stars 106 forks source link

Importing bitbucket_repository results in 400 during plan #23

Open four43 opened 6 years ago

four43 commented 6 years ago

Hey all,

I seem to be getting 400 status codes when accessing an existing repository that was imported to this state.

Terraform Version

Terraform v0.11.7
+ provider.aws v1.25.0
+ provider.bitbucket v1.0.0
+ provider.external v1.0.0
+ provider.local v1.1.0
+ provider.random v1.3.1
+ provider.template v1.0.0

Affected Resource(s)

Please list the resources as a list, for example:

Terraform Configuration Files

resource "bitbucket_repository" "project_repo" {
  owner = "myaccount"
  name = "my-project"
  project_key = "api"
  scm = "git"
  is_private = true
  fork_policy = "no_public_forks"

  lifecycle {
    prevent_destroy = true
  }
}

Debug Output

Expected Behavior

Resource was imported via terraform import bitbucket_repository.project_repo myaccount/my-project, minor updates are planned:

~ bitbucket_repository.project_repo
      has_issues:                "true" => "false"
      has_wiki:                  "true" => "false"
      language:                  "php" => ""
      project_key:               "PROJ" => "api"

Actual Behavior

Running apply produced:

Error: Error applying plan:

1 error(s) occurred:

* bitbucket_repository.project_repo: 1 error(s) occurred:

* bitbucket_repository.project_repo: API Error: 400 2.0/repositories/hamweather/aeris-api Bad request

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform import bitbucket_repository.project_repo myaccount/my-project
  2. terraform apply

This seems pretty reproducible. I didn't include the debug log (cause I'm lazy), but if that's actually necessary and it's hard to reproduce I can. Thanks all.