Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hterik opened this issue Oct 29, 2024 · 4 comments
Labels
documentation Improvements or additions to documentation

Comments

@hterik
Copy link

hterik commented Oct 29, 2024

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 #516 and it appears to work better instead.

@stemaMSFT
Copy link
Member

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

@magodo
Copy link
Collaborator

magodo commented Oct 30, 2024

@stemaMSFT Two options exist:

  • --generate-mapping-file / -g: This indicates to only generate the mapping file (aztfexportResourceMapping.json), but not do the following import/export tasks.
  • --generate-import-block: This will generate the import.tf along with the aztfexportResourceMapping.json.

So the document here needs to update.

@magodo magodo added documentation Improvements or additions to documentation question Further information is requested and removed question Further information is requested labels Oct 30, 2024
@stemaMSFT
Copy link
Member

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

@magodo
Copy link
Collaborator

magodo commented Nov 6, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants