https://github.com/svrakitin/terraform-provider-hydra
Terraform provider for ory/hydra
https://github.com/svrakitin/terraform-provider-hydra
hydra jwks jwt oauth2 ory terraform terraform-provider
Last synced: 2 months ago
JSON representation
Terraform provider for ory/hydra
- Host: GitHub
- URL: https://github.com/svrakitin/terraform-provider-hydra
- Owner: svrakitin
- License: mit
- Created: 2021-02-14T18:51:02.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-06-07T12:50:51.000Z (11 months ago)
- Last Synced: 2024-06-19T05:41:14.091Z (10 months ago)
- Topics: hydra, jwks, jwt, oauth2, ory, terraform, terraform-provider
- Language: Go
- Homepage: https://registry.terraform.io/providers/svrakitin/hydra/latest
- Size: 114 KB
- Stars: 21
- Watchers: 1
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ory - Ory Hydra Terraform Provider
- awesome-ory - Ory Hydra Terraform Provider
README
# Terraform Hydra Provider
This provider is used to manage [ory/hydra](https://github.com/ory/hydra) resources through Hydra Admin API.
Supported resources:
- OAuth2 Clients (`hydra_oauth2_client` resource)
- JWKS (`hydra_jwks` resource and data source)See [ory/hydra](https://github.com/ory/hydra) [REST API docs](https://www.ory.sh/hydra/docs/reference/api/) for description of resources.
## Example usage
```hcl
terraform {
required_providers {
hydra = {
source = "svrakitin/hydra"
version = "0.5.3"
}
}
}provider "hydra" {
endpoint = "http://hydra-admin.localhost"
}resource "hydra_jwks" "generated" {
name = "generated"generator {
alg = "RS256"
kid = "generated"
use = "sig"keepers = {
version = 1
}
}
}data "hydra_jwks" "default" {
name = "hydra.openid.id-token"
}resource "hydra_oauth2_client" "example" {
client_id = "example"
client_name = "example"redirect_uris = ["http://localhost:8080/callback"]
response_types = ["code"]
token_endpoint_auth_method = "none"
}
```## Authentication
### Basic Auth
Support for Basic Auth on the Hydra Admin API is available.
```hcl
provider "hydra" {
endpoint = "http://hydra-admin.localhost"authentication {
basic {
username = var.hydra_admin_basic_auth_username
password = var.hydra_admin_basic_auth_password
}
}
}
```### HTTP header
Support for auth using an arbitrary HTTP request header is available. The header name defaults to `Authorization` if not otherwise set.
```hcl
provider "hydra" {
endpoint = "http://hydra-admin.localhost"authentication {
http_header {
name = var.hydra_admin_auth_http_header_name
value = var.hydra_admin_auth_http_header_value
}
}
}
```