SumoLogic / terraform-provider-sumologic

Terraform provider for Sumo Logic
https://www.terraform.io/docs/providers/sumologic/
Mozilla Public License 2.0
38 stars 55 forks source link

sumologic_monitor resource does not support sumologic_folder resources as parent_id #676

Open kcarrillorhoads opened 1 month ago

kcarrillorhoads commented 1 month ago

When defining sumologic_monitor entities even if the sumologic_folder resource is in the same state, the monitor will fail creation if the parent_id is set to a sumologic_folder:

parent_id= sumologic_folder.security_monitors.id

│ Error: {"id":"HXYMD-VNQXH-WHANG","errors":[{"code":"content:parent_not_found","message":"Parent object not found."}]} │ │ with module.team-specific.module.security.sumologic_monitor.guardduty_high_severity_threats, │ on modules/sumo-team-specific/security/guardduty.tf line 240, in resource "sumologic_monitor" "guardduty_high_severity_threats": │ 240: resource "sumologic_monitor" "guardduty_high_severity_threats" {

kevin-sumo commented 1 month ago

Monitors have a distinct folder structure and are managed via a separate sumologic_monitor_folder resource. So you'll need to create a folder using this resource, then point your monitors to the parent ID of that folder.

The folders resource is currently only for managing the folders found within the Content Library.