Terraform example scripts to deploy resources to Oracle Cloud Infrastructure.
- An OCI Tenancy and an IAM/IDCS user created with the right level of access. If you do not already have a tenancy, you can request a free-tier tenancy from here
- User should be enabled with programmatic access to OCI. For instructions on how to setup, See required Keys & OCIDS
- A Work-Station or a Developer machine (preferably a Linux machine, But Windows will work too)
- Terraform installed and added to path. If not installed, Download from here. For more detailed information on Terraform for OCI, check the official getting started page.
- OCI Provider. Automatically downloaded during
terraform init
.
- clone the repo to your work station. Preferably an Oracle Linux server on OCI (session 3 uses InstancePrincipal which needs a machine on OCI)
cd
to each example* directory to review Terraform config scripts- In each example* directory, make sure to either:
- add a
terraform.tfvars
file in the directory. See OCI TFVARS or - set/export system environment variables for authentication. See
TF_VAR_name
section in TF environment variables
- add a
- run
terraform init
,terraform plan
&terraform apply
to deploy the resource(s) - finally, run
terraform destroy
to terminate the provisioned resources
Disclaimer: This is a personal repository. All code, views or opinions represented here are personal and belong solely to me and do not represent those of people, institutions or organizations that I may or may not be associated with in professional or personal capacity, unless explicitly stated.
Also please note, resources deployed using these example scripts do incur charges. Make sure to terminate the deployed resources/services after your tests, to save/minimize your bills