Manage Lagoon hosting platform resources as infrastructure-as-code.
Project description
Pulumi Lagoon Provider — Python SDK
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 |
Usage
import pulumi
from pulumi_lagoon.lagoon import Project, Environment, Variable, Group
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 and Go.
Documentation
License
Apache License 2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pulumi_lagoon-0.2.7.tar.gz.
File metadata
- Download URL: pulumi_lagoon-0.2.7.tar.gz
- Upload date:
- Size: 24.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ba5f871261f76a77ab605237cfc1e256ae582bffeb60e8a3ec51ca625a1a5ee
|
|
| MD5 |
ba4506a9441d88720321257658388b5c
|
|
| BLAKE2b-256 |
259b1c1fd6a2aad029b6e97414e4a686c41c9c0e986b639d23119fea50c191c2
|
Provenance
The following attestation bundles were made for pulumi_lagoon-0.2.7.tar.gz:
Publisher:
publish.yml on tag1consulting/pulumi-lagoon-provider
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pulumi_lagoon-0.2.7.tar.gz -
Subject digest:
3ba5f871261f76a77ab605237cfc1e256ae582bffeb60e8a3ec51ca625a1a5ee - Sigstore transparency entry: 1189447550
- Sigstore integration time:
-
Permalink:
tag1consulting/pulumi-lagoon-provider@3af30e75e2a8910bb3015a230a37b91bd03be05a -
Branch / Tag:
refs/tags/v0.2.7 - Owner: https://github.com/tag1consulting
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3af30e75e2a8910bb3015a230a37b91bd03be05a -
Trigger Event:
release
-
Statement type:
File details
Details for the file pulumi_lagoon-0.2.7-py3-none-any.whl.
File metadata
- Download URL: pulumi_lagoon-0.2.7-py3-none-any.whl
- Upload date:
- Size: 43.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05c65710419330e55adb52d906168ef9af22637ea833c454d53f7c2614d08fb0
|
|
| MD5 |
02eb30bb17f22c434ddafe6ac7db3619
|
|
| BLAKE2b-256 |
900090be76e8df773848e6138c52451ae75fb5845828065626d9d87e260da0db
|
Provenance
The following attestation bundles were made for pulumi_lagoon-0.2.7-py3-none-any.whl:
Publisher:
publish.yml on tag1consulting/pulumi-lagoon-provider
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pulumi_lagoon-0.2.7-py3-none-any.whl -
Subject digest:
05c65710419330e55adb52d906168ef9af22637ea833c454d53f7c2614d08fb0 - Sigstore transparency entry: 1189447553
- Sigstore integration time:
-
Permalink:
tag1consulting/pulumi-lagoon-provider@3af30e75e2a8910bb3015a230a37b91bd03be05a -
Branch / Tag:
refs/tags/v0.2.7 - Owner: https://github.com/tag1consulting
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3af30e75e2a8910bb3015a230a37b91bd03be05a -
Trigger Event:
release
-
Statement type: