I just wanted to provide my use case. I do not consider #218 a bug, and I depend on Terraform outputing the source_code_hash for AWS Lambdas during Terraform plans. At work, we use these Terraform plans for our deployment approval processes and it’s crucial that the SHA256 Base64 encoded checksum of Lambda pakcages be present within Terraform plan output. This checksum within an approved Terraform plan is the easiest way to actually validate that the Lambda package currently deployed in AWS matches the approved Terraform plans.
So my request is, please do not take any actions on #218 because in my use case it is working exactly as needed.
I don’t think there’s any change to be made there, a data source is “read” during the plan by Terraform. The fact that archive_file creates local artifacts during the plan is problematic since Terraform assumes data sources have no side effects, but the point at which ReadData is called is outside of the control of the provider.