Skip to main content
⏳ Estimated read time: 3 min read

Module Editor

The Module Editor enhances the modularity and reusability of infrastructure code by enabling users to create, import, and manage modules efficiently within the application stack. This section introduces the Module Editor, its functionalities, and how users can leverage it to streamline their Infrastructure as Code (IaC) workflows.

Module Editor

Module Editor Overview

The Module Editor provides a centralized space for users to create, manage, and edit Terraform modules. It enables users to define custom modules, modify their configurations, and seamlessly integrate them into their infrastructure workflows.

Create Custom Modules

Users typically define Terraform (.tf) files to create reusable modules. With the Module Editor:

  • Users can create custom modules within the application
  • The associated Terraform code is displayed alongside the module
  • Users can edit the module directly within the editor
  • Users must publish their modules before they can reference and reuse them within appStack

Import External Modules

Users can import modules directly from the Terraform Registry by specifying:

  • Module Name (Required)
  • Version (Optional, defaults to the latest version)

After importing, users can configure and modify the module's settings as needed. Imported modules will be listed within the Module Editor and can be used in appStack.

Create Module Versions

To manage changes and updates to existing modules, users can create new versions directly from within the Module Editor. Versioning ensures traceability, stability, and reuse across infrastructure workflows.

To create a new version of a custom module:

  1. In the Module Editor, expand the module you want to make versions of.
  2. Click the + New Version button.
  3. Apply the necessary changes to the Terraform configuration (e.g., update resource blocks, change variables, etc.).
  4. Once the updates are complete, click Publish to make the new version available for use in appStacks.

Each published version is saved independently, allowing users to switch between versions or roll back if needed.

Configuration Management

To enhance module flexibility, users can define and use the following Terraform blocks within Module Editor:

  • variables.tf: Accepts input parameters to make the module dynamic
  • locals : Stores temporary values for use within the module
  • output.tf: Exposes values from the module for use in other configurations

For example, if a module requires a cluster name as an external input, users can declare it as a variable within variables.tf and reference it dynamically.