Skip to content

Commit

Permalink
Prevent overriding changes to dashboards created using the module (#150)
Browse files Browse the repository at this point in the history
Because of how Grafana dashboards are managed, it's doubtful that someone will make changes to the JSON version of the dashboards rather than make updates directly to the UI. The goal of the grafana-dashboards module is to create the starter dashboards, and then the user can customize them as they would like without sticking to Flightdeck's initial versions.

This change will ensure that once the dashboards are created, terraform won't try to revert changes that the user makes to the UI whenever they try to make changes to resources that use this module.
  • Loading branch information
clarissalimab committed Jun 28, 2023
1 parent 5b0bac9 commit 347d71e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions aws/grafana-dashboards/main.tf
Expand Up @@ -2,4 +2,10 @@ resource "grafana_dashboard" "this" {
for_each = toset(var.dashboards_to_create)

config_json = file("${path.module}/dashboards/${each.value}.json")

lifecycle {
ignore_changes = [
config_json
]
}
}

0 comments on commit 347d71e

Please sign in to comment.