Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scaleway_cockpit uses organization_id instead of project_id #2923

Open
dehy opened this issue Feb 17, 2025 · 1 comment
Open

scaleway_cockpit uses organization_id instead of project_id #2923

dehy opened this issue Feb 17, 2025 · 1 comment
Assignees
Labels
bug observability Cockpit observability issues, bugs and feature requests priority:high New features

Comments

@dehy
Copy link

dehy commented Feb 17, 2025

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Terraform v1.10.5
Scaleway Provider v2.49.0

Affected Resource(s)

  • scaleway_cockpit

Terraform Configuration Files

provider "scaleway" {
  organization_id = "aaaaaaaaaaaa"
  project_id      = "bbbbbbbbbbbb"
  zone            = "fr-par-1"
  region          = "fr-par"
}

resource "scaleway_cockpit" "main" {
  plan = "free"
  project_id = "bbbbbbbbbb" # explicit property for test, should use provider's default project_id anyway
}

Debug Output

https://gist.github.com/dehy/a2a7fc4e8bbf7056fcdabb405eeceb43

Panic Output

Expected Behavior

The provider requests the API with the project_id and gives the authorised result (with IAM configured)

Actual Behavior

The provider requests the API with the default organization_id

Steps to Reproduce

  1. Create a new project
  2. Create a new IAM application, a policy for this project with ObservabilityFullAccess scope, and a new API Key.
  3. Configure terraform with provider and credentials
  4. terraform apply

Important Factoids

References

  • #0000
@dehy
Copy link
Author

dehy commented Feb 17, 2025

I just found the culprit, although I don't know how it became a problem:

My current Terraform State was referencing the scaleway_cockpit resource but with an empty project_id (empty string ""). After updating it with the correct project_id, it was able to read the resource data.

This resource was working before, I don't know how it became "corrupted". I think I imported it. I should take time to reproduce.

@remyleone remyleone added the observability Cockpit observability issues, bugs and feature requests label Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug observability Cockpit observability issues, bugs and feature requests priority:high New features
Projects
None yet
Development

No branches or pull requests

3 participants