Skip to content

Commit 69cc7cd

Browse files
committed
Merge branch 'master' into aggr-check
2 parents 75dcccb + 95e61fd commit 69cc7cd

20 files changed

+917
-79
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
name: Set up Go
2929
uses: actions/setup-go@v2
3030
with:
31-
go-version: 1.16
31+
go-version: 1.17
3232
-
3333
name: Import GPG key
3434
id: import_gpg

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Set up Go
3838
uses: actions/[email protected]
3939
with:
40-
go-version: '1.16'
40+
go-version: '1.17'
4141
id: go
4242

4343
- name: Check out code into the Go module directory
@@ -66,7 +66,7 @@ jobs:
6666
- name: Set up Go
6767
uses: actions/[email protected]
6868
with:
69-
go-version: '1.16'
69+
go-version: '1.17'
7070
id: go
7171

7272
- name: Check out code into the Go module directory

.go-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.16.6
1+
1.17.0

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
1-
## 2.17.0 (Unreleased)
1+
## 2.17.1 (Unreleased)
2+
3+
4+
## 2.17.0 (July 28, 2022)
25
FEATURES:
36
* **New Resource:** sumologic_cse_entity_entity_group_configuration (GH-376)
47
* **New Resource:** sumologic_cse_inventory_entity_group_configuration (GH-376)
8+
* Add new optional `notification_group_fields` field to resource/sumologic_monitor (GH-403)
9+
* Add new optional `obj_permission` set to resource/sumologic_monitor for Fine Grain Permission (FGP) support (GH-397)
10+
* Add use_versioned_api parameter for s3 source (GH-401)
11+
12+
BUG FIXES:
13+
* Default to NIL for optional timezome field in SumoLogic source (GH-392)
14+
* Allow Monitor move between Monitor folders (GH-405)
515

616
## 2.16.2 (June 12, 2022)
717

go.mod

Lines changed: 72 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,90 @@
11
module github.com/SumoLogic/terraform-provider-sumologic
22

3-
go 1.16
3+
go 1.17
4+
5+
require (
6+
github.com/go-errors/errors v1.4.0
7+
github.com/hashicorp/go-retryablehttp v0.7.0
8+
github.com/hashicorp/terraform-plugin-sdk v1.17.2
9+
)
410

