Install yum-config-manager to manage your repositories.

 sudo yum install -y yum-utils

Use yum-config-manager to add the official HashiCorp Linux repository.

 sudo yum-config-manager –add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo

Install Terraform

 sudo yum -y install terraform

Verify the installation

Verify that the installation worked by opening a new terminal session and listing Terraform’s available subcommands.

 terraform -help

Usage: terraform [-version] [-help] <command> [args]