Petra is a lightweight tool that allows to host your own private Terraform registry using Google Cloud Storage as a storage backend.
Petra is not an official Devoteam product and is provided as-is to the community.

Server to get a terraform module versions / get a signed URL to download a module from a private registry (Google Cloud Storage bucket).
Configured by the following env vars :
- GCS_BUCKET: Bucket used to host Terraform modules
- SIGNED_URL: (Optional) Enables the use of a Signed URL for the download api routes. Defaults to false and just forwards a gcs:// link
CLI to upload / remove / upload a terraform module to a private registry (Google Cloud Storage bucket).
Example usage :
bash
petractl push --bucket tf-registry-petra ../tests/mod1
Cloud Run's service account must have the following roles:
Then terraform init:
// main.tf
module "my_module" {
source = "{CLOUD_RUN_URL}/{NAMESPACE}/{MODULE}/{PROVIDER}/{VERSION}"
}
or specify the module version separately :
// main.tf
module "my_module" {
source = "{CLOUD_RUN_URL}/{NAMESPACE}/{MODULE}/{PROVIDER}"
version = "{VERSION}"
}
Activate Workload Identity and the service account must have the following roles:
Then terraform init:
// main.tf
module "my_module" {
source = "{PETRA_SERVER}/{NAMESPACE}/{MODULE}/{PROVIDER}"
version = "{VERSION}"
}
Follow these steps if you are OK installing and using Go on your machine.
F1 -> Go: Install/Update Tools -> (select all) -> OK.The release workflow is triggered each time a tag with v prefix is pushed.
CAUTION: Make sure to understand the consequences before you bump the major version. More info: Go Wiki, Go Blog.
Remember to update Go version in .github/workflows
Notable files:
Simply create an issue or a pull request.
Take a look at GoReleaser docs as well as its repo how it is dogfooding its functionality.
$ claude mcp add petra \
-- python -m otcore.mcp_server <graph>