The terraform-exporter
CLI is a pluggable tool that supports exporting resources
you have already created into Terraform HCL files. Plugins determine what
resources should be exported and how to export them, as well as a terraform
provider file. This tool generates a shell script to terraform import
those
resources to be used later.
By default, the tool does not know how to export anything, and leaves that up to the plugins to do. Plugins are hosted by registries, and a default registry is configured in the tool.
$ brew install gideaworx/tap/terraform-exporter
Visit the releases page.
$ go install github.com/gideaworx/terraform-exporter@latest
Usage: terraform-exporter <command>
Flags:
-h, --help Show context-sensitive help.
-v, --version Show the version and quit
Commands:
export <command-name> <command-args> ...
Export data to terraform files
install-plugin (install,i) <plugin-name>
Install a plugin
remove-plugin (remove,rm) <plugin-name>
Uninstall a plugin
update-plugin (update,up) <plugin-name>
Update a plugin
help (h) <command-name>
Show help for a plugin's exporter command
list-plugins (ls)
List installed plugins
list-commands (lc)
List commands provided by installed plugins
registry show-catalog (ls)
List all installed plugin registries
registry available-plugins
List all plugins available in a registry
registry add
Add a registry from which plugins can be installed
registry remove (rm) <name>
Remove a registry from the local catalog
Run "terraform-exporter <command> --help" for more information on a command.
Follow the guides in the plugin repository
terraform-exporter
is released under the MIT license.
Pull requests are welcome! All contributors are bound by the Code of Conduct. Before opening a pull request, please open an issue so it can be triaged. Please ensure, to the best of your ability, that the issue actually lies within the CLI itself and not a plugin before opening an issue.