splunk / terraform-provider-splunk

Terraform Provider for Splunk
Mozilla Public License 2.0
103 stars 77 forks source link

Error when creating a SAML group with / in the name #172

Open bedinger opened 1 year ago

bedinger commented 1 year ago

Similar to #26, when creating a SAML group with a / in the name, an error is returned, because the name parameter is not URI-encoded by the provider.

Example

resource "splunk_admin_saml_groups" "demo_users" {
  name          = "demo/users"
  roles         = ["user"]
}

Output (abbreviated)

$ terraform apply

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place

Terraform will perform the following actions:

  # splunk_admin_saml_groups.demo_users will be created
  + resource "splunk_admin_saml_groups" "demo_users" {
      + id    = (known after apply)
      + name  = "demo/users"
      + roles = [
          + "user",
        ]
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

splunk_admin_saml_groups.demo_users: Creating...

│ Error: Invalid custom action for this internal handler (handler: SAML-groups, custom action: users, eai action: list).
│
│   with splunk_admin_saml_groups.demo_users,
│   on main.tf line 35, in resource "splunk_admin_saml_groups" "demo_users":
│   35: resource "splunk_admin_saml_groups" "demo_users" {

The fix for this will likely be similar to the one introduced in #29. I will be glad to submit a PR to address this.