testcosmos-setup

command
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package main implements a CLI for managing the Cosmos DB database and containers used by the protosource event store. Mirrors the Dynamo-side cmd/testdynamo-setup tool but speaks the Cosmos NoSQL API.

Quickstart against the local emulator (Linux/Windows host):

docker run --rm -p 8081:8081 -p 10250-10255:10250-10255 \
  --name cosmos-emulator \
  mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator

export COSMOS_ENDPOINT=https://localhost:8081
export COSMOS_KEY='C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw=='
export COSMOS_INSECURE=1   # emulator uses a self-signed cert
testcosmos-setup create

Against a real Azure account, prefer Managed Identity (set COSMOS_USE_DEFAULT_CREDENTIAL=1) and omit COSMOS_KEY.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL