Problem: When you see below error on your terraform runs
[ERROR] eval: *terraform.EvalDiff, err: rpc error: code = ResourceExhausted desc = grpc: received message larger than max (4797537 vs. 4194304)
ResourceExhausted desc = grpc: received message larger than max (4207558 vs. 4194304), where the max is 4MB
This does not have to do with Docker, memory (RAM) or any other system constraints
(local or on TFC/E). Instead, this is an error due to an underlying hardcoded 4MB limit in the gRPC message
size for messages sent to and from the provider plugin.
At this time there is no way to exceed this 4MB limit.
The feature update to increase the size to 256MB has been implemented in terraform-plugin-go v0.6.0 and is used by the terraform-plugin-sdk. However, this update has not been adopted by the provider plugins yet.
In the mean time, to avoid this problem, you'll need to refactor your terraform configuration - such that your resource and state data is smaller than 4MB.