zahiar / terraform-provider-bitbucket

Terraform Provider for Bitbucket Cloud
https://registry.terraform.io/providers/zahiar/bitbucket/latest
Mozilla Public License 2.0
19 stars 22 forks source link

Error: unable to create group with error: response status code was not 200 #176

Open archmangler opened 1 year ago

archmangler commented 1 year ago

Group creation provider is broken:

base) welcome@Traianos-MacBook-Pro bitbucket-iac % terraform plan -out terraform.plan
bitbucket_project.example: Refreshing state... [id={e22a7ac4-0ea1-4fd6-9e51-be7f399f1b49}]

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # bitbucket_group.orion will be created
  + resource "bitbucket_group" "orion" {
      + id         = (known after apply)
      + name       = "orion"
      + permission = "write"
      + slug       = (known after apply)
      + workspace  = "{engeneon}"
    }

Plan: 1 to add, 0 to change, 0 to destroy.

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Saved the plan to: terraform.plan

To perform exactly these actions, run the following command to apply:
    terraform apply "terraform.plan"
.
(base) welcome@Traianos-MacBook-Pro bitbucket-iac % terraform apply terraform.plan
bitbucket_group.orion: Creating...
╷
│ Error: unable to create group with error: response status code was not 200
│ 
│   with bitbucket_group.orion,
│   on main.tf line 13, in resource "bitbucket_group" "orion":
│   13: resource "bitbucket_group" "orion" {
│ 
╵
kevinmichaelchen commented 11 months ago

I'm also running into this... Seems like a dupe of #116... Some helpful info there, but haven't found a way past this yet...

My user has workspace admin, which lead me to assume that I can read all groups using this provider. However it didn't work before I added myself to the group that I targeted for data retrieval. It's all very confusing, and I'm not sure if this is a bug with the provider or some clunky bitbucket API behaviour.

At first glance, this looks like some crazy chicken-and-egg behavior.