Skip to main content

No project description provided

Project description

The CloudFormation CLI (cfn) allows you to author your own resource providers that can be used by CloudFormation.

Development

For developing, it’s strongly suggested to install the development dependencies inside a virtual environment. (This isn’t required if you just want to use this tool.)

python3 -m venv env
source env/bin/activate
pip install -e . -r requirements.txt
pre-commit install

You will also need to install a language plugin, such as the Java language plugin, also via pip install. For example, assuming the plugin is checked out in the same parent directory as this repository:

pip install -e ../aws-cloudformation-rpdk-java-plugin

Linting and running unit tests is done via pre-commit, and so is performed automatically on commit. The continuous integration also runs these checks. Manual options are available so you don’t have to commit):

` # run all hooks on all files, mirrors what the CI runs pre-commit run --all-files # run unit tests only. can also be used for other hooks, e.g. black, flake8, pylint-local pre-commit run pytest-local `

If you want to generate an HTML coverage report afterwards, run coverage html. The report is output to htmlcov/index.html.

Usage

WARNING: Future Information; we have not published to PyPI yet.

Installation

This tool can be installed using pip from the Python Package Index (PyPI). It requires Python 3.

pip3 install cfn

Command: init

To create a project in the current directory, use the init command. A wizard will guide you through the creation.

cfn init

Command: generate

To refresh auto-generated code, use the generate command. Usually, plugins try to integrate this command in the native build flow, so please consult a plugin’s README to see if this is necessary.

cfn generate

Plugin system

New language plugins can be independently developed. As long as they declare the appropriate entry point and are installed in the same environment, they can even be completely separate codebases. For example, a plugin for Groovy might have the following entry point:

entry_points={
    "rpdk.v1.languages": ["groovy = rpdk.groovy:GroovyLanguagePlugin"],
},

Plugins must provide the same interface as LanguagePlugin (in plugin_base.py). And they may inherit from LanguagePlugin for the helper methods - but this is not necessary. As long as the class has the same methods, it will work as a plugin.

License

This library is licensed under the Apache 2.0 License.

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

cloudformation-cli-0.1.tar.gz (70.2 kB view details)

Uploaded Source

Built Distribution

cloudformation_cli-0.1-py3-none-any.whl (59.2 kB view details)

Uploaded Python 3

File details

Details for the file cloudformation-cli-0.1.tar.gz.

File metadata

  • Download URL: cloudformation-cli-0.1.tar.gz
  • Upload date:
  • Size: 70.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.0

File hashes

Hashes for cloudformation-cli-0.1.tar.gz
Algorithm Hash digest
SHA256 14d0008e20fac992c08048d503e4fa394b0ae74755c83869db3ea2a83ae39d20
MD5 5acd00db89065b1bcd0e6c759b18851c
BLAKE2b-256 b332041eb9e0c9a7009e42e12f2798c57854207a057d771deb6e87198f1e3cae

See more details on using hashes here.

File details

Details for the file cloudformation_cli-0.1-py3-none-any.whl.

File metadata

  • Download URL: cloudformation_cli-0.1-py3-none-any.whl
  • Upload date:
  • Size: 59.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.0

File hashes

Hashes for cloudformation_cli-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a7db6cf42192030691baac02ffc1b19427cdeba6782a94ee4ae9594805e77c9a
MD5 9b2e60e757dc09cbc7007d33513cbd80
BLAKE2b-256 1c66b0de532bd271b0f58e60915d5afecc30f50267ecd2b4b1369c5569758b26

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