Terraform
Using the official Bahriya Terraform provider to manage your infrastructure as code.
25 articles
Installing the Terraform Provider
Install the Bahriya Terraform provider: add it from the HashiCorp Registry, authenticate with a personal access token, pin versions and upgrade.
3 minTerraform Provider
Manage Bahriya infrastructure as code with the official Terraform provider: every resource and data source, field naming and key behaviours.
4 minComplete Terraform Example
A complete Terraform example wiring every Bahriya resource type together: a project, registry credentials, secrets, Memcached and an HTTP container.
2 minDeploy a Cron Job with Terraform
Deploy a cron job on Bahriya with Terraform: schedule a container with a cron expression, timezone, retry limits, concurrency policy and suspend flag.
3 minDeploy a Project with Terraform
Deploy a Bahriya project with Terraform: set handle, name and regions, read quota outputs and attach vault items and configs with per-type resources.
4 minDeploy a Worker Container with Terraform
Deploy a worker container on Bahriya with Terraform for background processes: same compute and autoscaling as HTTP containers, without ingress.
2 minDeploy an HTTP Container with Terraform
Deploy an HTTP container on Bahriya with Terraform: public hostname with TLS, health checks, autoscaling, secrets, private registries and regions.
5 minDeploy Encryption Keys with Terraform
Store symmetric encryption keys in the Bahriya vault with Terraform, attach them to projects and mount them as files on containers, with rotation.
2 minDeploy Env Files with Terraform
Manage env files on Bahriya with Terraform: store KEY=VALUE configuration, attach it to projects and inject entries into containers via envFrom.
2 minDeploy GPG Keypairs with Terraform
Manage GPG keypairs on Bahriya with Terraform: store ASCII-armoured public and private keys, attach them to projects and mount them on containers.
2 minDeploy JSON Configs with Terraform
Manage JSON configs on Bahriya with Terraform: store validated JSON, attach it to projects and mount it as a file in containers, with versioned rotation.
2 minDeploy Memcached with Terraform
Provision managed Memcached on Bahriya with Terraform: pick a cache size and regions, then connect containers over the internal network on port 11211.
2 minDeploy Network Policies with Terraform
Deploy network policies on Bahriya with Terraform: control ingress from other projects and egress by CIDR or domain, per project or per workload.
2 minDeploy Plain Configs with Terraform
Manage plain configs on Bahriya with Terraform: store arbitrary text files, attach them to projects and mount them inside containers, with rotation.
2 minDeploy Registry Credentials with Terraform
Store private container registry credentials on Bahriya with Terraform so containers can pull images from Docker Hub, GitHub, GitLab and more.
2 minDeploy Secrets with Terraform
Deploy secrets on Bahriya with Terraform: store encrypted values and mount them as environment variables in containers via secretsenvvar.
1 minDeploy SSH Keypairs with Terraform
Manage SSH keypairs on Bahriya with Terraform: store a public key and PEM private key, attach them to projects and mount them as files on containers.
2 minDeploy TLS Bundles with Terraform
Deploy TLS bundles on Bahriya with Terraform: store a CA, server certificate and private key, attach them to projects and mount them on containers.
2 minDeploy Valkey with Terraform
Provision managed Valkey on Bahriya with Terraform: cache or persistent store, single, HA or sharded tiers, backups and external TLS exposure.
4 minDeploy X.509 Certificates with Terraform
Manage X.509 certificates on Bahriya with Terraform: store a single PEM certificate, attach it to projects and mount it as a file on containers.
2 minDeploy YAML Configs with Terraform
Manage YAML configs on Bahriya with Terraform: store validated YAML, attach it to projects and mount it as a file in containers, with rotation.
1 minManage Billing Details with Terraform
Manage your organisation's billing details on Bahriya with Terraform — the legal name, address, tax registration and reference printed on invoices.
2 minManage Custom Roles with Terraform
Define custom Bahriya roles as code with Terraform: named permission grants by level, resource and action, assigned to organisation members.
2 minManage HTTP container path rules with Terraform
Manage path rules on Bahriya HTTP containers with Terraform: basic auth, rate limiting and IP allow or deny lists scoped to a URL prefix.
3 minShare Individual Resources with Terraform
Share a single Bahriya resource with one member using Terraform: additive grants on a specific container, registry or secret, without role changes.
2 min