@@ -16,6 +16,7 @@ func TestAccSumologicCSEInventoryEntityGroupConfiguration_createAndUpdate(t *tes
1616 description := "Test description"
1717 group := "goo"
1818 inventoryType := "computer"
19+ inventorySource := "Active Directory"
1920 name := "Entity Group Configuration Tf test"
2021 suppressed := false
2122 tag := "foo"
@@ -29,21 +30,21 @@ func TestAccSumologicCSEInventoryEntityGroupConfiguration_createAndUpdate(t *tes
2930 Steps : []resource.TestStep {
3031 {
3132 Config : testCreateCSEInventoryEntityGroupConfigurationConfig (criticality , description , group ,
32- inventoryType , name , suppressed , tag ),
33+ inventoryType , inventorySource , name , suppressed , tag ),
3334 Check : resource .ComposeTestCheckFunc (
3435 testCheckCSEInventoryEntityGroupConfigurationExists (resourceName , & InventoryEntityGroupConfiguration ),
3536 testCheckInventoryEntityGroupConfigurationValues (& InventoryEntityGroupConfiguration , criticality ,
36- description , group , inventoryType , name , suppressed , tag ),
37+ description , group , inventoryType , inventorySource , name , suppressed , tag ),
3738 resource .TestCheckResourceAttrSet (resourceName , "id" ),
3839 ),
3940 },
4041 {
4142 Config : testCreateCSEInventoryEntityGroupConfigurationConfig (criticality , description , group ,
42- inventoryType , nameUpdated , suppressed , tag ),
43+ inventoryType , inventorySource , nameUpdated , suppressed , tag ),
4344 Check : resource .ComposeTestCheckFunc (
4445 testCheckCSEInventoryEntityGroupConfigurationExists (resourceName , & InventoryEntityGroupConfiguration ),
4546 testCheckInventoryEntityGroupConfigurationValues (& InventoryEntityGroupConfiguration , criticality ,
46- description , group , inventoryType , nameUpdated , suppressed , tag ),
47+ description , group , inventoryType , inventorySource , nameUpdated , suppressed , tag ),
4748 resource .TestCheckResourceAttrSet (resourceName , "id" ),
4849 ),
4950 },
@@ -77,18 +78,19 @@ func testAccCSEInventoryEntityGroupConfigurationDestroy(s *terraform.State) erro
7778
7879func testCreateCSEInventoryEntityGroupConfigurationConfig (
7980 criticality string , description string , group string ,
80- inventoryType string , name string , suppressed bool , tag string ) string {
81+ inventoryType string , inventorySource string , name string , suppressed bool , tag string ) string {
8182 return fmt .Sprintf (`
8283resource "sumologic_cse_inventory_entity_group_configuration" "inventory_entity_group_configuration" {
8384 criticality = "%s"
8485 description = "%s"
85- groups = [ "%s"]
86+ group = "%s"
8687 inventory_type = "%s"
88+ inventory_source = "%s"
8789 name = "%s"
8890 suppressed = %t
8991 tags = ["%s"]
9092}
91- ` , criticality , description , group , inventoryType , name , suppressed , tag )
93+ ` , criticality , description , group , inventoryType , inventorySource , name , suppressed , tag )
9294}
9395
9496func testCheckCSEInventoryEntityGroupConfigurationExists (n string , InventoryEntityGroupConfiguration * CSEEntityGroupConfiguration ) resource.TestCheckFunc {
@@ -116,20 +118,23 @@ func testCheckCSEInventoryEntityGroupConfigurationExists(n string, InventoryEnti
116118
117119func testCheckInventoryEntityGroupConfigurationValues (InventoryEntityGroupConfiguration * CSEEntityGroupConfiguration ,
118120 criticality string , description string , group string ,
119- inventoryType string , name string , suppressed bool , tag string ) resource.TestCheckFunc {
121+ inventoryType string , inventorySource string , name string , suppressed bool , tag string ) resource.TestCheckFunc {
120122 return func (s * terraform.State ) error {
121123 if InventoryEntityGroupConfiguration .Criticality != criticality {
122124 return fmt .Errorf ("bad criticality, expected \" %s\" , got %#v" , criticality , InventoryEntityGroupConfiguration .Criticality )
123125 }
124126 if InventoryEntityGroupConfiguration .Description != description {
125127 return fmt .Errorf ("bad description, expected \" %s\" , got %#v" , description , InventoryEntityGroupConfiguration .Description )
126128 }
127- if InventoryEntityGroupConfiguration .Groups [ 0 ] != group {
128- return fmt .Errorf ("bad group, expected \" %s\" , got %#v" , tag , InventoryEntityGroupConfiguration .Groups [ 0 ] )
129+ if InventoryEntityGroupConfiguration .Group != group {
130+ return fmt .Errorf ("bad group, expected \" %s\" , got %#v" , tag , InventoryEntityGroupConfiguration .Group )
129131 }
130132 if InventoryEntityGroupConfiguration .InventoryType != inventoryType {
131133 return fmt .Errorf ("bad inventoryType, expected \" %s\" , got %#v" , inventoryType , InventoryEntityGroupConfiguration .InventoryType )
132134 }
135+ if InventoryEntityGroupConfiguration .InventorySource != inventorySource {
136+ return fmt .Errorf ("bad inventoryType, expected \" %s\" , got %#v" , inventorySource , InventoryEntityGroupConfiguration .InventorySource )
137+ }
133138 if InventoryEntityGroupConfiguration .Name != name {
134139 return fmt .Errorf ("bad name, expected \" %s\" , got %#v" , name , InventoryEntityGroupConfiguration .Name )
135140 }
0 commit comments