Module Registry and Terraform Provider Updates

Sean O'Dell
Director of Product Marketing and Developer Relations

What is Terraform Module Registry

Depending upon where you began your journey into Infrastructure as Code and Hashicorp Terraform, one of the most obvious features is the module registry. It really wasn’t anything talked about other than it was “there” thanks to the Terraform Registry. While I personally utilize the public registry on a regular basis, it became very clear over time that I had a need for a private Module Registry, too. Our fantastic customers and partners (and even our dev teams here) also began asking for the same thing. We are excited to deliver this highly requested feature.

The image above includes a few private modules focused on AWS EKS Cluster creation and management that Andrew Way, Sales Engineer at env0 built because of organizational goals and objectives. 

As usual, our desire is for the community to consume these new features in a way that makes sense to you just in case the blog format is not your preference.

env0 Module Registry

The env0 Module Registry is a private registry for Terraform modules, allowing you to privately share and reuse Terraform modules within your organization.

 

Module Creation

To create a new module, the team created a simple wizard to help guide you through the process.

Required Details

  • Name - this can be any string of your choice, for example, eks or gke.
  • Provider - this can also be any string of your choice, for example, aws or gcp.
  • Description - A useful way of summarizing what the module does and when it should be use.

NOTE: The combination of name and provider must be unique within your organization’s modules.

VCS Provider

 VCS provider you’d like to use, and after you’ve authorized env0 to access your repositories, select a repository from the dropdown. It is assumed your module’s code is stored in the root folder of the repository.

NOTE: Each module requires its own separate repository.  i.e. The module registry currently does not support mono-repos of modules.

Module Versioning

Versioning is a common concept within Terraform and the same principles apply for our Module Registry.

  • Semantic versioning format (e.g. 1.0.0)
  • Versions must be applied to your source repository as git tags.

There are a few ways to utilize these modules depending upon your use case:

Module List

The Modules List page is available to every user in the organization by clicking on “Module Registry” in the organization’s menu.

You can use the search box to locate specific modules by name, provider, description, or the users who created them.

Module Page

On this page you can see the details of your Module.

  • Readme tab - will show the contents of the README.md in your repository.
  • Instructions tab - will include instructions on how the module can be used in your Terraform code.

env0 Terraform Provider

Would an Infrastructure as Code Management Platform be usable if it didn’t have it’s own Terraform provider? I don’t think so! The team at env0 has built a Terraform Provider to help you manage your env0 via Configuration as Code.

I won’t be covering the “How To” in this blog because the documentation does a better job due to the schematic requirements and layout that we are all accustomed to on the Terraform Provider site. Check it out for yourself here.

Based upon feedback from our customers, the following three resources make the most sense:

Included with each resource is what the resulting output would look like from within the env0 UI.

Projects are used in env0 to provide granular access control to Environments. Every environment in env0 exists under a project, and users are given access on a per-project basis.

 Templates in env0 defines a type of environment that can be deployed

Environments in env0 is an entity representing a deployment managed by env0.

These new enhancements and features are driven by our end users and we are always looking for feedback. Feel free to reach out and let us know what you think and what else you want to see in these areas.

What is Terraform Module Registry

Depending upon where you began your journey into Infrastructure as Code and Hashicorp Terraform, one of the most obvious features is the module registry. It really wasn’t anything talked about other than it was “there” thanks to the Terraform Registry. While I personally utilize the public registry on a regular basis, it became very clear over time that I had a need for a private Module Registry, too. Our fantastic customers and partners (and even our dev teams here) also began asking for the same thing. We are excited to deliver this highly requested feature.

The image above includes a few private modules focused on AWS EKS Cluster creation and management that Andrew Way, Sales Engineer at env0 built because of organizational goals and objectives. 

As usual, our desire is for the community to consume these new features in a way that makes sense to you just in case the blog format is not your preference.

env0 Module Registry

The env0 Module Registry is a private registry for Terraform modules, allowing you to privately share and reuse Terraform modules within your organization.

 

Module Creation

To create a new module, the team created a simple wizard to help guide you through the process.

Required Details

  • Name - this can be any string of your choice, for example, eks or gke.
  • Provider - this can also be any string of your choice, for example, aws or gcp.
  • Description - A useful way of summarizing what the module does and when it should be use.

NOTE: The combination of name and provider must be unique within your organization’s modules.

VCS Provider

 VCS provider you’d like to use, and after you’ve authorized env0 to access your repositories, select a repository from the dropdown. It is assumed your module’s code is stored in the root folder of the repository.

NOTE: Each module requires its own separate repository.  i.e. The module registry currently does not support mono-repos of modules.

Module Versioning

Versioning is a common concept within Terraform and the same principles apply for our Module Registry.

  • Semantic versioning format (e.g. 1.0.0)
  • Versions must be applied to your source repository as git tags.

There are a few ways to utilize these modules depending upon your use case:

Module List

The Modules List page is available to every user in the organization by clicking on “Module Registry” in the organization’s menu.

You can use the search box to locate specific modules by name, provider, description, or the users who created them.

Module Page

On this page you can see the details of your Module.

  • Readme tab - will show the contents of the README.md in your repository.
  • Instructions tab - will include instructions on how the module can be used in your Terraform code.

env0 Terraform Provider

Would an Infrastructure as Code Management Platform be usable if it didn’t have it’s own Terraform provider? I don’t think so! The team at env0 has built a Terraform Provider to help you manage your env0 via Configuration as Code.

I won’t be covering the “How To” in this blog because the documentation does a better job due to the schematic requirements and layout that we are all accustomed to on the Terraform Provider site. Check it out for yourself here.

Based upon feedback from our customers, the following three resources make the most sense:

Included with each resource is what the resulting output would look like from within the env0 UI.

Projects are used in env0 to provide granular access control to Environments. Every environment in env0 exists under a project, and users are given access on a per-project basis.

 Templates in env0 defines a type of environment that can be deployed

Environments in env0 is an entity representing a deployment managed by env0.

These new enhancements and features are driven by our end users and we are always looking for feedback. Feel free to reach out and let us know what you think and what else you want to see in these areas.

Logo Podcast
With special guest
Andrew Brown

Schedule a technical demo. See env0 in action.

CTA Illustration