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

Plugin execution fails on Windows #359

Open
pl4nty opened this issue Mar 13, 2023 · 0 comments
Open

Plugin execution fails on Windows #359

pl4nty opened this issue Mar 13, 2023 · 0 comments

Comments

@pl4nty
Copy link

pl4nty commented Mar 13, 2023

Describe the bug

The plugin is distributed for Windows with an exe file extension, which is what Terraform assumes when trying to execute it. However, the following regex causes the plugin to exit as soon as it loads:

r, err := regexp.Compile("\\bterraform-provider-([a-zA-Z0-9]+)(?:_v[\\d]+\\.[\\d]+\\.[\\d]+)?\\b$")

provider binary name terraform-provider-myprovider.exe does not match terraform naming convention

To Reproduce

Steps to reproduce the behavior:

  1. Download plugin for Windows
  2. Execute plugin
  3. Optionally, install and rename to remove file extension
  4. Observe plugin now executes fine when run directly: Start-Process -FilePath [path to binary] -NoNewWindow
  5. Set $env:TF_LOG="Debug" and observe plugin failing to load in Terraform
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant