Skip to content

Commit 906fb06

Browse files
PSA-30969 Add correlation filter for performance. (#50)
PSA-30969 Add correlation filter for performance. * Add attribute subscription_filter_type to select the filter type for all specified subscriptions * Refactor to distinguish between subscription Name and subscription filter value * Improve Docs
1 parent c0e2922 commit 906fb06

Some content is hidden

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

51 files changed

+1969
-933
lines changed

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,12 @@ updates:
88
go-modules:
99
patterns:
1010
- "*"
11+
12+
- package-ecosystem: "github-actions"
13+
directory: "/"
14+
schedule:
15+
interval: "weekly"
16+
groups:
17+
all-github-actions:
18+
patterns:
19+
- "*"

.github/pull_request_template.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## Pull Request Template
2+
3+
### Description
4+
5+
Please provide a brief description of the changes made in this pull request.
6+
7+
### Related Issue
8+
9+
If this pull request is related to an existing issue, please mention it here.
10+
11+
### Checklist
12+
13+
Please ensure that the following checklist is completed before submitting the pull request:
14+
15+
- [ ] Code has been tested locally and passes all tests. For more information about local testing, refer to [HowTo - Test locally](/docs/guides/howto-runintegrationtests.md).
16+
- [ ] Documentation has been updated with `make tfdocs-generate`.

.github/workflows/release.yaml

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
name: Release
2-
3-
on:
4-
push:
5-
tags:
6-
- "v*"
7-
8-
permissions:
9-
contents: write
10-
11-
jobs:
12-
goreleaser:
13-
runs-on: ubuntu-latest
14-
steps:
15-
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
16-
with:
17-
# Allow goreleaser to access older tag information.
18-
fetch-depth: 0
19-
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
20-
with:
21-
go-version-file: "go.mod"
22-
cache: true
23-
- name: Import GPG key
24-
uses: crazy-max/ghaction-import-gpg@111c56156bcc6918c056dbef52164cfa583dc549 # v5.2.0
25-
id: import_gpg
26-
with:
27-
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
28-
passphrase: ${{ secrets.GPG_PASSPHRASE }}
29-
- name: Run GoReleaser
30-
uses: goreleaser/goreleaser-action@f82d6c1c344bcacabba2c841718984797f664a6b # v4.2.0
31-
with:
32-
args: release --clean
33-
env:
34-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35-
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
goreleaser:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
# Allow goreleaser to access older tag information.
18+
fetch-depth: 0
19+
- uses: actions/setup-go@v5
20+
with:
21+
go-version-file: "go.mod"
22+
cache: true
23+
- name: Import GPG key
24+
uses: crazy-max/ghaction-import-gpg@v5
25+
id: import_gpg
26+
with:
27+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
28+
passphrase: ${{ secrets.GPG_PASSPHRASE }}
29+
- name: Run GoReleaser
30+
uses: goreleaser/goreleaser-action@v5
31+
with:
32+
args: release --clean
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

.github/workflows/test.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,31 +16,31 @@ jobs:
1616
runs-on: ubuntu-latest
1717
timeout-minutes: 5
1818
steps:
19-
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
20-
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
19+
- uses: actions/checkout@v4
20+
- uses: actions/setup-go@v5
2121
with:
2222
go-version-file: "go.mod"
2323
cache: true
2424
- run: go mod download
2525
- run: go build -v .
2626
- name: Run linters
27-
uses: golangci/golangci-lint-action@v3.7.0
27+
uses: golangci/golangci-lint-action@v5
2828
with:
2929
version: latest
3030

3131
generate-documentation:
3232
runs-on: ubuntu-latest
3333
name: "Generate Documentation"
3434
steps:
35-
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
36-
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
35+
- uses: actions/checkout@v4
36+
- uses: actions/setup-go@v5
3737
with:
3838
go-version-file: "go.mod"
3939
cache: true
40-
- run: go generate ./...
40+
- run: make tfdocs-generate
4141
- name: Comparing generated Terraform documentation against main
4242
run: |
43-
git diff --compact-summary --exit-code || \
43+
git diff --exit-code || \
4444
(echo; echo "Unexpected difference in directories after code generation. Run 'go generate ./...' command and commit."; exit 1)
4545
4646
test:
@@ -56,12 +56,12 @@ jobs:
5656
- "1.5.*"
5757
- "1.6.*"
5858
steps:
59-
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
60-
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
59+
- uses: actions/checkout@v4
60+
- uses: actions/setup-go@v5
6161
with:
6262
go-version-file: "go.mod"
6363
cache: true
64-
- uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1 # v2.0.3
64+
- uses: hashicorp/setup-terraform@v3
6565
with:
6666
terraform_version: ${{ matrix.terraform }}
6767
terraform_wrapper: false
@@ -70,5 +70,5 @@ jobs:
7070
TF_ACC: "1"
7171
DG_SERVICEBUS_CLIENTSECRET: ${{ secrets.DG_SERVICEBUS_CLIENTSECRET }}
7272
DG_SERVICEBUS_CLIENTID: ${{ vars.DG_SERVICEBUS_CLIENTID }}
73-
run: go test -v -cover ./internal/provider/
73+
run: make testacc
7474
timeout-minutes: 10

.gitignore

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
*.dll
2-
*.exe
3-
.DS_Store
4-
example.tf
5-
terraform.tfplan
6-
terraform.tfstate
7-
bin/
8-
dist/
9-
modules-dev/
10-
/pkg/
11-
website/.vagrant
12-
website/.bundle
13-
website/build
14-
website/node_modules
15-
.vagrant/
16-
*.backup
17-
./*.tfstate
18-
.terraform/
19-
*.log
20-
*.bak
21-
*~
22-
.*.swp
23-
.idea
24-
*.iml
25-
*.test
26-
*.iml
27-
28-
website/vendor
29-
30-
# Test exclusions
31-
!command/test-fixtures/**/*.tfstate
32-
!command/test-fixtures/**/.terraform/
33-
34-
# Keep windows files with windows line endings
35-
*.winfile eol=crlf
1+
*.dll
2+
*.exe
3+
.DS_Store
4+
example.tf
5+
terraform.tfplan
6+
terraform.tfstate
7+
bin/
8+
dist/
9+
modules-dev/
10+
/pkg/
11+
website/.vagrant
12+
website/.bundle
13+
website/build
14+
website/node_modules
15+
.vagrant/
16+
*.backup
17+
./*.tfstate
18+
.terraform/
19+
*.log
20+
*.bak
21+
*~
22+
.*.swp
23+
.idea
24+
*.iml
25+
*.test
26+
*.iml
27+
28+
website/vendor
29+
30+
# Test exclusions
31+
!command/test-fixtures/**/*.tfstate
32+
!command/test-fixtures/**/.terraform/
33+
34+
# Keep windows files with windows line endings
35+
*.winfile eol=crlf

.golangci.yml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
# Visit https://golangci-lint.run/ for usage documentation
2-
# and information on other useful linters
3-
issues:
4-
max-per-linter: 0
5-
max-same-issues: 0
6-
7-
linters:
8-
disable-all: true
9-
enable:
10-
- durationcheck
11-
- errcheck
12-
- exportloopref
13-
- forcetypeassert
14-
- godot
15-
- gosimple
16-
- ineffassign
17-
- makezero
18-
- misspell
19-
- nilerr
20-
- predeclared
21-
- staticcheck
22-
- tenv
23-
- unconvert
24-
- unparam
25-
- unused
26-
- vet
1+
# Visit https://golangci-lint.run/ for usage documentation
2+
# and information on other useful linters
3+
issues:
4+
max-per-linter: 0
5+
max-same-issues: 0
6+
7+
linters:
8+
disable-all: true
9+
enable:
10+
- durationcheck
11+
- errcheck
12+
- exportloopref
13+
- forcetypeassert
14+
- godot
15+
- gosimple
16+
- ineffassign
17+
- makezero
18+
- misspell
19+
- nilerr
20+
- predeclared
21+
- staticcheck
22+
- tenv
23+
- unconvert
24+
- unparam
25+
- unused
26+
- vet

.vscode/launch.json

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
{
2-
// Use IntelliSense to learn about possible attributes.
3-
// Hover to view descriptions of existing attributes.
4-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5-
"version": "0.2.0",
6-
"configurations": [
7-
{
8-
"name": "Debug tests",
9-
"type": "go",
10-
"request": "launch",
11-
"mode": "auto",
12-
"env": {"PKG_NAME": "${relativeFileDirname}"},
13-
"envFile": "${workspaceFolder}/.vscode/private.env",
14-
"program": "${fileDirname}",
15-
"args": [
16-
"-test.v",
17-
"-test.run",
18-
"^${selectedText}$"
19-
],
20-
}
21-
]
22-
}
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Debug tests",
9+
"type": "go",
10+
"request": "launch",
11+
"mode": "auto",
12+
"env": {"PKG_NAME": "${relativeFileDirname}"},
13+
"envFile": "${workspaceFolder}/.vscode/private.env",
14+
"program": "${fileDirname}",
15+
"args": [
16+
"-test.v",
17+
"-test.run",
18+
"^${selectedText}$"
19+
],
20+
}
21+
]
22+
}

