Running "terraform" in the browser

I’d like to share how we manage to run a subset of “terraform” feature, together with a terraform provider (unchanged) in the browser:

The solution is basically to extend the go-plugin to be able to compiled to WASM and run in the browser environment, with the help of Web Worker. We’ve made a PoC of running terraform import scenario with this solution, which works great! The only change needed at the target provider codebase is just swapping the dependency to the extended go-plugin. No other code change needed.

In theory, this can be extended to any go-plugin based applications, not only about terraform. So I’d like to gather more potential use cases for running go-plugin based application in the browser.

I’ve submit a PR to the GitHub - hashicorp/go-plugin: Golang plugin system over RPC. repo, btw:

1 Like