511
require (
612
cloud.google.com/go v0.88.0 // indirect
13+
cloud.google.com/go/storage v1.10.0 // indirect
14+
github.com/Masterminds/goutils v1.1.0 // indirect
15+
github.com/Masterminds/semver v1.5.0 // indirect
16+
github.com/Masterminds/sprig v2.22.0+incompatible // indirect
17+
github.com/agext/levenshtein v1.2.2 // indirect
18+
github.com/apparentlymart/go-cidr v1.1.0 // indirect
19+
github.com/apparentlymart/go-textseg/v12 v12.0.0 // indirect
20+
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
21+
github.com/armon/go-radix v1.0.0 // indirect
722
github.com/aws/aws-sdk-go v1.40.10 // indirect
23+
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
24+
github.com/bgentry/speakeasy v0.1.0 // indirect
25+
github.com/davecgh/go-spew v1.1.1 // indirect
826
github.com/fatih/color v1.12.0 // indirect
9-
github.com/go-errors/errors v1.4.0
1027
github.com/go-test/deep v1.0.7 // indirect
28+
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
29+
github.com/golang/protobuf v1.5.2 // indirect
30+
github.com/google/go-cmp v0.5.6 // indirect
31+
github.com/google/uuid v1.1.2 // indirect
32+
github.com/googleapis/gax-go/v2 v2.0.5 // indirect
33+
github.com/hashicorp/errwrap v1.0.0 // indirect
34+
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
35+
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
36+
github.com/hashicorp/go-getter v1.5.3 // indirect
1137
github.com/hashicorp/go-hclog v0.16.2 // indirect
12-
github.com/hashicorp/go-retryablehttp v0.7.0
38+
github.com/hashicorp/go-multierror v1.0.0 // indirect
39+
github.com/hashicorp/go-plugin v1.4.0 // indirect
40+
github.com/hashicorp/go-safetemp v1.0.0 // indirect
1341
github.com/hashicorp/go-uuid v1.0.2 // indirect
42+
github.com/hashicorp/go-version v1.3.0 // indirect
1443
github.com/hashicorp/hcl v1.0.0 // indirect
44+
github.com/hashicorp/hcl/v2 v2.8.2 // indirect
45+
github.com/hashicorp/logutils v1.0.0 // indirect
1546
github.com/hashicorp/terraform-config-inspect v0.0.0-20210625153042-09f34846faab // indirect
16-
github.com/hashicorp/terraform-plugin-sdk v1.17.2
47+
github.com/hashicorp/terraform-exec v0.13.3 // indirect
48+
github.com/hashicorp/terraform-json v0.10.0 // indirect
49+
github.com/hashicorp/terraform-plugin-test/v2 v2.2.1 // indirect
50+
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect
1751
github.com/hashicorp/yamux v0.0.0-20210707203944-259a57b3608c // indirect
52+
github.com/huandu/xstrings v1.3.2 // indirect
53+
github.com/imdario/mergo v0.3.12 // indirect
54+
github.com/jmespath/go-jmespath v0.4.0 // indirect
55+
github.com/jstemmer/go-junit-report v0.9.1 // indirect
56+
github.com/klauspost/compress v1.11.2 // indirect
57+
github.com/mattn/go-colorable v0.1.8 // indirect
1858
github.com/mattn/go-isatty v0.0.13 // indirect
59+
github.com/mitchellh/cli v1.1.2 // indirect
60+
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
61+
github.com/mitchellh/copystructure v1.0.0 // indirect
62+
github.com/mitchellh/go-homedir v1.1.0 // indirect
63+
github.com/mitchellh/go-testing-interface v1.0.4 // indirect
64+
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
65+
github.com/mitchellh/mapstructure v1.1.2 // indirect
66+
github.com/mitchellh/reflectwalk v1.0.1 // indirect
1967
github.com/oklog/run v1.1.0 // indirect
2068
github.com/posener/complete v1.2.3 // indirect
69+
github.com/spf13/afero v1.2.2 // indirect
2170
github.com/ulikunitz/xz v0.5.10 // indirect
71+
github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect
72+
github.com/vmihailenco/tagparser v0.1.1 // indirect
73+
github.com/zclconf/go-cty v1.8.2 // indirect
74+
github.com/zclconf/go-cty-yaml v1.0.2 // indirect
75+
go.opencensus.io v0.23.0 // indirect
76+
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 // indirect
77+
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
78+
golang.org/x/mod v0.4.2 // indirect
79+
golang.org/x/net v0.0.0-20210614182718-04defd469f4e // indirect
80+
golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914 // indirect
81+
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 // indirect
82+
golang.org/x/text v0.3.6 // indirect
83+
golang.org/x/tools v0.1.5 // indirect
84+
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
85+
google.golang.org/api v0.50.0 // indirect
86+
google.golang.org/appengine v1.6.7 // indirect
87+
google.golang.org/genproto v0.0.0-20210721163202-f1cecdd8b78a // indirect
88+
google.golang.org/grpc v1.39.0 // indirect
89+
google.golang.org/protobuf v1.27.1 // indirect
2290
)

go.sum

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,14 @@ github.com/hashicorp/go-getter v1.5.3 h1:NF5+zOlQegim+w/EUhSLh6QhXHmZMEeHLQzllkQ
218218
github.com/hashicorp/go-getter v1.5.3/go.mod h1:BrrV/1clo8cCYu6mxvboYg+KutTiFnXjMEgDD8+i7ZI=
219219
github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI=
220220
github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
221+
github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
221222
github.com/hashicorp/go-hclog v0.16.2 h1:K4ev2ib4LdQETX5cSZBG0DVLk1jwGqSPXBjdah3veNs=
222223
github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
223224
github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o=
224225
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
225-
github.com/hashicorp/go-plugin v1.3.0 h1:4d/wJojzvHV1I4i/rrjVaeuyxWrLzDE1mDCyDy8fXS8=
226226
github.com/hashicorp/go-plugin v1.3.0/go.mod h1:F9eH4LrE/ZsRdbwhfjs9k9HoDUwAHnYtXdgmf1AVNs0=
227+
github.com/hashicorp/go-plugin v1.4.0 h1:b0O7rs5uiJ99Iu9HugEzsM67afboErkHUWddUSpUO3A=
228+
github.com/hashicorp/go-plugin v1.4.0/go.mod h1:5fGEH17QVwTTcR0zV7yhDPLLmFX9YSZ38b18Udy6vYQ=
227229
github.com/hashicorp/go-retryablehttp v0.7.0 h1:eu1EI/mbirUgP5C8hVsTNaGZreBDlYiwC1FZWkvQPQ4=
228230
github.com/hashicorp/go-retryablehttp v0.7.0/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY=
229231
github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo=

