aztfexport

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

MPL-2.0 License

Downloads
204
Stars
1.6K
Committers
16

Bot releases are visible (Hide)

aztfexport - v0.15.0

Published by azure-terraform-bot 2 months ago

0.15.0 (Aug 19, 2024)

ENHANCEMENTS

  • Authentication related options now pass through to the provider as the provider configuration (#546)

    The new options (or existing flags but now passed to providers) are listed below:

    • env
    • tenant-id
    • auxiliary-tenant-ids
    • client-id
    • client-id-file-path
    • client-certificate
    • client-certificate-path
    • client-certificate-password
    • client-secret
    • client-secret-file-path
    • oidc-request-token
    • oidc-request-url
    • oidc-token
    • oidc-token-file-path
    • use-managed-identity-cred (defaults to false)
    • use-azure-cli-cred (defaults to true)
    • use-oidc-cred (defaults to false)
  • New option: -mask-sensitive to allow masking sensitive attributes (#551)

  • Resource mode supports multiple resources (#552)

  • Behavior change of --overwrite to avoid deleting user files (#553)

SECURITY ISSUES

  • Update github.com/hashicorp/hc-install to v0.7.0 to solve CVE issues (#538)
aztfexport - v0.14.2 Latest Release

Published by azure-terraform-bot 5 months ago

0.14.2 (Jun 7, 2024)

BUG FIXES

  • Update aztft to include population of load balancer probes and rules, if any (#524)
aztfexport - v0.14.1

Published by azure-terraform-bot 6 months 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)
aztfexport - v0.14.0

Published by magodo 12 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)
aztfexport - v0.13.1

Published by magodo over 1 year ago

0.13.1 (Jul 18, 2023)

BUG FIXES

  • Update aztft to fix a panic when querying unknown resource types (#434)
aztfexport - v0.13.0

Published by magodo over 1 year 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)
aztfexport - v0.12.0

Published by magodo over 1 year 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)
aztfexport - v0.11.0

Published by magodo over 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.

aztfexport - v0.10.0

Published by magodo over 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)
aztfexport - v0.9.0

Published by magodo almost 2 years 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)
aztfexport - v0.8.0

Published by magodo about 2 years 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)
aztfexport - v0.7.0

Published by magodo about 2 years 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)
aztfexport - v0.6.0

Published by magodo over 2 years ago

0.6.0 (Jul 21, 2022)

BREAKING CHANGES:

  • The CLI is now refactored to two subcommands: resource/res and resource-group/rg, where the resource/res is to terrafy a single resource by its Azure resource ID, and the resource-group/rg is to terrafy a resource group by name, as before (#166)

ENHANCEMENTS:

  • New option: --append to allow importing to existing workspace (#151)
  • New subcommand aztfy resource to terrafy a single resource by its Azure resource ID (#166)
  • Replace the TF to Azure ID mapping by aztft, which makes the TF resource type auto deducing more accurate (#175)
  • Update provider schema to v3.14.0 (#176)
  • UI improvement for non-interactive mode (#177)

BUG FIXES:

  • Support clouds rather than Azure public (#169)
  • Support signalr service (#155)
  • Support storage file share (#150)
aztfexport - v0.5.0

Published by magodo over 2 years ago

0.5.0 (Jun 07, 2022)

ENHANCEMENTS:

  • Conslidate the user resource mapping file (#107)
  • CLI supports long form option and env var source (#111)
  • Interactive filter (via /) supports regexp (#115)
  • New shortcut key delete to mark items to be skipped (#116)
  • Update schema and resource mapping for provider v3.9.0 (#126)

BUG FIXES:

  • ID transformation for frontdoor (#120)
aztfexport - v0.4.0

Published by ms-henglu over 2 years ago

0.4.0 (May 23, 2022)

ENHANCEMENTS:

  • Update schema and resource mapping for v3.7.0 (#106)
  • Batch mode now can be invoked without the resource mapping file (-m). In this case, only the resource types that can be automatically deduced by aztfy will be imported (#103)
  • Switch the underlying SDK to Azure SDK Track2 (#87)

BUG FIXES:

  • Support key vault nested items (i.e. key, secret and certificate) (#104)
  • Support applicationinsights webtest resource (#96)
  • Support the managed data disk attached to the VM (#91)
aztfexport - v0.3.0

Published by magodo over 2 years ago

0.3.0 (May 6, 2022)

ENHANCEMENTS:

  • Update schema and resource mapping for v3.5.0 (#84)

BUG FIXES:

  • Fix go install failures (#81)
  • Use simple string comparison for resource identifier filter matching (#82)

OTHER:

  • Adding a devcontainer (#73)
aztfexport - v0.2.0

Published by magodo over 2 years ago

0.2.0 (April 22, 2022)

ENHANCEMENTS:

  • Removing the dependency on specific versions of terraform (i.e. v1.1 alpha versions) (#56)
    Previously, aztfy depends on an experimental feature of terraform called terraform add, which is only available in a transient period in its v1.1 alpha versions. This requirement is now not needed since this version, which means almost any terraform version works with aztfy.
  • Schema and builtin resource mapping recommendation are generated for AzureRM provider v3.3.0 (#68)
aztfexport - v0.1.1

Published by magodo over 2 years ago

0.1.1 (April 6, 2022)

This patch release only makes some internal changes for the release pipeline. The only user facing change is that the Windows binaries are digitally signed. The checksum of the binaries for the other platforms are also signed, as before.

aztfexport - v0.1.0

Published by magodo over 2 years ago

0.1.0 (March 28, 2022)

ENHANCEMENTS:

  • Schema and builtin resource mapping recommendation are generated for AzureRM provider v3.0.2
aztfexport - v0.0.8

Published by magodo over 2 years ago

0.0.8 (March 11, 2022)

ENHANCEMENTS:

  • Schema and builtin resource mapping recommendation are generated for AzureRM provider v2.99.0