terraform_initialization

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
terraform_initialization [2023/04/28 08:41] – created andonovjterraform_initialization [2023/04/28 08:49] (current) andonovj
Line 20: Line 20:
  
  
-<Code:bash>+<Code:bash|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 
 +</Code> 
 + 
 +These values are important for us. So choose a folder, where you want to have your terraform repository initialized and created the following file: 
 + 
 +<Code:bash|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" 
 +
 +</Code> 
 + 
 + 
 +After that, we need to initiliza the environment: 
 + 
 +<Code:bash|Initialization> 
 +julien.andonov@julienaonovsMBP adi_redis % terraform init 
 + 
 +Initializing the backend... 
 + 
 +Initializing provider plugins... 
 +- Finding latest version of hashicorp/oci... 
 +- Installing hashicorp/oci v4.118.0... 
 +- Installed hashicorp/oci v4.118.0 (signed by HashiCorp) 
 + 
 +Terraform has created a lock file .terraform.lock.hcl to record the provider 
 +selections it made above. Include this file in your version control repository 
 +so that Terraform can guarantee to make the same selections by default when 
 +you run "terraform init" in the future. 
 + 
 +╷ 
 +│ Warning: Additional provider information from registry 
 +│ 
 +│ The remote registry returned warnings for registry.terraform.io/hashicorp/oci: 
 +│ - For users on Terraform 0.13 or greater, this provider has moved to oracle/oci. Please update your source in required_providers. 
 +╵ 
 + 
 +Terraform has been successfully initialized! 
 + 
 +You may now begin working with Terraform. Try running "terraform plan" to see 
 +any changes that are required for your infrastructure. All Terraform commands 
 +should now work. 
 + 
 +If you ever set or change modules or backend configuration for Terraform, 
 +rerun this command to reinitialize your working directory. If you forget, other 
 +commands will detect it and remind you to do so if necessary. 
 +julien.andonov@julienaonovsMBP adi_redis %
  
  
 </Code> </Code>
  • terraform_initialization.1682671305.txt.gz
  • Last modified: 2023/04/28 08:41
  • by andonovj