Regex Project Name Support

We are excited to announce that Terrahaxs now supports regular expressions for project names!

What does this mean for you?

Previously, there was a one-to-one relationship between a project and directory/workspace configuration. If you are working in a large Terraform ecosystem then your configuration file becomes bloated and could be thousands of lines long.

How does it work?

You can checkout an example pull request here.

In this PR our configuration file looks like this:


version: 3
defaults:
  workflow: myworkflow
  roles:
    aws: arn:aws:iam::530084066544:role/terrahaxs-worker
projects:
- dir: (foo|bar|baz).*
  workspace: default
  terraform_version: v1.0.11
- dir: bar.*
  workspace: default
  terraform_version: v1.0.11
  drift_detection_enabled: false
- dir: hw_dir.*
  workspace: default
workflows:
  myworkflow:
    plan:
      steps:
      - run: terraform fmt -check -diff .
      - init
      - plan:
          extra_args: ["-lock=false"]
      - show
      - run: conftest test $SHOWFILE --policy $CLONE_DIR/policy --no-color
        name: Conftest
    apply:
      steps:
      - run: echo hi
      - init
      - apply

and we added 100 directories that begin with hw_dir and we ended up with a workflow run on 100 projects.

If a project matches more than one regular expression then the last match will be the one that gets executed.

We hope you enjoy this feature and it makes it reduces the amount of effort required to keep your configuration file up to date!

Recent Articles

blog-image
A Comprehensive AWS Resource Tagging Strategy

Tagging is a powerful tool that provides control, visibility, and streamlined management of resources.

blog-image
Parallelizing Infrastructure Management: The Terrahaxs Advantage

A major limitation of existing Terraform CI/CD tools in the number of projects you are able to plan/apply simultaneously.

blog-image
Choosing the Right Terraform Loop: count vs for_each

Terraform is a popular infrastructure as code (IaC) tool that allows you to manage and automate your infrastructure resources.