Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to AzAPI provider fails with terraform: executable file not found in $PATH #53

Open
2 tasks done
tiwood opened this issue Jan 8, 2025 · 0 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@tiwood
Copy link

tiwood commented Jan 8, 2025

Versions

This bug is reproducible in:

  • the latest version of the extension (below)
  • the latest version of the language server (below)

Extension

2025-01-08 09:56:29.576 [error] Error: error handling command "azapi.aztfmigrate": unable to find, install, or build from 1 sources: 1 error occurred:
	* terraform: executable file not found in $PATH


    at di (/Users/[email protected]/.vscode/extensions/azapi-vscode.azapi-2.2.0-darwin-arm64/out/extension.js:23:226)
    at dt (/Users/[email protected]/.vscode/extensions/azapi-vscode.azapi-2.2.0-darwin-arm64/out/extension.js:22:11286)
    at Immediate.<anonymous> (/Users/[email protected]/.vscode/extensions/azapi-vscode.azapi-2.2.0-darwin-arm64/out/extension.js:22:11134)
    at processImmediate (node:internal/timers:483:21) azapi.aztfmigrate {"value":"azapi-vscode.azapi","_lower":"azapi-vscode.azapi"}

Language Server

2.2.0

VS Code

VSCode Version: 1.96.2
Extension Version: 2.2.0

Operating System

15.2 (24C101)

Terraform Version


Steps To Reproduce

Steps to reproduce the behavior:

  1. Go to a azurerm Terraform resource
  2. Use `Rewrite -> Migrate to AzAPI provider
  3. See error

Include any relevant Terraform configuration or project structure:

resource "azurerm_resource_group" "example" {
  name     = "example"
  location = "West Europe"
}

Expected Behavior

Resource should be migrated to AzAPI Resource.

Actual Behavior

Process is aborted due to error seen above.

Additional context

This may be related to #52

Terraform is available at path (tried in external terminal and VSCode embedded terminal):

which terraform
/opt/homebrew/bin/terraform
@tiwood tiwood added the bug Something isn't working label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant