Reloading Salt grains

saltutil.sync_grains - it is module call, not state. You need run this module with state "module" https://docs.saltproject.io/en/latest/ref/states/all/salt.states.module.html#module-salt.states.module But you can just start minion only after deployng right configuration (see salt-cloud). For dynamic parametrizing best practice is pillar: https://docs.saltproject.io/en/latest/topics/tutorials/pillar.html