Create a new OIDC provider in Vultr IAM to enable federated authentication. Configure the provider with client credentials and callback URL for integration.
An OIDC provider enables Vultr to act as an OpenID Connect identity provider, issuing tokens that external systems can use to authenticate against Vultr. Creating a provider automatically generates a Vultr-managed OIDC issuer with its own RSA key pair.
Follow this guide to create an OIDC provider using the Vultr API or Terraform.
Send a POST request to the Create OIDC Provider endpoint to create a new provider. Replace PROVIDER-NAME with a descriptive name.
$ curl "https://api.vultr.com/v2/oidc/provider" \
-X POST \
-H "Authorization: Bearer ${VULTR_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"provider": {
"name": "PROVIDER-NAME"
}
}'
Note the id for managing the provider and the issuer_id for the auto-created Vultr-managed issuer linked to this provider.
Ensure the Vultr Terraform provider is configured in your Terraform project.
Define the OIDC provider resource. Replace PROVIDER-NAME with a descriptive name.
resource "vultr_oidc_provider" "my_provider" {
name = "PROVIDER-NAME"
}
Apply the configuration.
$ terraform apply
Verify that the output shows vultr_oidc_provider.my_provider: Creation complete. Note the provider id and issuer_id from the Terraform state.