Aztfy Versions Save

A tool to bring existing Azure resources under Terraform's management

v0.14.1

1 month ago

0.14.1 (Apr 16, 2024)

BUG FIXES

  • Fix rg mode not export empty resource group (#500)
  • Fix cross RP parent-child dependency (#505)
  • Update github.com/hashicorp/terraform-exec: v0.17.2 -> v0.20.0 to fix an issue relating to terraform cloud (#508)
  • New option: --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)
  • Update aztft and tfadd for terraform-provider-azurerm v3.99.0, which fixes import issues reside in the upstream provider (#517)

v0.14.0

6 months ago

0.14.0 (Nov 13, 2023)

ENHANCEMENTS

  • New auth method: Fedorated Workload Identity (a.k.a OIDC) (#438)
  • New option --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)
  • Support azurerm provider v3.77.0 (#463)

BUG FIXES

  • Update aztft to fix the id construction for azurerm_role_definition (#437)

v0.13.1

10 months ago

0.13.1 (Jul 18, 2023)

BUG FIXES

  • Update aztft to fix a panic when querying unknown resource types (#434)

v0.13.0

10 months ago

0.13.0 (Jul 17, 2023)

ENHANCEMENTS

  • Resource mapping file (i.e. 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)
  • New option: --plain-ui which can be used together with --non-interactive for environment that has no /dev/tty available (#423)
  • Support azurerm provider v3.65.0 (#430)

BUG FIXES

  • Update aztft to support populate logic app workflow's prop-like resources (#421)
  • Support the legacy azurerm_virtual_machine (#425, #427)

v0.12.0

11 months ago

0.12.0 (May 24, 2023)

FEATURES

  • Integrate with terraform-client-go for "HCL only" mode that replaces the terraform binary, for better performance and lower resource consumption (#381)

ENHANCEMENTS

  • New option: --provider-version to overwrite the provider version used for importing (other than using the bound version) (#376)
  • New option: --env to specify a different environment rather than public cloud (#378)
  • 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 (#390)
  • Support azurerm provider v3.56.0 (#396)

BUG FIXES

  • Extend --append to remote backend, and the backend type now honors the existing type in append mode (#373)

v0.11.0

1 year ago

0.11.0 (Mar 7, 2023)

This release only contains the RP #370 that renames the tool from aztfy to aztfexport. This also brings some other breaking changes, including:

  • Resource mapping file name: aztfyResourceMapping.json -> aztfexportResourceMapping.json
  • Skipped resource list file name: aztfySkippedResources.txt -> aztfexportSkippedResources.txt
  • Config directory name: .aztfy -> .aztfexport

Meanwhile, the package name of this tool in the package manager of your choice is now also renamed to aztfexport.

v0.10.0

1 year ago

0.10.0 (Mar 3, 2023)

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)
  • Create the output directory (specified by -o) if not exists (#364)

ENHANCEMENTS:

  • New option --log-level (#317)
  • New option --module-path to support appending to nested module (#322)
  • Interactive mode keybinding del be used for reverting skip (#326)
  • Performance improvement:
    • Parallelize resource mapping (aztft), discovering (azlist) (#340) and initialization for importing (#341)
    • When there is no base state given, state merging will not use tfmerge (#347)
    • Only run terraform show once when converting from state to config (#349)
    • Avoid terraform init for import workspaces when --dev-provider is specified (#350)
  • New command 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)
  • Keep resource mapping file and skipped resource file in hcl only mode (#365)
  • Supporting terraform-provider-azurerm v3.46.0 (#369)

BUG FIXES:

  • Don't push state if there is no state to push (#327)
  • Keep resource order in the config as is in the import list (#329)
  • Fix --append leaks to be used together with --hcl-only in interactive mode (#363)

OTHERS:

  • Refactoring and exposing some useful type/func to pkg to be called by external Go modules. NOTE: There is no compatibility guarantee for these APIs. (#336, #346, #362)

v0.9.0

1 year ago

0.9.0 (Nov 16, 2022)

ENHANCEMENTS:

  • Importing resources in parallel - rather than in serial. The default parallelism is set to 10. Users can change it via the option --parallelism (#260)
  • Supports Terraform AzureRM provider v3.31.0 (#302)

BUG FIXES:

  • Handle multiple azure resources having the same Terraform IDs when resolving Terraform dependencies by adding a comment containing all the candidates and let users to choose (#251)
  • Fix panic in azlist (#262)
  • Avoid using os.Rename() to move files as it doesn't work for Windows when moving files across drives (#269)
  • In resource mode, handle Terraform address conflicts on multiple same typed prop-like resources (previously we incorrectly assume there will be only one such resource) (#281)
  • Fix some incorrect import specs in aztft (#294, #299, #300)

v0.8.0

1 year ago

0.8.0 (Oct 1, 2022)

BREAKING CHANGES:

  • Changing the mapping file format (#234), also rename the file by removing its prefix dot (i.e. now aztfyResourceMapping.json) (#240)
  • The -m option in resource-group mode is now replaced in favor of the new map subcommand (#241)
  • Renaming option --batch/-b to --non-interactive/-n (#242)
  • resource subcommand now defaults to run interactively, to be consistent with the other 3 subcommands (#243)

ENHANCEMENTS:

  • New subcommand: query to support customized set of resources (#231)
  • Removing dependency on ARM template export, together with the resource count limitation of 200 bound to ARM template, in resource-group mode (#231)
  • The cross resource dependency is now resolved by aztfy, rather than leveraging that from the ARM template, which gives precise dependencies than before (#231)
  • New file aztfySkippedResources.txt will now be generated to show the resources that are within the specified scope, but are skipped (#237)
  • Support property-like Terraform resources (a.k.a association/attachement resources). This also indicates that resource mode now might results into multiple Terraform resources. (#238)
  • New CLI option: -g/--generate-mapping-file to just generate the resource mapping file and quit (#240)
  • New subcommand: map/mapping-file to terrafy resources defined in a resource mapping file (#241)
  • New option: --hcl-only to only keep the .tf files in the output directory, and removing the other files (#246)

BUG FIXES:

  • Fix data plane only resource id incorrectly prefixed by \ after mapping from azure id to TF id (#230)

v0.7.0

1 year ago

0.7.0 (Sep 13, 2022)

ENHANCEMENTS:

  • Show import progress on rg batch mode (#188)
  • Introduce --type in resource mode to allow users to explicitly set the TF resource type (#198)
  • New common option: --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:

  • Fix import error for azurerm_virtual_desktop_host_pool (#185)
  • Empty check on the outdir only once prior to TF run (#180)