sumologic/provider.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ func Provider() terraform.ResourceProvider {
6060
"sumologic_cse_match_rule": resourceSumologicCSEMatchRule(),
6161
"sumologic_cse_threshold_rule": resourceSumologicCSEThresholdRule(),
6262
"sumologic_collector": resourceSumologicCollector(),
63+
"sumologic_installed_collector": resourceSumologicInstalledCollector(),
6364
"sumologic_http_source": resourceSumologicHTTPSource(),
6465
"sumologic_gcp_source": resourceSumologicGCPSource(),
6566
"sumologic_polling_source": resourceSumologicPollingSource(),

sumologic/provider_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ func SkipCseTest(t *testing.T) {
3636
}
3737

3838
func testAccPreCheck(t *testing.T) {
39-
if v := os.Getenv("SUMOLOGIC_ACCESSKEY"); v == "" {
39+
if os.Getenv("SUMOLOGIC_ACCESSKEY") == "" {
4040
t.Fatal("SUMOLOGIC_ACCESSKEY must be set for acceptance tests")
4141
}
42-
if v := os.Getenv("SUMOLOGIC_ACCESSID"); v == "" {
42+
if os.Getenv("SUMOLOGIC_ACCESSID") == "" {
4343
t.Fatal("SUMOLOGIC_ACCESSID must be set for acceptance tests")
4444
}
45-
if v := os.Getenv("SUMOLOGIC_ENVIRONMENT"); v == "" {
45+
if os.Getenv("SUMOLOGIC_ENVIRONMENT") == "" && os.Getenv("SUMOLOGIC_BASE_URL") == "" {
4646
t.Fatal("SUMOLOGIC_ENVIRONMENT must be set for acceptance tests")
4747
}
4848
}

sumologic/resource_sumologic_collector.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,17 @@ func resourceSumologicCollectorRead(d *schema.ResourceData, meta interface{}) er
8787
return fmt.Errorf("error setting fields for resource %s: %s", d.Id(), err)
8888
}
8989

90+
if collector.CollectorType == "Installable" {
91+
d.Set("host_name", collector.HostName)
92+
d.Set("ephemeral", collector.Ephemeral)
93+
d.Set("source_sync_mode", collector.SourceSyncMode)
94+
d.Set("cutoff_timestamp", collector.CutoffTimestamp)
95+
d.Set("alive", collector.Alive)
96+
d.Set("last_seen_alive", collector.LastSeenAlive)
97+
d.Set("collector_version", collector.CollectorVersion)
98+
99+
}
100+
90101
return nil
91102
}
92103

sumologic/resource_sumologic_generic_polling_source.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ func resourceSumologicGenericPollingSource() *schema.Resource {
125125
Type: schema.TypeString,
126126
Optional: true,
127127
},
128+
"use_versioned_api": {
129+
Type: schema.TypeBool,
130+
Optional: true,
131+
},
128132
"path_expression": {
129133
Type: schema.TypeString,
130134
Optional: true,
@@ -336,6 +340,7 @@ func getPollingThirdPartyPathAttributes(pollingResource []PollingResource) []map
336340
"limit_to_regions": t.Path.LimitToRegions,
337341
"limit_to_namespaces": t.Path.LimitToNamespaces,
338342
"limit_to_services": t.Path.LimitToServices,
343+
"use_versioned_api": t.Path.UseVersionedApi,
339344
"custom_services": flattenCustomServices(t.Path.CustomServices),
340345
"tag_filters": flattenPollingTagFilters(t.Path.TagFilters),
341346
"sns_topic_or_subscription_arn": flattenPollingSnsTopicOrSubscriptionArn(t.Path.SnsTopicOrSubscriptionArn),
@@ -572,6 +577,9 @@ func getPollingPathSettings(d *schema.ResourceData) (PollingPath, error) {
572577
pathSettings.Type = "S3BucketPathExpression"
573578
pathSettings.BucketName = path["bucket_name"].(string)
574579
pathSettings.PathExpression = path["path_expression"].(string)
580+
if path["use_versioned_api"] != nil {
581+
pathSettings.UseVersionedApi = path["use_versioned_api"].(bool)
582+
}
575583
pathSettings.SnsTopicOrSubscriptionArn = getPollingSnsTopicOrSubscriptionArn(d)
576584
case "CloudWatchPath", "AwsInventoryPath":
577585
pathSettings.Type = pathType

0 commit comments

Comments
 (0)