Resource and providers

Add validations to check if these attributes have been set.