A tool to bring existing Azure resources under Terraform's management
BUG FIXES
rg
mode not export empty resource group (#500)github.com/hashicorp/terraform-exec
: v0.17.2 -> v0.20.0 to fix an issue relating to terraform cloud (#508)--generate-import-block
to allow users to select whether to generate the import.tf
after exporting. This fixes appending to a submodule fails due to import block can only resides in the root module (#516)aztft
and tfadd
for terraform-provider-azurerm v3.99.0, which fixes import issues reside in the upstream provider (#517)ENHANCEMENTS
--provider-name=[azurerm|azapi]
to export to different providers, either azurerm
(default), or azapi
(new) (#462, #464, #465)resource-group
and query
modes add new option: --include-role-assignment
for exporting role assignments directly assigned to the exported resources (#468)query
mode add new option --include-resource-group
for exporting the resource group(s) containing the exported resources (#468)azurerm
provider v3.77.0 (#463)BUG FIXES
azurerm_role_definition
(#437)BUG FIXES
ENHANCEMENTS
aztfexportResourceMapping.json
) will now be generated together with the import.tf
that is the Terraform official import blocks, as long as the version of terraform
being used is v1.5.0 or later (#398)--plain-ui
which can be used together with --non-interactive
for environment that has no /dev/tty
available (#423)BUG FIXES
azurerm_virtual_machine
(#425, #427)FEATURES
terraform-client-go
for "HCL only" mode that replaces the terraform
binary, for better performance and lower resource consumption (#381)ENHANCEMENTS
--provider-version
to overwrite the provider version used for importing (other than using the bound version) (#376)--env
to specify a different environment rather than public cloud (#378)--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 (#390)BUG FIXES
--append
to remote backend, and the backend type now honors the existing type in append mode (#373)This release only contains the RP #370 that renames the tool from aztfy
to aztfexport
. This also brings some other breaking changes, including:
Meanwhile, the package name of this tool in the package manager of your choice is now also renamed to aztfexport
.
BREAKING CHANGES
aztfy
now depends on a pre-installed terraform
executable that is located at $PATH
. Also, the directory under UserCacheDir/aztfy used for caching the downloaded terraform is now not needed and can be safely deleted. (#347)aztfy
now by default will collect telemetry for identifying issues and areas for improvement (see https://github.com/Azure/aztfy#config). Users can opt out by running aztfy config set telemetry_enabled false
(#360)-o
) if not exists (#364)ENHANCEMENTS:
--log-level
(#317)--module-path
to support appending to nested module (#322)tfmerge
(#347)terraform show
once when converting from state to config (#349)terraform init
for import workspaces when --dev-provider
is specified (#350)config [get|set|show]
to manage aztfy config file, which is under $HOME/.aztfy/config.json (#360)map
mode allows to reference a resource mapping file in the output directory even when --overwrite
is specified. Previously, that resource mapping file will also be cleaned during overwriting (#361)BUG FIXES:
--append
leaks to be used together with --hcl-only
in interactive mode (#363)OTHERS:
pkg
to be called by external Go modules. NOTE: There is no compatibility guarantee for these APIs. (#336, #346, #362)ENHANCEMENTS:
--parallelism
(#260)BUG FIXES:
os.Rename()
to move files as it doesn't work for Windows when moving files across drives (#269)BREAKING CHANGES:
aztfyResourceMapping.json
) (#240)-m
option in resource-group
mode is now replaced in favor of the new map
subcommand (#241)--batch
/-b
to --non-interactive
/-n
(#242)resource
subcommand now defaults to run interactively, to be consistent with the other 3 subcommands (#243)ENHANCEMENTS:
query
to support customized set of resources (#231)resource-group
mode (#231)aztfy
, rather than leveraging that from the ARM template, which gives precise dependencies than before (#231)aztfySkippedResources.txt
will now be generated to show the resources that are within the specified scope, but are skipped (#237)resource
mode now might results into multiple Terraform resources. (#238)-g
/--generate-mapping-file
to just generate the resource mapping file and quit (#240)map
/mapping-file
to terrafy resources defined in a resource mapping file (#241)--hcl-only
to only keep the .tf files in the output directory, and removing the other files (#246)BUG FIXES:
ENHANCEMENTS:
--type
in resource mode to allow users to explicitly set the TF resource type (#198)--full-properties
to generate full HCL from TF state. This is for inspection purpose, which means the config generated most likely requires modification to be valid (#210, #214)aztfy
now release Windows msi
in the github release. Meanwhile, corresponding Linux packages are published to https://packages.microsoft.com, which covers rhel8
, rhel9
, ubuntu-focal
and ubuntu-jammy
repos (#204)BUG FIXES:
azurerm_virtual_desktop_host_pool
(#185)