LogoLogo
Bonsai (0.13) DocsGitHubDiscord CommunityGarden Enterprise
Acorn (0.12)
Acorn (0.12)
  • Welcome!
  • 🌳Basics
    • How Garden Works
    • Quickstart Guide
    • The Stack Graph (Terminology)
  • 🌻Tutorials
    • Your First Project
      • 1. Initialize a Project
      • 2. Connect to a Cluster
      • 3. Deploy and Test
      • 4. Configure Your Project
  • 💐Using Garden
    • Configuration Overview
    • Projects
    • Modules
    • Services
    • Tests
    • Tasks
    • Workflows
    • Variables and templating
    • Module Templates
    • Using the CLI
  • 🌿Kubernetes Plugins
    • About
    • Remote K8s Plugin Configuration
      • 1. Create a Cluster
        • AWS
        • GCP
        • Azure
      • 2. Configure Container Registry (Optional)
        • AWS
        • GCP
        • Azure
      • 3. Set Up Ingress, TLS and DNS
      • 4. Configure the Provider
    • Local K8s Plugin Configuration
      • 1. Install Local Kubernetes
      • 2. Configure the Provider
    • Module Configuration
      • Container
      • Kubernetes
      • Helm
      • PersistentVolumeClaim
      • ConfigMap
    • Advanced
      • In-Cluster Building
      • Minimal RBAC Configuration for Development Clusters
      • Deploying to Production
  • 🌺Terraform Plugin
    • About
    • Provider Configuration
    • Module Configuration
  • ☘️Pulumi Plugin
    • About
    • Provider Configuration
    • Module Configuration
  • 🌹Other Plugins
    • Container
    • Exec (local scripts)
  • 🌼Guides
    • Installing Garden
    • Adopting Garden
    • Code Synchronization (Dev Mode)
    • Connecting a local service to a K8s cluster (Local Mode)
    • Environments and namespaces
    • Hot Reload
    • Migrating from Docker Compose to Garden
    • Using Garden in CI
  • 🌷Advanced
    • cert-manager Integration
    • Using Remote Sources
    • Custom Commands
  • 🪷Reference
    • Providers
      • conftest-container
      • conftest-kubernetes
      • conftest
      • container
      • exec
      • hadolint
      • jib
      • kubernetes
      • local-kubernetes
      • maven-container
      • octant
      • openfaas
      • pulumi
      • terraform
    • Module Types
      • configmap
      • conftest
      • container
      • exec
      • hadolint
      • helm
      • jib-container
      • kubernetes
      • maven-container
      • openfaas
      • persistentvolumeclaim
      • pulumi
      • templated
      • terraform
    • Template Strings
      • Project configuration context
      • Environment configuration context
      • Provider configuration context
      • Module configuration context
      • Remote Source configuration context
      • Project Output configuration context
      • Custom Command configuration context
      • Workflow configuration context
      • Template Helper Functions
    • Glossary
    • Commands
    • Project Configuration
    • Module Template Configuration
    • Workflow Configuration
  • 🎋Misc
    • FAQ
    • Troubleshooting
    • Telemetry
Powered by GitBook
On this page

Was this helpful?

  1. Pulumi Plugin

Provider Configuration

First, you need to enable the pulumi provider in your project configuration. This is as simple as placing it in your list of providers:

kind: Project
name: my-project
providers:
  - name: pulumi # <----
  ...

In case you want to use different backends for different Garden environments you can configure your provider and modules follows. This example uses two different pulumi backends. In the dev environment it uses a self-managed state backend, in this case an S3 bucket which is specified with the backendURL. In the prod environment it uses pulumi managed state backend, which is the default so we don't need to specify a backendURL.

Note that when you use a self managed state backend, Garden's module level cacheStatus needs to be set to false, since caching is only available with the pulumi managed state backend. The same applies to orgName which only makes sense in the context of the pulumi managed state backend. Please ensure that orgName is set to null or empty string "" for all the environments that are not using the pulumi managed state backend.

---
kind: Project
name: pulumi
defaultEnvironment: dev
variables:
  cacheStatus: true
environments:
  - name: dev
    variables:
      backendURL: s3://<bucket-name>
      cacheStatus: false # cacheStatus has to be set to false for self-managed state backends
  - name: prod
    variables:
      orgName: garden
providers:
  - name: pulumi
    environments: [dev, prod]
    orgName: ${var.orgName || null} # ensure orgName is null or "" for self-managed state backends
    backendURL: ${var.backendURL || null} # defaults to Pulumi managed state backend if null or ""

---
kind: Module
type: pulumi
name: aws-s3
stack: ${environment.name}
createStack: true
cacheStatus: ${var.cacheStatus} # cacheStatus has to be set to false for self-managed state backends
description: Creates an s3 bucket
pulumiVariables:
  environment: ${environment.name}
PreviousAboutNextModule Configuration

Last updated 1 year ago

Was this helpful?

There are several configuration options you can set on the provider—see the for details.

☘️
reference docs for the pulumi provider