terraform: update hooks to use InstanceState