rancher / terraform-provider-rancher2

Terraform Rancher2 provider
https://www.terraform.io/docs/providers/rancher2/
Mozilla Public License 2.0
263 stars 226 forks source link

[BUG] rancher2_auth_config_freeipa Forbidden but configuring on UI works #1108

Open josedev-union opened 1 year ago

josedev-union commented 1 year ago

Rancher Server Setup

Information about the Cluster

User Information

provider "rancher2" { alias = "admin"

api_url = rancher2_bootstrap.admin.url token_key = rancher2_bootstrap.admin.token insecure = true }

resource "rancher2_bootstrap" "admin" { provider = rancher2.bootstrap initial_password = var.rancher_bootstrap_password password = var.rancher_admin_password

telemetry = false

depends_on = [ helm_release.rancher, ] }


### Provider Information
- What is the version of the Rancher v2 Terraform Provider in use? 2.19.0
- What is the version of Terraform in use? 1.1.5

### Describe the bug
When i try to configure Freeipa auth provider using `rancher2_auth_config_freeipa`, it returns 403 Forbidden.

│ Error: Bad response statusCode [403]. Status [403 Forbidden]. Body: [baseType=error, code=PermissionDenied, message=Permission denied] from [https://xyz/v3/freeIpaConfigs/freeipa?action=testAndApply] │ │ with rancher2_auth_config_freeipa.freeipa[0], │ on freeipa.tf line 1, in resource "rancher2_auth_config_freeipa" "freeipa": │ 1: resource "rancher2_auth_config_freeipa" "freeipa" { │ ╵

I can configure it on rancher UI using the same information without any issue.

### To Reproduce

Actual Result

│ Error: Bad response statusCode [403]. Status [403 Forbidden]. Body: [baseType=error, code=PermissionDenied, message=Permission denied] from [https://xyz/v3/freeIpaConfigs/freeipa?action=testAndApply]
│ 
│   with rancher2_auth_config_freeipa.freeipa[0],
│   on freeipa.tf line 1, in resource "rancher2_auth_config_freeipa" "freeipa":
│    1: resource "rancher2_auth_config_freeipa" "freeipa" {
│ 
╵

Expected Result

Freeipa should be configured without any error.

Screenshots

Additional context

josedev-union commented 1 year ago

more context is It works when access_mode is unrestricted but doesn't work when it is restricted or required.

Dj00ntyBoi commented 3 months ago

Could that be the same Issue as decribed in #676 ?