Skip to content

Commit 1ef915d

Browse files
Merge branch 'main' into dependabot/github_actions/github/codeql-action-3
2 parents b6f9ccd + 605d4df commit 1ef915d

File tree

129 files changed

+13232
-2004
lines changed

Some content is hidden

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

129 files changed

+13232
-2004
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535

3636
steps:
3737
- name: Checkout repository
38-
uses: actions/checkout@v4.1.1
38+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3939

4040
# Initializes the CodeQL tools for scanning.
4141
- name: Initialize CodeQL

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ jobs:
2020
steps:
2121
-
2222
name: Checkout
23-
uses: actions/checkout@v4.1.1
23+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2424
-
2525
name: Unshallow
2626
run: git fetch --prune --unshallow
2727
-
2828
name: Set up Go
29-
uses: actions/setup-go@v4
29+
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
3030
with:
3131
go-version-file: go.mod
3232
-
@@ -38,7 +38,7 @@ jobs:
3838
PASSPHRASE: ${{ secrets.PASSPHRASE }}
3939
-
4040
name: Run GoReleaser
41-
uses: goreleaser/goreleaser-action@v5.0.0
41+
uses: goreleaser/goreleaser-action@v6.3.0
4242
with:
4343
version: latest
4444
args: release --clean

.github/workflows/terraform_provider.yml

Lines changed: 102 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,52 @@ on:
55
branches:
66
- main
77
- develop
8-
paths-ignore:
9-
- '**.md'
108
pull_request:
119
branches:
1210
- main
1311
- develop
14-
paths-ignore:
15-
- '**.md'
1612
env:
1713
TERRAFORM_VERSION: "1.2.6"
14+
REDISCLOUD_ACCESS_KEY: ${{ secrets.REDISCLOUD_ACCESS_KEY_STAGING }}
15+
REDISCLOUD_SECRET_KEY: ${{ secrets.REDISCLOUD_SECRET_KEY_STAGING }}
16+
REDISCLOUD_URL: ${{ secrets.REDISCLOUD_URL_STAGING }}
17+
AWS_TEST_CLOUD_ACCOUNT_NAME: "${{ secrets.AWS_TEST_CLOUD_ACCOUNT_NAME_STAGING }}"
18+
AWS_PEERING_REGION: ${{ secrets.AWS_PEERING_REGION }}
19+
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
20+
AWS_VPC_CIDR: ${{ secrets.AWS_VPC_CIDR }}
21+
AWS_VPC_ID: ${{ secrets.AWS_VPC_ID }}
22+
AWS_TEST_TGW_ID: ${{ secrets.AWS_TEST_TGW_ID_STAGING }}
23+
TF_ACC: true
24+
TF_LOG: info
25+
AWS_ACCESS_KEY_ID: ${{ secrets.CLOUD_ACCOUNT_KEY }}
26+
AWS_ACCESS_SECRET_KEY: ${{ secrets.CLOUD_ACCOUNT_SECRET }}
27+
AWS_CONSOLE_USERNAME: ${{ secrets.CLOUD_ACCOUNT_USERNAME }}
28+
AWS_CONSOLE_PASSWORD: ${{ secrets.CLOUD_ACCOUNT_PASS }}
29+
AWS_SIGNIN_URL: ${{ secrets.CLOUD_ACCOUNT_URL }}
30+
GCP_VPC_PROJECT: ${{ secrets.GCP_VPC_PROJECT }}
31+
GCP_VPC_ID: ${{ secrets.GCP_VPC_ID }}
32+
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
33+
GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }}
34+
35+
concurrency:
36+
group: <span class="math-inline">\{\{ github\.workflow \}\}\-</span>{{ github.ref }}
37+
cancel-in-progress: true
1838

