Deploy and specify application variables
Spin supports application variables. Instead of being static, their values can be updated without modifying the application, creating a simpler experience for rotating secrets, updating API endpoints, and more.
If this is the first time you're deploying a Spin application or you don't want to specify application variables go to the Quickstart guide. It'll walk you through the process of creating a new Spin application, using JavaScript, TypeScript, or Rust, and deploying it to Akamai Functions.
For example, consider a Spin application with the following variable declaration as part of the application manifest (spin.toml).
[variables]
compression_level = { default = "1" }When deploying the Spin application to Akamai Functions, you can set variables by providing --variable flags and passing the key and value using the key=value format. See the following spin aka deploy command, which changes the value of the compression_level variable to 3.
In this example
spin aka deploydoes not include any code changes. It only passes new variables and will not upload a new version to the platform. It only propagates the variables changes.
spin aka deploy --variable compression_level=3Deploying updated version of app my-app in account your-account (version 1 → 2)
OK to continue? yes
Waiting for app to be ready... ready
App Routes:
- my-app: https://ec8a19d8-6d10-4056-bb69-cc864306b489.fwf.app (wildcard)
spin aka deploycan point to aspin.tomlfile by using the--fileoption.
Updated 6 days ago
