Use the official HashiCorp Docker image to run Terraform without installing a host package.
docker run --rm -it -v "$PWD":/workspace -w /workspace hashicorp/terraform:latest version
docker run --rm -it -v "$PWD":/workspace -w /workspace hashicorp/terraform:latest init
docker run --rm -it -v "$PWD":/workspace -w /workspace hashicorp/terraform:latest plan