Configure the data directory for post-init inspection
masterWhen using the --after-init flag, the tool looks for the Terraform data directory to inspect the configuration.
- It first checks the
TF_DATA_DIRenvironment variable. - If
TF_DATA_DIRis not set, it defaults to the.terraformdirectory within the target directory.
You can control this behavior by setting the TF_DATA_DIR environment variable before running the command.
export TF_DATA_DIR=/path/to/custom/terraform/data
terraform-config-inspect --after-init --json .