code: func (n *EvalApplyProvisioners) filterProvisioners() []*configs.Provisioner {
  	// Fast path the zero case
  	if n.ResourceConfig == nil || n.ResourceConfig.Managed == nil {
  		return nil
  	}
  
  	if len(n.ResourceConfig.Managed.Provisioners) == 0 {
  		return nil
  	}
  
  	result := make([]*configs.Provisioner, 0, len(n.ResourceConfig.Managed.Provisioners))
  	for _, p := range n.ResourceConfig.Managed.Provisioners {
  		if p.When == n.When {
  			result = append(result, p)
  		}
  	}
  
  	return result
  }
docs: // filterProvisioners filters the provisioners on the resource to only
  // the provisioners specified by the "when" option.