-
You have setup the required keys
-
You know the required OCIDs
-
git is installed
-
ssh client is installed
-
Terraform 0.12.8+ is installed
The instructions on this page allows you to create the base infrastructure which you can then extend manually in the OCI console.
-
Clone the repo:
git clone https://github.com./oracle/terraform-oci-base.git tfbase
cd tfbase
cp terraform.tfvars.example terraform.tfvars
-
Set mandatory parameters in terraform.tfvars:
-
api_fingerprint
-
api_private_key_path
-
compartment_id
-
tenancy_ocid
-
user_ocid
-
-
Override other parameters:
-
region
-
-
Optional parameters to override:
-
bastion_enabled
-
ssh_private_key_path
-
ssh_public_key_path
-
vcn_dns_label
-
vcn_name
-
-
Create a provider.tf file and add the following:
provider "oci" { tenancy_ocid = var.oci_base_provider.tenancy_id user_ocid = var.oci_base_provider.user_id fingerprint = var.oci_base_provider.api_fingerprint private_key_path = var.oci_base_provider.api_private_key_path region = var.oci_base_provider.region disable_auto_retries = false }
-
Run terraform init, plan and apply:
terraform init terraform plan terraform apply
The use of this Terraform module is explained in more details on the Oracle Solution guide.