Skip to content

docs: Missing reference to Claranet Terraform modules #245

Open

Description

@mloskot

Since the tfwrapper is Claranet-oriented, then it is valid to expect it would support use of Claranet production-ready Terraform modules.

I think, the wrapper documentation, especially Stacks file structure, should touch on best practices on using the modules in a project:

  • Does tfwrapper offer any features to refer/link/import the modules?
  • If not, where it is suggested to put them?
  • Share between account/environment/stack or make as local as possible?
  • Host them as a copy or via Git submodule?
    ...

Activity

  1. pdecat commented on Oct 9, 2023

    @pdecat
    Member

    All sorts of modules are supported, tfwrapper does not make any assumption about them.

    You just use any module with the vanilla source argument of a terraform module block.

    For modules that are not really reusable beyond a project, there's effectively a pattern of keeping them at the root of a project under a modules or common directory, and then referencing them locally across the stacks.

  2. mloskot commented on Oct 9, 2023

    @mloskot
    Author

    I have encountered convention to use Clara modules like

    mkdir -p terraform/modules/terraform_azurerm_nsg
    

    then export https://github.com/claranet/terraform-azurerm-nsg.git into terraform/modules/terraform_azurerm_nsg, or add as Git submodule.

    I wondered how Claranet folks structure it in a project based on the tfwrapper that also uses Claranet modules.
    Including such example in docs would be a nice touch to newbies, I think.

  3. pdecat commented on Oct 10, 2023

    @pdecat
    Member

    Hmm, I'm not aware of such usage internally. @Shr3ps @BzSpi does that speak to you?

  4. BzSpi commented on Oct 10, 2023

    @BzSpi
    Contributor

    Hi,

    Never heard of that behavior.
    Since modules are public, they're mostly retrieved from registry or, for a very few customers, mirrored from Github and used through their git as source.

  5. mloskot commented on Oct 10, 2023

    @mloskot
    Author

    Good point on the preference of the registry as source of Claranet modules.
    Thanks @pdecat @BzSpi

  6. mloskot commented on Oct 28, 2023

    @mloskot
    Author

    I've been looking for a repo with a good example project that shows Claranet's own best practices of

    • using the tfwrapper
    • composition of templates for tfwrapper
    • structure of environments and stacks

    I think such repo would be a very useful complement to the whole collection here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions