Skip to main content

Tf Restore Helper

Project description

PyPI Python Version License

Read the documentation at https://tf-restore-helper.readthedocs.io/ Tests Codecov

pre-commit Black

Features

  • Constructs Terraform import commands to assist an operator aligning a terraform state after volume restores have taken place by an external tool, which results in terraform misalignment.

  • Tool is currently only compatible with AWS volumes (PRs welcome) and is used at own risk. Operators that do not understand the terraform state file or what the produced commands will do, should not use this tool as a helper and proper state backup and recovery procedures should be well understood before making use of this.

Installation

You can install Tf Restore Helper via pip from PyPI:

$ pip install tf-restore-helper

Usage

Please see the Command-line Reference for details.

Examples of usage:

> tf-restore-helper --planfile tests/assets/plan.json
 2021-05-03 13:28:43 sbpltc1nplvdl botocore.credentials[79705] INFO Found credentials in environment variables.
 2021-05-03 13:28:46 sbpltc1nplvdl postrestoretfcli[79705]   WARNING THIS INFORMATION SHOULD BE USED ONLY IF YOU KNOW WHAT YOU ARE DOING!
 -----------Terraform volume alignment commands-----------
 terraform state rm "aws_ebs_volume.test-instance-volume-1"
 terraform state rm "aws_volume_attachment.test-instance-volume-1"

Contributing

Contributions are very welcome. To learn more, see the Contributor Guide.

License

Distributed under the terms of the MIT license, Tf Restore Helper is free and open source software.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Credits

This project was generated from @cjolowicz’s Hypermodern Python Cookiecutter template.

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

tf-restore-helper-0.1.1.tar.gz (7.4 kB view hashes)

Uploaded Source

Built Distribution

tf_restore_helper-0.1.1-py3-none-any.whl (7.7 kB view hashes)

Uploaded Python 3

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