Skip to main content

Tools to manage CloudFormation stack configuration

Project description

Simple command line tools to create and update CloudFormation stacks that make it easy to version-control both your templates and stack configurations in one place. Supports a few proprietary transforms useful for dynamically merging a manually maintained template with a generated template (for example, sam.json from “chalice package”) that contains resources you’d like to include in your main template.

Development

The vinstall script uses the venv module to prepare a Python environment useful for development, so you don’t have to build and install carica-cfn-tools to be able to run and test it.

  1. Run ./vinstall

  2. Activate the virtual environment by running . ./venv/bin/activate

  3. The console_scripts listed in setup.py are now in your path, so you can simply run them like:

    carica-cfn ...

Sample Stack Config

Region: us-east-1
Bucket: mycorp-cfn-us-east-1
Name: WarehouseApp
Template: ../templates/warehouse-app.yml
Jinja: true
Parameters:
  # Normal parameter values can include strings, numbers, booleans, etc.
  Stage: dev
  TableReadCapacityUnits: 10
  TableWriteCapacityUnits: 5
  AdminPassword:
    # A parameter with a "ParameterStore" sub-key will be resolved to the
    # SSM Parameter Store parameter with that name.
    ParameterStore: dev.warehouseapp.admin-password
  PostgreSQLPassword:
    # A parameter with a "SecretsManager" sub-key will be resolved to the
    # Secrets Manager secret with that ID.
    SecretsManager: dev.warehouseapp.postgresql-password
Extras:
  - ../cfn/static/logo.png
  - ../cfn/static/index.html
JinjaExtras:
  - ../cfn/includes/*.yml
JinjaExtrasContext:
  FOO: bar

Region sets where the CloudFormation template and related resources will be uploaded and where the CloudFormation stack will be created. This must match the region the Bucket was created in. This is required.

Bucket sets where the CloudFormation template and related resources will be uploaded. This is required.

Name sets the name of the CloudFormation stack. This is required.

Template is a relative path to the CloudFormation YAML or JSON template file to create the stack from. This is required.

Jinja is an optional setting that controls whether Template will be processed with Jinja2 before being uploaded. This setting does not enable Jinja2 for extras; use JinjaExtras for that.

Extras and JinjaExtras can be absolute paths or glob patterns relative to the stack config file.

Extras or JinjaExtras that are directories, whether specified by absolute path or expanded from a glob pattern, are copied recursively into the deployment at a top-level directory named after the last directory component of the source. An extra directory path like /foo/bar/baz ends up as /baz in the deployment.

Extras or JinjaExtras that are files, whether by absolute path or expanded from a glob pattern, are copied into the root of the deployment.

JinjaExtras are processed with the Jinja2 template engine after all extras are copied to a temporary directory.

JinjaExtrasContext is a dictionary passed as the context when Jinja is run.

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

carica_cfn_tools-1.26.tar.gz (18.7 kB view details)

Uploaded Source

Built Distribution

carica_cfn_tools-1.26-py2.py3-none-any.whl (18.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file carica_cfn_tools-1.26.tar.gz.

File metadata

  • Download URL: carica_cfn_tools-1.26.tar.gz
  • Upload date:
  • Size: 18.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for carica_cfn_tools-1.26.tar.gz
Algorithm Hash digest
SHA256 4639c394d02e9e6a10c3dc3881a5d9b0291a271f5728a762a19c72632810914e
MD5 14d681da97261f24d4c770136948cdba
BLAKE2b-256 05770e5f783d77b7307e47bf9743c4e0b12f2a95e8040615258d793d28251fce

See more details on using hashes here.

File details

Details for the file carica_cfn_tools-1.26-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for carica_cfn_tools-1.26-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1812357ed10303fc67da17c3b90894911aae7cd9140b3c944fce764502d107bb
MD5 24b9bdeda003cb47d41c2a6c6d6c56aa
BLAKE2b-256 8d68ea1b50e7cda6cfa51fd217c8bbf45f0e5944a552a7d82a30c9b2abef47a0

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