Run terraform plan
Before deploying, always run terraform plan to preview what Terraform will do. This shows you exactly which resources will be created, updated, or destroyed, without making any changes to your Grafana instance.
To preview your deployment, complete the following steps:
Run
terraform planfrom yourterraformdirectory:terraform planReview the output. You should see something like:
Terraform will perform the following actions: # grafana_folder.dashboards_as_code will be created + resource "grafana_folder" "dashboards_as_code" { + id = (known after apply) + title = "Dashboards as Code" + uid = (known after apply) } # grafana_dashboard.my_dashboard will be created + resource "grafana_dashboard" "my_dashboard" { + config_json = jsonencode({...}) + folder = (known after apply) + id = (known after apply) } Plan: 2 to add, 0 to change, 0 to destroy.Confirm the plan shows:
- 2 to add (the folder and the dashboard)
- 0 to change (nothing existing is being modified)
- 0 to destroy (nothing is being deleted)
What to look for
If the plan looks correct, you’re ready to apply. If something looks wrong (unexpected destroys or changes), review your configuration before proceeding.
In the next milestone, you apply the plan to deploy the dashboard to Grafana and verify it’s working.