Fixes #8226 - Support environment variables on creation