brandonc / help-private-provider

A set of scripts and prompts to help me remember how to upload a terraform provider to a private registry

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create & Upload a Private Provider (Sorta)

This is half-automated, half do-nothing set of scripts to assist in uploading a single linux platform provider to a private registry in Terraform Cloud.

Prerequisite Assets

  1. A pgp signing key which is used to sign the provider you want to register. You can generate a signing key using these instructions. The public key should be exported in ASCII-armor format.

  2. The linux/amd64 provider binary, SHA256SUMS, and SHA256SUMS.sig files. These are usually generated by goreleaser. I find it easy to generate these on Github Actions using the scaffolding workflow configured with the exported secret key from prerequisite 1.

Steps:

Visit each directory in order and perform the following instructions.

01-gpg-key

Copy your exported public signing key to 01-gpg-key/my_key.pgp and terraform init / terraform apply to create the key on the private registry.

Now would be a good time to edit config_example and copy to .secret_config. Make sure you also copy the Key ID terraform output into KEY_ID.

$ cp config_example .secret_config

02-provider-create

Run ./script.sh and follow the instructions

03-version-create

Run ./script.sh and follow the instructions

04-provider-sha

Run ./script.sh and follow the instructions

05-platform-upload

Run ./script.sh <SHA256SUM> and follow the instructions

About

A set of scripts and prompts to help me remember how to upload a terraform provider to a private registry

License:Mozilla Public License 2.0


Languages

Language:Shell 94.7%Language:HCL 5.3%