Граф коммитов

8 Коммитов

Автор SHA1 Сообщение Дата
magodo b794b083c7
Integrate with terraform-client-go for hcl only mode to eliminate `terraform` binary (#381)
* 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.
2023-03-29 10:03:52 +08:00
magodo 9ed90aea08
Extend `--append` to remote backend, and the backend type now honors the existing type in append mode (#373)
* Extend `--append` to remote backend, and the backend type now honors the existing type in append mode

* Pass CI

* Update readme
2023-03-09 09:34:49 +08:00
magodo c78dad6c8d Allow resource mapping file in the output directory in `map` mode 2023-02-16 11:30:02 +08:00
magodo c1805ba252
Expose some useful type/func to `pkg` to be called by external Go modules (#336)
* 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
2023-01-18 13:01:35 +08:00
magodo 1f340700d0
Move the interactive output dir check code from `NewBaseMeta()` to CLI before function (#309)
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.
2022-11-23 14:54:18 +08:00
magodo 996777aae4
Integrate with `gosec` to CI (#270) 2022-10-24 11:33:17 +08:00
magodo 2dd0da89cc
Avoid using `os.Rename()` (#269)
`os.Rename()` doesn't work for Windows when moving files across drives. Copy by bytes instead.
2022-10-20 10:25:38 +08:00
magodo 2f5c5cfaef
Single resource mode supports resource population and depedency
E.g. `aztfy res <vm id>` now might terrafies three resources: vm, managed disk and disk attachement.
2022-09-23 17:12:13 +08:00