Skip to main content

Convert Cloudformation Templates to Terraform.

Project description


Cloudformation 2 Terraform

Convert your Cloudformation templates to Terraform.
Report Bug · Request Feature ·

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. Contact
  7. Acknowledgements

About The Project

cf2tf is a CLI tool that attempts to convert Cloudformation to Terraform. We say attempt because it's not really possible to make the conversion with 100% accuracy (currently) because of several reasons mostly around converting a Map value in Cloudformation to the correct value in HCL.

Getting Started

Prerequisites

Cloud-Radar requires python >= 3.7

Installation

cf2tf is available as an easy to install pip package.

pip install cf2tf

Usage

To convert a template to terraform.

cf2tf my_template.yaml

This above command will dump all the terraform resources to stdout. You might want to save the results:

cf2tf my_template.yaml > main.tf

If you prefer to have each resource in its own file then:

cf2tf my_template.yaml -o some_dir

If some_dir doesn't exist, then it will be created for you. Then each resource type will be saved to a specific file (variables.tf, outputs.tf etc.).

Roadmap

  • Better conversion of Cloudformation Maps to Terraform (Maps, Block and json)
  • Allow overides for specific resources.

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

This project uses poetry to manage dependencies and pre-commit to run formatting, linting and tests. You will need to have both installed to your system as well as python 3.9.

  1. Fork the Project

  2. Setup the environment.
    This project uses vscode devcontainer to provide a completly configured development environment. If you are using vscode and have the remote container extension installed, you should be asked to use the devcontainer when you open this project inside of vscode.

    If you are not using devcontainers then you will need to have python installed. Install the poetry, nox, nox_poetry and pre-commit packages. Then run poetry install and pre-commit install commands.

    Most of the steps can be found in the Dockerfile.

  3. Create your Feature Branch (git checkout -b feature/AmazingFeature)

  4. Commit your Changes (git commit -m 'Add some AmazingFeature')

  5. Push to the Branch (git push origin feature/AmazingFeature)

  6. Open a Pull Request

Contact

Levi - @shady_cuz

Acknowledgements

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cf2tf-0.1.0.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

cf2tf-0.1.0-py3-none-any.whl (25.6 kB view details)

Uploaded Python 3

File details

Details for the file cf2tf-0.1.0.tar.gz.

File metadata

  • Download URL: cf2tf-0.1.0.tar.gz
  • Upload date:
  • Size: 23.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.13 Linux/5.13.0-1025-azure

File hashes

Hashes for cf2tf-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7f1a75fa4032f8f84e8bc396093570d87c3837c953e01ed7485d2d7cbc9e006f
MD5 fbded6fd3ba985673a55f4dad990f726
BLAKE2b-256 4532914ae7efb3f3317336433c79f7e092809f7238b0deed04a5fb07d25efa78

See more details on using hashes here.

File details

Details for the file cf2tf-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cf2tf-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 25.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.13 Linux/5.13.0-1025-azure

File hashes

Hashes for cf2tf-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 733c45efa34920f7436b9d7ae11c36a9c06001537798db2b09d12ad151ae48bd
MD5 846f5b4e42139cfd3cd09ae4fce798cc
BLAKE2b-256 065d6f1742d881d86f7820002dd7387b2296089b7b536de72a7d6bbe4b11f56e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page