Skip to content

Commit

Permalink
Add label_resolutions to signalfx_detector resource
Browse files Browse the repository at this point in the history
  • Loading branch information
pdecat committed Jan 25, 2022
1 parent a5e23a0 commit 83dd37d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions signalfx/resource_signalfx_detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,19 @@ func detectorResource() *schema.Resource {
},
},
},
"label_resolutions": &schema.Schema{
Type: schema.TypeMap,
Computed: true,
Description: "Resolutions of the detector alerts in milliseconds that indicate how often data is analyzed to determine if an alert should be triggered",
Elem: &schema.Schema{
Type: schema.TypeInt,
},
},
"url": &schema.Schema{
Type: schema.TypeString,
Computed: true,
Description: "URL of the detector",
},
},
}},

SchemaVersion: 1,
StateUpgraders: []schema.StateUpgrader{
Expand Down Expand Up @@ -532,6 +539,9 @@ func detectorAPIToTF(d *schema.ResourceData, det *detector.Detector) error {
return err
}
}
if err := d.Set("label_resolutions", det.LabelResolutions); err != nil {
return err
}
if err := d.Set("tags", det.Tags); err != nil {
return err
}
Expand Down

0 comments on commit 83dd37d

Please sign in to comment.