diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 47c06001..83cb5d15 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,8 +34,9 @@ jobs: - name: Run GoReleaser uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0 with: - args: release --clean + args: release --clean ${{ env.SIGNING_DISABLED == 'true' && '--skip sign' }} env: # GitHub sets the GITHUB_TOKEN secret automatically. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} + GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} + SIGNING_DISABLED: 'true' diff --git a/internal/provider/datasources/data_source_cluster_options_test.go b/internal/provider/datasources/data_source_cluster_options_test.go index e5952725..236c1527 100644 --- a/internal/provider/datasources/data_source_cluster_options_test.go +++ b/internal/provider/datasources/data_source_cluster_options_test.go @@ -2,6 +2,7 @@ package datasources_test import ( "fmt" + "regexp" "testing" "github.com/astronomer/astronomer-terraform-provider/internal/utils" @@ -18,6 +19,10 @@ func TestAcc_DataSourceClusterOptions(t *testing.T) { }, ProtoV6ProviderFactories: astronomerprovider.TestAccProtoV6ProviderFactories, Steps: []resource.TestStep{ + { + Config: astronomerprovider.ProviderConfig(t, true) + clusterOptions("invalid", "AWS"), + ExpectError: regexp.MustCompile(`type value must be one of`), + }, { Config: astronomerprovider.ProviderConfig(t, true) + clusterOptions("HYBRID", "AWS"), Check: resource.ComposeTestCheckFunc( diff --git a/internal/provider/schemas/cluster_options.go b/internal/provider/schemas/cluster_options.go index eaf771f1..b633e71f 100644 --- a/internal/provider/schemas/cluster_options.go +++ b/internal/provider/schemas/cluster_options.go @@ -82,6 +82,12 @@ func ClusterOptionsDataSourceSchemaAttributes() map[string]schema.Attribute { }, "type": schema.StringAttribute{ Required: true, + Validators: []validator.String{ + stringvalidator.OneOf( + string(platform.ClusterTypeDEDICATED), + string(platform.ClusterTypeHYBRID), + ), + }, }, "cloud_provider": schema.StringAttribute{ Optional: true,