build-oci-exadata-database-main-tf
Generate or update Terraform configuration only for OCI Exadata Database Service on Dedicated Infrastructure with the upstream `oci-landing-zones/terraform-oci-modules-oracle-database/tree/main/exadata-database` folder. Use for Cloud Exadata Infrastructure, Cloud VM Clusters, DB Homes, Container Databases, and Pluggable Databases. Validate only required and supplied inputs of the requested module objects through OCI MCP; never deploy, run Terraform, or gate configuration generation on operational deployment prerequisites. Explain relevant VCN, subnet, route, security-control, and Object Storag
Try your first task
A source-grounded starter task has not been verified for this skill yet.
SKILL.md
name: build-oci-exadata-database-main-tfdescription: "Generate or update Terraform configuration only for OCI Exadata Database Service on Dedicated Infrastructure with the upstream `oci-landing-zones/terraform-oci-modules-oracle-database/tree/main/exadata-database` folder. Use for Cloud Exadata Infrastructure, Cloud VM Clusters, DB Homes, Container Databases, and Pluggable Databases. Validate only required and supplied inputs of the requested module objects through OCI MCP; never deploy, run Terraform, or gate configuration generation on operational deployment prerequisites. Explain relevant VCN, subnet, route, security-control, and Object Storage requirements as non-blocking deployment context only. Never create IAM or network prerequisite resources."Build OCI Exadata Database Terraform
Generate Exadata resource configurations only. Default to additive-only changes. Never invent a module path, input name, resource model, or prerequisite value. Never create or remediate IAM, API keys, VCNs, subnets, route tables, gateways, NSGs, or Object Storage connectivity. Do create only the Exadata resource families supported by the module: Cloud Exadata Infrastructure, Cloud VM Clusters, DB Homes, Container Databases, and Pluggable Databases. Never mutate, replace, rename, move, or delete an existing resource unless the user explicitly and unambiguously requests that exact change. Never install or execute Terraform.
Required workflow
-
Inspect the target before writing.
- Inspect the project root, Terraform files, provider/backend setup, established layout, and any existing module blocks.
- For an update, recovery, removal, or deletion, inspect accessible local Terraform state read-only for the exact state address. Never modify state or run Terraform state commands.
- Treat it as an existing project when a project or configuration is in scope. Otherwise ask for a target directory; do not hardcode one or overwrite unrelated files.
- Read references/module.md first. If the request is outside the module's five resource families, say: "The Terraform module for
<capability>is not supported byoci-landing-zones/terraform-oci-modules-oracle-database/tree/main/exadata-database." - Read references/lifecycle-safety.md for any non-additive request.
-
Collect inputs in dependency order.
- Read references/reference.md before collecting inputs. Treat it as informational deployment context, not a generation gate.
- Validate only values supplied by, or required in, the requested module object. Never request VCN, subnet, route, NSG, or Object Storage values for a standalone
cloud_exadata_infrastructures_configuration. Do not block generation for any operational deployment prerequisite that is not a requested-object input. - Read the applicable sections in references/input-collection.md. Collect shared tenancy and compartment values first; collect VCN/subnet, subscription, and SSH-key values only for the resource families that use them, in infrastructure → VM cluster → DB home → database → PDB order.
- Read the upstream
SPEC.mdbefore writing any resource objects so the generated configuration matches the module's exact structure and nested attributes. - Preserve literal OCIDs and map-key references. Do not infer an OCID, availability domain, database/GI/system version, capacity, or network topology.
- Ask whether the user wants documented optional inputs only after all required inputs are present. If declined, use documented defaults; never invent optional values.
- Treat database passwords, TDE wallet passwords, API private-key passwords, and remote-clone credentials as secrets. Do not place them in tracked files or echo them back; use a secure secret-injection mechanism already established by the project.
- Read references/terraform-sources.md before writing a module block.
-
Validate before producing usable configuration.
- Read references/validation.md only after inputs are collected.
- Apply every non-placeholder rule. OCI MCP validation is mandatory: pause if the
get_oci_command_helpandrun_oci_commandOCI MCP tools are unavailable or cannot be invoked. Pause for a corrected value when an input is missing or known invalid. Do not claim OCI-side availability, quota, capacity, version compatibility, or IAM access has been verified unless it was actually verified through the required OCI MCP read. - For an existing-resource mutation, require confirmed Terraform-state ownership before proposing it.
-
Generate after validation succeeds.
- Read references/main-tf-map.md.
- In an existing project, preserve its layout, provider/backend blocks, naming, variables, and secret-handling approach. Make the smallest scoped change; do not add a duplicate module block.
- In a new project, create exactly
main.tf,variables.tf, andterraform.tfvars. Include the OCI provider baseline and module block inmain.tf; typed declarations invariables.tf; only validated non-secret literal values interraform.tfvars. Never place Terraform functions, interpolations, traversals, or dynamic expressions (includingfile(),templatefile(),${...}, orpath.module) in a.tfvarsfile. Resolve repository-local public-key files inmain.tfwith a local value or module-argument merge; make the corresponding variable attribute optional when that expression supplies it. - Default the module source to
ref=main. Use a release tag or commit SHA only when the user explicitly provides one; do not ask the user to approve the default.
-
Hand off without execution.
- Tell the user this upstream module requires Terraform 1.5.0 or later.
- Provide, but never run:
terraform init,terraform validate,terraform plan, andterraform apply. - Explain that an Exadata operation can take many hours, and the plan must be reviewed before apply. The upstream documentation notes that a later apply may resume after certain transient provisioning conflicts; do not promise that it will.
Boundaries
- Use only
git::https://github.com/oci-landing-zones/terraform-oci-modules-oracle-database.git//exadata-database?ref=<ref>for the module source; default<ref>tomainunless the user explicitly provides a release tag or commit SHA. Treathttps://github.com/oci-landing-zones/terraform-oci-modules-oracle-database/tree/main/exadata-databaseas the canonical upstream folder path. - Support only Cloud Exadata Infrastructure, Cloud VM Clusters, DB Homes, Container Databases, and Pluggable Databases. Do not generate IAM, VCN, subnet, route-table, gateway, NSG, or Object Storage prerequisite resources. Do not substitute direct
oci_*resources or a different module. - Do not run
terraform,tofu, package-manager, provider-login, OCI write, or install commands. - Do not create, modify, replace, move, delete, import, or unlock Terraform state; do not create a lock file or
.terraformdirectory. - Do not put private-key material, passwords, tokens, or wallet secrets in
terraform.tfvars, examples, or repository files.
Reference routing
| Need at this stage | Read |
|---|---|
| Confirm supported capabilities and module contract | module.md |
| Confirm deployment prerequisites and network baseline | reference.md |
| Collect resource-family inputs | input-collection.md |
| Update, remove, recover, or destroy a resource | lifecycle-safety.md |
| Create the source, provider, or minimal project baseline | terraform-sources.md |
| Validate values and dependencies | validation.md |
| Map validated values to Terraform files | main-tf-map.md |