Skip to content

Commit

Permalink
Merge pull request #7 from crossplane-contrib/feat/config/rootcapath
Browse files Browse the repository at this point in the history
feat(config): rootcapath
  • Loading branch information
Breee authored Dec 12, 2023
2 parents 1d4f26b + 9b2f478 commit ab155c9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/credentials.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ stringData:
"client_secret": "xxxxxx",
"url": "https://keycloak.example.com",
"base_path": "/auth",
"realm": "master"
"realm": "master",
"root_ca_certificate" : ""
}
5 changes: 5 additions & 0 deletions internal/clients/keycloak.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
}

0 comments on commit ab155c9

Please sign in to comment.