diff --git a/examples/credentials.yaml b/examples/credentials.yaml index ef0ce05..c4f5a58 100644 --- a/examples/credentials.yaml +++ b/examples/credentials.yaml @@ -11,5 +11,6 @@ stringData: "client_secret": "xxxxxx", "url": "https://keycloak.example.com", "base_path": "/auth", - "realm": "master" + "realm": "master", + "root_ca_certificate" : "" } diff --git a/internal/clients/keycloak.go b/internal/clients/keycloak.go index 71a193b..709a1c5 100644 --- a/internal/clients/keycloak.go +++ b/internal/clients/keycloak.go @@ -40,6 +40,7 @@ const ( realmKey = "realm" basePathKey = "base_path" additionalHeadersKey = "additional_headers" + rootCaCertificateKey = "root_ca_certificate" ) // TerraformSetupBuilder builds Terraform a terraform.SetupFn function which @@ -111,6 +112,10 @@ func TerraformSetupBuilder(version, providerSource, providerVersion string) terr if v, ok := creds[additionalHeadersKey]; ok { ps.Configuration[additionalHeadersKey] = v } + // root ca certificate + if v, ok := creds[rootCaCertificateKey]; ok { + ps.Configuration[rootCaCertificateKey] = v + } return ps, nil } }