* Collect subscription id in telemetry
* Separating the error trace to 2, so that we only need to redacate the details
* Split aztfexport end error to 2
* Fix a minor bug in the effective cli arg
* New CLI options: `--use-environment-cred`, `--use-managed-identiy-cred` and `--use-azure-cli-cred` to allow users to explicitly choose auth method instead of the default auth chain
* test cases for the new cli options
* Integrate with terraform-client-go for hcl only mode to eliminate `terraform` binary
Integrate with terraform-client-go for hcl only mode to eliminate `terraform` binary. This improves the performance (quicker speed and lower footprint) of importing.
To use it, users have to explicitly specify a new hidden flag (`--tfclient-plugin-go`). This flag is hidden since it is not supposed for CLI users to use, but is meant to be used by module users who wants to get the benefit of performance improvement.
* New option: `--provider-version` to overwrite the provider version used for importing (other than using the bound version)
* Determine the provider version constraint under used if not specified
* refactor
* Export ImportItem/List to pkg
* Remove meta2 reference
* Remove meta2 reference
* Move `Batch` out of `Config`
* Not chdir in test
* Remove write file sync
* Improve `ImportParalle` to allow it accept list longer than paralleism
* Differentiate exported Config and internally used cfg types for (non)interactive mode && add comments for exported types
* revert the vm acctest to use os profile ubuntu 16.04
* pass gosec
* `Meta` methods accept context
Moving the interactive output dir check code from `NewBaseMeta()` to CLI before function as the `NewBaseMeta()` is meant to be used by 3rd-party modules, which is inappropriate to hold code requires user's interactions.
This PR adds a new subcommand `map`/`mapping-file` to terrafy a predefined set of resources. This subcommand replaces the original way of specifying the resource mapping file by `-m` in either `query` or `rg` mode. As a result, the `-m` is removed from `query` and `rg` mode.
Relating to #222. More context can be found at: https://github.com/Azure/aztfy/issues/222#issuecomment-1260564510.
* Introduce `-g`/`--generate-mapping-file` to only generate resouce mapping file
- In batch mode for `rg` and `query`, and also for `res`, `-g` will only generates resouce maping file, but not import any resource (interactive mode already has <kbd>s</kbd> for the same purpose)
- Remove the prefix dot of the resource mapping file and skipped resouces file names, to make it noticebale for Linux/Mac users
- `res` mode now also exports resource mapping file on a successful run
* Making the key of resource mapping file case sensitive (to make the key usable for res mode)
- Introduce a hidden flag `--plain-ui`, which is used for e2e test to stream the test output
- Add more stage related log during e2e test
- Introduce delay in e2e test right before apply, to wait for the created resources be recorded in ARG