heroku / terraform-provider-heroku

Terraform Heroku provider
https://registry.terraform.io/providers/heroku/heroku/latest
Mozilla Public License 2.0
99 stars 75 forks source link

API error when managing users "Requested range order is not allowed" #379

Closed leetrout closed 12 months ago

leetrout commented 12 months ago

Terraform Version

Run terraform -v to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.

Heroku Provider Version

Terraform v1.5.5
on darwin_amd64
+ provider registry.terraform.io/heroku/heroku v5.2.6

Affected Resource(s)

Please list the resources as a list, for example:

Terraform Configuration Files

We cannot share - it is a list of 36 heroku_team_collaborator resources.

Debug Output

We cannot provide the debug output due to privacy issues.

Expected Behavior

Terraform applies cleanly

Actual Behavior

Error: Get "https://api.heroku.com/teams/apps/<UUID>/collaborators": Requested range order is not allowed, please try `id` or another specified in `Accept-Ranges`.

Steps to Reproduce

  1. terraform apply
mars commented 12 months ago

Thanks for letting us know @leetrout 😃

It seems to require a simple fix, which I proofed using curl HTTP requests to Heroku API.

I've made pre-release v5.2.7-pre.1 with the proposed fix #380. Please help me validate it by specifying provider:

terraform {
  required_providers {
    heroku = {
      source = "heroku/heroku"
      version = "5.2.7-pre.1"
    }
  }
}

I'll release v5.2.7 once our peer review is complete, and hopefully you confirm success 🙏

mars commented 12 months ago

This is fixed in v5.2.7. Use with:

terraform {
  required_providers {
    heroku = {
      source = "heroku/heroku"
      version = "5.2.7"
    }
  }
}
leetrout commented 12 months ago

Thank you @mars!

We found a work-around yesterday by removing some users manually and re-adding them so I don't have the same state to test with 😞

leetrout commented 12 months ago

We hit the bug again today on 5.2.6 and confirming upgrading to 5.2.7 fixed it.