From 5747d8d5266522d2ea8b47e88b9b21c361abf65e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 May 2025 14:44:58 +0100 Subject: [PATCH 1/4] Bump actions/setup-go from 5.4.0 to 5.5.0 in the github-actions-backward-compatible group (#161) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 340fec3..2beee95 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -43,7 +43,7 @@ jobs: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Set up Go - uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0 + uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 with: go-version: ${{ matrix.go }} - name: Go mod download From 93e144b03171114aff84a4e8814914fc71952756 Mon Sep 17 00:00:00 2001 From: Nara Kasbergen Kwon <855115+xiehan@users.noreply.github.com> Date: Wed, 14 May 2025 19:16:28 +0200 Subject: [PATCH 2/4] github: Add PR template with required fields for PCI compliance (#162) --- .github/pull_request_template.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..38e8ce7 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,16 @@ +## Related Issue + +Fixes # + +## Description + +In plain English, describe your approach to addressing the issue linked above. For example, if you made a particular design decision, let us know why you chose this path instead of another solution. + + +## Rollback Plan + +- [ ] If a change needs to be reverted, we will roll out an update to the code within 7 days. + +## Changes to Security Controls + +Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain. From 5aa707b9c44b3e57b079d6576c6aea83423c5e6a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 May 2025 10:10:40 +0100 Subject: [PATCH 3/4] Bump github.com/zclconf/go-cty from 1.16.2 to 1.16.3 (#163) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index b8afe3a..7dfa65d 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/hashicorp/terraform-json -go 1.18 +go 1.21 require ( github.com/davecgh/go-spew v1.1.1 @@ -8,7 +8,7 @@ require ( github.com/hashicorp/go-version v1.7.0 github.com/mitchellh/copystructure v1.2.0 github.com/sebdah/goldie v1.0.0 - github.com/zclconf/go-cty v1.16.2 + github.com/zclconf/go-cty v1.16.3 github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b ) diff --git a/go.sum b/go.sum index d8b709c..bb0f3a8 100644 --- a/go.sum +++ b/go.sum @@ -27,8 +27,8 @@ github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0 github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= -github.com/zclconf/go-cty v1.16.2 h1:LAJSwc3v81IRBZyUVQDUdZ7hs3SYs9jv0eZJDWHD/70= -github.com/zclconf/go-cty v1.16.2/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= +github.com/zclconf/go-cty v1.16.3 h1:osr++gw2T61A8KVYHoQiFbFd1Lh3JOCXc/jFLJXKTxk= +github.com/zclconf/go-cty v1.16.3/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b h1:FosyBZYxY34Wul7O/MSKey3txpPYyCqVO5ZyceuQJEI= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= From c8242273df822bbc6cec6515d6edc9412c83928a Mon Sep 17 00:00:00 2001 From: Anubhav Goel Date: Wed, 13 Aug 2025 11:04:45 +0530 Subject: [PATCH 4/4] Added: support for list resource (#165) --- schemas.go | 3 +++ schemas_test.go | 3 +++ testdata/list_resources/schemas.json | 1 + 3 files changed, 7 insertions(+) create mode 100644 testdata/list_resources/schemas.json diff --git a/schemas.go b/schemas.go index 3073d9d..dad47e7 100644 --- a/schemas.go +++ b/schemas.go @@ -95,6 +95,9 @@ type ProviderSchema struct { // The schemas for resources identities in this provider. ResourceIdentitySchemas map[string]*IdentitySchema `json:"resource_identity_schemas,omitempty"` + + // The schemas for any list resources in this provider. + ListResourceSchemas map[string]*Schema `json:"list_resource_schemas,omitempty"` } // Schema is the JSON representation of a particular schema diff --git a/schemas_test.go b/schemas_test.go index 56d45d3..59b9c7f 100644 --- a/schemas_test.go +++ b/schemas_test.go @@ -28,6 +28,9 @@ func TestProviderSchemasValidate(t *testing.T) { "a provider schema including resource identity schemas is validated": { testDataPath: "testdata/identity/schemas.json", }, + "a provider schema including list resource schemas is validated": { + testDataPath: "testdata/list_resources/schemas.json", + }, } for tn, tc := range cases { diff --git a/testdata/list_resources/schemas.json b/testdata/list_resources/schemas.json new file mode 100644 index 0000000..9edb520 --- /dev/null +++ b/testdata/list_resources/schemas.json @@ -0,0 +1 @@ +{"format_version":"0.1","provider_schemas":{"registry.terraform.io/hashicorp/null":{"provider":{"version":0,"block":{"description_kind":"plain"}},"list_resource_schemas":{"null_resource":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"triggers":{"type":["map","string"],"description_kind":"plain","optional":true}},"description_kind":"plain"}}}}}}