RSO Cloud Provider¶
Manage RSO Cloud resources: virtual machines, serverless apps, scheduled jobs, managed PostgreSQL, object storage, queues and topics, container registries, public ingress and access management.
The same provider works with Terraform and OpenTofu under the source address
theorigamicorporation/rso.
Example Usage¶
terraform {
required_providers {
rso = {
source = "theorigamicorporation/rso"
}
}
}
# Credentials come from the environment:
# RSO_TENANT, RSO_SERVICE_ACCOUNT_NAME, RSO_SERVICE_ACCOUNT_SECRET
provider "rso" {}
Authentication¶
Create a service account in the console (Service accounts) and give it the access the configuration needs. Every argument can also be set through an environment variable, which is the usual way to keep the secret out of the configuration:
export RSO_TENANT=my-tenant
export RSO_SERVICE_ACCOUNT_NAME=ci
export RSO_SERVICE_ACCOUNT_SECRET='...'
A ready access token (RSO_ACCESS_TOKEN) works too, for a quick try; the
provider cannot renew it.
How it works¶
The provider talks to the platform API the console uses, scoped to one tenant. The platform decides where things run: a configuration names what it wants, never a cluster or a node. Operations the platform carries out in the background (cloning an instance, creating a queue) are waited for, so a resource is ready when the apply returns.
Secrets the platform shows once (service account tokens, bucket keys, queue credentials) and secrets you pass in are stored in the state. Protect your state.
Import¶
Resources that can be imported show the expected ID on their page. Use
terraform import / tofu import or import blocks.
Schema¶
Optional¶
access_token(String, Sensitive) A ready OAuth access token, instead of a service account.RSO_ACCESS_TOKEN.client_id(String) OAuth2 client id.RSO_CLIENT_ID.endpoint(String) GraphQL API endpoint. Defaults tohttps://gateway.cloud.rso.dev/graphql.RSO_API_URL.region(String) Region of the tenant to work in. Defaults to the platform's default region.RSO_REGION.service_account_name(String) Service account name.RSO_SERVICE_ACCOUNT_NAME.service_account_secret(String, Sensitive) Service account token, shown once when the account is created or rotated.RSO_SERVICE_ACCOUNT_SECRET.tenant(String) Tenant (organisation) id the resources belong to.RSO_TENANT.token_url(String) OAuth2 token endpoint.RSO_TOKEN_URL.