Skip to content

Commit 1d2f2bd

Browse files
Fix provider behavior, docs, and lint issues
1 parent 83508dd commit 1d2f2bd

File tree

88 files changed

+9456
-1
lines changed

Some content is hidden

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

88 files changed

+9456
-1
lines changed

.copywrite.hcl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
schema_version = 1
2+
3+
project {
4+
license = "MPL-2.0"
5+
copyright_year = 2021
6+
7+
header_ignore = [
8+
# examples used within documentation (prose)
9+
"examples/**",
10+
11+
# GitHub issue template configuration
12+
".github/ISSUE_TEMPLATE/*.yml",
13+
14+
# golangci-lint tooling configuration
15+
".golangci.yml",
16+
17+
# GoReleaser tooling configuration
18+
".goreleaser.yml",
19+
]
20+
}

.env.example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Kinde API credentials
2+
# Copy this file to .env and fill in your values
3+
KINDE_DOMAIN="https://your-domain.kinde.com"
4+
KINDE_AUDIENCE="https://your-domain.kinde.com/api"
5+
KINDE_CLIENT_ID="your-client-id"
6+
KINDE_CLIENT_SECRET="your-client-secret"

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* @kinde-oss/giants-kinde
2+
package.json @kinde-oss/sdk-engineers
3+
**/package.json @kinde-oss/sdk-engineers

