Lab :49 create VCN, 1 subnet using terraform - TanveeKhanDB/OCI GitHub Wiki

Requierment:

Network Architecture Design Objective

The primary objective of this phase is to establish a well-structured, scalable, and extensible network architecture for the Application Environment.

The design focuses on optimized IP address management, logical resource segmentation, non-overlapping CIDR allocation, and standardized network resource organization to support current workloads while providing sufficient capacity for future growth and infrastructure expansion.


Key Design Objectives

1. Establish a Scalable Network Architecture

Design a modular and extensible network topology capable of supporting current application workloads while allowing seamless integration of additional workloads, subnets, services, and infrastructure components as the environment grows.

2. Implement Optimized IP Address Management

Develop a structured CIDR and subnet allocation strategy to ensure efficient utilization of the available IP address space and provide adequate address capacity for current and future workloads.

3. Ensure Network Address Isolation

Prevent CIDR overlap with existing OCI VCNs, on-premises networks, and interconnected environments to maintain predictable routing, avoid address conflicts, and ensure reliable network connectivity.

4. Maintain Reserved Address Capacity

Allocate dedicated IP address space for future expansion, allowing additional subnets, application workloads, infrastructure services, and network components to be introduced without requiring major changes to the existing network architecture.

5. Standardize Resource Naming and Organization

Implement a consistent, descriptive, and environment-aware naming convention across VCNs, subnets, route tables, gateways, security controls, and other OCI resources.

This improves:

  • Operational visibility
  • Resource identification
  • Governance and compliance
  • Infrastructure maintainability
  • Troubleshooting efficiency
  • Terraform resource management

Architecture Design Principle

Design for today's workload, but architect the network for tomorrow's scale.


Planning:

Complete Subnet Breakdown

Resource Domain CIDR Block Total IPs Usable IPs IP Range Lifecycle Status
blinkit_spoke_VCN 10.0.1.0/24 256 251 10.0.1.0 - 10.0.1.255 Create
Application Subnet 10.0.1.0/25 128 125 10.0.1.0 - 10.0.1.127 Create (Private)
Reserve Subnet 1 10.0.1.128/26 64 61 10.0.1.128 - 10.0.1.191 Planning
Reserve Subnet 2 10.0.1.192/27 32 29 10.0.1.192 - 10.0.1.223 Planning
Future use 10.0.1.224/27 32 29 10.0.1.224 - 10.0.1.255 Unallocated

Dependency flow

Project Structure

Final Terraform Flow