terraform-deploy-provider icon indicating copy to clipboard operation
terraform-deploy-provider copied to clipboard

How to use and publish to the registry

Open willem-haring opened this issue 2 years ago • 2 comments
trafficstars

Is there a plan to better document the usage and any plans to publish to the terraform registry as a provider?

willem-haring avatar Dec 07 '22 12:12 willem-haring

I have yet to get the current, undocumented way of using this working yet, but here are some notes on what I think is needed.

  1. Download the zip of the binary for your OS platform architecture from https://github.com/denoland/terraform-deploy-provider/releases and unzip it
  2. Touch create a .terraformrc in the specifically designated directory for your OS (see https://developer.hashicorp.com/terraform/cli/config/config-file)
  3. Fill it out so it doesn't look to the Terraform registry for the provider binary, but instead looks at your local filesystem, in particular the path to the binary (see https://developer.hashicorp.com/terraform/cli/config/config-file#provider-installation)

In theory this should be enough to get terraform init to work I think, but I haven't succeeded so far.

I sort of wonder how easy it would be to publish a fork of this to the Terraform registry just to get a feel for what the blockers are.

Grunet avatar Apr 02 '23 17:04 Grunet

Somehow I set this up with different steps, I didn't make a .terraformrc to do it.

I put the binary at ~/.terraform.d/plugins/terraform.local/denoland/deploy/0.3.1/linux_amd64/terraform-provider-deploy_v0.3.1 and then added this block to my configuration directory:

terraform {
  required_providers {
    deploy = {
      source  = "terraform.local/denoland/deploy"
      version = "0.3.1"
    }
  }
}

provider "deploy" {
  api_token = "ddp_..........."
}

But seriously this should be on the registry, I'd assume that the existing binary is fine and it's maybe a bit of a code-signing concern to properly publish a build to the registry.

danopia avatar Apr 02 '23 19:04 danopia