DBA Hub

📋Steps in this guide1/2

Terraform : Installation

This article explains how to install Terrafrom and perform the basic setup required before using it.

oracle miscconfigurationintermediate
by OracleDba
11 views
1

Install Terraform

For Oracle Linux 8 the simplest way to install Terraform is to pull it from the developer repository. For other operating systems we can download the software from the Terraform download page. - Download Terraform For Windows, download and unzip the software, which just contains the "terraform.exe" file. Make sure the location of this executable is in your environment variable. Check the Terraform installation using the following command.

Code/Command (click line numbers to comment):

1
2
3
4
5
6
dnf install -y oraclelinux-developer-release-el8
dnf install -y terraform

set PATH=%PATH%;%homepath%\u01\software\hashicorp\terraform_0.14.6_windows_amd64

terraform -v
2

Generate RSA Keys

Terraform needs a key pair to connect to cloud providers. On Linux we create a new private and public key using the command as follows. On Windows you may already have the executable installed as part of a different product. In my case it was installed as part of a Vagrant installation. If not, you can download the executable from the following location. - Openssl Binaries Make sure the location of this executable is in your environment variable. We create a new private and public key using the command as follows. For more information see: - Download Terraform - Openssl Binaries - Terraform : All Articles Hope this helps. Regards Tim...

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
mkdir -p $HOME/.oci
openssl genrsa -out $HOME/.oci/my-oci-key.pem 2048
chmod 600 $HOME/.oci/my-oci-key.pem
openssl rsa -pubout -in $HOME/.oci/my-oci-key.pem -out $HOME/.oci/my-oci-key_public.pem
cat $HOME/.oci/my-oci-key_public.pem

set PATH=%PATH%;C:\HashiCorp\Vagrant\embedded\usr\bin

cd %homepath%
mkdir .oci
openssl.exe genrsa -out %homepath%\.oci\my-oci-key.pem 2048
openssl rsa -pubout -in %homepath%\.oci\my-oci-key.pem -out %homepath%\.oci\my-oci-key_public.pem
cat %homepath%\.oci\my-oci-key_public.pem

Comments (0)

Please to add comments

No comments yet. Be the first to comment!