Skip to content

Rename RESTATE_API_KEY env var to RESTATE_AUTH_TOKEN - #389

Merged
slinkydeveloper merged 1 commit into
mainfrom
pavel/rename-restate-api-key-to-auth-token
Sep 2, 2026
Merged

Rename RESTATE_API_KEY env var to RESTATE_AUTH_TOKEN#389
slinkydeveloper merged 1 commit into
mainfrom
pavel/rename-restate-api-key-to-auth-token

Conversation

@pcholakov

@pcholakov pcholakov commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Use RESTATE_AUTH_TOKEN everywhere for consistency, based on customer feedback.

Summary

  • Renames the RESTATE_API_KEY environment variable to RESTATE_AUTH_TOKEN across the five CDK Lambda examples (TypeScript, Go, Java, Kotlin, Python), the Next.js template, and the integration test runner.
  • The Restate CLI and the docs/UI consistently use RESTATE_AUTH_TOKEN for the API key already; only these examples were the outlier. A customer flagged the inconsistency between docs pages and tooling, which surfaced when configuring deployments end-to-end.

Files touched

  • typescript/integrations/deployment-lambda-cdk/{lib/lambda-ts-cdk-stack.ts,README.md}
  • go/integrations/go-lambda-cdk/{cdk/go-lambda-cdk-stack.ts,README.md}
  • java/integrations/java-gradle-lambda-cdk/{cdk/lambda-jvm-cdk-stack.ts,README.md}
  • kotlin/integrations/kotlin-gradle-lambda-cdk/{cdk/lambda-jvm-cdk-stack.ts,README.md}
  • python/integrations/deployment-lambda-cdk/{lib/lambda-python-stack.ts,README.md}
  • typescript/templates/nextjs/app/actions.ts
  • .tools/run_node_tests.sh

This is a straight rename with no backward compatibility shim: callers must update their environment to use the new variable name.

Test plan

  • CI builds for all five CDK examples pass with RESTATE_AUTH_TOKEN=key_test (the test runner was updated to set the new name)
  • Manual cdk synth of the TypeScript stack with RESTATE_AUTH_TOKEN set produces a valid template
  • Stack now fails with the expected error message when neither RESTATE_ENV_ID nor RESTATE_AUTH_TOKEN are set
  • Companion docs PR in restatedev/docs-restate is merged so the CDK code block on docs/cloud/connecting-services stays in sync

@pcholakov

Copy link
Copy Markdown
Contributor Author

CI checks are failing for unrelated reason, addressed by #390

@slinkydeveloper
slinkydeveloper merged commit f339b97 into main Sep 2, 2026
13 of 15 checks passed
@slinkydeveloper
slinkydeveloper deleted the pavel/rename-restate-api-key-to-auth-token branch September 2, 2026 09:35
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants