When the example is deployed, the custom resolvers are used to resolve values for the stack parameters.
See the complete example at GitHub.
The example consists of the following files:
There is a single stack whose configuration is given in stacks/stack.yml file with the following contents:
The stack has two parameters: Timestamp and Name. Values for the parameters are resolved using custom resolvers.
In an implementation file, a provider object must be exported. The provider object has name which is used to refer to the resolver in stack configuration files using resolver property, and init function that is used to initialize and return the resolver object. Finally, when the stack is deployed, the actual parameter value is resolved using resolve function of the resolver object. For the other properties, see custom resolvers documentation.
The timestamp resolver returns the current timestamp.
The uppercase resolver converts the given name property value to uppercase.
To deploy the example stack, run command:
To remove the created stack, run command:
Find more information from the documentation: