Skip to content

Commit 1aa2ebe

Browse files
authored
Merge branch 'master' into INVS-1146_Entity_Group_Inventory_enhancements
2 parents eb5c264 + 2d22ca3 commit 1aa2ebe

File tree

67 files changed

+6314
-652
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+6314
-652
lines changed

CHANGELOG.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,57 @@
1-
## 2.21.1 (Unreleased)
1+
## 2.25.1 (Unreleased)
22
ENHANCEMENTS:
33
* resource/sumologic_cse_inventory_entity_group_configuration: Add new fields to support enhanced functionality. (GH-495)
44

55
DEPRECATIONS:
66
* resource/sumologic_cse_inventory_entity_group_configuration: Deprecated `groups` in favor of `inventory_key`, `inventory_value`. (GH-495)
77

8+
## 2.25.0 (August 8, 2023)
9+
FEATURES:
10+
* **New Resource:** sumologic_metrics_search (GH-528)
11+
* **New Resource:** sumologic_rum_source (GH-547)
12+
* Add `budgetType` support for sumologic_ingest_budget_v2 (GH-549)
13+
14+
BUG FIXES:
15+
* Enforce non-empty string validation of `default_normalized_domain` and `domain_mappings` in cse_entity_normalization resource. (GH-540)
16+
* Fixes `sumologic_s3_source` to allow setting `use_versioned_api` parameter to `false`. (GH-555)
17+
18+
DEPRECATIONS:
19+
* resource_sumologic_ingest_budget : Deprecated in favour of `resource_sumologic_ingest_budget_v2`.
20+
21+
## 2.24.0 (June 22, 2023)
22+
FEATURES:
23+
* **New Resource:** sumologic_cse_outlier_rule (GH-532)
24+
* Add new optional `global_signal_suppression_window` field to sumologic_cse_insights_configuration (GH-533)
25+
26+
BUG FIXES:
27+
* Enforce validation of `group_by_fields` in cse_*_rule resources, on non empty string elements. (GH-535)
28+
* Fixes `resource_sumologic_cse_match_list` to allow for match lists with more than 1000 items to be created. (GH-536)
29+
30+
## 2.23.0 (May 24, 2023)
31+
FEATURES:
32+
* **New Resource:** sumologic_log_search (GH-432)
33+
* **New Resource:** sumologic_s3_archive_source (GH-524)
34+
35+
BUG FIXES:
36+
* Enforce validation of `inventory_type` for sumologic_cse_inventory_entity_group_configuration ( fix documentation too ) (GH-521)
37+
38+
## 2.22.1 (May 15, 2023)
39+
FEATURES:
40+
* resource/sumologic_slo: Added support for associating tags with an SLO
41+
42+
## 2.22.0 (March 23, 2023)
43+
FEATURES:
44+
* resource/sumologic_monitor: Added support for creating SLO Monitors with multiple burn rates (GH-499)
45+
* Add new optional `resolution_payload` field to connection resource and `resolution_payload_override` field to notifications section of monitor resource (GH-482)
46+
* **New Resource:** sumologic_local_file_source (GH-477)
47+
48+
BUG FIXES:
49+
* Remove thresholdType field under searchSchedule in content resource (GH-483)
50+
51+
DEPRECATIONS:
52+
53+
* resource/sumologic_monitor: Deprecated `burn_rate_threshold` and `time_range` in favor of `burn_rate` inside `slo_burn_rate_condition` block (GH-499)
54+
855

956
## 2.21.0 (February 27, 2023)
1057
FEATURES:

GNUmakefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ WEBSITE_REPO=github.com/hashicorp/terraform-website
44
PKG_NAME=sumologic
55
PLUGIN_DIR=~/.terraform.d/plugins
66
UNAME=$(shell uname -m)
7+
DEBUG_FLAGS=-gcflags="all=-N -l"
78

89
default: build
910

