terraform {
oci = {
source = "oracle/oci"
version = "5.4.0"
}
}
}
Configure the Oracle Cloud provider
Resources
provider "oci" {
tenancy_ocid = "ocid1.tenancy.oc1..aaaaaaaa7uzhjutgya5yjptkgotowujccvsddes2jly2hohvkrvd6ctl7pna"
user_ocid = "ocid1.user.oc1..aaaaaaaabfoxa4e2nzck7k5f7foublichvn6ys4fqoviufna4v23yswus7gq"
fingerprint = "00:60:8d:87:1c:ec:fd:94:55:42:85:cb:8a:67:36:d6"
private_key_path = "C:\DevOps\Terraform-Project\oracleidentitycloudservice_usdba-07-15-13-28.pem"
region = "ap-mumbai-1"
disable_auto_retries = true
}
oci_provider_variables.auto.tfvars
Variables
tenancy_ocid = "ocid1.tenancy.oc1..aaaaaaaa7uzhjutgya5yjptkgotowujccvsddes2jly2hohvkrvd6ctl7pna"
user_ocid = "ocid1.user.oc1..aaaaaaaabfoxa4e2nzck7k5f7foublichvn6ys4fqoviufna4v23yswus7gq"
fingerprint = "00:60:8d:87:1c:ec:fd:94:55:42:85:cb:8a:67:36:d6"
private_key_path = "C:\DevOps\Terraform-Project\oracleidentitycloudservice_usdba-07-15-13-28.pem"
region = "ap-mumbai-1"
disable_auto_retries = true
Create a new compute instance
resource "oci_core_instance" "Harerama" {
compartment_id = "ocid1.tenancy.oc1..aaaaaaaa7uzhjutgya5yjptkgotowujccvsddes2jly2hohvkrvd6ctl7pna"
display_name = "Harekrishna-instance"
shape = "VM.Standard2.1"
}
Key files - oracleidentitycloudservice_usdba-07-15-13-28.pem
Top comments (0)