.github/CODE_OF_CONDUCT.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Code of Conduct
2+
3+
HashiCorp Community Guidelines apply to you when interacting with the community here on GitHub and contributing code.
4+
5+
Please read the full text at [HashiCorp Community Guidelines](https://www.hashicorp.com/community-guidelines).

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# See GitHub's documentation for more information on this file:
2+
# https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates
3+
version: 2
4+
updates:
5+
- package-ecosystem: "gomod"
6+
directory: "/"
7+
schedule:
8+
interval: "daily"
9+
- package-ecosystem: "github-actions"
10+
directory: "/"
11+
schedule:
12+
interval: "daily"
13+
# TODO: Dependabot only updates hashicorp GHAs in the template repository, the following lines can be removed for consumers of this template
14+
allow:
15+
- dependency-name: "hashicorp/*"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# DO NOT EDIT - This GitHub Workflow is managed by automation
2+
# https://github.com/hashicorp/terraform-devex-repos
3+
name: Issue Comment Triage
4+
5+
on:
6+
issue_comment:
7+
types: [created]
8+
9+
jobs:
10+
issue_comment_triage:
11+
runs-on: ubuntu-latest
12+
env:
13+
# issue_comment events are triggered by comments on issues and pull requests. Checking the
14+
# value of github.event.issue.pull_request tells us whether the issue is an issue or is
15+
# actually a pull request, allowing us to dynamically set the gh subcommand:
16+
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issue_comment-on-issues-only-or-pull-requests-only
17+
COMMAND: ${{ github.event.issue.pull_request && 'pr' || 'issue' }}
18+
GH_TOKEN: ${{ github.token }}
19+
steps:
20+
- name: 'Remove waiting-response on comment'
21+
run: gh ${{ env.COMMAND }} edit ${{ github.event.issue.html_url }} --remove-label waiting-response

.github/workflows/lock.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# DO NOT EDIT - This GitHub Workflow is managed by automation
2+
# https://github.com/hashicorp/terraform-devex-repos
3+
name: 'Lock Threads'
4+
5+
on:
6+
schedule:
7+
- cron: '43 20 * * *'
8+
9+
jobs:
10+
lock:
11+
runs-on: ubuntu-latest
12+
steps:
13+
# NOTE: When TSCCR updates the GitHub action version, update the template workflow file to avoid drift:
14+
# https://github.com/hashicorp/terraform-devex-repos/blob/main/modules/repo/workflows/lock.tftpl
15+
- uses: dessant/lock-threads@1bf7ec25051fe7c00bdd17e6a7cf3d7bfb7dc771 # v5.0.1
16+
with:
17+
github-token: ${{ github.token }}
18+
issue-inactive-days: '30'
19+
issue-lock-reason: resolved
20+
pr-inactive-days: '30'
21+
pr-lock-reason: resolved

.github/workflows/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Terraform Provider release workflow.
2+
name: Release
3+
4+
# This GitHub action creates a release when a tag that matches the pattern
5+
# "v*" (e.g. v0.1.0) is created.
6+
on:
7+
push:
8+
tags:
9+
- 'v*'
10+
11+
# Releases need permissions to read and write the repository contents.
12+
# GitHub considers creating releases and uploading assets as writing contents.
13+
permissions:
14+
contents: write
15+
16+
jobs:
17+
goreleaser:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
21+
with:
22+
# Allow goreleaser to access older tag information.
23+
fetch-depth: 0
24+
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
25+
with:
26+
go-version-file: 'go.mod'
27+
cache: true
28+
- name: Import GPG key
29+
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0
30+
id: import_gpg
31+
with:
32+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
33+
passphrase: ${{ secrets.PASSPHRASE }}
34+
- name: Run GoReleaser
35+
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
36+
with:
37+
args: release --clean
38+
env:
39+
# GitHub sets the GITHUB_TOKEN secret automatically.
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

.github/workflows/test.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Terraform Provider testing workflow.
2+
name: Tests
3+
4+
# This GitHub action runs your tests for each pull request and push.
5+
# Optionally, you can turn it on using a schedule for regular testing.
6+
on:
7+
pull_request:
8+
paths-ignore:
9+
- 'README.md'
10+
push:
11+
paths-ignore:
12+
- 'README.md'
13+
14+
# Testing only needs permissions to read the repository contents.
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
# Ensure project builds before running testing matrix
20+
build:
21+
name: Build
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 5
24+
steps:
25+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
26+
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
27+
with:
28+
go-version-file: 'go.mod'
29+
cache: true
30+
- run: go mod download
31+
- run: go build -v .
32+
- name: Run linters
33+
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0
34+
with:
35+
version: latest
36+
37+
generate:
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
41+
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
42+
with:
43+
go-version-file: 'go.mod'
44+
cache: true
45+
# Temporarily download Terraform 1.8 prerelease for function documentation support.
46+
# When Terraform 1.8.0 final is released, this can be removed.
47+
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
48+
with:
49+
terraform_version: '1.8.0-alpha20240216'
50+
terraform_wrapper: false
51+
- run: go generate ./...
52+
- name: git diff
53+
run: |
54+
git diff --compact-summary --exit-code || \
55+
(echo; echo "Unexpected difference in directories after code generation. Run 'go generate ./...' command and commit."; exit 1)
56+
57+
# Run acceptance tests in a matrix with Terraform CLI versions
58+
test:
59+
if: false
60+
name: Terraform Provider Acceptance Tests
61+
needs: build
62+
runs-on: ubuntu-latest
63+
timeout-minutes: 15
64+
strategy:
65+
fail-fast: false
66+
matrix:
67+
# list whatever Terraform versions here you would like to support
68+
terraform:
69+
- '1.0.*'
70+
- '1.1.*'
71+
- '1.2.*'
72+
- '1.3.*'
73+
- '1.4.*'
74+
steps:
75+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
76+
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
77+
with:
78+
go-version-file: 'go.mod'
79+
cache: true
80+
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
81+
with:
82+
terraform_version: ${{ matrix.terraform }}
83+
terraform_wrapper: false
84+
- run: go mod download
85+
- env:
86+
TF_ACC: "1"
87+
run: go test -v -cover ./internal/provider/
88+
timeout-minutes: 10

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,9 @@ coverage/
2121
# System files
2222
.DS_Store
2323

24+
# Serena mcp
25+
.serena
26+
project.yml
27+
2428
# ---------------------------------------------------------------------
2529
# Add specific rules here…

0 commit comments

Comments
 (0)