terraform-provider-bitbucket
terraform-provider-bitbucket copied to clipboard
Importing bitbucket_repository results in 400 during plan
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:
- bitbucket_repository
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:
-
terraform import bitbucket_repository.project_repo myaccount/my-project
-
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.