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:

  1. Run terraform plan from your terraform-alerts directory:

    Bash
    terraform plan
  2. Review the output. You should see something like:

    Terraform will perform the following actions:
    
      # grafana_folder.alerts will be created
      + resource "grafana_folder" "alerts" {
          + id    = (known after apply)
          + title = "Terraform Alerts"
          + uid   = (known after apply)
        }
    
      # grafana_rule_group.cpu_alerts will be created
      + resource "grafana_rule_group" "cpu_alerts" {
          + folder_uid       = (known after apply)
          + interval_seconds = 60
          + name             = "CPU alerts"
          ...
        }
    
      # grafana_contact_point.email_alerts will be created
      + resource "grafana_contact_point" "email_alerts" {
          + name = "Email alerts"
          ...
        }
    
      # grafana_notification_policy.main will be created
      + resource "grafana_notification_policy" "main" {
          + contact_point = "Email alerts"
          ...
        }
    
    Plan: 4 to add, 0 to change, 0 to destroy.
  3. Confirm the plan shows:

    • 4 to add (the folder, rule group, contact point, and notification policy)
    • 0 to change (nothing existing is being modified)
    • 0 to destroy (nothing is being deleted)

What to look for

IndicatorMeaning
+ (green)Resource will be created
~ (yellow)Resource will be updated in place
- (red)Resource will be destroyed

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 alerting pipeline to Grafana and verify it’s working.


page 8 of 10