Open 6ripley opened 1 year ago
Hey @6ripley,
Looks like the first issue is the getErr.Error()
was a mistake (copy-n-paste), so I will remove that.
However, I'd like to know the totalCount
that is returned when you use curl
or Postman to GET
this endpoint: https://docs.split.io/reference/list-segments-in-environment. I suspect there's a pagnation issue and the default pagination offset and limits are not enough.
Hi @davidji99,
Thanks for getting back to me!
totalcount
varies between the environments but here are the listings and it seems some of them are way above the limit:
"offset":0,"limit":20,"totalCount":68
"offset":0,"limit":20,"totalCount":3
"offset":0,"limit":20,"totalCount":79
"offset":0,"limit":20,"totalCount":26
"offset":0,"limit":20,"totalCount":7
"offset":0,"limit":20,"totalCount":11
"offset":0,"limit":20,"totalCount":9
THanks @6ripley. As I suspected, the API client needs to support pagination.
Hi there,
Terraform Version
Debug Output
https://gist.github.com/6ripley/4fab5da4044e370e9a118748b798c3ac
Panic Output
Expected Behavior
Terraform should successfully refresh configuration or throw a useful error.
Actual Behavior
Plugin crashes when refreshing state. After re-creating tfstate file and importing existing resources terraform works for the first time when one of the below commands are issued. When apply with refresh=false is issued, it works for printing planned changes but crashes when applied. Tried applying less resources per command but once it reaches certain number of resources it fails on refresh every time.
Steps to Reproduce
terraform apply
terraform apply -refresh-only
Important Factoids
Tested with Mac with M1 and with Ubuntu 22.04 Already tried setting up
export GODEBUG=asyncpreemptoff=1
on mac, recreating tfstate file from import multiple times, re-initializing terraform.Any help will be appreciated, thanks!