|
| 1 | +AWS CloudFormation Resource Provider Java Plugin |
| 2 | +================================================ |
| 3 | + |
| 4 | +The CloudFormation CLI (cfn) allows you to author your own resource |
| 5 | +providers that can be used by CloudFormation. |
| 6 | + |
| 7 | +This plugin library helps to provide Java runtime bindings for the |
| 8 | +execution of your providers by CloudFormation. |
| 9 | + |
| 10 | +Usage |
| 11 | +----- |
| 12 | + |
| 13 | +If you are using this package to build resource providers for |
| 14 | +CloudFormation, install the (CloudFormation |
| 15 | +CLI)[https://github.com/aws-cloudformation/aws-cloudformation-rpdk] and |
| 16 | +the (CloudFormation CLI Java |
| 17 | +Plugin)[https://github.com/aws-cloudformation/aws-cloudformation-rpdk-java-plugin] |
| 18 | + |
| 19 | +.. code-block:: bash |
| 20 | +
|
| 21 | + pip install cloudformation-cli |
| 22 | + pip install cloudformation-cli-java-plugin |
| 23 | +
|
| 24 | +Refer to the documentation for the `CloudFormation CLI`_ for usage |
| 25 | +instructions. |
| 26 | + |
| 27 | +Development |
| 28 | +----------- |
| 29 | + |
| 30 | +First, you will need to install the (CloudFormation |
| 31 | +CLI)[https://github.com/aws-cloudformation/aws-cloudformation-rpdk], as |
| 32 | +it is a required dependency: |
| 33 | + |
| 34 | +.. code-block:: bash |
| 35 | +
|
| 36 | + pip install cloudformation-cli |
| 37 | +
|
| 38 | +For changes to the plugin, a Python virtual environment is recommended. |
| 39 | + |
| 40 | +.. code-block:: bash |
| 41 | +
|
| 42 | + python3 -m venv env |
| 43 | + source env/bin/activate |
| 44 | + # assuming cloudformation-cli has already been cloned/downloaded |
| 45 | + pip install -e . |
| 46 | + pre-commit install |
| 47 | +
|
| 48 | +Linting and running unit tests is done via `pre-commit`_, and so is |
| 49 | +performed automatically on commit. The continuous integration also runs |
| 50 | +these checks. Manual options are available so you don't have to commit): |
| 51 | + |
| 52 | +.. code-block:: bash |
| 53 | +
|
| 54 | + # run all hooks on all files, mirrors what the CI runs |
| 55 | + pre-commit run --all-files |
| 56 | + # run unit tests only. can also be used for other hooks, e.g. black, flake8, pylint-local |
| 57 | + pre-commit run pytest-local |
| 58 | +
|
| 59 | +License |
| 60 | +------- |
| 61 | + |
| 62 | +This library is licensed under the Apache 2.0 License. |
| 63 | + |
| 64 | +.. _CloudFormation CLI: https://github.com/aws-cloudformation/aws-cloudformation-rpdk |
| 65 | +.. _pre-commit: https://pre-commit.com/ |
0 commit comments