fn::final
The fn::final built-in function marks a value as final, preventing child environments from overriding it. If a child environment attempts to override a final value, the value is not overridden and a validation warning is raised.
Declaration
fn::final: value
Parameters
| Property | Type | Description |
|---|---|---|
value | any | The value to mark as final. |
Returns
The original value, marked as final so that it cannot be overridden by child environments.
Example
Parent environment (myproj/parent)
values:
frozen:
fn::final: frozen_value
not_final: plain_value
Child environment (myproj/child)
imports:
- myproj/parent
values:
frozen: overridden # Warning, cannot override final value
not_final: new_value # OK
Evaluated result
{
"frozen": "frozen_value",
"not_final": "new_value"
}
Thank you for your feedback!
If you have a question about how to use Pulumi, reach out in Community Slack.
Open an issue on GitHub to report a problem or suggest an improvement.