Skip to content

Commit 805540f

Browse files
authored
Merge pull request #514 from SumoLogic/jinkane-SUMO-218195
SUMO-218195 added tags support for SLO
2 parents 72e3f5d + ad9f2e5 commit 805540f

File tree

6 files changed

+470
-22
lines changed

6 files changed

+470
-22
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## 2.22.1 (Unreleased)
2-
2+
FEATURES:
3+
* resource/sumologic_slo: Added support for associating tags with an SLO
34
## 2.22.0 (March 23, 2023)
45
FEATURES:
56
* resource/sumologic_monitor: Added support for creating SLO Monitors with multiple burn rates (GH-499)

sumologic/resource_sumologic_slo.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,13 @@ func resourceSumologicSLO() *schema.Resource {
276276
},
277277
},
278278
},
279+
"tags": {
280+
Type: schema.TypeMap,
281+
Optional: true,
282+
Elem: &schema.Schema{
283+
Type: schema.TypeString,
284+
},
285+
},
279286
"is_mutable": {
280287
Type: schema.TypeBool,
281288
Optional: true,
@@ -366,6 +373,7 @@ func resourceSLORead(d *schema.ResourceData, meta interface{}) error {
366373
d.Set("is_system", slo.IsSystem)
367374
d.Set("service", slo.Service)
368375
d.Set("application", slo.Application)
376+
d.Set("tags", slo.Tags)
369377

370378
flatCompliance, err := flattenSLOCompliance(slo.Compliance)
371379
if err != nil {
@@ -561,6 +569,7 @@ func resourceToSLO(d *schema.ResourceData) (*SLOLibrarySLO, error) {
561569
Indicator: *indicator,
562570
Service: d.Get("service").(string),
563571
Application: d.Get("application").(string),
572+
Tags: d.Get("tags").(map[string]interface{}),
564573
}
565574

566575
err = verifySLOObject(slo)

0 commit comments

Comments
 (0)