Skip to content

nab-gha/pulumi-python-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Pulumi Python Examples

Goals

Pulumi Python examples used to explore issues and approaches

  • Infrastructure as Code - Define all infrastructure using tooling such as Pulumi

Setup

Install required software and setup environment

Pulumi

The Infrastructure as Code tool.

AWS

An AWS account and the AWS CLI

Python

  • Install Python3
  • setup virtual environment
    • cd to example1 and create virtual env
    • virtualenv venv
    • source venv/bin/activate

Building Dev Cluster

  • Deploy infrasturcture
    • create an S3 bucket and a prefix (folder) for storing your pulumi state
    • export PULUMI_CONFIG_PASSPHRASE=""
    • pulumi --non-interactive login s3://<bucket>/<prefix>
    • pulumi --non-interactive stack select -c example-one
    • pulumi up

Running unittests

Reading Pulumi issues, documentation and blogs, I think this should work:

export PULUMI_PYTHON_PROJECT=example-one
export PULUMI_PYTHON_STACK=example-one
export PULUMI_CONFIG=$(yq eval Pulumi.${PULUMI_PYTHON_STACK}.yaml --output-format=json | jq -c '.config')
pytest

But it fails

ERROR test_server.py - pulumi.config.ConfigMissingError: Missing required configuration variable 'project:application'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published