Skip to main content

Utilities for working with Pulumi stacks

Project description

pulumi-stack-utils

test workflow

A collection of utilities for working with Pulumi stacks

The original motivation for this package is to get around some limitations with the StackReference available in the official pulumi Python package. Specifically around reading outputs from other stacks. Currently, stacks need to share the same passphrase to read outputs from each other, even if the output isn't secret.

More information can be found in this issue.

Installation

pip install pulumi-stack-utils

Usage

Retrieve outputs from a stack using an S3 backend

from pulumi_stack_utils import StackReference

# If backend_url isn't provided the package will try and read it
# from the Pulumi.yaml file in the cwd
ref = StackReference("organization/project/my-stack", backend_url="s3://state-backend/prefix")
output = ref.get_output("myOutput")

Autotag resources created on AWS. Based on this blog post

import pulumi
from pulumi_stack_utils.aws.autotag import register_auto_tags

config = pulumi.config()
register_auto_tags({
    "user:Project": pulumi.get_project(),
    "user:Stack": pulumi.get_stack(),
    "user:Owner": config.require("stackOwner"),
})

Project details


Download files

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

Source Distribution

pulumi-stack-utils-0.1.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

pulumi_stack_utils-0.1.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file pulumi-stack-utils-0.1.1.tar.gz.

File metadata

  • Download URL: pulumi-stack-utils-0.1.1.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for pulumi-stack-utils-0.1.1.tar.gz
Algorithm Hash digest
SHA256 95ae25230162ba4eadc806fa69e47be86ad7e058c6040a7ec6356d0831f6ca3f
MD5 37b7d957fd288ad5f06b3fadb5e65d97
BLAKE2b-256 cf7ada85d1e23c840876bc4f1bc0423bb2a87ec12902a2aaf30e347768c4f3ef

See more details on using hashes here.

File details

Details for the file pulumi_stack_utils-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pulumi_stack_utils-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 83e79f72545cdd2545dc0fdf7b114734398e0bb28a93d7f4e969a1a403e25cdf
MD5 757be0e8166a92bf3780d880a357002a
BLAKE2b-256 76f5a1c5a45825583d52de05e37a4e12cd35f52550e1968507f8b2316a49aefb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page