Skip to content

Add notification rule, project/team scoping, and publisher data source#1

Merged
bkondakor merged 11 commits intomainfrom
claude/add-notification-config-vCk1v
Mar 19, 2026
Merged

Add notification rule, project/team scoping, and publisher data source#1
bkondakor merged 11 commits intomainfrom
claude/add-notification-config-vCk1v

Conversation

@bkondakor
Copy link
Copy Markdown
Owner

Add support for configuring DependencyTrack notifications via Terraform:

  • dependencytrack_notification_rule: manages notification rules with full
    support for event-driven and scheduled triggers, all notification groups
    (SYSTEM and PORTFOLIO scopes), publisher config, notify_on, message,
    notify_children, log_successful_publish, schedule_cron, and
    schedule_skip_unchanged options.

  • dependencytrack_notification_rule_project: scopes a notification rule
    to a specific project (PORTFOLIO scope only).

  • dependencytrack_notification_rule_team: associates a team with a
    notification rule (for email publisher).

  • dependencytrack_notification_publisher (data source): looks up a
    notification publisher by name to retrieve its UUID.

Uses SolarFactories/client-go fork with notification API support
(PR DependencyTrack/client-go#56).

https://claude.ai/code/session_019ocavNKpCndi448shsGs4Q

claude added 11 commits March 12, 2026 13:06
Add support for configuring DependencyTrack notifications via Terraform:

- dependencytrack_notification_rule: manages notification rules with full
  support for event-driven and scheduled triggers, all notification groups
  (SYSTEM and PORTFOLIO scopes), publisher config, notify_on, message,
  notify_children, log_successful_publish, schedule_cron, and
  schedule_skip_unchanged options.

- dependencytrack_notification_rule_project: scopes a notification rule
  to a specific project (PORTFOLIO scope only).

- dependencytrack_notification_rule_team: associates a team with a
  notification rule (for email publisher).

- dependencytrack_notification_publisher (data source): looks up a
  notification publisher by name to retrieve its UUID.

Uses SolarFactories/client-go fork with notification API support
(PR DependencyTrack/client-go#56).

https://claude.ai/code/session_019ocavNKpCndi448shsGs4Q
The Terraform Registry generates docs from the docs/ folder. The
notification resources were missing doc files, causing them to not
appear on the registry.

https://claude.ai/code/session_019ocavNKpCndi448shsGs4Q
Add SetAttribute (resource/datasource schema), NotificationRule,
NotificationPublisher, GetAllRulesFilterOptions, and
CreateScheduledNotificationRuleRequest to the exhaustruct exclude
list, matching the existing pattern for other client-go and
terraform-plugin-framework types.

https://claude.ai/code/session_019ocavNKpCndi448shsGs4Q
Implements CRUD operations for managing notification publishers,
including create, read, update, delete, and import support.
Registers the new resource in the provider.

https://claude.ai/code/session_019ocavNKpCndi448shsGs4Q
The NotificationRule struct's TriggerType JSON tag lacks omitempty,
so an unset field serializes as "" which the server rejects. Set
TriggerType explicitly when creating EVENT rules.

https://claude.ai/code/session_019ocavNKpCndi448shsGs4Q
When a publisher or rule is deleted externally, the Read method now
removes it from state instead of returning an error, allowing
Terraform to plan a recreation.

https://claude.ai/code/session_019ocavNKpCndi448shsGs4Q
Adds a new resource to associate notification rules with tags,
allowing rules to be limited to specific tags (PORTFOLIO scope).
Uses the TagService API (TagNotificationRules/UntagNotificationRules)
which requires DependencyTrack API version >= 4.12.

https://claude.ai/code/session_019ocavNKpCndi448shsGs4Q
When is_latest is set to true, the data source now uses
Project.Latest() to find the project by name without requiring
a version. Either version or is_latest=true must be provided.

https://claude.ai/code/session_019ocavNKpCndi448shsGs4Q
DependencyTrack returns a 500 error when deleting a rule that
still has project, team, or tag associations. The Delete method
now removes all associations before attempting deletion.

https://claude.ai/code/session_019ocavNKpCndi448shsGs4Q
CreateScheduledRule sends a request type whose Publisher inner
class only accepts uuid, but the Go client serializes extra fields
(name, publisherClass, etc.) causing a 400 error. CreateRule
accepts the full NotificationRule struct which handles both EVENT
and SCHEDULE trigger types correctly.

https://claude.ai/code/session_019ocavNKpCndi448shsGs4Q
The post-create update request copied the API response which could
return trigger_type as EVENT. This caused the API to reject
scheduleCron with "scheduleCron can not be set for rule with trigger
type EVENT". Now explicitly sets TriggerType from the plan value.

https://claude.ai/code/session_019ocavNKpCndi448shsGs4Q
@bkondakor bkondakor merged commit e04e14e into main Mar 19, 2026
3 of 5 checks passed
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.

2 participants