Quickstart Terraform Templates and Modules

Here is a collection of templates and sample code for using HashiCorp Terraform / OpenTofu to provision and manage resources for Oracle Database@Azure and the database-related services.

Prerequisities

  1. Complete, at a minimum, steps 1-2 of the Onboarding with Oracle Database@Azure.
  2. Have a HashiCorp Terraform/OpenTofu, OCI CLI, Azure CLI, and python (minimum 3.4) environment. For more information, see the Oracle Multicloud Landing Zone for Azure README.

Terraform Providers

The Oracle Multicloud Landing Zone for Azure modules and templates use multiple Terraform providers

Note

This document provides templates and modules (sample code/reference implementations) of provisioning and management of Oracle Database@Azure resources through Terraform provider AzAPI. The AzAPI TF provider resources and data sources are documented here https://registry.terraform.io/providers/Azure/azapi/latest/docs. The API spec version used in the examples is "2023-09-01-preview" as denoted in the "type" field in the examples. This will be changed to the public version when its made available.

Terraform Templates and Modules Coverage

Table 1-1 Terraform Templates and Module Coverage

Steps Templates Modules

1. Create identity federation using Azure's identity service

  • To create a confidential application for Oracle Database@Azure within your OCI account
  • To download your OCI IAM domain's SAML service provider metadata
  • To create a SAML service principal in your Azure account
  • To create an identity provider resource in OCI IAM for Azure Active Directory

2. Create User Groups

  • To create OCI IAM User Groups and Policies for Oracle Database@Azure
  • To create Oracle Database@Azure user groups in Azure for OCI IAM identity federation
  • To enable users and groups synchronization in the Azure SAML service principal
3. Create Exadata Infrastructure az-oci-exa-pdb
4. Create Exadata VM Cluster az-oci-exa-pdb
5. Create Database Home az-oci-exa-pdb
6. Create Container Database (CDB) and Pluggable Database (PDB) az-oci-exa-pdb