-
Notifications
You must be signed in to change notification settings - Fork 50
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
External resource provider #5
Comments
Hi @bramtassyns, This is not something the Terraform team at HashiCorp is currently working on, mainly just due to focus being elsewhere. The original proposal for this provider in hashicorp/terraform#8144 did discuss such a resource type, but we elected to do the data source only for the first pass because it was a "quicker win" to solve a particular class of problem and we were concerned about the complexity of delegating the whole resource lifecycle to an external program. If someone in the community has the time and motivation to work on it, we'd love to help get that in. This is the sort of thing that likely requires some prototyping and design iteration to find an approach that makes the right tradeoffs, so it will likely require trying a few approaches to find the one that feels the most "right" within the constraints. (The original proposal called for these objects to be called |
While ago, I created a simple shell provider https://github.com/toddnni/terraform-provider-shell that can be used to wrap external programs to terraform. I would be happy to have same functionality covered in external resource provider either by taking the functionality from mine or having better in external provider. |
Some time ago I've implemented the most generic external commands provider I could think of nazarewk-iac/terraform-provider-custom. It is based on string attributes <-> files mappings (see the design in docs) without providing any advanced logic - it is supposed to be wrapped in a purpose-built modules and leverage new Terraform 0.12+ features to provide nicer to use interfaces. Recently I thought about how to move forward with the provider (improve docs/tests, create example modules etc.) and whether I could use it in my current workplace (not unless it's built and hosted in-house or Verified/Official in registry). It just hit me the easiest way to move forward would be trying to integrate it into official provider. Looks like It is a result of 2 years of pondering on the issues encountered previously in daftcode/terraform-provider-scripted (which was built-opn toddnni/terraform-provider-shell ) and roughly 1 workday of implementation. Since the behavior is simple enough to explain in a few paragraphs and the implementation is relatively short and simple (~500 LoC) I think it would be a perfect candidate for merging and maintaining as part of @apparentlymart I would be more than happy to prepare a PR for my proposal as long as there is any real chance of merging it. |
Hi,
Are you are working on/considering adding support for resources (next to data) to this provider?
While you can use a null_resource to create a sort of 'scripted' provider using provisioners. The support for running a script on destruction is very limited there (if you set the count to 0 it is executed, if you just remove it the script is never executed). It also lacks the option to set output variables based on the output of your script.
The text was updated successfully, but these errors were encountered: