Skip to content

Terraform provider

The rso provider manages instances, apps, PostgreSQL clusters, container registries and service accounts, and reads quotas, OS templates and cost estimates.

Setup

terraform {
  required_providers {
    rso = {
      source = "theorigamicorporation/rso"
    }
  }
}

# Credentials come from the environment:
#   RSO_TENANT, RSO_SERVICE_ACCOUNT_NAME, RSO_SERVICE_ACCOUNT_SECRET
provider "rso" {}

Create a service account and export its credentials:

export RSO_TENANT="<tenant-id>"
export RSO_SERVICE_ACCOUNT_NAME="<name>"
export RSO_SERVICE_ACCOUNT_SECRET="<token>"
terraform init && terraform plan
Resource Manages
rso_instance virtual machine; CPU, memory and root disk can grow in place
rso_app serverless container app
rso_postgres_cluster managed PostgreSQL cluster
rso_docker_registry private container registry
rso_service_account machine identity
Data source Reads
rso_instance_templates OS templates
rso_quota usage, limits and remaining headroom
rso_cost_estimate hourly and monthly cost of a configuration

An apply that would exceed a quota fails with the platform's QUOTA_EXCEEDED message and creates nothing.

Arguments and attributes of every resource and data source are in the reference, generated from the provider.

See the examples. Every example on that page is applied and destroyed by the provider's test suite on each change.