Skip to content

Commit 3699cfb

Browse files
authored
Merge pull request #187 from prudhvigodithi/main
Project go upgrade to 1.22
2 parents bdfb6d1 + 23b05e5 commit 3699cfb

18 files changed

+283
-780
lines changed

.github/workflows/add-untriaged.yml

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
name: Apply 'untriaged' label during issue lifecycle
2-
3-
on:
4-
issues:
5-
types: [opened, reopened, transferred]
6-
7-
jobs:
8-
apply-label:
9-
runs-on: ubuntu-latest
10-
steps:
11-
- uses: actions/github-script@v6
12-
with:
13-
script: |
14-
github.rest.issues.addLabels({
15-
issue_number: context.issue.number,
16-
owner: context.repo.owner,
17-
repo: context.repo.repo,
18-
labels: ['untriaged']
19-
})
1+
name: Apply 'untriaged' label during issue lifecycle
2+
3+
on:
4+
issues:
5+
types: [opened, reopened, transferred]
6+
7+
jobs:
8+
apply-label:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/github-script@v6
12+
with:
13+
script: |
14+
github.rest.issues.addLabels({
15+
issue_number: context.issue.number,
16+
owner: context.repo.owner,
17+
repo: context.repo.repo,
18+
labels: ['untriaged']
19+
})

.github/workflows/test.yml

+17-14
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ jobs:
88
name: Runs go linters
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/setup-go@v3
11+
- uses: actions/setup-go@v5
1212
with:
13-
go-version: 1.17
14-
- uses: actions/checkout@v3
13+
go-version: 1.22.1
14+
- uses: actions/checkout@v4
1515
with:
1616
# we depend on full git history for linters
1717
fetch-depth: 0
@@ -26,7 +26,7 @@ jobs:
2626
test:
2727
strategy:
2828
matrix:
29-
go-version: [1.18.x]
29+
go-version: [1.22.1]
3030
os: [ubuntu-latest]
3131
os-major-version:
3232
- "2-opensearch"
@@ -50,11 +50,11 @@ jobs:
5050
run: |
5151
sudo sysctl -w vm.max_map_count=262144
5252
- name: Setup Go ${{ matrix.go-version }}
53-
uses: actions/setup-go@v2
53+
uses: actions/setup-go@v5
5454
with:
5555
go-version: ${{ matrix.go-version }}
5656
- name: Checkout code
57-
uses: actions/checkout@v2
57+
uses: actions/checkout@v4
5858
with:
5959
# we depend on full git history for linters
6060
fetch-depth: 0
@@ -76,18 +76,21 @@ jobs:
7676
- name: Check Docker containers
7777
run: docker ps -a
7878
# While docker/OS is booting up, run the linters
79-
- name: Get tools
80-
run: |
81-
./script/install-tools
8279
- name: Install managed version of terraform
83-
uses: hashicorp/setup-terraform@v1
80+
uses: hashicorp/setup-terraform@v3
8481
with:
85-
terraform_version: 1.0.11
82+
terraform_version: 1.1.7
8683
terraform_wrapper: false
84+
- name: Terraform fmt
85+
id: fmt
86+
run: terraform fmt -check
87+
continue-on-error: false
88+
- name: Terraform Validate
89+
id: validate
90+
run: terraform validate -no-color
8791
- name: Run check scripts
8892
run: |
8993
./script/test-mod-tidy
90-
./script/test-terraform-fmt
9194
- name: Wait for OpenSearch
9295
# ensure that OS has come up and is available
9396
run: |
@@ -109,9 +112,9 @@ jobs:
109112
name: Release
110113
steps:
111114
- name: Checkout code
112-
uses: actions/checkout@v2
115+
uses: actions/checkout@v4
113116
- name: Setup Go
114-
uses: actions/setup-go@v2
117+
uses: actions/setup-go@v5
115118
with:
116119
go-version: 1.18.x
117120
- name: Import GPG key

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
/vendor
22
.DS_Store
3-
terraform-provider-opensearch
3+
terraform-provider-opensearch

