From c76ec533a0e585e71c68f3d9c0b5dbb7eb4a1b28 Mon Sep 17 00:00:00 2001 From: Devanshu Tanna Date: Thu, 11 Apr 2024 13:07:41 +0530 Subject: [PATCH] Make `kong_consumer_key_auth` Resource Improbable (#154) * feat: make the kong_consumer_key_auth resource importable * chore: update the workflow to use crazy-max's action for pgp and another linting fix release workflow --- .github/workflows/release.yml | 8 ++++---- .goreleaser.yml | 4 +++- kong/resource_kong_consumer_key_auth.go | 3 +++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 05d13a5..c0f063f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,11 +32,11 @@ jobs: - name: Import GPG key id: import_gpg - uses: hashicorp/ghaction-import-gpg@v2.1.0 - env: + uses: crazy-max/ghaction-import-gpg@v6.1.0 + with: # These secrets will need to be configured for the repository: - GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} - PASSPHRASE: ${{ secrets.PASSPHRASE }} + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.PASSPHRASE }} - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2.5.0 diff --git a/.goreleaser.yml b/.goreleaser.yml index 826e1b3..04a98e7 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -28,6 +28,8 @@ builds: ignore: - goos: darwin goarch: '386' + - goos: windows + goarch: 'arm64' binary: '{{ .ProjectName }}_v{{ .Version }}' archives: - format: zip @@ -47,7 +49,7 @@ signs: - "${signature}" - "--detach-sign" - "${artifact}" -release: +# release: # If you want to manually examine the release before its live, uncomment this line: # draft: true changelog: diff --git a/kong/resource_kong_consumer_key_auth.go b/kong/resource_kong_consumer_key_auth.go index febbd5d..6528c03 100644 --- a/kong/resource_kong_consumer_key_auth.go +++ b/kong/resource_kong_consumer_key_auth.go @@ -15,6 +15,9 @@ func resourceKongConsumerKeyAuth() *schema.Resource { ReadContext: resourceKongConsumerKeyAuthRead, DeleteContext: resourceKongConsumerKeyAuthDelete, UpdateContext: resourceKongConsumerKeyAuthUpdate, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "consumer_id": { Type: schema.TypeString,