Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: openfga/terraform-provider-openfga
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.3.2
Choose a base ref
...
head repository: openfga/terraform-provider-openfga
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing with 4,781 additions and 278 deletions.
  1. +2 −0 .github/CODEOWNERS
  2. +1 −1 .github/workflows/pr.yml
  3. +4 −4 .github/workflows/release.yml
  4. +21 −0 .github/workflows/semgrep.yaml
  5. +5 −5 .github/workflows/test.yml
  6. +27 −12 .golangci.yml
  7. +1 −1 .goreleaser.yml
  8. +52 −32 CHANGELOG.md
  9. +178 −21 LICENSE
  10. +3,736 −0 NOTICE.txt
  11. +462 −2 README.md
  12. +74 −0 RELEASES.md
  13. +8 −8 docs/index.md
  14. +3 −3 examples/provider/provider.tf
  15. +39 −35 go.mod
  16. +89 −83 go.sum
  17. +1 −1 internal/provider/acceptance/helpers.go
  18. +1 −1 internal/provider/authorizationmodel/authorization_model_data_source_test.go
  19. +1 −1 internal/provider/authorizationmodel/authorization_model_document_data_source_test.go
  20. +1 −1 internal/provider/authorizationmodel/authorization_model_resource_test.go
  21. +3 −2 internal/provider/authorizationmodel/authorization_models_data_source_test.go
  22. +45 −45 internal/provider/provider.go
  23. +1 −1 internal/provider/query/check_query_data_source_test.go
  24. +1 −1 internal/provider/query/check_query_model.go
  25. +1 −1 internal/provider/query/list_objects_query_data_source_test.go
  26. +2 −1 internal/provider/query/list_objects_query_model.go
  27. +1 −1 internal/provider/query/list_users_query_data_source_test.go
  28. +2 −1 internal/provider/query/list_users_query_model.go
  29. +1 −1 internal/provider/relationshiptuple/relationship_tuple_data_source_test.go
  30. +1 −1 internal/provider/relationshiptuple/relationship_tuple_resource_test.go
  31. +3 −2 internal/provider/relationshiptuple/relationship_tuples_data_source_test.go
  32. +1 −1 internal/provider/store/store_data_source_test.go
  33. +2 −1 internal/provider/store/store_resource_test.go
  34. +2 −1 internal/provider/store/stores_data_source_test.go
  35. +2 −2 main.go
  36. +1 −1 templates/index.md.tmpl
  37. +4 −2 tools/go.mod
  38. +2 −2 tools/go.sum
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* @openfga/dx @openfga/contrib-sdks
README.md @openfga/product @openfga/community @openfga/dx @openfga/contrib-sdks
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ jobs:
pull-requests: write
steps:
- name: PR Conventional Commit Validation
uses: ytanikin/pr-conventional-commits@1.4.1
uses: ytanikin/pr-conventional-commits@8267db1bacc237419f9ed0228bb9d94e94271a1d # v1.4.1
with:
task_types: '["feat","fix","docs","test","refactor","ci","perf","chore","revert"]'
add_scope_label: 'true'
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -27,18 +27,18 @@ jobs:
with:
# Allow goreleaser to access older tag information.
fetch-depth: 0
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version-file: 'go.mod'
cache: true
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0
uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0
id: import_gpg
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 # v6.2.1
uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.3.0
with:
args: release --clean
env:
21 changes: 21 additions & 0 deletions .github/workflows/semgrep.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Semgrep

on:
push:
branches:
- main

jobs:
semgrep:
name: Scan
runs-on: ubuntu-latest
container:
image: returntocorp/semgrep
if: (github.actor != 'dependabot[bot]' && github.actor != 'snyk-bot')
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- run: semgrep ci --no-suppress-errors
env:
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -14,14 +14,14 @@ jobs:
timeout-minutes: 5
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version-file: 'go.mod'
cache: true
- run: go mod download
- run: go build -v .
- name: Run linters
uses: golangci/golangci-lint-action@2226d7cb06a077cd73e56eedd38eecad18e5d837 # v6.5.0
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
with:
version: latest

