Terraform provider for ORY Hydra.
The provider is published to the Terraform Registry. Terraform v0.13.0+ supports automatic provider installation from the Terraform Registry. If you run older versions of terraform, you will have to install the provider manually.
To install this provider, add it into your Terraform configuration. Then, run terraform init.
terraform {
required_providers {
oryhydra = {
source = "hypnoglow/oryhydra"
version = "0.3.0"
}
}
}
provider "oryhydra" {}To configure the provider, define the url argument:
provider "oryhydra" {
url = "https://admin.hydra.example.tld"
}Alternatively you can set ORY_HYDRA_URL environment variable.
Refer to documentation for available resources reference.
Examples can be found in examples directory.
This section explains how to build the provider and test it out on the example.
First of all you need to build the provider and link it to the examples:
make build
make prepare-examplesTo test examples, you need a running Hydra instance. For demonstrational purposes, we can run Hydra locally as a Docker container:
docker container run -i -t --rm --name hydra \
-p 4444:4444 \
-p 4445:4445 \
-e LOG_LEVEL=debug \
-e DSN=memory \
oryd/hydra:v1.4.10 serve all --dangerous-force-httpThen you can simply run examples as usual terraform project. Enter a particular example directory (e.g. cd examples/oryhydra_oauth2_client)
and run:
terraform init
terraform plan
terraform applyReleases managed by GoReleaser.
Run goreleaser locally:
goreleaser release --config .github/goreleaser.yaml --rm-dist --skip-publish --skip-validate