A simple example of using terraform to only Extract data from providers as JSON printed to stdout. This mechanism can be further utilized inside ETL work such as using kestra or used as a way to backup configuration.
For example to run the module in /src/huaweicloud
inside the container, run:
docker run --rm \
--env-file .env \
ghcr.io/telkomindonesia/terraq huaweicloud
You can mount your terraform module under /src
directory on the container and then pass the directory name as the first argument.
docker run --rm \
--env-file .env \
-v $PWD/example:/src/example \
ghcr.io/telkomindonesia/terraq example