@@ -30,7 +30,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version-file: 'go.mod'
cache: true
@@ -59,7 +59,7 @@ jobs:
- '1.8.4'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version-file: 'go.mod'
cache: true
@@ -86,6 +86,6 @@ jobs:
- test
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
with:
jobs: ${{ toJSON(needs) }}
39 changes: 27 additions & 12 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,42 @@
# Visit https://golangci-lint.run/ for usage documentation
# and information on other useful linters
issues:
max-issues-per-linter: 0
max-same-issues: 0

version: "2"
linters:
disable-all: true
default: none
enable:
- copyloopvar
- durationcheck
- errcheck
- copyloopvar
- forcetypeassert
- godot
- gofmt
- gosimple
- govet
- ineffassign
- makezero
- misspell
- nilerr
- predeclared
- staticcheck
- tenv
- unconvert
- unparam
- unused
- govet
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
issues:
max-issues-per-linter: 0
max-same-issues: 0
formatters:
enable:
- gofmt
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ builds:
goarch: '386'
binary: '{{ .ProjectName }}_v{{ .Version }}'
archives:
- format: zip
- formats: zip
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
checksum:
extra_files:
84 changes: 52 additions & 32 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,69 @@
## 0.3.2 (March 10, 2025)
## [0.5.0] - 2025-06-06

BUG FIXES:
### Breaking Changes

* data_source/authorization_model: Fixed nil pointer for non-existing latest authorization model
* data_source/\*_query: Added missing documentation
- provider: Renamed `scopes` to `api_scopes`, `audience` to `api_audience` and `token_endpoint_url` to `api_token_issuer`. Changed environment variable names accordingly.

## 0.3.1 (February 27, 2025)
### Fixed

BUG FIXES:
- goreleaser: Changed deprecated `archives.format` field to `archives.formats`.

* data_source/authorization_model_document: Fixed broken module file names
## [0.4.0] - 2025-06-05

## 0.3.0 (February 27, 2025)
### Notes

FEATURES:
- This is the first release as the **official Terraform provider** in the **OpenFGA organization**. Thank you to everyone who made this possible 🎉

* data_source/authorization_model_document: Added support for modular models
### Security

## 0.2.1 (February 22, 2025)
- provider: Updated terraform provider SDK

BUG FIXES:
## [0.3.2] - 2025-03-10

* docs: Fixed missing provider attributes
### Fixed

## 0.2.0 (February 22, 2025)
- data_source/authorization_model: Fixed nil pointer for non-existing latest authorization model
- data_source/\*_query: Added missing documentation

FEATURES:
## [0.3.1] - 2025-02-27

* provider: Added `scopes` and `audience` attributes
### Fixed

## 0.1.0 (February 19, 2025)
- data_source/authorization_model_document: Fixed broken module file names

FEATURES:
## [0.3.0] - 2025-02-27

* provider: Provider added
* resource/store: Resource added
* data_source/store: Data source added
* data_source/stores: Data source added
* resource/authorization_model Resource added
* data_source/authorization_model: Data source added
* data_source/authorization_models: Data source added
* data_source/authorization_model_document: Data source added
* resource/relationship_tuple Resource added
* data_source/relationship_tuple: Data source added
* data_source/relationship_tuples: Data source added
* data_source/check_query: Data source added
* data_source/list_objects_query: Data source added
* data_source/list_users_query: Data source added
### Added

- data_source/authorization_model_document: Added support for modular models

## [0.2.1] - 2025-02-22

### Fixed

- docs: Fixed missing provider attributes

## [0.2.0] - 2025-02-22

### Added

- provider: Added `scopes` and `audience` attributes

## [0.1.0] - 2025-02-19

### Added

- provider: Provider added
- resource/store: Resource added
- data_source/store: Data source added
- data_source/stores: Data source added
- resource/authorization_model Resource added
- data_source/authorization_model: Data source added
- data_source/authorization_models: Data source added
- data_source/authorization_model_document: Data source added
- resource/relationship_tuple Resource added
- data_source/relationship_tuple: Data source added
- data_source/relationship_tuples: Data source added
- data_source/check_query: Data source added
- data_source/list_objects_query: Data source added
- data_source/list_users_query: Data source added
Loading