A variable is used for efficiently retrieving a value from an environment.

The variable interface has a single function that accepts an environment parameter and returns a typed value. Because a variable is created at the provider level and not the context it can be reused across environments and referenced as a constant or static field.