There has been some confusion over why creating or modifying variables in a versioned flow do not trigger local changes in the flow.
Will improve the relevant section in the User Guide (https://nifi.apache.org/docs/nifi-docs/html/user-guide.html#managing_local_changes) with the following clarifications:
Modifying doesn’t trigger local changes because variable values are intended to be different in each environment. When a flow is imported to an environment, it is assumed there is a one-time operation required to set those variables specific for the given environment.
Creating a variable doesn’t trigger a local change because just creating a variable on its own has not changed anything about what the flow processes. A component will have to be created/modified that uses the new variable, which will trigger a local change.