tvl-depot/ops/keycloak/main.tf
Vincent Ambo 6576c2f15f feat(ops/keycloak): import github identity provider configuration
For some reason Terraform decided that it would otherwise like
to *delete* this configuration, which is undesirable.

Note that there is a "magic" special behaviour when the `alias` and
`provider_id` are set to the name of a built-in supported
provider (github, gitlab etc.), which lets us skip the
authorization_url setup.

Change-Id: Ib66154c2896dda162c57bdc2d7964a9fa4e15f20
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6706
Tested-by: BuildkiteCI
Reviewed-by: lukegb <lukegb@tvl.fyi>
2022-09-20 09:28:45 +00:00

44 lines
1,019 B
HCL

# Configure TVL Keycloak instance.
#
# TODO(tazjin): Configure GitLab IDP
terraform {
required_providers {
keycloak = {
source = "mrparkers/keycloak"
}
}
backend "s3" {
endpoint = "https://objects.dc-sto1.glesys.net"
bucket = "tvl-state"
key = "terraform/tvl-keycloak"
region = "glesys"
skip_credentials_validation = true
skip_region_validation = true
skip_metadata_api_check = true
}
}
provider "keycloak" {
client_id = "terraform"
url = "https://auth.tvl.fyi"
}
resource "keycloak_realm" "tvl" {
realm = "TVL"
enabled = true
display_name = "The Virus Lounge"
default_signature_algorithm = "RS256"
smtp_server {
from = "tvlbot@tazj.in"
from_display_name = "The Virus Lounge"
host = "127.0.0.1"
port = "25"
reply_to = "depot@tazj.in"
ssl = false
starttls = false
}
}