diff --git a/sumologic/resource_sumologic_gcp_metrics_source_test.go b/sumologic/resource_sumologic_gcp_metrics_source_test.go index 27cd07fb..45256f06 100644 --- a/sumologic/resource_sumologic_gcp_metrics_source_test.go +++ b/sumologic/resource_sumologic_gcp_metrics_source_test.go @@ -250,10 +250,9 @@ func testAccSumologicGcpMetricsSourceConfig(t *testing.T, cName, cDescription, c service_name = "compute_instance_and_guests" prefixes = ["%s" ,"compute.googleapis.com/guest/", "compute.googleapis.com/instance/"] } - use_versioned_api = false } lifecycle { - ignore_changes = [authentication[0].private_key, path["use_versioned_api"]] + ignore_changes = [authentication[0].private_key] } } `, cName, cDescription, cCategory, sName, sDescription, sCategory, diff --git a/sumologic/resource_sumologic_generic_polling_source.go b/sumologic/resource_sumologic_generic_polling_source.go index 6b3745a9..ad7b4463 100644 --- a/sumologic/resource_sumologic_generic_polling_source.go +++ b/sumologic/resource_sumologic_generic_polling_source.go @@ -129,6 +129,13 @@ func resourceSumologicGenericPollingSource() *schema.Resource { Type: schema.TypeBool, Optional: true, Default: true, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + contentType := d.Get("content_type").(string) + if contentType != "AwsS3Bucket" { + return true + } + return false + }, }, "path_expression": { Type: schema.TypeString, @@ -584,7 +591,6 @@ func getPollingPathSettings(d *schema.ResourceData) (PollingPath, error) { } pathSettings.SnsTopicOrSubscriptionArn = getPollingSnsTopicOrSubscriptionArn(d) case "CloudWatchPath", "AwsInventoryPath": - pathSettings.UseVersionedApi = nil pathSettings.Type = pathType rawLimitToRegions := path["limit_to_regions"].([]interface{}) LimitToRegions := make([]string, 0, len(rawLimitToRegions)) @@ -607,7 +613,6 @@ func getPollingPathSettings(d *schema.ResourceData) (PollingPath, error) { pathSettings.TagFilters = getPollingTagFilters(d) } case "AwsXRayPath": - pathSettings.UseVersionedApi = nil pathSettings.Type = "AwsXRayPath" rawLimitToRegions := path["limit_to_regions"].([]interface{}) LimitToRegions := make([]string, 0, len(rawLimitToRegions)) @@ -618,7 +623,6 @@ func getPollingPathSettings(d *schema.ResourceData) (PollingPath, error) { } pathSettings.LimitToRegions = LimitToRegions case "GcpMetricsPath": - pathSettings.UseVersionedApi = nil pathSettings.Type = pathType addGcpMetricsPathSettings(&pathSettings, path) default: diff --git a/sumologic/resource_sumologic_monitors_library_monitor.go b/sumologic/resource_sumologic_monitors_library_monitor.go index ca1a09f0..15b96c10 100644 --- a/sumologic/resource_sumologic_monitors_library_monitor.go +++ b/sumologic/resource_sumologic_monitors_library_monitor.go @@ -33,7 +33,7 @@ func getMonitorBaseSchema() map[string]*schema.Schema { ValidateFunc: validation.All( validation.StringDoesNotContainAny("/"), validation.StringMatch(regexp.MustCompile(`(?s)^[^\ ].*[^\ ]$`), - "name must not contain leading or trailing spaces"), + "name must not contain leading or trailing spaces"), ), }, diff --git a/sumologic/resource_sumologic_slo.go b/sumologic/resource_sumologic_slo.go index efd78775..30c3bba1 100644 --- a/sumologic/resource_sumologic_slo.go +++ b/sumologic/resource_sumologic_slo.go @@ -164,8 +164,8 @@ func resourceSumologicSLO() *schema.Resource { Schema: map[string]*schema.Schema{ "name": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, ValidateFunc: validation.StringDoesNotContainAny("/"), }, "description": {