1939
jobs:
2040
go_build:
2141
name: go build
2242
runs-on: ubuntu-latest
2343
steps:
24-
- uses: actions/checkout@v4.1.1
25-
- uses: actions/cache@v3.3.2
44+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
45+
- uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
2646
continue-on-error: true
2747
id: cache-terraform-plugin-dir
2848
timeout-minutes: 2
2949
with:
3050
path: terraform-plugin-dir
3151
key: ${{ runner.os }}-terraform-plugin-dir-${{ hashFiles('go.sum') }}-${{ hashFiles('provider/**') }}
3252
- if: steps.cache-terraform-plugin-dir.outputs.cache-hit != 'true' || steps.cache-terraform-plugin-dir.outcome == 'failure'
33-
uses: actions/setup-go@v4
53+
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
3454
with:
3555
go-version-file: go.mod
3656
- if: steps.cache-terraform-plugin-dir.outputs.cache-hit != 'true' || steps.cache-terraform-plugin-dir.outcome == 'failure'
@@ -45,22 +65,22 @@ jobs:
4565
needs: [go_build]
4666
runs-on: ubuntu-latest
4767
steps:
48-
- uses: actions/checkout@v4.1.1
49-
- uses: actions/cache@v3.3.2
68+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
69+
- uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
5070
continue-on-error: true
5171
id: cache-terraform-providers-schema
5272
timeout-minutes: 2
5373
with:
5474
path: terraform-providers-schema
5575
key: ${{ runner.os }}-terraform-providers-schema-${{ hashFiles('go.sum') }}-${{ hashFiles('provider/**') }}
5676
- if: steps.cache-terraform-providers-schema.outputs.cache-hit != 'true' || steps.cache-terraform-providers-schema.outcome == 'failure'
57-
uses: actions/cache@v3.3.2
77+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
5878
timeout-minutes: 2
5979
with:
6080
path: terraform-plugin-dir
6181
key: ${{ runner.os }}-terraform-plugin-dir-${{ hashFiles('go.sum') }}-${{ hashFiles('provider/**') }}
6282
- if: steps.cache-terraform-providers-schema.outputs.cache-hit != 'true' || steps.cache-terraform-providers-schema.outcome == 'failure'
63-
uses: hashicorp/setup-terraform@v3.0.0
83+
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
6484
with:
6585
terraform_version: ${{ env.TERRAFORM_VERSION }}
6686
terraform_wrapper: false
@@ -86,63 +106,90 @@ jobs:
86106
mkdir terraform-providers-schema
87107
terraform providers schema -json > terraform-providers-schema/schema.json
88108
89-
go_test:
90-
name: go test
109+
go_test_databases:
110+
name: go test Databases
91111
needs: [go_build]
92112
runs-on: ubuntu-latest
93113
steps:
94-
- uses: actions/[email protected]
95-
- uses: actions/setup-go@v4
114+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
115+
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
116+
with:
117+
go-version-file: go.mod
118+
- run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAcc(DataSource|Resource)RedisCloud(Essentials|Pro|ActiveActive)Database_.*"'
119+
120+
go_test_subscriptions:
121+
name: go test Subscriptions
122+
needs: [go_test_databases]
123+
runs-on: ubuntu-latest
124+
steps:
125+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
126+
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
127+
with:
128+
go-version-file: go.mod
129+
- run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAcc(DataSource|Resource)RedisCloud(Essentials|Pro|ActiveActive)Subscription_.*"'
130+
131+
go_test_subscriptions_tls:
132+
name: go test Subscriptions TLS
133+
needs: [go_test_subscriptions]
134+
runs-on: ubuntu-latest
135+
steps:
136+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
137+
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
138+
with:
139+
go-version-file: go.mod
140+
- run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAcc(DataSource|Resource)RedisCloudSubscriptionTls_.*"'
141+
142+
go_test_essentials_plan:
143+
name: go test Essentials Plan
144+
needs: [go_test_subscriptions_tls]
145+
runs-on: ubuntu-latest
146+
steps:
147+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
148+
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
96149
with:
97150
go-version-file: go.mod
98-
- uses: dorny/[email protected]
99-
id: filter
151+
- run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAcc(DataSource|Resource)RedisCloudEssentialsPlan_.*"'
152+
153+
go_test_persistence_modules_regions_acl:
154+
name: go test Other
155+
needs: [go_test_essentials_plan]
156+
runs-on: ubuntu-latest
157+
steps:
158+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
159+
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
100160
with:
101-
filters: |
102-
code-changes:
103-
- 'go.mod'
104-
- 'go.sum'
105-
- 'provider/**'
106-
- '*.go'
107-
- '.github/workflows/**'
108-
- run: make testacc
109-
if: steps.filter.outputs.code-changes == 'true'
110-
env:
111-
REDISCLOUD_ACCESS_KEY: ${{ secrets.REDISCLOUD_ACCESS_KEY_QA }}
112-
REDISCLOUD_SECRET_KEY: ${{ secrets.REDISCLOUD_SECRET_KEY_QA }}
113-
REDISCLOUD_URL: https://api-k8s-cloudapi.qa.redislabs.com/v1
114-
AWS_TEST_CLOUD_ACCOUNT_NAME: "${{ secrets.AWS_TEST_CLOUD_ACCOUNT_NAME }}"
115-
AWS_PEERING_REGION: ${{ secrets.AWS_PEERING_REGION }}
116-
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
117-
AWS_VPC_CIDR: ${{ secrets.AWS_VPC_CIDR }}
118-
AWS_VPC_ID: ${{ secrets.AWS_VPC_ID }}
119-
TF_ACC: true
120-
TF_LOG: debug
121-
AWS_ACCESS_KEY_ID: ${{ secrets.CLOUD_ACCOUNT_KEY }}
122-
AWS_ACCESS_SECRET_KEY: ${{ secrets.CLOUD_ACCOUNT_SECRET }}
123-
AWS_CONSOLE_USERNAME: ${{ secrets.CLOUD_ACCOUNT_USERNAME }}
124-
AWS_CONSOLE_PASSWORD: ${{ secrets.CLOUD_ACCOUNT_PASS }}
125-
AWS_SIGNIN_URL: ${{ secrets.CLOUD_ACCOUNT_URL }}
126-
GCP_VPC_PROJECT: ${{ secrets.GCP_VPC_PROJECT }}
127-
GCP_VPC_ID: ${{ secrets.GCP_VPC_ID }}
128-
- name: Generate code coverage report
129-
if: steps.filter.outputs.code-changes == 'true' && (success() || failure())
130-
run: make generate_coverage
131-
- name: Upload code coverage report
132-
if: steps.filter.outputs.code-changes == 'true' && (success() || failure())
133-
uses: actions/upload-artifact@v3
161+
go-version-file: go.mod
162+
- run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAcc(DataSource|Resource)RedisCloud(DataPersistence|DatabaseModules|Regions|Acl).*"'
163+
164+
go_test_cloud_account:
165+
name: go test Cloud Account
166+
needs: [go_test_persistence_modules_regions_acl]
167+
runs-on: ubuntu-latest
168+
steps:
169+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
170+
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
134171
with:
135-
name: coverage.html
136-
path: bin/coverage.html
172+
go-version-file: go.mod
173+
- run: EXECUTE_TESTS=true make testacc TESTARGS='-test.short -run="TestAcc(DataSource|Resource)RedisCloud(CloudAccount).*"'
174+
175+
go_test_transit_payment:
176+
name: go test Transit Gateway & Payment
177+
needs: [go_test_cloud_account]
178+
runs-on: ubuntu-latest
179+
steps:
180+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
181+
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
182+
with:
183+
go-version-file: go.mod
184+
- run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAcc(DataSource|Resource)RedisCloud(TransitGatewayAttachment|PaymentMethod).*"'
137185

138186
tfproviderlint:
139187
name: tfproviderlint
140188
needs: [go_build]
141189
runs-on: ubuntu-latest
142190
steps:
143-
- uses: actions/checkout@v4.1.1
144-
- uses: actions/setup-go@v4
191+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
192+
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
145193
with:
146194
go-version-file: go.mod
147195
- run: make tfproviderlint
148-

.goreleaser.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Visit https://goreleaser.com for documentation on how to customize this
22
# behavior.
3+
version: 2
34
before:
45
hooks:
56
# this is just an example and not a requirement for provider building/publishing
@@ -51,4 +52,4 @@ release:
5152
# If you want to manually examine the release before its live, uncomment this line:
5253
# draft: true
5354
changelog:
54-
skip: true
55+
disable: true

0 commit comments

Comments
 (0)