Closed nlamirault closed 4 years ago
Hello ! It looks more than an token issue rather than a Terraform issue. Could you call : curl https://account.scaleway.com/tokens/<access_key>/permissions -H 'x-auth-token: <secret_key>'
and check the Kubernetes block ? You should have clusters:*
and with your organization ID below ?
I think you might use a token that is not bound to the project your are using (tokens are only valid on a single project)
OK. I've received
{"cluster:*": ["<PROJECT_ID>:*"]}
I replace the organizationID with the projectID into SCW_DEFAULT_ORGANIZATION_ID and it works.
Yeah the SCW_DEFAULT_PROJECT_ID
is working with k8s in terraform 1.17.0 which should be released begining of next week :) I'll close this then!
@nlamirault 1.17.0 is released π
Came here for the same issue - SCW_DEFAULT_PROJECT_ID
does nothing for k8s cluster creation, so I actually copy my SCW_DEFAULT_PROJECT_ID
env var into SCW_DEFAULT_ORGANIZATION_ID
and now it works.
This seems like a real mess since from the dashboard, my org and project ids are different yet in the SDK - they have to be the same for it to work and actually, you can't define just project id as if you're missing the SCW_DEFAULT_ORGANIZATION_ID
the error returned is;
Error: scaleway-sdk-go: invalid argument(s): project_id is required, A Project ID is required
That's really misleading as what's actually missing is the org id that needs to be the project id .....
TF: 0.14.0 Scaleway SDK: 1.17.2
@andrew-s yes, 1.17 is not fully project ready. It's a half ready release :( next major should be better!
Community Note
Terraform Version
0.13.2
Affected Resource(s)
scaleway_k8s_cluster_beta
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
Create a cluster on Kapsule
Actual Behavior
An API Error.
Steps to Reproduce
terraform apply
Important Factoids
References
0000