The code provides a reusuable Terraform module that provisions a compute instance on Oracle Cloud Infrastructure.
This modules does not create network resources like VCN, subnets, etc as it uses the existing network resources. Please use acf_res_net module for creating new network resources in OCI.
module "terraform-oci-compute" {
source = "github.com/avaloqcloud/terraform-oci-compute"
}
terraform {
required_version = "~> 1.2"
required_providers {
github = {
source = "integrations/github"
version = "~> 5.39"
}
oci = {
source = "oracle/oci"
version = "5.18.0"
}
}
}
Name | Version |
---|---|
oci | n/a |
Name | Type |
---|---|
oci_core_instance.compute_instance | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
availabilitydomain | Availability Domain | string |
n/a | yes |
boot_volume_size_in_gbs | Compartment OCID | string |
"500" |
yes |
cloud_init_script | Cloud init script | string |
n/a | yes |
compartment_ocid | Compartment OCID | string |
n/a | yes |
instance_image | Image ID | string |
n/a | yes |
instance_shape | Image Shape | string |
n/a | yes |
memory | Memory size | string |
n/a | yes |
ocpus | OCPU Size | string |
n/a | yes |
ssh_public_key | SSH public key | string |
n/a | yes |
subnet_id | Subnet ID | string |
n/a | yes |
vm_name | VM Name | string |
n/a | yes |