These Terraform modules are designed to automate the creation of OCI resources and Cloudflare DNS records. You can deploy an OCI instance and create a Cloudflare DNS record for it in a single Terraform run.
I have created these modules to help me with my own projects, but I think they will be useful to others as well.
-
Grab the relevant information from your OCI account
- tenancy_ocid
- user_ocid
- private_key_path
- fingerprint
- region
-
Grab the relevant information from your Cloudflare account
- api_key
-
Create the Terraform .auto.tfvars variables files and populate them with the information from the previous steps
-
Run
terraform init
to initialize the modules -
Run
terraform plan
to see what will be created -
Run
terraform apply
to create the resources -
Run
terraform destroy
to destroy the resources
tenancy_ocid
- The tenancy OCIDuser_ocid
- The user OCIDprivate_key_path
- The path to the private keyfingerprint
- The fingerprint of the private keyregion
- The region to create the instance incompartment_ocid
- The compartment OCIDavailability_domain
- The availability domain to create the instance inshape
- The shape of the instanceimage_ocid
- The image OCIDzone_id
- The Cloudflare zone IDrecord_name
- The name of the DNS record