codefresh-io / terraform-provider-codefresh

Terraform provider for the Codefresh API
https://registry.terraform.io/providers/codefresh-io/codefresh
Mozilla Public License 2.0
18 stars 24 forks source link

[Bug]: codefresh_current_account data source returns 403 #131

Closed dave23122 closed 5 months ago

dave23122 commented 9 months ago

What happened?

When trying to use the codefresh_current_account data source with any provider version above 0.1.2 (0.1.2 works), a 403 error is returned:

{"status":403,"code":"2400","name":"FORBIDDEN_ERROR","message":"Required role: 'Admin' is not included in the user roles: [User]","context":{"requiredRole":"Admin","userRoles":["User"]}}

I am using a token that is an account admin, so would expect to be able to use this. However am unsure if this data source is intended to only be able to be used by a token that is a Codefresh level admin, rather than just an account admin.

Version

0.2.0+

Relevant Terraform Configuration

terraform {
  required_providers {
    codefresh = {
      source = "codefresh-io/codefresh"
      version = "0.6.0"
    }
  }
}

data "codefresh_current_account" "acc" {

}