Azure / aztfexport

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

Documentation for creating `import.tf` is outdated, missing `--generate-import-block` #572

Open hterik opened 1 month ago

hterik commented 1 month ago

https://learn.microsoft.com/en-us/azure/developer/terraform/azure-export-for-terraform/select-custom-resources#using-terraform-import-blocks contains faulty instructions for generating import.tf The page instructs to use the --generate-mapping-file but it is not working.

A new --generate-import-block was added in https://github.com/Azure/aztfexport/pull/516 and it appears to work better instead.

stemaMSFT commented 1 month ago

@magodo to confirm we no longer generate import blocks through -g or --generate-mapping-file?

magodo commented 1 month ago

@stemaMSFT Two options exist:

So the document here needs to update.

stemaMSFT commented 4 weeks ago

Got it. Can we also add a short form, i.e. --i for --generate-import-block?

magodo commented 3 weeks ago

I'd suggest not to do it as -i as it is typically used for "input" in short. Also, it is not so necessary as this option is enabled by default, people will only use it if they want to disable that.