Skip to content

feat(monitor-alert): support dashboardTemplate link type in alert v2 resources#702

Merged
tembleking merged 1 commit intomasterfrom
feat/alert-v2-dashboard-template-link
Feb 11, 2026
Merged

feat(monitor-alert): support dashboardTemplate link type in alert v2 resources#702
tembleking merged 1 commit intomasterfrom
feat/alert-v2-dashboard-template-link

Conversation

@tembleking
Copy link
Copy Markdown
Member

@tembleking tembleking commented Feb 11, 2026

The Sysdig Monitor API returns type = "dashboardTemplate" for alert links referencing dashboard templates, but the provider only validates dashboard and runbook as accepted values. This causes permanent drift on every terraform plan for any alert with dashboard template links, forcing users to add lifecycle { ignore_changes } workarounds.

This PR adds dashboardTemplate as an accepted link type alongside the existing dashboard and runbook types, eliminating the state drift.

Closes #700

Copilot AI review requested due to automatic review settings February 11, 2026 08:22
@tembleking tembleking enabled auto-merge February 11, 2026 08:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for Sysdig Monitor API alert links with type = "dashboardTemplate" to eliminate persistent Terraform plan drift for alert v2 resources that reference dashboard templates.

Changes:

  • Extend accepted alert link type values to include dashboardTemplate.
  • Add an acceptance test configuration snippet exercising dashboardTemplate link type.
  • Update multiple alert v2 resource docs to document dashboardTemplate and how id is used.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
website/docs/r/monitor_alert_v2_prometheus.md Document dashboardTemplate as a valid link type and clarify id semantics.
website/docs/r/monitor_alert_v2_metric.md Document dashboardTemplate as a valid link type and clarify id semantics.
website/docs/r/monitor_alert_v2_group_outlier.md Document dashboardTemplate as a valid link type and clarify id semantics.
website/docs/r/monitor_alert_v2_form_based_prometheus.md Document dashboardTemplate as a valid link type and clarify id semantics.
website/docs/r/monitor_alert_v2_event.md Document dashboardTemplate as a valid link type and clarify id semantics.
website/docs/r/monitor_alert_v2_downtime.md Document dashboardTemplate as a valid link type and clarify id semantics.
website/docs/r/monitor_alert_v2_change.md Document dashboardTemplate as a valid link type and clarify id semantics.
sysdig/resource_sysdig_monitor_alert_v2_metric_test.go Add test config including a dashboardTemplate link.
sysdig/resource_sysdig_monitor_alert_v2_common.go Include dashboardTemplate in the provider’s allowed link-type values.
sysdig/internal/client/v2/alerts_v2.go Add AlertLinkV2TypeDashboardTemplate constant matching API output.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tembleking tembleking added this pull request to the merge queue Feb 11, 2026
Merged via the queue into master with commit 4f4b392 Feb 11, 2026
349 of 350 checks passed
@tembleking tembleking deleted the feat/alert-v2-dashboard-template-link branch February 11, 2026 09:01
fcracker79 pushed a commit that referenced this pull request Mar 5, 2026
…resources (#702)

The Sysdig Monitor API returns `type = "dashboardTemplate"` for alert
links referencing dashboard templates, but the provider only validates
`dashboard` and `runbook` as accepted values. This causes permanent
drift on every `terraform plan` for any alert with dashboard template
links, forcing users to add `lifecycle { ignore_changes }` workarounds.

This PR adds `dashboardTemplate` as an accepted link type alongside the
existing `dashboard` and `runbook` types, eliminating the state drift.

Closes #700
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support dashboardTemplate type in alert link blocks

3 participants