split depends_on validation into its own function
split depends_on validation into its own function

Only resources were validating depends_on. We can use this same block to
ensure all depends_on validation has the same output.

rnaveiras/terraform,pdecat/terraform,pdecat/terraform,ewbankkit/terraform,tommynsong/terraform,hashicorp/terraform,pdecat/terraform,apparentlymart/terraform,apparentlymart/terraform,ewbankkit/terraform,hashicorp/terraform,ewbankkit/terraform,pdecat/terraform,rnaveiras/terraform,ewbankkit/terraform,tommynsong/terraform,apparentlymart/terraform,tommynsong/terraform,apparentlymart/terraform,hashicorp/terraform,rnaveiras/terraform,apparentlymart/terraform