hashicorp / terraform-provider-external

Utility provider that exists to provide an interface between Terraform and external programs. Useful for integrating Terraform with a system for which a first-class provider does not exist.
https://registry.terraform.io/providers/hashicorp/external/latest
Mozilla Public License 2.0
179 stars 49 forks source link

Permit use of shell aliases #327

Open kevineor opened 4 months ago

kevineor commented 4 months ago

Today, the provider does not handle programs that are defined as shell alias.

This is primarily due to the go exec LookPath limitation, it searches from PATH environment variable but does not provide any shell implementations.

This is a proposition to execute the program from a shell when the program is not located in PATH. For now the following shells are supported :

I took as example an implementation from https://github.com/mmmorris1975/aws-runas