Company
Date Published
Author
James Buchanan, Senior Solutions Architect
Word count
1119
Language
English
Hacker News points
None

Summary

Terraform is a powerful observability-as-code tool that enables users to define and manage cloud and on-prem resources through configuration files written in HCL (HashiCorp Configuration Language). However, working with HCL syntax can be challenging, especially when updating and adding new widgets to an existing New Relic dashboard. To overcome this, users can utilize JSON templates to make it easier to manage Terraform-provisioned New Relic dashboards without having to convert them to HCL syntax. With JSON templates, users can edit the dashboard in the New Relic UI, export the configuration into their Terraform project, and use extended features of New Relic dashboards, including series coloring and y-axis scaling. This allows users to create a New Relic dashboard in Terraform using JSON templates, which is part one of a three-part series on dynamically creating New Relic dashboards with Terraform. The prerequisites for this tutorial include provider version 3.4.0 or above, as well as having Terraform installed. Users can follow along with the sample code and instructions to create a dashboard using JSON, update an existing dashboard, and redeploy with minor tweaks. The next steps involve reading part two of the series on dynamically creating New Relic dashboards with Terraform and part three on generating dashboards from NRQL queries.