https://github.com/devigned/spin-workload-id
Azure Workload ID test
https://github.com/devigned/spin-workload-id
Last synced: 5 days ago
JSON representation
Azure Workload ID test
- Host: GitHub
- URL: https://github.com/devigned/spin-workload-id
- Owner: devigned
- License: mit
- Created: 2024-06-06T16:54:42.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-18T15:18:30.000Z (almost 2 years ago)
- Last Synced: 2026-01-29T22:34:39.603Z (about 2 months ago)
- Language: HCL
- Size: 30.3 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Spin Workload Identity Demonstration
This project provides a demonstration of Spin's Key / Value store integration using Azure Workload Identity to access an Azure Cosmos DB instance. Not all this code is currently in the Spin repository, but it is intended to be merged in the future.
We will create a native image of Spin that includes the necessary changes to support Azure Workload Identity. We will then deploy a Kubernetes cluster in Azure, deploy the Spin image to the cluster, and demonstrate that Spin can access the Cosmos DB instance using the Azure Workload Identity credentials.
## To run this sample
To run this sample, you'll need the following prerequisites:
- [Terraform](https://www.terraform.io/downloads.html)
- [Docker](https://docs.docker.com/get-docker/)
- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/)
- [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli)
### Building the Spin image
This is assuming you have the Spin source code in a directory similar to the way spin is referenced below. This also includes some changes to the Spin runtime to discover Azure Workload Identity credentials via process environment variables.
```bash
docker buildx build --push --platform linux/amd64 . -t devigned/spin-kv-test:0.0.12 --build-context spin=../../fermyon/spin
```
### Deploying the infrastructure
```bash
terraform apply -var 'location=westus3' -var 'prefix=test' -auto-approve
```