- A Temporal Cloud account with API keys enabled.
- A namespace with API key authentication enabled (Allow API Key authentication). * Note the gRPC endpoint for the namespace.
- An API key for Namespace authentication.
- Create a service account that has writer or namespace administrator access to a namespace that has API key authentication enabled.
- Create an API key for the service account.
- Start the worker
go run ./worker -namespace <namespace> -grpcEndpoint <grpcEndpoint> -apikey <apikey>
- Run a workflow
go run ./starter -namespace <namespace> -grpcEndpoint <grpcEndpoint> -apikey <apikey>
- Create 2 API keys (
apikey1
andapikey2
) - Start the worker using
apikey1
go run ./worker -namespace <namespace> -grpcEndpoint <grpcEndpoint> -apikey <apikey1>
- Run a workflow using
apikey2
go run ./starter -namespace <namespace> -grpcEndpoint <grpcEndpoint> -apikey <apikey2>
- Disable
key1
tcld apikey disable --id <key1 id>
- Wait for the worker to fail pollings (
WARN Failed to poll for task.
) - Run a workflow using
apikey2
go run ./starter -namespace <namespace> -grpcEndpoint <grpcEndpoint> -apikey <apike21>
Note the work flow doesn't progress.
7. Update the worker so that it uses apikey2
(which is still enabled)
curl -X PUT http://localhost:3333/ -d 'apikey2'
- The workflow will now complete.