This is an old revision of the document!


In this section, we will initilize the terraform for our environment. Now, it is important to remember that, terraform is Infrastructure as a Code tool, meaning, we write the code and terraform configure the infrastructure on cloud side. Because of that we have to install the necessary providers (Cloud Providers: OCI, AWS, Azure, etc) So let's get started with OCI:

There are several cloud providers:

  • Oracle: OCI
  • Amazon: AWS
  • Microsoft: Azure
  • Alibaba: No idea
  • Others: No idea :-)

So let's focus on the OCI for now. From your account, (top right corner in OCI), you can generate new API key value pairs and when you do, you will have the followng information:

OCI API key info

[DEFAULT]
user=ocid1.user.oc1..****************************
fingerprint=*****************************
tenancy=ocid1.tenancy.oc1..**********************
region=us-******-1
key_file=<path to your private keyfile> # TODO

These values are important for us. So choose a folder, where you want to have your terraform repository initialized and created the following file:

provider.tf

julien.andonov@julienaonovsMBP adi_redis % cat provider.tf
provider "oci" {
  tenancy_ocid = "ocid1.tenancy.oc1..************************"
  user_ocid = "ocid1.user.oc1..****************************"
  private_key_path = "/Users/Julien.andonov/***************/oracle_oci_julien_andonov_private_key.pem"
  fingerprint = "5a:79:c4:4*****************a:9d:26:5a:2d:f8"
  region = "us-phoenix-1"
}
  • terraform_initialization.1682671687.txt.gz
  • Last modified: 2023/04/28 08:48
  • by andonovj