Azure / aztfexport

A tool to bring existing Azure resources under Terraform's management
https://azure.github.io/aztfexport/
Mozilla Public License 2.0
1.59k stars 184 forks source link

New option: `--generate-import-block` to allow users to select whether to generate the import.tf #516

Closed magodo closed 5 months ago

magodo commented 5 months ago

Previously, this tool by default will generate the import.tf as long as the terraform >= v1.5.0. Whilst this behavior will cause error when append to a workspace as a submodule, as the import.tf is only allowed to appear at the root module.

This PR fixes this issue by introducing a new option --generate-import-blockto allow users to select whether to generate theimport.tf`.