Skip to main content

Pulumi Lagoon Provider — Python SDK

PyPI version License

A Pulumi provider for managing Lagoon resources as infrastructure-as-code.

Installation

pip install pulumi-lagoon

Configuration

pulumi config set lagoon:apiUrl https://api.lagoon.example.com/graphql
pulumi config set --secret lagoon:token YOUR_TOKEN

Or via environment variables:

export LAGOON_API_URL=https://api.lagoon.example.com/graphql
export LAGOON_TOKEN=YOUR_TOKEN

Supported Resources

Resource Description
Project Lagoon projects (applications/sites)
Environment Environments (branch/PR deployments)
Variable Project and environment variables
DeployTarget Kubernetes cluster deploy targets
DeployTargetConfig Branch-pattern routing to deploy targets
NotificationSlack Slack deployment notifications
NotificationRocketChat RocketChat deployment notifications
NotificationEmail Email deployment notifications
NotificationMicrosoftTeams Microsoft Teams deployment notifications
ProjectNotification Link notifications to projects
Task Advanced task definitions (command and image types)
Group Groups for organizing projects and users
Route API-managed routes (requires Lagoon v2.29.0+)
ProjectAutogeneratedRouteConfig Autogenerated route settings at project level
EnvironmentAutogeneratedRouteConfig Autogenerated route settings at environment level

Usage

import pulumi
from pulumi_lagoon import Project, Environment, Variable, Group  # top-level re-exports
# The submodule path also works: from pulumi_lagoon.lagoon import ...

project = Project("my-site",
    name="my-drupal-site",
    git_url="git@github.com:org/repo.git",
    deploytarget_id=1,
    production_environment="main",
    branches="^(main|develop|stage)$",
)

prod_env = Environment("production",
    name="main",
    project_id=project.lagoon_id,
    deploy_type="branch",
    deploy_base_ref="main",
    environment_type="production",
)

db_config = Variable("db-host",
    name="DATABASE_HOST",
    value="mysql.production.example.com",
    project_id=project.lagoon_id,
    environment_id=prod_env.lagoon_id,
    scope="runtime",
)

team = Group("my-team",
    name="my-team",
)

pulumi.export("project_id", project.lagoon_id)

Importing Existing Resources

pulumi import lagoon:lagoon:Project my-site 123
pulumi import lagoon:lagoon:Environment prod-env 123:main
pulumi import lagoon:lagoon:Variable api-key 123::API_KEY
pulumi import lagoon:lagoon:Group my-team my-team

Multi-Language Support

This provider also has SDKs for TypeScript/JavaScript, Go, and .NET/C#.

Documentation

License

Apache License 2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pulumi_lagoon-0.5.2.tar.gz (32.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pulumi_lagoon-0.5.2-py3-none-any.whl (59.4 kB view details)

Uploaded Python 3

File details

Details for the file pulumi_lagoon-0.5.2.tar.gz.

File metadata

  • Download URL: pulumi_lagoon-0.5.2.tar.gz
  • Upload date:
  • Size: 32.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pulumi_lagoon-0.5.2.tar.gz
Algorithm Hash digest
SHA256 f09f064658752774a9eda1881558ccbbf4d8a5eeb7fe96e3d4ef5c69a375055d
MD5 b1279cf814a38554e612a7532df3b72b
BLAKE2b-256 70a11e46a2d3e9d09be16662bf03edc2fa11774acafcff63fc9c3b769f66158b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pulumi_lagoon-0.5.2.tar.gz:

Publisher: publish.yml on tag1consulting/pulumi-lagoon-provider

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pulumi_lagoon-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: pulumi_lagoon-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 59.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pulumi_lagoon-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bdf16d9ab55903a33d6d14984462b3b83f24ff076157b8c4a8e6d22f78ddb4db
MD5 4973aae9f5fb531c793b5350b6db91a8
BLAKE2b-256 a647fbe9b6a0d2a790f213ac02e16239f7bebfb40d3baadab9e9d353b01110cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pulumi_lagoon-0.5.2-py3-none-any.whl:

Publisher: publish.yml on tag1consulting/pulumi-lagoon-provider

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.5.5

2 files

0.5.4

2 files

0.5.3

2 files

This release

0.5.2 This release

2 files

0.5.1

2 files

0.5.0

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.9

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page