Skip to content

Consider Terranix Integration #75

Open
@scottbot95

Description

@scottbot95

This would probably be better as a discussion, but discussions weren't enabled on this repo at time of creation

Overview

Terranix is "a NixOS way to create terraform json files." It leverages the NixOS module system to generate a terraform config file.

By providing the utilities in this package as terranix module(s) in addition to (or instead of) the base terraform module, we could potentially simplify the implementation and provide a more flexible interface for consumers of this module.

Pros

  • NixOS modules are far more flexible than Terraform modules, allowing overriding of values created by the modules.
  • Tighter coupling to the Nix language simplifies implementation of deploy_nix (I believe the nix-instantiate.sh script could be removed entirely as all that info could be computed directly in the nix expression)

Cons

  • Must continue to maintain the terraform HCL version of the module to allow non-terranix users to consume the module.
  • Duplicating logic between the Terranix and HCL versions leads to substantially increased maintenance cost and significantly increase the chance for bugs to be introduced.
  • Resources/data/etc created by Terranix modules are not namespaced like with native Terraform modules. This could potentially cause naming collisions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions