[WIP] add a Terraform module interface #73
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This experimental branch adds a terraform module interface to
packet-cli
.The goal of this is to make it easier to consume Packet provider modules from the official Terraform registry.
Only github.com/packethost and github.com/packet-labs modules would be considered.
_Update: Only the Equinix Metal provider and Equinix modules would be considered)
Current blockers
Considerations
packet terraform
be built as an independent plugin through a plugin interface (like git plugins)? (possibly a shell script?)Future workflow
Examples of use:
list all Packet modules
show module details
The registry API includes the parameters of the module.
create an instance of that module
These module parameters could be exposed as arguments.
This would effectively perform
terraform init --from-module=packet/k8s/packet
.What directory would this go in? Should the base directory be common - and pass
workspace
through? (Likening this togo get
, this would be likego get registry/module@workspace
)The api token would be wired-up, since the packet cli already knows one. How does it do this? Well known APIKey / Token variable names?