Oracle Analytics Cloud : Set up and configure Oracle Analytics Cloud environments using Terraform

September 8, 2023 | 5 minute read
Amit Tyagi
Oracle Analytics Architect, Oracle Cloud Solutions Architect, Data Management Domain Expert
Text Size 100%:

Oracle Analytics Cloud (OAC) is a single and complete platform that empowers your entire organization to ask any question of any data, across any environment, on any device. It fits into your ecosystem, enabling analysis in the cloud while also providing easy access to any data source. The result? The best use of all your data, no matter where it is.  Oracle Analytics Cloud provides a variety of options for intelligent analysis without being overwhelming to deploy and manage, making it an effective way to engage more people in analysis and extend your organization’s expertise.

When you first deploy OAC, you have a choice: either you can provision and configure your OAC environment manually, or you can use Terraform to create and maintain your OAC environment. Terraform is an infrastructure-as-code tool that allows you to build, change, and version your infrastructure using code techniques. It will enable you to set up configuration files to define your applications or infrastructure and store your infrastructure's state to modify or update. You can use Terraform to create and maintain multiple OAC environments. Not only will it automate the manual steps of deployment, but it will also allow the consistent rollout of additional OAC instances as needed.

This blog uses OAC with a private end point as a sample architecture to describe how to create and setup these resources with Terraform. Based on your requirements, you can update the Terraform script to add or update network resources such as VCNs, subnets, routing tables, security lists, etc.

OAC Architecture

For the above architecture, you will perform the following tasks with Terraform:

  • Setup OCI network resources for the OAC private endpoint (PE) environment.
  • Create a VCN, a public subnet for the Bastion Host, and two separate private subnets for the database and OAC.
  • Oracle Autonomous Database (ADB) will be provisioned with the given configuration.
  • An OAC instance with a private access channel (PAC) will be provisioned with the provided configuration.
  • PAC egress IPs will be configured in the security list of the database private subnet (to establish connectivity between OAC and ADB).
  • A Bastion host will be setup to access private subnet resources, e.g., ADB and OAC, for maintenance purposes.( Bastion Host is a compute instance to access private network resources from an external network such as the Internet).
  • The required routing and security rules will be configured so that the environment is ready to use.

Terraform Artifacts

These are the Terraform scripts that are provided in the "Deployment Scripts" section.

  • — Terraform variable file which contains all variable definitions.
  •—Terraform Config file which contains all variable values. Variables are grouped into different categories, e.g., VCN, Subnet, ADB etc., and are self-explanatory. The sample values provided in the attached file are just an example.
  • — Terraform resource file for the OCI environment, which will set up all network resources (including VCN and subnets) and provision all PaaS components such as the Autonomous database, OAC, private access channel, and Bastion host. (For your reference, a Terraform resource for Oracle Database VM has also been provided as commented section in

To add or update more configuration options for OAC, please refer to Terraform for OAC.
To add or update more configuration options for OAC private access channel please refer to Terraform for Private Access Channel
To add or update more configuration options for ADB please refer to Terraform for ADB.
For all OCI network components please refer to Terraform Documentation

How to Use these Terraform artifact

Prerequisites: Terraform should be installed on the machine where you are planning to execute these scripts.

  • Make a directory on your machine where Terraform is installed.
  • Copy,, and files into the directory.
  • Provide all the values required in for provider, VCN, subnets, and PaaS resources.
  • Set resource_suffix_dev as “Dev” or “Test," as this will be used in all resource names, e.g., Dev_Public_Subnet. You can change it based on your naming specifications.
  • Execute " terraform plan -var-file=config.tfvars"
  • Execute " terraform apply -var-file=config.tfvars "
Terraform Script
Execution of Terraform Script

Output: all network resources (VCN, Internet GW, Service GW, Nat GW, Subnets, Route Tables, Security Lists) and all PaaS components (OAC, PAC, ADB, and Bastion host) will be deployed for the OAC environment.

Test OAC Connectivity with Oracle Autonomous Database

Once the Terraform deployment completes, you can test the connectivity of OAC with your ADB instance. Please follow these steps to make OAC connection with ADB. 

  • Log in to your OAC Instance.
  • In the upper right corner, click the “Create” button and select Oracle Autonomous Data Warehouse Cloud.
  • Enter the details as shown in the example by filling in the connection name, your username and password, and by uploading the ADB file.
  • Click Save.
  • ( To download ADB wallet - 1. Navigate to Oracle Autonomous Database instance 2. click Database connection, 3. Under wallet type, make sure Instance Wallet is selected and then click Download wallet 4. Enter a wallet Password and click Download)

OAC Connection

OAC Connection- Adw

Download Terraform artifacts from Github

You can download Terraform Artifacts from this GitHub Repository.
OAC Terraform Artifacts


For the manual process of setting up and configuring the Oracle Analytics Cloud environment, please refer to this blog.

How to Setup and Configure the Oracle Analytics Cloud Environment on OCI

To explore more on Oracle Analytics cloud please refer these Oracle Analytics cloud documentations and Product Videos library.

Oracle Analytics Cloud Documentations

Oracle Analytics Product Videos

Amit Tyagi

Oracle Analytics Architect, Oracle Cloud Solutions Architect, Data Management Domain Expert

Previous Post

Oracle Fusion Analytics Implementation Series: Adopting and Expanding

Dayne Carley | 11 min read

Next Post

Oracle Analytics Cloud at Oracle CloudWorld 2023

Barry Mostert | 6 min read