Skip to content

Add Monitors Terraform resources - #12

Draft
pijiang3 wants to merge 3 commits into
mainfrom
codex/monitors-provider-crud
Draft

Add Monitors Terraform resources#12
pijiang3 wants to merge 3 commits into
mainfrom
codex/monitors-provider-crud

Conversation

@pijiang3

Copy link
Copy Markdown
Collaborator

Summary

  • add Monitors datasource CRUD via flashduty_monitor_datasource plus single/list data sources
  • add Monitors alert rule CRUD via flashduty_monitor_alert_rule plus single/list data sources
  • use JSON string attributes for backend-specific payload, rule_configs, labels, annotations, and enabled time windows
  • add examples, generated Terraform docs, README entries, and acceptance test coverage

Notes

  • flashduty_monitor_datasource.enabled is read-only because the Monitors update API does not update this field.
  • flashduty_monitor_alert_rule.folder_id is ForceNew/RequiresReplace because the Monitors update API does not move rules across folders.
  • RUM is intentionally not included in this PR; this ships the selected OpenAPI-supported Monitors scope first.

Validation

  • terraform fmt -recursive examples
  • GOCACHE=/private/tmp/terraform-provider-flashduty-gocache go test ./...
  • GOCACHE=/private/tmp/terraform-provider-flashduty-gocache go build ./...
  • PATH=/opt/homebrew/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Library/Frameworks/Python.framework/Versions/3.12/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/corplink/mdm/opt/corplink-mdm/bin:/usr/local/go/bin:/Users/a1/.codex/tmp/arg0/codex-arg0e6BqYi:/Users/a1/.cache/codex-runtimes/codex-primary-runtime/dependencies/bin/override:/Users/a1/.local/bin:/Users/a1/Library/pnpm:/Users/a1/.nvm/versions/node/v24.12.0/bin:/Users/a1/go/bin:/Users/a1/.cache/codex-runtimes/codex-primary-runtime/dependencies/bin/fallback:/Applications/ChatGPT.app/Contents/Resources GOTOOLCHAIN=go1.25.5 GOCACHE=/private/tmp/terraform-provider-flashduty-gocache make lint
  • TF_ACC=1 GOCACHE=/private/tmp/terraform-provider-flashduty-gocache go test -v -run 'TestAccMonitor' ./internal/provider (skips without Monitors test env vars)
  • tfplugindocs generation with exported provider schema

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.

1 participant