Background#
Over one year ago I built a custom CLI tool in Go by hand.
The purpose was twofold: (1) learn more Go, and (2) end up with a CLI-tool able to generate a terraform block with the current latest versions of specified providers, e.g.:
$ tpq azurerm random --hcl
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "4.67.0"
}
random = {
source = "hashicorp/random"
version = "3.8.1"
}
}
}
A neat little tool to solve a small and very specific problem.
I never published it anywhere. Until now! But to be transparent: this is not the same codebase. In fact, it no longer include the original functionality because in the end I never used it much.
This version of the tool has been completely worked on using an agent1.
Introducing: Terraform Provider Query#
Terraform Provider Query or tpq is a TUI tool to browse official and partner Terraform providers. It currently does not include community providers simply because they are too many and a lot of them are not active.
The list of features is modest:
Browse official and partner providers, search and filter by typing.#
The start view fetches all official and partner providers:

Type to filter the list:

See published versions of a given provider.#
Open a provider to list published versions:

See release notes for a given version of a provider.#
Open a version to read the release notes:

Open the Terraform registry documentation page for a given version of a provider.#
Press d for a selected provider version to open the Terraform registry provider documentation.
Try it out#
The source code and instructions for how to install it is available on GitHub:
Try it out if you think this could be useful for your daily Terraforming!
I want to add the ability to browse resources, data sources, etc, for a given provider. I had this feature available for a short while, but removed it for now because it is complicated to get it just right.
I am beta-testing something new (more on that in the future) and this project was a great fit to work on. ↩︎




