Obtaining tf version and provider versions internally to tf

We would like to tag our resources with the tf version and provider version on the individual resources. Is there any way to do this?