Skip to main navigation Skip to search Skip to main content

TerraMetrics: An Open Source Tool for Infrastructure-as-Code (IaC) Quality Metrics in Terraform

  • École de technologie supérieure

Research output: Contribution to Book/Report types › Contribution to conference proceedings › peer-review

13 Citations (Scopus)

Abstract

Infrastructure-as-Code (IaC) constitutes a pivotal DevOps methodology, leading edge of software deployment onto cloud platforms. IaC relies on source code files rather than manual configuration to manage the infrastructure of a software system. Terraform, an IaC tool and its declarative configuration language named HCL, has recently garnered considerable attention among IaC practitioners. Like other software artefacts, Terraform files could be affected by misconfigurations, faults, and smells. Therefore, DevOps practitioners might benefit from a quality assurance tool to help them perform quality assurance activities on Terrafrom artefacts. This paper introduces TerraMetrics, an open-source tool designed to characterize the quality of Terraform artefacts by providing a catalogue of 40 quality metrics. TerraMetrics leverages the Terraform Abstract Syntax Tree (AST) to extract the metric list, offering a potentially enduring solution compared to conventional regular expressions. This tool comprises three main components: (i) a parser transforming HCL code into an AST, (ii) visitors that traverse the AST nodes to extract the metrics, and (iii) collectors for storing the collected metrics in JSON format. The TerraMetrics tool is publicly available as an Open Source tool, with a demo video, at: https://github.com/stilab-ets/terametrics.

Original languageEnglish
Title of host publicationProceedings - 2024 32nd IEEE/ACM International Conference on Program Comprehension, ICPC 2024
PublisherIEEE Computer Society
Pages450-454
Number of pages5
ISBN (Electronic)9798400705861
DOIs
Publication statusPublished - 13 Jun 2024
Event32nd IEEE/ACM International Conference on Program Comprehension, ICPC 2024 - Lisbon, Portugal
Duration: 15 Apr 2024 → 16 Apr 2024

Publication series

NameIEEE International Conference on Program Comprehension
ISSN (Print)2643-7147
ISSN (Electronic)2643-7171

Conference

Conference32nd IEEE/ACM International Conference on Program Comprehension, ICPC 2024
Country/TerritoryPortugal
CityLisbon
Period15/04/24 → 16/04/24

Keywords

  • AST
  • HCL
  • Infrastructure-as-Code
  • Terraform
  • quality metrics

ASJC Scopus subject areas

  • Software
  • Hardware and Architecture

Fingerprint

Dive into the research topics of 'TerraMetrics: An Open Source Tool for Infrastructure-as-Code (IaC) Quality Metrics in Terraform'. These topics are generated from the title and abstract of the publication. Together, they form a unique fingerprint.

Cite this