Python Pulumi program that defines S3 state bucket and KMS key
-
Create new project directory and go to it
-
Execute
pulumi new https://github.com/peterkowalski/pulumi-template-aws-python
-
Open workspace in Visual Studio Code using Dev Container
-
Configure AWS credentials
-
Remove
venv
directory -
Remove virtual environment configuration from
Pulumi.yaml
BEFORE:
name: pulumi-python-s3state runtime: name: python options: virtualenv: venv main: src/ description: Python Pulumi program that defines S3 state bucket and KMS key
AFTER:
name: pulumi-python-s3state runtime: name: python main: src/ description: Python Pulumi program that defines S3 state bucket and KMS key
-
Install Python packages:
poetry install
-
Initialize git repository:
git init
-
Execute
fix_template.py
-
Install
pre-commit
hooks:pre-commit install
-
Make an initial commit
- Automatically remove initially created
venv
directory withfix_template.py
- Automatically remove virtual environment configuration from
Pulumi.yaml
withfix_template.py