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 includeszeropsprimitives.
| Language | WebApp package / install | Primitives-only package / install |
|---|---|---|
| Python ≥ 3.10 | python -m pip install pulumi-zerops-app==0.1.1 | python -m pip install pulumi-zerops==0.1.1 |
| Go ≥ 1.26.6 | go get github.com/zeropsio/pulumi-zerops/sdk-app/go/zeropsapp@v0.1.1 | go get github.com/zeropsio/pulumi-zerops/sdk/go/zerops@v0.1.1 |
| TypeScript / Node.js | npm install @zerops/pulumi-app@0.1.1 | npm install @zerops/pulumi@0.1.1 |
| YAML | zerops-app plugin; no SDK | zerops plugin; no SDK |
| C# | Coming soon: NuGet Zerops.Pulumi.App / Zerops.Pulumi | None |
| Java | Coming soon: Maven io.zerops:pulumi-app / io.zerops:pulumi | None |
- 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_TOKENsecurely, or set a secret in an initialized stack:
- Multiple organizations: set
zerops:organizationIdto the organization's membershipclientId.
Quickstart
- Python
- Go
- TypeScript
- YAML
- Templates include
app/and prompt forappNameand a secret Zerops token. - PostgreSQL starts disabled; enable with
pulumi config set database true. - Open the
urlstack output after deployment.
WebApp
- Replace the template's infrastructure program with the matching example.
- Creates a
LIGHTproject, runtime, PostgreSQL, deployment and public subdomain. app/: template application andzerops.yamlwith setupapp; see the zerops.yaml specification.
- Python
- Go
- TypeScript
- YAML
main.go
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/zeropsio/pulumi-zerops/sdk-app/go/zeropsapp"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
source, database := "./app", true
web, err := zeropsapp.NewWebApp(ctx, "web", &zeropsapp.WebAppArgs{
AppName: "hello", Runtime: "python@3.12",
Source: &source, Database: &database,
})
if err != nil {
return err
}
ctx.Export("url", web.Url)
return nil
})
}
| Input (schema / YAML name) | Behavior |
|---|---|
appName | Required project name. |
runtime | Required service type; independent of the Pulumi language. |
database / databaseType | Default false; when enabled, postgresql:single@16; HA requires postgresql:ha@16. |
env | Additional variables; database mode injects server-side refs including ${db_connectionString} and ${db_password}. |
publicAccess | Default true; subdomain requires a source deployment with HTTP ports. |
source / zeropsYaml | Application directory; reads its zerops.yml / zerops.yaml unless supplied explicitly. |
hostname | Default app; must match the deployment setup; db reserved with database enabled. |
Primitives
- Resource semantics, deployment modes and import IDs.
- Tokens below use Pulumi's short YAML form.
| Resource | Token |
|---|---|
| Project | zerops:index:Project |
| Service | zerops:index:Service |
| Project / service variables | zerops:index:ProjectEnv / zerops:index:ServiceEnv |
| Deployment | zerops:index:ServiceDeploy |
| Object storage | zerops:index:ObjectStorage |
| Subdomain | zerops:index:ServiceSubdomainAccess |
| HTTP / port routing | zerops:index:PublicHttpRouting / zerops:index:PublicPortRouting |
| Dedicated IPv4 | zerops:index:ProjectDedicatedIpv4 |
| Git integration / backups | zerops:index:ServiceGitIntegration / zerops:index:ServiceBackupConfig |
| Restart / YAML import | zerops:index:ServiceRestart / zerops:index:ProjectImport |
| VPN / L7 balancer | zerops:index:ProjectVpnPeer / zerops:index:ProjectL7BalancerConfig |
| Logging / Prometheus | zerops:index:ProjectRemoteLogging / zerops:index:ProjectPrometheusConfig |
| Integration token | zerops:index:IntegrationToken |
Behavior Notes
- Dual-mode managed types require explicit
:single@/:ha@, for examplepostgresql:single@16; runtime types such aspython@3.12are unchanged. - Floors: PostgreSQL disk
2GB, ClickHouse RAM0.375GB, Elasticsearch RAM2GB; 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 ofsourceDir,archivePath,git; supplyzeropsYaml. Provider Git pins the planned commit; server Git builds public branch HEAD at build time.- Source/input changes replace
ServiceDeployand trigger a new deployment; destroying that resource does not stop or roll back the application. - Directory uploads exclude
.gitonly;.gitignoreis not an upload filter. Keep secrets,.env, dependencies and caches outsideapp/. - Pulumi secrets are encrypted in state, not omitted. WebApp database environment references resolve on Zerops; generated passwords are not read into state.
- Routing
forceSyncoverrideszerops:routingForceSync(defaultfalse); 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.xreleases may break compatibility.