Skip to main content
Skip to main content

Pulumi

Use the Zerops provider for Pulumi to deploy applications with WebApp or primitive resources.

Install​

  • Version: 0.1.1; Pulumi CLI 3.x.
  • Start with zerops-app / WebApp; its SDK includes zerops primitives.
LanguageWebApp package / installPrimitives-only package / install
Python ≥ 3.10python -m pip install pulumi-zerops-app==0.1.1python -m pip install pulumi-zerops==0.1.1
Go ≥ 1.26.6go get github.com/zeropsio/pulumi-zerops/sdk-app/go/zeropsapp@v0.1.1go get github.com/zeropsio/pulumi-zerops/sdk/go/zerops@v0.1.1
TypeScript / Node.jsnpm install @zerops/pulumi-app@0.1.1npm install @zerops/pulumi@0.1.1
YAMLzerops-app plugin; no SDKzerops plugin; no SDK
C#Coming soon: NuGet Zerops.Pulumi.App / Zerops.PulumiNone
JavaComing soon: Maven io.zerops:pulumi-app / io.zerops:pulumiNone
  • Plugins download automatically from the provider's GitHub release.
  • Pulumi Registry listing pending; use the GitHub repository.

Auth​

  • Create a token in token management (guide).
  • Supply ZEROPS_TOKEN securely, or set a secret in an initialized stack:
pulumi config set --secret zerops:token
  • Multiple organizations: set zerops:organizationId to the organization's membership clientId.

Quickstart​

pulumi new https://github.com/zeropsio/pulumi-zerops/tree/v0.1.1/templates/zerops-python
pulumi up
  • Templates include app/ and prompt for appName and a secret Zerops token.
  • PostgreSQL starts disabled; enable with pulumi config set database true.
  • Open the url stack output after deployment.

WebApp​

  • Replace the template's infrastructure program with the matching example.
  • Creates a LIGHT project, runtime, PostgreSQL, deployment and public subdomain.
  • app/: template application and zerops.yaml with setup app; see the zerops.yaml specification.
__main__.py
import pulumi
from pulumi_zerops_app import WebApp

web = WebApp(
"web",
app_name="hello",
runtime="python@3.12",
source="./app",
database=True,
)
pulumi.export("url", web.url)
Input (schema / YAML name)Behavior
appNameRequired project name.
runtimeRequired service type; independent of the Pulumi language.
database / databaseTypeDefault false; when enabled, postgresql:single@16; HA requires postgresql:ha@16.
envAdditional variables; database mode injects server-side refs including ${db_connectionString} and ${db_password}.
publicAccessDefault true; subdomain requires a source deployment with HTTP ports.
source / zeropsYamlApplication directory; reads its zerops.yml / zerops.yaml unless supplied explicitly.
hostnameDefault app; must match the deployment setup; db reserved with database enabled.

Primitives​

ResourceToken
Projectzerops:index:Project
Servicezerops:index:Service
Project / service variableszerops:index:ProjectEnv / zerops:index:ServiceEnv
Deploymentzerops:index:ServiceDeploy
Object storagezerops:index:ObjectStorage
Subdomainzerops:index:ServiceSubdomainAccess
HTTP / port routingzerops:index:PublicHttpRouting / zerops:index:PublicPortRouting
Dedicated IPv4zerops:index:ProjectDedicatedIpv4
Git integration / backupszerops:index:ServiceGitIntegration / zerops:index:ServiceBackupConfig
Restart / YAML importzerops:index:ServiceRestart / zerops:index:ProjectImport
VPN / L7 balancerzerops:index:ProjectVpnPeer / zerops:index:ProjectL7BalancerConfig
Logging / Prometheuszerops:index:ProjectRemoteLogging / zerops:index:ProjectPrometheusConfig
Integration tokenzerops:index:IntegrationToken

Behavior Notes​

  • Dual-mode managed types require explicit :single@ / :ha@, for example postgresql:single@16; runtime types such as python@3.12 are unchanged.
  • Floors: PostgreSQL disk 2 GB, ClickHouse RAM 0.375 GB, Elasticsearch RAM 2 GB; smaller configured values fail preview. Overrides: zerops:postgresqlMinDiskGb, ZEROPS_CLICKHOUSE_MIN_RAM_GB, ZEROPS_ELASTICSEARCH_MIN_RAM_GB.
  • WebApp.source: directory only. ServiceDeploy: exactly one of sourceDir, archivePath, git; supply zeropsYaml. Provider Git pins the planned commit; server Git builds public branch HEAD at build time.
  • Source/input changes replace ServiceDeploy and trigger a new deployment; destroying that resource does not stop or roll back the application.
  • Directory uploads exclude .git only; .gitignore is not an upload filter. Keep secrets, .env, dependencies and caches outside app/.
  • Pulumi secrets are encrypted in state, not omitted. WebApp database environment references resolve on Zerops; generated passwords are not read into state.
  • Routing forceSync overrides zerops:routingForceSync (default false); forcing synchronization permits foreign staged routing changes.
  • Resources incur charges; destroying the project deletes application and database data.
  • Zerops public API is beta; provider 0.x releases may break compatibility.