GNUmakefile

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,31 @@
1-
default: testacc
2-
3-
# Run acceptance tests
4-
.PHONY: testacc
5-
testacc:
6-
TF_ACC=1 go test ./... -v $(TESTARGS) -timeout 120m
1+
.DEFAULT_GOAL := build
2+
BIN_FILE=terraform-provider-dg-servicebus.exe
3+
4+
# Build the executable binary
5+
build:
6+
@go build -o "${BIN_FILE}"
7+
8+
# Run the executable binary
9+
run:
10+
./"${BIN_FILE}"
11+
12+
# Clean the project by removing build artifacts
13+
clean:
14+
go clean
15+
rm --force "cp.out"
16+
rm --force nohup.out
17+
18+
# Run linter to analyze the code for potential issues
19+
lint:
20+
golangci-lint run
21+
22+
# Run acceptance tests with Terraform
23+
testacc:
24+
TF_ACC=1 go test -timeout 120m -count=1 -parallel=5 -v -cover ./internal/provider/
25+
26+
# Generate Terraform provider documentation
27+
tfdocs-generate:
28+
export GOBIN=$$PWD/bin && \
29+
export PATH=$$GOBIN:$$PATH && \
30+
go install github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs@latest && \
31+
tfplugindocs generate --provider-name "dgservicebus"

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
# Terraform Provider DG ServiceBus
2-
3-
This repository contains a Terraform provider for managing NServiceBus Endpoints on Azure Service Bus. It tries to solves a specific issue, currently present when using the official Azure Resource Manager Provider, in conjunction with NServiceBus. The issue is described in detail [in this issue](https://github.com/hashicorp/terraform-provider-azurerm/issues/20718)
4-
5-
For additional information about provider development see the [Plugin Framework documentation](https://developer.hashicorp.com/terraform/plugin).
1+
# Terraform Provider DG ServiceBus
2+
3+
This repository contains a Terraform provider for managing NServiceBus Endpoints on Azure Service Bus. It addresses a specific issue that arises when using the official Azure Resource Manager Provider in conjunction with NServiceBus. You can find more details about this issue [here](https://github.com/hashicorp/terraform-provider-azurerm/issues/20718).
4+
5+
For additional information about provider development, please refer to the [Plugin Framework documentation](https://developer.hashicorp.com/terraform/plugin).
6+
7+
You can find more documentation in the [docs](/docs/) folder. The documentation is structured as described [here](https://developer.hashicorp.com/terraform/registry/providers/docsa).

0 commit comments

Comments
 (0)