AWS provider communicating with VPC endpoint for resource provisioning

Can I configure the AWS provider to communicate with VPC endpoints?
EC2 instance doesn’t have internet connectivity and would like to use terraform to provision AWS resources.