|
| 1 | +--- |
| 2 | +# generated by https://github.com/hashicorp/terraform-plugin-docs |
| 3 | +page_title: "dependencytrack_tag_notification_rules Resource - dependencytrack" |
| 4 | +subcategory: "" |
| 5 | +description: |- |
| 6 | + Applies an existing tag to multiple notification rules. Requires API version >= 4.12. |
| 7 | +--- |
| 8 | + |
| 9 | +# dependencytrack_tag_notification_rules (Resource) |
| 10 | + |
| 11 | +Applies an existing tag to multiple notification rules. Requires API version >= 4.12. |
| 12 | + |
| 13 | +## Example Usage |
| 14 | + |
| 15 | +```terraform |
| 16 | +# Requires DependencyTrack API v4.12+ |
| 17 | +
|
| 18 | +resource "dependencytrack_project" "example" { |
| 19 | + name = "Example Project" |
| 20 | + tags = ["example_tag"] |
| 21 | +} |
| 22 | +
|
| 23 | +resource "dependencytrack_notification_publisher" "example" { |
| 24 | + name = "Example Publisher" |
| 25 | + publisher_class = "org.dependencytrack.notification.publisher.ConsolePublisher" |
| 26 | + template_mime_type = "text/plain" |
| 27 | +} |
| 28 | +
|
| 29 | +resource "dependencytrack_notification_rule" "example" { |
| 30 | + name = "Example Event Rule" |
| 31 | + trigger_type = "EVENT" |
| 32 | + log_successful_publish = false |
| 33 | + notify_on = [ |
| 34 | + "NEW_VULNERABILITY", |
| 35 | + "PROJECT_CREATED", |
| 36 | + "BOM_PROCESSED" |
| 37 | + ] |
| 38 | + publisher_id = dependencytrack_notification_publisher.test.id |
| 39 | +} |
| 40 | +
|
| 41 | +resource "dependencytrack_tag_notification_rules" "example" { |
| 42 | + tag = "example_tag" |
| 43 | + notification_rules = [ |
| 44 | + dependencytrack_notification_rule.example.id, |
| 45 | + ] |
| 46 | + depends_on = [dependencytrack_project.example] |
| 47 | +} |
| 48 | +``` |
| 49 | + |
| 50 | +<!-- schema generated by tfplugindocs --> |
| 51 | +## Schema |
| 52 | + |
| 53 | +### Required |
| 54 | + |
| 55 | +- `notification_rules` (List of String) Notification Rule UUIDs to which to apply tag. |
| 56 | +- `tag` (String) Name of the Tag. |
| 57 | + |
| 58 | +### Read-Only |
| 59 | + |
| 60 | +- `id` (String) Name of the Tag. |
| 61 | + |
| 62 | +## Import |
| 63 | + |
| 64 | +Import is supported using the following syntax: |
| 65 | + |
| 66 | +```shell |
| 67 | +terraform import dependencytrack_tag_notification_rules.example example_tag |
| 68 | +``` |
0 commit comments