1
votes

Is it a best practice to create dashboards, notification channels & alerting policies using terraform. The volume is quite large where we will be having more than 20 monitoring workspaces and at least 50 to 100 alerting policies on each workspace.

As I checked couldn't find any predefined terraform modules for stackdriver monitoring, also creating dashboards & alerting policies using terraform resources is quite complex as we need to provide a lot of JSON data.

1

1 Answers

1
votes

In terms of best practices on creating dashboards, notification channels & alerting policies using terraform. We would suggest creating these compartments in GCP using the the UI interface that is provided in GCP console as the interface is more friendlier and managable when planning to have around 20 monitoring workspace.

As such, you can automatize these compartment creations using Terraform and the available APIs that are available with Stackdriver Monitoring (Cloud Monitoring). However, you will need to create these scripts with Terraform in order to complete these tasks. Google currently does not have any documentation on best practices when using Terraform with Cloud Monitoring.

Furthermore, if you would like to know more about Terraforms best practices are, I would suggest following this link for more information on those factors when concidering using Terrafrom for creating dashboards, notification channels & alerting policies.