Skip to main content

Your Azure

BeaconTower keeps some state outside the cluster, in your own Azure subscription. This is the only cloud dependency: no BeaconTower account, no shared tenant, nothing of ours in the path.

btk3s az login       # the Azure CLI, in the toolchain container
btk3s cloud up # create everything, about 15 minutes

cloud up plans first, then applies. It is safe to re-run: it converges what is there rather than creating a second copy, and it handles the two Azure answers that would otherwise stop you - a name still being released after a delete, and a resource that exists but is not in the state file.

What you need​

  • A subscription you control, and Contributor on it or on the resource group. No service principal, no Entra ID rights: the tenant's secrets reach the cluster through Vault, which External Secrets authenticates to with a Kubernetes ServiceAccount token.
  • Your values in azure/terraform/terraform.tfvars - subscription, resource group, key vault name, location. btk3s init writes it from your answers (--location sets the region).

What it creates​

One resource group holding eight resources:

ResourceWhat uses it
Key Vaultthe tenant's certificates and the credentials up mints
Cosmos DB (GlobalDocumentDB)core-management's document store
Service Bus namespace (Standard)commands and events between services
Event Hubs namespace (Standard)the telemetry ingress path
4 storage accountscore, timeseries, IoT and backup; the IoT one is created even though btk3s creates no IoT Hub

Cosmos DB is most of the 15 minutes; the rest come up in about two.

Check what you have at any time:

btk3s doctor cloud    # subscription, providers, quota, key vault

What it costs​

Rough order of magnitude for one idle developer tenant, not a quote: the Cosmos account and the two Standard namespaces dominate, and the storage accounts and Key Vault are pennies. Nothing scales with how many devices you simulate at this size, but an account left running costs whether or not k3s is on.

Stopping k3s does not stop the Azure charges - the cluster is on your machine, these resources are not. To stop paying, destroy them.

Removing it​

btk3s cloud destroy         # asks first; --yes skips the prompt

It destroys the resource group's contents and purges the Key Vault, so a soft-deleted vault does not block the next cloud up with the same name. That is deliberate and it is not reversible: the certificates and credentials in it are gone, and the tenant's data with them.

To come back afterwards:

btk3s cloud up
btk3s up

allowing an hour: Cosmos again, then a full tenant bringup.

When it goes wrong​

  • cannot reach subscription - btk3s az login and check the subscription id in terraform.tfvars.
  • Microsoft.DocumentDB is not Registered - the resource provider has never been used in this subscription. az provider register -n Microsoft.DocumentDB once, then cloud up again.
  • Cosmos fails to create and no Cosmos account has ever existed here - region capacity for your subscription, not anything btk3s did. doctor warns about this before you start. See aka.ms/cosmosdbquota.
  • A name is still reserved after a destroy. Azure holds Cosmos and Key Vault names for a while; cloud up handles the common case. Otherwise, for Cosmos, change suffix in terraform.tfvars: it renames Cosmos, the namespaces and the storage accounts, so keep it to the length init allowed. For the Key Vault, change keyvault_name: the vault is named by that value alone, so suffix does not change it.