Unable to publish terraform provider to registry

I’m trying to publish the following release

I created this release using goreleaser from the following documentation-

But I can’t post, I’m receiving an error.

Any ideas what’s wrong?

I ran into the same issue when attempting to publish my first provider the other night as well. I had installed the GitHub workflow action as suggested but that wasn’t quite all there was to do. The missing piece I found was the .goreleaser.yml in the root directory of the repository. I found the example inside the hashicorp/terraform-provider-scaffolding repository.

The secret sauce as I found out was that the Registry is looking for the SHA256SUMS and detached signature file that goreleaser wasn’t creating by default. The specific part in the
.goreleaser.yml that handled this was:

  name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
  algorithm: sha256
  - artifacts: checksum
      # if you are using this in a GitHub action or some other automated pipeline, you 
      # need to pass the batch flag to indicate its not interactive.
      - "--batch"
      - "--local-user"
      - "{{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key
      - "--output"
      - "${signature}"
      - "--detach-sign"
      - "${artifact}"

Hope that helps.

1 Like

Thank you! That helped, works great now.

1 Like

Don’t mention it @JonWoodlief I wrecked my brain until 2-3 in the morning trying to figure it out myself. Ultimately I went back and started from a fresh repo using the hashicorp/terraform-provider-scaffolding as a template repo but saw you were already working from something and I was started from a greenfield.

1 Like