CODE_OF_CONDUCT.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ This code of conduct applies to all spaces provided by the OpenSource project in
1919
* Advocating for or encouraging any of the above behaviors.
2020
* Enforcement and Reporting Code of Conduct Issues:
2121

22-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported. [Contact us](mailto:[email protected]). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.
22+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported. [Contact us](mailto:[email protected]). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.

NOTICE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
OpenSearch (https://opensearch.org/)
2-
Copyright OpenSearch Contributors
2+
Copyright OpenSearch Contributors

docs/index.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ Example usage:
113113

114114
```tf
115115
provider "opensearch" {
116-
url = "https://search-foo-bar-pqrhr4w3u4dzervg41frow4mmy.us-east-1.es.amazonaws.com"
117-
aws_access_key = "anaccesskey"
118-
aws_secret_key = "asecretkey"
119-
aws_token = "" # if necessary
116+
url = "https://search-foo-bar-pqrhr4w3u4dzervg41frow4mmy.us-east-1.es.amazonaws.com"
117+
aws_access_key = "anaccesskey"
118+
aws_secret_key = "asecretkey"
119+
aws_token = "" # if necessary
120120
}
121121
```
122122

@@ -128,11 +128,11 @@ Example usage:
128128

129129
```tf
130130
provider "opensearch" {
131-
url = "https://search-foo-bar-pqrhr4w3u4dzervg41frow4mmy.us-east-1.es.amazonaws.com"
132-
username = "ausername"
133-
password = "apassword"
134-
# Must be disabled for basic auth
135-
sign_aws_requests = false
131+
url = "https://search-foo-bar-pqrhr4w3u4dzervg41frow4mmy.us-east-1.es.amazonaws.com"
132+
username = "ausername"
133+
password = "apassword"
134+
# Must be disabled for basic auth
135+
sign_aws_requests = false
136136
}
137137
```
138138

@@ -145,9 +145,9 @@ Example usage:
145145

146146
```tf
147147
provider "opensearch" {
148-
url = "https://search-foo-bar-pqrhr4w3u4dzervg41frow4mmy.us-east-1.es.amazonaws.com"
149-
aws_assume_role_arn = "arn:aws:iam::012345678901:role/rolename"
150-
aws_assume_role_external_id = "SecretID"
148+
url = "https://search-foo-bar-pqrhr4w3u4dzervg41frow4mmy.us-east-1.es.amazonaws.com"
149+
aws_assume_role_arn = "arn:aws:iam::012345678901:role/rolename"
150+
aws_assume_role_external_id = "SecretID"
151151
}
152152
```
153153

@@ -169,8 +169,8 @@ You can specify a named profile that will be used for credentials (either static
169169

170170
```tf
171171
provider "opensearch" {
172-
url = "https://search-foo-bar-pqrhr4w3u4dzervg41frow4mmy.us-east-1.es.amazonaws.com"
173-
aws_profile = "profilename"
172+
url = "https://search-foo-bar-pqrhr4w3u4dzervg41frow4mmy.us-east-1.es.amazonaws.com"
173+
aws_profile = "profilename"
174174
}
175175
```
176176

go.mod

+65-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,74 @@
11
module github.com/opensearch-project/terraform-provider-opensearch
22

3-
go 1.14
3+
go 1.22.1
44

55
require (
6-
github.com/aws/aws-sdk-go v1.45.24
6+
github.com/aws/aws-sdk-go v1.52.2
77
github.com/deoxxa/aws_signing_client v0.0.0-20161109131055-c20ee106809e
8-
github.com/hashicorp/go-hclog v1.5.0
9-
github.com/hashicorp/terraform-plugin-docs v0.13.0
10-
github.com/hashicorp/terraform-plugin-sdk/v2 v2.12.0
11-
github.com/katbyte/terrafmt v0.4.0
8+
github.com/hashicorp/go-hclog v1.6.3
9+
github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0
1210
github.com/mitchellh/go-homedir v1.1.0
13-
github.com/olivere/elastic v6.2.26+incompatible
11+
github.com/olivere/elastic v6.2.37+incompatible
1412
github.com/olivere/elastic/v7 v7.0.32
1513
gopkg.in/olivere/elastic.v6 v6.2.37
1614
)
15+
16+
require (
17+
github.com/ProtonMail/go-crypto v1.1.0-alpha.2-proton // indirect
18+
github.com/agext/levenshtein v1.2.3 // indirect
19+
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
20+
github.com/cloudflare/circl v1.3.8 // indirect
21+
github.com/fatih/color v1.16.0 // indirect
22+
github.com/golang/protobuf v1.5.4 // indirect
23+
github.com/google/go-cmp v0.6.0 // indirect
24+
github.com/hashicorp/errwrap v1.1.0 // indirect
25+
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
26+
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
27+
github.com/hashicorp/go-cty v1.4.1-0.20200723130312-85980079f637 // indirect
28+
github.com/hashicorp/go-multierror v1.1.1 // indirect
29+
github.com/hashicorp/go-plugin v1.6.0 // indirect
30+
github.com/hashicorp/go-uuid v1.0.3 // indirect
31+
github.com/hashicorp/go-version v1.6.0 // indirect
32+
github.com/hashicorp/hc-install v0.6.4 // indirect
33+
github.com/hashicorp/hcl/v2 v2.20.1 // indirect
34+
github.com/hashicorp/logutils v1.0.0 // indirect
35+
github.com/hashicorp/terraform-exec v0.20.0 // indirect
36+
github.com/hashicorp/terraform-json v0.21.0 // indirect
37+
github.com/hashicorp/terraform-plugin-go v0.22.2 // indirect
38+
github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect
39+
github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
40+
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
41+
github.com/hashicorp/yamux v0.1.1 // indirect
42+
github.com/jmespath/go-jmespath v0.4.0 // indirect
43+
github.com/josharian/intern v1.0.0 // indirect
44+
github.com/kr/pretty v0.3.0 // indirect
45+
github.com/mailru/easyjson v0.7.7 // indirect
46+
github.com/mattn/go-colorable v0.1.13 // indirect
47+
github.com/mattn/go-isatty v0.0.20 // indirect
48+
github.com/mitchellh/copystructure v1.2.0 // indirect
49+
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
50+
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
51+
github.com/mitchellh/mapstructure v1.5.0 // indirect
52+
github.com/mitchellh/reflectwalk v1.0.2 // indirect
53+
github.com/oklog/run v1.1.0 // indirect
54+
github.com/pkg/errors v0.9.1 // indirect
55+
github.com/rogpeppe/go-internal v1.12.0 // indirect
56+
github.com/stretchr/testify v1.8.2 // indirect
57+
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
58+
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
59+
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
60+
github.com/zclconf/go-cty v1.14.4 // indirect
61+
golang.org/x/crypto v0.23.0 // indirect
62+
golang.org/x/mod v0.17.0 // indirect
63+
golang.org/x/net v0.25.0 // indirect
64+
golang.org/x/sync v0.7.0 // indirect
65+
golang.org/x/sys v0.20.0 // indirect
66+
golang.org/x/text v0.15.0 // indirect
67+
golang.org/x/tools v0.20.0 // indirect
68+
google.golang.org/appengine v1.6.8 // indirect
69+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240429193739-8cf5692501f6 // indirect
70+
google.golang.org/grpc v1.63.2 // indirect
71+
google.golang.org/protobuf v1.34.1 // indirect
72+
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
73+
gopkg.in/yaml.v2 v2.4.0 // indirect
74+
)

0 commit comments

Comments
 (0)