confluentinc / terraform-provider-confluent

Terraform Provider for Confluent
Apache License 2.0
118 stars 61 forks source link

Configuring SSO strictly through Terraform seems to not work. #326

Open greg-swift-yohana opened 7 months ago

greg-swift-yohana commented 7 months ago

What I did:

Leveraged the okta example from the documentation, but updating description and display_name.

What I expected:

Successful terraform run

What I got:

Terraform will perform the following actions:

  # confluent_identity_provider.okta will be created
  + resource "confluent_identity_provider" "okta" {
      + description  = "Identity Provider via Okta"
      + display_name = "Okta"
      + id           = (known after apply)
      + issuer       = "https://pwl.okta.com/oauth2/default"
      + jwks_uri     = "https://pwl.okta.com/oauth2/default/v1/keys"
    }
... snip ...
│ Error: error creating Identity Provider: 400 Bad Request
│ 
│   with confluent_identity_provider.okta,
│   on okta.tf line 5, in resource "confluent_identity_provider" "okta":
│    5: resource "confluent_identity_provider" "okta" {
│ 
╵

Other notes:

When doing the SSO workflow through the UI, you are asked for an SSO Identifier and a Metadata File (or manual input - would be nice if you took the metadata url). Neither seem to be exposed for configuration through Terraform.

I tried creating the SSO Identity Provider through the UI and getting the id so I could import it, but now i'm thinking these are completely separate things?

➜  confluent git:(confluent-saml) ✗ confluent iam provider list                                                                                                                
None found.