Skip to content

postfinance/terraform-registry

Repository files navigation

GitHub release (latest SemVer) Software License Build Go Report Card

terraform-registry

Table of Contents generated with DocToc

Definitions

Provider Registry

Protocol Versions

This is about the Terraform provider API versions:

see this Reddit post for details

Acceptance Testing

For Artifactory acceptance testing set:

export ARTIFACTORY_BASE_URL=
export ARTIFACTORY_USERNAME=
export ARTIFACTORY_PASSWORD=

Tests

Service discovery

curl -s http://localhost:8080/.well-known/terraform.json | jq
{
  "providers.v1": "/v1/providers"
}

Provider versions

curl -s ttp://localhost:8080/v1/providers/postfinance/example/versions | jq
{
  "versions": [
    {
      "version": "0.0.1",
      "protocols": [
        "5.0"
      ],
      "platforms": [
        {
          "os": "linux",
          "arch": "amd64"
        }
      ]
    },
    {
      "version": "1.1.9",
      "protocols": [
        "5.0"
      ],
      "platforms": [
        {
          "os": "linux",
          "arch": "amd64"
        }
      ]
    }
  ]
}

Provider download

curl -s http://localhost:8080/v1/providers/postfinance/example/0.0.1/download/linux/amd64 | jq
{
  "protocols": [
    "5.0"
  ],
  "os": "linux",
  "arch": "amd64",
  "filename": "terraform-provider-example_linux_x86_64-0.0.1.zip",
  "download_url": "https://repo.example.com/artifactory/generic/terraform/providers/terraform-provider-example/terraform-provider-example_linux_x86_64-0.0.1.zip",
  "shasums_url": "https://repo.example.com/artifactory/generic/terraform/providers/terraform-provider-example/terraform-provider-example_0.0.1_SHA256SUMS.txt",
  "shasums_signature_url": "https://repo.example.com/artifactory/generic/terraform/providers/terraform-provider-example/terraform-provider-example_0.0.1_SHA256SUMS.txt.sig",
  "shasum": "d7dddb0a94c4388e4e3bf5f68faea18c46eab8aaceaec8954b269a4a29f13c29",
  "signing_keys": {
    "gpg_public_keys": [
      {
        "key_id": "C1C252F5499702CB",
        "ascii_armor": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n ... -----END PGP PUBLIC KEY BLOCK-----\n"
      }
    ]
  }
}```