{"id":14957723,"url":"https://github.com/azure/aztfexport","last_synced_at":"2025-12-11T22:12:53.230Z","repository":{"id":36962234,"uuid":"395943715","full_name":"Azure/aztfexport","owner":"Azure","description":"A tool to bring existing Azure resources under Terraform's management","archived":false,"fork":false,"pushed_at":"2025-04-02T05:47:23.000Z","size":8292,"stargazers_count":1712,"open_issues_count":38,"forks_count":201,"subscribers_count":39,"default_branch":"main","last_synced_at":"2025-04-10T01:03:42.158Z","etag":null,"topics":["azure","devops","iac","terraform","terraform-azurerm","tool"],"latest_commit_sha":null,"homepage":"https://azure.github.io/aztfexport/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Azure.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-14T08:30:23.000Z","updated_at":"2025-04-08T11:33:18.000Z","dependencies_parsed_at":"2023-02-18T05:15:47.536Z","dependency_job_id":"898c4802-d84c-49f4-9521-8c9e1d9dffb3","html_url":"https://github.com/Azure/aztfexport","commit_stats":{"total_commits":409,"total_committers":16,"mean_commits":25.5625,"dds":0.09535452322738391,"last_synced_commit":"986322f6b026ab1dadc90cba8193f3da99b206e3"},"previous_names":["azure/aztfy"],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Faztfexport","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Faztfexport/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Faztfexport/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Faztfexport/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Azure","download_url":"https://codeload.github.com/Azure/aztfexport/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137892,"owners_count":21053775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure","devops","iac","terraform","terraform-azurerm","tool"],"created_at":"2024-09-24T13:15:27.312Z","updated_at":"2025-12-11T22:12:53.192Z","avatar_url":"https://github.com/Azure.png","language":"Go","readme":"## Microsoft Azure Export for Terraform\n\nA tool to bring your existing Azure resources under the management of Terraform.\n\n### Video (v0.12.0)\n[![Video](https://img.youtube.com/vi/LWk9SU7AmDA/hqdefault.jpg)](https://youtu.be/LWk9SU7AmDA)\n\n## Goal\n\nAzure Export for Terraform exports supported resources into Terraform state and generate the corresponding Terraform configuration. Both the Terraform state and configuration are expected to be consistent with the resources' remote state, i.e., `terraform plan` shows no diff. The user then is able to use Terraform to manage these resources.\n\nIt supports both the [Terraform AzureRM provider](https://github.com/hashicorp/terraform-provider-azurerm) and the [Terraform AzAPI provider](https://github.com/Azure/terraform-provider-azapi).\n\n## Non Goal\n\nThe Terraform configurations generated by `aztfexport` are not meant to be comprehensive and do not ensure that the infrastructure can be fully reproduced from said generated configurations. For details, please see [limitations](#limitations)).\n\n## Install\n\n### From Release\n\nPrecompiled binaries and Window MSI are available at [Releases](https://github.com/Azure/aztfexport/releases).\n\n### From Go toolchain\n\n```bash\ngo install github.com/Azure/aztfexport@latest\n```\n\n### From Package Manager\n\n#### Windows\n\n```bash\nwinget install aztfexport\n```\n\n#### Homebrew (Linux/macOS)\n\n```bash\nbrew install aztfexport\n```\n\n#### dnf (Linux)\n\nSupported versions:\n\n- RHEL 8 (amd64, arm64)\n- RHEL 9 (amd64, arm64)\n\n1. Import the Microsoft repository key:\n\n    ```\n    rpm --import https://packages.microsoft.com/keys/microsoft.asc\n    ```\n\n2. Add `packages-microsoft-com-prod` repository:\n\n    ```\n    ver=8 # or 9\n    dnf install -y https://packages.microsoft.com/config/rhel/${ver}/packages-microsoft-prod.rpm\n    ```\n\n3. Install:\n\n    ```\n    dnf install aztfexport\n    ```\n\n#### apt (Linux)\n\nSupported versions:\n\n- Ubuntu 20.04 (amd64, arm64)\n- Ubuntu 22.04 (amd64, arm64)\n\n1. Import the Microsoft repository key:\n\n    ```\n    curl -sSL https://packages.microsoft.com/keys/microsoft.asc \u003e /etc/apt/trusted.gpg.d/microsoft.asc\n    ```\n\n2. Add `packages-microsoft-com-prod` repository:\n\n    ```\n    ver=20.04 # or 22.04\n    apt-add-repository https://packages.microsoft.com/ubuntu/${ver}/prod\n    ```\n\n3. Install:\n\n    ```\n    apt-get install aztfexport\n    ```\n\n#### AUR (Linux)\n\n```bash\nyay -S aztfexport\n```\n\n## Prerequisites\n\n`aztfexport` requires a `terraform` executable installed in the `$PATH` with version `\u003e= v0.12`.\n\n## How it Works\n\n`aztfexport` leverages [`aztft`](https://github.com/magodo/aztft) to identify the Terraform resource type corresponding to an Azure resource ID. Then it runs `terraform import` under the hood to import each resource. Afterwards, it runs [`tfadd`](https://github.com/magodo/tfadd) to generate the Terraform HCL code for each imported resource.\n\n## Usage\n\nRead the [Azure Export documentation](https://learn.microsoft.com/en-us/azure/developer/terraform/azure-export-for-terraform/export-terraform-overview) which covers scenarios and usage.\n\n### Config\n\n`aztfexport` will create a configuration file at `$HOME/.aztfexport/config.json`. This file is aim to be managed by command `aztfexport config [subcommand]`, which includes following subcommands:\n\n- `get`: Get a config item\n- `set`: Set a config item\n- `show`: Show the full configuration\n\nCurrently, the following config items are supported:\n\n- `installation_id`: A UUID created on first run. If there is Azure CLI or Azure Powershell installed on the current machine, the UUID will be the same value among these tools. Otherwise, a new one will be created. This is used as an identifier in the telemetry trace.\n- `telemetry_enabled`: Enables telemetry. We use telemetry to identify issues and areas for improvement, in order to optimize this tool for better performance, reliability, and user experience. If you wish to disable our telemetry, set this to false.\n\n## Limitations\n\nVisit [this page](https://learn.microsoft.com/en-us/azure/developer/terraform/azure-export-for-terraform/export-terraform-concepts#limitations) on the Azure Export for Terraform documentation that discusses the currently known limitations of the tool.\n\n## Additional Resources\n\n- [The aztfexport Github Page](https://azure.github.io/aztfexport): Everything about aztfexport, including comparisons with other existing import solutions.\n- [aztft](https://github.com/magodo/aztft): A Go program and library for identifying the correct Terraform AzureRM provider resource type on the Azure resource id.\n- [tfadd](https://github.com/magodo/tfadd): A Go program and library for generating Terraform configuration from Terraform state.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazure%2Faztfexport","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazure%2Faztfexport","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazure%2Faztfexport/lists"}