/pulumi-pipeline

A ready-to-use CI/CD Pipeline for managing your infrastructure with Pulumi

Primary LanguageTypeScriptMIT LicenseMIT

Pulumi Pipeline

fluentci pipeline deno compatibility dagger-min-version ci

A ready-to-use CI/CD Pipeline for managing your infrastructure with Pulumi.

🚀 Usage

Run the following command in your project:

fluentci run pulumi_pipeline

Or, if you want to use it as a template:

fluentci init -t pulumi

This will create a .fluentci folder in your project.

Now you can run the pipeline with:

fluentci run .

🧩 Dagger Module

Use as a Dagger module:

dagger install github.com/fluent-ci-templates/pulumi-pipeline@main

Call a function from the module:

dagger call preview \
  --src . \
  --stack dev \
  --token env:PULUMI_ACCESS_TOKEN \
  --google-application-credentials ./fluentci-086b644d4c53.json
dagger call up \
  --src . \
  --stack dev \
  --token env:PULUMI_ACCESS_TOKEN \
  --google-application-credentials ./fluentci-086b644d4c53.json

🛠️ Environment variables

Variable Description
PULUMI_ACCESS_TOKEN The Pulumi access token to use for authenticating with the Pulumi service.
PULUMI_STACK The name of the stack to operate on.
PULUMI_VERSION The version of the Pulumi CLI to use. Defaults to latest.

✨ Jobs

Job Description
preview Show a preview of updates to a stack's resources
up Create or update the resources in a stack
preview(
  src: Directory | string,
  stack: string,
  token: Secret | string,
  pulumiVersion = "latest",
  googleApplicationCredentials?: string
): Promise<string>

up(
  src: Directory | string,
  stack: string,
  token: Secret | string,
  pulumiVersion = "latest",
  googleApplicationCredentials?: string
): Promise<string>

👨‍💻 Programmatic usage

You can also use this pipeline programmatically:

import { preview, up } from "jsr:@fluentci/pulumi";

await preview(
  ".", 
  Deno.env.get("PULUMI_STACK") || "dev",
  Deno.env.get("PULUMI_ACCESS_TOKEN")!
);

await up(
  ".", 
  Deno.env.get("PULUMI_STACK") || "dev",
  Deno.env.get("PULUMI_ACCESS_TOKEN")!
);