@@ -22,9 +23,9 @@ install: fmtcheck
2223
install-dev: fmtcheck
2324
mkdir -vp $(PLUGIN_DIR)
2425
ifeq ($(UNAME), arm64)
25-
go build -o $(PLUGIN_DIR)/sumologic.com/dev/sumologic/1.0.0/darwin_arm64/terraform-provider-sumologic
26+
go build ${DEBUG_FLAGS} -o $(PLUGIN_DIR)/sumologic.com/dev/sumologic/1.0.0/darwin_arm64/terraform-provider-sumologic
2627
else
27-
go build -o $(PLUGIN_DIR)/sumologic.com/dev/sumologic/1.0.0/darwin_amd64/terraform-provider-sumologic
28+
go build ${DEBUG_FLAGS} -o $(PLUGIN_DIR)/sumologic.com/dev/sumologic/1.0.0/darwin_amd64/terraform-provider-sumologic
2829
endif
2930

3031
uninstall:

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,20 @@ Then run `terraform init` to initialize it.
5353

5454
In order to run the full suite of Acceptance tests, run `make testacc`.
5555

56+
To run a specific acceptance test, run `go test -v ./sumologic -run YourSpecificTestName`
57+
5658
*Note:*
57-
- Acceptance tests *create real resources*, and often cost money to run. The environment variables `SUMOLOGIC_ACCESSID`, `SUMOLOGIC_ACCESSKEY`, and `SUMOLOGIC_ENVIRONMENT` must also be set for acceptance tests to work properly.
59+
- Acceptance tests *create real resources*, and often cost money to run. The environment variables `SUMOLOGIC_ACCESSID`, `SUMOLOGIC_ACCESSKEY`, `SUMOLOGIC_ENVIRONMENT` / `SUMOLOGIC_BASE_URL`, and `TF_ACC` must also be set for acceptance tests to work properly.
60+
- For example, you can generate a personal access key in stag-alpha [here](https://cse-stag-alpha.stag.sumologic.net/ui/#/preferences). Once your test runs, you are then capable of viewing the real resources created by Terraform in the [stag-alpha UI](https://cse-stag-alpha.stag.sumologic.net/sec/hud?hours=24).
61+
```sh
62+
$ export SUMOLOGIC_ACCESSID="yourAccessID"
63+
$ export SUMOLOGIC_ACCESSKEY="yourAccessKey"
64+
$ export SUMOLOGIC_ENVIRONMENT="stag"
65+
$ export SUMOLOGIC_BASE_URL="https://stag-api.sumologic.net/api/"
66+
$ export TF_ACC=1
67+
```
68+
- More information on configuration can be found at the [Terraform Provider codelabs documentation](https://github.com/Sanyaku/codelabs/blob/master/backend/pages/SumoLogicTerraformProvider.md).
69+
5870
- Environment variable `SUMOLOGIC_TEST_GOOGLE_APPLICATION_CREDENTIALS` must be set for gcp metrics acceptance tests to work properly (ex. below).
5971
- export SUMOLOGIC_TEST_GOOGLE_APPLICATION_CREDENTIALS=`cat /path/to/service_acccount.json`
6072
- Set Environment variable `SUMOLOGIC_ENABLE_GCP_METRICS_ACC_TESTS` to false, to disable acceptance test for Gcp Metrics.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ go 1.17
44

55
require (
66
github.com/go-errors/errors v1.4.0
7+
github.com/google/go-cmp v0.5.6
78
github.com/hashicorp/go-retryablehttp v0.7.0
89
github.com/hashicorp/terraform-plugin-sdk v1.17.2
910
github.com/stretchr/testify v1.7.0
@@ -28,7 +29,6 @@ require (
2829
github.com/go-test/deep v1.0.7 // indirect
2930
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
3031
github.com/golang/protobuf v1.5.2 // indirect
31-
github.com/google/go-cmp v0.5.6 // indirect
3232
github.com/google/uuid v1.1.2 // indirect
3333
github.com/googleapis/gax-go/v2 v2.0.5 // indirect
3434
github.com/hashicorp/errwrap v1.0.0 // indirect

sumologic/data_source_sumologic_folder_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func TestAccDataSourceFolder_folder_does_not_exist(t *testing.T) {
3131
{
3232
Config: folderConfig("/Library/Users/[email protected]/doesNotExist"),
3333
ExpectError: regexp.MustCompile(
34-
"folder with path '/Library/Users/dgould\\[email protected]/doesNotExist' does not exist"),
34+
`folder with path '/Library/Users/dgould\[email protected]/doesNotExist' does not exist`),
3535
},
3636
},
3737
})

sumologic/provider.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,15 @@ func Provider() terraform.ResourceProvider {
6363
"sumologic_cse_match_rule": resourceSumologicCSEMatchRule(),
6464
"sumologic_cse_threshold_rule": resourceSumologicCSEThresholdRule(),
6565
"sumologic_cse_first_seen_rule": resourceSumologicCSEFirstSeenRule(),
66+
"sumologic_cse_outlier_rule": resourceSumologicCSEOutlierRule(),
6667
"sumologic_collector": resourceSumologicCollector(),
6768
"sumologic_installed_collector": resourceSumologicInstalledCollector(),
6869
"sumologic_http_source": resourceSumologicHTTPSource(),
6970
"sumologic_gcp_source": resourceSumologicGCPSource(),
7071
"sumologic_polling_source": resourceSumologicPollingSource(),
7172
"sumologic_s3_source": resourceSumologicGenericPollingSource(),
7273
"sumologic_s3_audit_source": resourceSumologicGenericPollingSource(),
74+
"sumologic_s3_archive_source": resourceSumologicGenericPollingSource(),
7375
"sumologic_cloudwatch_source": resourceSumologicGenericPollingSource(),
7476
"sumologic_aws_inventory_source": resourceSumologicGenericPollingSource(),
7577
"sumologic_aws_xray_source": resourceSumologicGenericPollingSource(),
@@ -107,6 +109,10 @@ func Provider() terraform.ResourceProvider {
107109
"sumologic_policies": resourceSumologicPolicies(),
108110
"sumologic_hierarchy": resourceSumologicHierarchy(),
109111
"sumologic_content_permission": resourceSumologicPermissions(),
112+
"sumologic_local_file_source": resourceSumologicLocalFileSource(),
113+
"sumologic_log_search": resourceSumologicLogSearch(),
114+
"sumologic_metrics_search": resourceSumologicMetricsSearch(),
115+
"sumologic_rum_source": resourceSumologicRumSource(),
110116
},
111117
DataSourcesMap: map[string]*schema.Resource{
112118
"sumologic_cse_log_mapping_vendor_product": dataSourceCSELogMappingVendorAndProduct(),

sumologic/resource_sumologic_connection.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ func resourceSumologicConnection() *schema.Resource {
8282
Optional: true,
8383
ValidateFunc: validation.StringInSlice([]string{"Incident", "Event"}, false),
8484
},
85+
"resolution_payload": {
86+
Type: schema.TypeString,
87+
Optional: true,
88+
ValidateFunc: validation.StringIsJSON,
89+
Computed: true,
90+
},
8591
},
8692
}
8793
}
@@ -137,6 +143,7 @@ func resourceSumologicConnectionRead(d *schema.ResourceData, meta interface{}) e
137143
return fmt.Errorf("error setting custom headers for resource %s: %s", d.Id(), err)
138144
}
139145
d.Set("default_payload", connection.DefaultPayload)
146+
d.Set("resolution_payload", connection.ResolutionPayload)
140147
d.Set("webhook_type", connection.WebhookType)
141148
d.Set("connection_subtype", connection.ConnectionSubtype)
142149
d.SetId(connection.ID)
@@ -203,6 +210,7 @@ func resourceToConnection(d *schema.ResourceData) Connection {
203210
connection.Headers = mapToHeaders(d.Get("headers").(map[string]interface{}))
204211
connection.CustomHeaders = mapToHeaders(d.Get("custom_headers").(map[string]interface{}))
205212
connection.DefaultPayload = d.Get("default_payload").(string)
213+
connection.ResolutionPayload = d.Get("resolution_payload").(string)
206214
connection.WebhookType = d.Get("webhook_type").(string)
207215
connection.ConnectionSubtype = d.Get("connection_subtype").(string)
208216

@@ -236,6 +244,7 @@ func printConnection(connection Connection) {
236244
log.Printf("Headers: %s", connection.Headers)
237245
log.Printf("CustomHeaders: %s", connection.CustomHeaders)
238246
log.Printf("DefaultPayload: %s", connection.DefaultPayload)
247+
log.Printf("ResolutionPayload: %s", connection.ResolutionPayload)
239248
log.Printf("WebhookType: %s", connection.WebhookType)
240249
log.Printf("ConnectionSubtype: %s", connection.ConnectionSubtype)
241250
}

0 commit comments

Comments
 (0)