How flavius-dinu/oci-adoption-framework-thunder works
Project type and purpose
• This is an open-source Terraform-based Infrastructure-as-Code (IaC) framework for Oracle Cloud Infrastructure (OCI).
• It provides examples (crawl, walk, run, network_architectures, dev_tools, free_tier, enterprise_tier) and reusable modules for setting up OCI resources quickly.
File structure
Top-level folders:
• examples/ – Example root configurations organized by stage (crawl, walk, run, etc.).
• modules/ – Reusable Terraform modules (network, compute, db, monitoring, IAM, etc.).
• userdata/ – Shell/PowerShell scripts executed on instances.
• intro/, workshop/, images/ – Documentation and workshop assets.
Plus root files: README.md, LICENSE, .gitignore.
README for additional insights
• Describes crawl (basic resources), walk (advanced), run, network architectures, developer tools, free/enterprise tiers.
• All examples import the OCI provider, pass credentials via .auto.tfvars, and reference modules under modules/.
Key components
a. Developer Workstation
– Terraform CLI
– Git repo (examples/, modules/, userdata/, docs)
– Terraform state (local or remote backend)
b. Terraform Examples (each folder under examples/)
– Root-level .tf that:
• Defines provider "oci" block (via .auto.tfvars)
• References modules from modules/
• Passes variables and invokes userdata scripts
c. Terraform Modules (modules/*)
– Encapsulate OCI resource definitions (network, compute, object-storage, database, logging, security)
– Clearly labeled outputs/variables
d. Userdata Scripts
– Shell or PowerShell scripts that bootstrap/configure instances
e. OCI Provider & API
– The Terraform OCI provider issues API calls to OCI
f. OCI Cloud Resources
– Virtual Cloud Network (VCN), Subnets, Internet Gateway, Route Tables
– Compute Instances, Auto Scaling Groups (ASG)
– Databases (ADW, DBaaS, Autonomous DB)
– Object Storage, Block Volumes, File Storage (FSS)
– Load Balancers, API Gateway, Functions, Event Services
– Monitoring & Logging (Grafana, Alarms, Cloud Guard)
– IAM (Users, Groups, Policies, Dynamic Groups)
– Additional services: KMS, Service Connector, WAAS, Blockchain, Marketplace Instances
Relationships and interactions
1. User invokes terraform init/plan/apply on an example folder.
2. Terraform loads local modules from modules/*.
3. Terraform merges .auto.tfvars (credentials & variables) into provider configuration.
4. Terraform executes module code to generate an execution plan.
5. Terraform OCI provider calls the OCI REST APIs to create/update cloud resources.
6. Instances run userdata scripts for in-instance configuration.
7. Terraform writes state to local or remote backend.
Architectural patterns and principles
– Modular design: All resource definitions live in reusable modules under modules/.
– Layered examples: crawl → walk → run represents increasing complexity.
– Separation of concerns: Examples drive end-to-end scenarios; modules encapsulate resource creation logic.
– Infrastructure-as-Code: declarative Terraform manifests, version controlled.
– Extensibility: New examples or modules can be added without affecting others.
Detailed elements
– Callouts for credential injection (terraform.tfvars), Terraform state, and userdata execution.