Oracle Cloud (OCI) Interview Questions
Oracle Cloud Infrastructure (OCI) – Interview Questions & Answers
-
What is a Policy in IAM?
Answer:
A Policy is a set of rules defining who can access a resource and what actions they can perform. Policies can be applied at the compartment or tenancy level. They are written in a human-readable language and follow this basic syntax:Allow group <group_name> to <verb> <resource-type> in <compartment>
Example:
Allow group Developers to manage instances in compartment Dev
Policies are the foundation of access control in OCI. Without a policy, no user (except the tenancy administrator) can access any resource.
-
 How do you create a Network Security Group using the CLI?
Answer:
Run the following command:oci network security-list create \ --name <name> \ --compartment-id <ocid> \ --egress-security-rules '[<json>]' \ --ingress-security-rules '[<json>]'
Explanation:
-
--name: The display name for the security list. -
--compartment-id: The OCID of the compartment where the security list will live. -
--egress-security-rules: JSON array defining outbound traffic rules. -
--ingress-security-rules: JSON array defining inbound traffic rules.
Note: A Network Security Group (NSG) is different from a Security List. NSGs are applied to individual VNICs, while Security Lists are applied to entire subnets. The command above creates a Security List. To create an NSG:
oci network nsg create --compartment-id <ocid> --vcn-id <vcn-ocid> --display-name <name>
-
-
What is IDCS Federation?
Answer:
IDCS Federation (Oracle Identity Cloud Service Federation) is a feature that connects IDCS with external identity providers such as:-
Microsoft Active Directory
-
Okta
-
Azure AD
-
SAML 2.0 compliant providers
Benefits:
-
Users can access multiple systems with one identity (Single Sign-On).
-
Reduces password fatigue and administrative overhead.
-
Centralizes authentication and authorization.
-
Enables seamless cross-system user access.
How it works:
IDCS acts as the Service Provider (SP) or Identity Provider (IdP) depending on the configuration. When federated, users authenticate with the external IdP and are granted access to OCI resources based on mapped groups and policies. -
-
How do you create a Compartment Landing Zone using the CLI?
Answer:
Run:oci landing-zone create \ --name <name> \ --compartment-id <ocid> \ --landing-zone-type <type> \ --default-config '<json>'
Explanation:
-
--name: Name of the landing zone. -
--compartment-id: The parent compartment OCID. -
--landing-zone-type: Type of landing zone (e.g.,PRODUCTION,DEVELOPMENT). -
--default-config: JSON configuration defining the compartment structure, policies, and networking.
A Landing Zone provides a pre-configured, compliant environment for new projects, ensuring consistency across your organization.
-
-
What is a Tag?
Answer:
A Tag is a label you apply to resources to categorize them by attributes such as:-
Cost center
-
Environment (Dev, Test, Prod)
-
Project name
-
Owner
-
Compliance level
Types of Tags in OCI:
-
Free-form Tags – Simple key-value pairs, no namespace required.
-
Defined Tags – Created within a Tag Namespace, with predefined values and optional validation.
Example:
Environment: Production CostCenter: CC-1234 Project: Alpha
Benefits:
-
Cost tracking and chargeback.
-
Automated policy enforcement.
-
Resource organization and search.
-
Compliance reporting.
-
-
How do you enable MFA for a user in the Console?
Answer:
Follow these steps:-
Sign in to the OCI Console as an administrator.
-
Navigate to Identity & Security → Users.
-
Click the user’s name you want to enable MFA for.
-
Click Add MFA.
-
Select the device type:
-
Oracle Mobile Authenticator (recommended)
-
SMS (text message)
-
Third-party authenticator app (Google Authenticator, etc.)
-
-
Follow the on-screen setup steps to register the device.
-
Click Save.
Note: You can also enforce MFA at the tenancy level via Authentication Policies in IDCS.
-
-
What is a Service Limit?
Answer:
A Service Limit is the maximum amount of a resource you can provision within a region or tenancy. It prevents over-provisioning and ensures efficient resource utilization.Examples:
-
Maximum number of compute instances per availability domain.
-
Maximum number of VCNs per compartment.
-
Maximum number of block volumes per region.
How to view:
Navigate to Governance → Service Limits in the Console, or use the CLI:oci limits value list --compartment-id <ocid>
How to increase:
Submit a support ticket through the Console or contact Oracle Support with justification. -
-
How do you create a group in IAM using the Console?
Answer:
Steps:-
Sign in to the OCI Console.
-
Navigate to Identity & Security → Groups.
-
Click Create Group.
-
Provide a Name (e.g.,
Developers,Admins). -
Provide a Description (optional but recommended).
-
Select a Compartment (usually the root compartment for IAM groups).
-
Click Create.
Note: Groups are used to assign policies to multiple users at once. Users inherit all policies attached to their groups.
-
-
What is a Resource Principal?
Answer:
A Resource Principal is a special identity representing a resource (not a user) within OCI. It is used to authenticate requests initiated by that resource.Use Cases:
-
A Function accessing Object Storage.
-
A Compute Instance accessing a database.
-
An API Gateway invoking a function.
Benefits:
-
No need to embed user credentials in code.
-
Fine-grained access control via policies.
-
Automatic credential rotation.
Example Policy:
Allow dynamic-group <group-name> to read objects in compartment <compartment-name>
-
-
How do you list all compartments using the CLI?
Answer:
Run:oci iam compartment list --compartment-id <tenancy-ocid>
Explanation:
-
--compartment-id: The OCID of the tenancy (root compartment).
Optional Flags:
-
--all: List all compartments including sub-compartments. -
--access-level: Filter by access level (ANY,ACCESSIBLE). -
--lifecycle-state: Filter by state (ACTIVE,DELETED).
Example with pagination:
oci iam compartment list --compartment-id ocid1.tenancy.oc1..aaaa --all
-
-
What is a Virtual Cloud Network (VCN)?
Answer:
A Virtual Cloud Network (VCN) is a private network within an Oracle Cloud region used to connect and isolate your resources. It consists of:-
Subnets (public and private)
-
Route Tables
-
Security Lists
-
Network Security Groups (NSGs)
-
Internet Gateways
-
NAT Gateways
-
Service Gateways
-
Dynamic Routing Gateways (DRGs)
Key Characteristics:
-
Region-specific (cannot span regions).
-
Defined by a CIDR block (e.g.,
10.0.0.0/16). -
Can have multiple subnets in different availability domains.
-
Provides isolation and security for your workloads.
-
-
How do you create a Dynamic Group using the CLI?
Answer:
Run:oci identity dynamic-group create \ --name <name> \ --description <desc> \ --matching-rule <rule>
Example:
oci identity dynamic-group create \ --name "ComputeInstances" \ --description "All compute instances in Dev compartment" \ --matching-rule "instance.compartment.id = 'ocid1.compartment.oc1..aaaa'"
Explanation:
-
--matching-rule: Defines which resources belong to the group. Uses attributes likeinstance.compartment.id,instance.id,resource.type, etc.
-
-
What is an Authentication Policy in IDCS?
Answer:
An Authentication Policy in IDCS (Oracle Identity Cloud Service) is a set of rules managing how authentication works. It covers:-
Password requirements (length, complexity, expiration)
-
Session settings (timeout, concurrent sessions)
-
MFA enforcement (required, optional, disabled)
-
Sign-on rules (IP-based, time-based)
-
Account lockout policies
How to configure:
-
Go to IDCS Console → Security → Authentication Policies.
-
Create or edit a policy.
-
Set sign-on rules, password policies, and MFA settings.
-
Assign the policy to users or groups.
-
-
How do you create a policy in the Console?
Answer:
Steps:-
Sign in to the OCI Console.
-
Navigate to Identity & Security → Policies.
-
Click Create Policy.
-
Provide a Name (e.g.,
Dev-Instance-Management). -
Provide a Description.
-
Select a Compartment (where the policy will reside).
-
Write your Policy Statements in the editor. Example:
Allow group Developers to manage instances in compartment Dev Allow group Admins to manage all-resources in tenancy
-
Click Create.
Note: Policies are additive. A user can have multiple policies from different groups.
-
-
What is a Delegation Token?
Answer:
A Delegation Token is a short-lived token that lets third-party apps access your Oracle Cloud resources securely without exposing your credentials.How it works:
-
You create a delegation token via the Console or CLI.
-
You share the token with a third-party application.
-
The app uses the token to make API calls on your behalf.
-
The token expires after a set time (default: 1 hour, max: 24 hours).
Use Cases:
-
Allowing a partner to manage specific resources.
-
Temporary access for automation scripts.
-
Secure cross-tenancy access.
CLI Example:
oci iam delegate-token create \ --compartment-id <ocid> \ --user-id <user-ocid> \ --description "Temp access for partner"
-
-
How do you view your Service Limits?
Answer:
Via Console:-
Sign in to the OCI Console.
-
Navigate to Governance → Service Limits.
-
Select the Region and Compartment.
-
View current usage and maximum limits for each service.
Via CLI:
oci limits value list --compartment-id <ocid>
Via API:
Use theListLimitValuesAPI endpoint.What you’ll see:
-
Service name (e.g., Compute, Block Volume).
-
Resource name (e.g.,
standard-e4-core-count). -
Available limit.
-
Current usage.
-
Whether the limit is adjustable.
-
-
What is IAM?
Answer:
IAM (Identity and Access Management) is Oracle Cloud’s service for managing:-
Users – Individual accounts.
-
Groups – Collections of users.
-
Policies – Rules defining access.
-
Compartments – Logical containers for resources.
-
Dynamic Groups – Rule-based resource collections.
-
Identity Providers – Federation with external IdPs.
Purpose:
IAM controls who can access what resources and how (read, write, manage).Key Components:
Component Purpose User Individual identity Group Collection of users Policy Access rules Compartment Resource container Dynamic Group Resource-based identity Federation External IdP integration -
-
How do you create a VCN?
Answer:
Via Console:-
Navigate to Networking → Virtual Cloud Networks.
-
Click Create Virtual Cloud Network.
-
Provide a Name (e.g.,
Prod-VCN). -
Select a Compartment.
-
Choose CIDR Block (e.g.,
10.0.0.0/16). -
Optionally enable DNS Resolution.
-
Click Create.
Via CLI:
oci network vcn create \ --compartment-id <ocid> \ --cidr-block "10.0.0.0/16" \ --display-name "Prod-VCN" \ --dns-label "prodvcn"
Best Practices:
-
Use non-overlapping CIDR blocks.
-
Plan for growth (use /16 for large environments).
-
Enable DNS for easier resource discovery.
-
-
What is a Network Source in IAM?
Answer:
A Network Source in IAM is a defined set of IP addresses or ranges used in policies to restrict resource access based on where requests originate.Use Case:
Allow access to Object Storage only from your corporate network:Allow group Developers to read objects in compartment Dev where request.network.source.ip = '203.0.113.0/24'
How to create:
-
Go to Identity & Security → Network Sources.
-
Click Create Network Source.
-
Provide a name and IP ranges.
-
Reference the network source in policies.
Benefits:
-
Adds an extra layer of security.
-
Restricts access based on network location.
-
Works with both user and resource principals.
-
-
How do you attach a policy to a group using the CLI?
Answer:
Run:oci iam group update \ --group-id <ocid> \ --add-policy <policy-ocid>
Note: In OCI, policies are not directly attached to groups. Instead, policies reference groups in their statements. The correct way to “attach” a policy is to write a policy statement that mentions the group:
Allow group <group-name> to <verb> <resource-type> in <compartment>
Example:
oci iam policy create \ --name "Dev-Policy" \ --description "Allow developers to manage instances" \ --compartment-id <ocid> \ --statements '["Allow group Developers to manage instances in compartment Dev"]'
-
What is a Compartment Landing Zone?
Answer:
A Compartment Landing Zone is a predefined set of compartments and policies that enforce your organization’s standards. It gives every new project a consistent, compliant starting point.Benefits:
-
Standardized compartment structure.
-
Pre-configured security policies.
-
Automated compliance.
-
Faster project onboarding.
-
Reduced misconfiguration risk.
How to create:
oci landing-zone create \ --name <name> \ --compartment-id <ocid> \ --landing-zone-type <type> \ --default-config '<json>'
Typical Structure:
Tenancy ├── Landing Zone │ ├── Core │ │ ├── Network │ │ ├── Security │ │ └── Logging │ ├── Projects │ │ ├── Project-A │ │ └── Project-B │ └── Shared Services │ ├── DNS │ └── Monitoring
-
-
How do you create a Tag Namespace in the Console?
Answer:
Steps:-
Sign in to the OCI Console.
-
Navigate to Governance → Tagging.
-
Click Create Namespace.
-
Provide a Name (e.g.,
CostCenter,Environment). -
Provide a Description.
-
Optionally add Tag Key Definitions:
-
Key name (e.g.,
Department). -
Value type (String, List).
-
Predefined values (optional).
-
-
Click Create.
Example Namespace:
Namespace: Environment Keys: - Dev - Test - Prod -
-
What is an Instance Principal?
Answer:
An Instance Principal is a special identity representing a compute instance, allowing it to make authenticated API calls without embedding user credentials.How it works:
-
You create a Dynamic Group with a matching rule for the instance.
-
You write a policy granting the dynamic group access to resources.
-
The instance automatically gets credentials via the Instance Metadata Service.
Example:
Dynamic Group: ComputeInstances Matching Rule: instance.compartment.id = 'ocid1.compartment.oc1..aaaa' Policy: Allow dynamic-group ComputeInstances to read objects in compartment Dev
Benefits:
-
No hardcoded credentials.
-
Automatic credential rotation.
-
Fine-grained access control.
-
-
How do you move resources between compartments?
Answer:
Via Console:-
Navigate to the resource (e.g., Compute Instance).
-
Select the resource(s).
-
Click Actions → Move Resources.
-
Choose the Destination Compartment.
-
Click Move.
Via CLI (example for Resource Manager Stack):
oci resource-manager stack move \ --stack-id <ocid> \ --compartment-id <destination-ocid>
Important Notes:
-
Not all resources can be moved.
-
Policies may need updating after the move.
-
Some resources have dependencies that must be moved together.
-
-
What is a Security Zone?
Answer:
A Security Zone is a protected set of resources and policies in Oracle Cloud that enforces strict security and compliance rules for critical workloads.Characteristics:
-
Immutable Policies – Cannot be modified or deleted.
-
Prevents Risky Actions – Blocks public buckets, unencrypted volumes, etc.
-
Compliance Enforcement – Ensures CIS, PCI-DSS, HIPAA compliance.
-
Automatic Remediation – Detects and blocks violations.
How to create:
-
Go to Identity & Security → Security Zones.
-
Click Create Security Zone.
-
Provide a name, compartment, and configuration.
-
Click Create.
Use Cases:
-
Financial services workloads.
-
Healthcare data processing.
-
Government compliance.
-
-
How do you create a new user in IAM?
Answer:
Via Console:-
Navigate to Identity & Security → Users.
-
Click Create User.
-
Fill in:
-
Name (e.g.,
john.doe). -
Email (required for notifications).
-
Description (optional).
-
-
Click Create.
Via CLI:
oci iam user create \ --name <name> \ --description <desc> \ --compartment-id <ocid>
After Creation:
-
Add user to groups.
-
Generate API keys if needed.
-
Enable MFA.
-
Set up federation if applicable.
-
-
What is a Route Table?
Answer:
A Route Table is a component that defines routing rules for your VCN. It controls how traffic flows between subnets and to external networks.Key Concepts:
-
Destination CIDR – Where traffic is going (e.g.,
0.0.0.0/0). -
Target – Where traffic is sent (e.g., Internet Gateway, NAT Gateway).
-
Route Rules – Ordered list of routing decisions.
Example Route Table:
Destination Target 0.0.0.0/0 Internet Gateway 10.0.0.0/16 Local VCN 192.168.0.0/16 DRG Types:
-
Public Route Table – Routes to Internet Gateway.
-
Private Route Table – Routes to NAT Gateway.
-
Custom Route Table – User-defined routes.
-
-
How do you create a Resource Manager Stack using the CLI?
Answer:
Run:oci resource-manager stack create \ --compartment-id <ocid> \ --config-source <source>
Example with Terraform:
oci resource-manager stack create \ --compartment-id ocid1.compartment.oc1..aaaa \ --display-name "MyStack" \ --config-source "https://github.com/user/repo.git" \ --terraform-version "1.0.x"
Explanation:
-
--config-source: Terraform configuration source (Git repo, ZIP, or folder). -
--terraform-version: Terraform version to use.
After Creation:
-
Plan the stack.
-
Apply the stack.
-
Monitor jobs.
-
-
What is IDCS?
Answer:
IDCS (Oracle Identity Cloud Service) is a cloud-based identity platform providing:-
Authentication – Verifying user identity.
-
Authorization – Controlling access to resources.
-
User Management – Creating, updating, deleting users.
-
SSO – Single Sign-On across applications.
-
MFA – Multi-Factor Authentication.
-
Federation – Integration with external IdPs.
Key Features:
Feature Description SSO One login for multiple apps MFA Extra security layer Federation Connect external IdPs Directory User and group management Reports Audit and compliance Integration with OCI:
IDCS is the default identity provider for OCI. It syncs users and groups with OCI IAM. -
-
How do you enable Instance Principals via the Console?
Answer:
Steps:-
Sign in to the OCI Console.
-
Navigate to Compute → Instances.
-
Select the instance you want to enable.
-
Click Attach VNIC with Instance Principle.
-
Confirm the action.
Note: The exact wording may vary. In practice, Instance Principals are enabled by:
-
Creating a Dynamic Group with a matching rule for the instance.
-
Writing a policy that grants the dynamic group access.
Example:
Dynamic Group: MyInstances Matching Rule: instance.id = 'ocid1.instance.oc1..aaaa' Policy: Allow dynamic-group MyInstances to read objects in compartment Dev
-
-
What is a Tag Namespace?
Answer:
A Tag Namespace is a grouping of related tags that ensures consistent labeling across your tenancy.Purpose:
-
Organize tags logically.
-
Enforce naming conventions.
-
Control who can create tags.
-
Enable tag-based policies.
Example:
Namespace: CostCenter Tags: - Finance - Marketing - Engineering Namespace: Environment Tags: - Dev - Test - ProdHow to create:
-
Go to Governance → Tagging.
-
Click Create Namespace.
-
Define the namespace and keys.
-
-
How do you create a compartment in the Console?
Answer:
Steps:-
Sign in to the OCI Console.
-
Navigate to Identity & Security → Compartments.
-
Click Create Compartment.
-
Fill in:
-
Name (e.g.,
Dev,Prod,Shared). -
Description.
-
Parent Compartment (optional; defaults to root).
-
-
Click Create Compartment.
Best Practices:
-
Use a hierarchical structure.
-
Limit depth to 6 levels.
-
Use meaningful names.
-
Apply policies at the compartment level.
-
-
What is an Access Request in IAM?
Answer:
An Access Request is a formal request submitted by a user to a policy owner asking for permission to access a specific resource.Process:
-
User identifies a resource they need access to.
-
User submits an access request (via email, ticket, or IAM workflow).
-
Policy owner reviews the request.
-
If approved, the user is added to the appropriate group or policy.
-
User gains access.
Benefits:
-
Formalizes access control.
-
Creates audit trail.
-
Ensures least privilege.
-
Reduces unauthorized access.
-
-
How do you create a Customer-Managed Key in the Console?
Answer:
Steps:-
Sign in to the OCI Console.
-
Navigate to Identity & Security → Key Management.
-
Click Create Key.
-
Fill in:
-
Name (e.g.,
MyEncryptionKey). -
Compartment.
-
Key Shape (algorithm, length).
-
-
Click Create Key.
Key Shapes:
Algorithm Length Use Case AES 128, 192, 256 Data encryption RSA 2048, 3072, 4096 Asymmetric encryption ECDSA P256, P384, P521 Digital signatures Note: Customer-Managed Keys give you full control over encryption keys, including rotation and deletion.
-
-
What is the Root Compartment?
Answer:
The Root Compartment is the top-level compartment automatically created when you sign up for Oracle Cloud. All other compartments live inside it, and it can never be deleted.Characteristics:
-
Created automatically with your tenancy.
-
Cannot be deleted or renamed.
-
Contains all other compartments.
-
Used for tenancy-level policies.
-
Access is highly privileged.
Best Practices:
-
Limit access to the root compartment.
-
Use it only for tenancy-wide policies.
-
Create sub-compartments for workloads.
-
Audit root compartment access regularly.
-
-
How do you create an Instance Configuration using the CLI?
Answer:
Run:oci compute-management instance-configuration create \ --name <name> \ --compartment-id <ocid> \ --instance-details '<json>'
Example:
oci compute-management instance-configuration create \ --name "WebServerConfig" \ --compartment-id ocid1.compartment.oc1..aaaa \ --instance-details '{ "shape": "VM.Standard.E4.Flex", "sourceDetails": { "imageId": "ocid1.image.oc1..aaaa", "sourceType": "image" }, "metadata": { "ssh_authorized_keys": "ssh-rsa AAAA..." } }'
Use Case: Quickly create multiple identical compute instances.
-
What is a Dynamic Group?
Answer:
A Dynamic Group is a rule-based collection of resources (not users) that share common attributes. Policies applied to a dynamic group affect all matching resources automatically.Key Points:
-
Contains resources, not users.
-
Membership is defined by matching rules.
-
Used for Instance Principals and Resource Principals.
-
Automatically updates as resources change.
Example Matching Rules:
instance.compartment.id = 'ocid1.compartment.oc1..aaaa' resource.type = 'computeinstance' instance.id = 'ocid1.instance.oc1..aaaa'
Example Policy:
Allow dynamic-group ComputeInstances to read objects in compartment Dev
-
-
How do you configure IDCS Federation in the Console?
Answer:
Steps:-
Sign in to the IDCS Console.
-
Navigate to Identity Providers.
-
Click Add Identity Provider.
-
Fill in:
-
Provider Type (SAML, OIDC, Social).
-
Name (e.g.,
AzureAD). -
Configuration Details (metadata URL, certificates).
-
-
Click Save.
-
Test the federation.
Required Information:
-
IdP metadata URL or XML.
-
Signing certificate.
-
Entity ID.
-
ACS URL.
Benefits:
-
Single Sign-On.
-
Centralized user management.
-
Reduced password fatigue.
-
-
What is a Subnet?
Answer:
A Subnet is a segment of a VCN tied to a specific availability domain. You define its CIDR block when creating it.Types:
-
Public Subnet – Has a route to an Internet Gateway.
-
Private Subnet – No direct internet access; uses NAT Gateway.
Key Characteristics:
-
Region-specific (within a VCN).
-
AD-specific (for regional subnets, can span ADs).
-
Has a CIDR block (e.g.,
10.0.1.0/24). -
Associated with a route table and security list.
Example:
VCN: 10.0.0.0/16 Public Subnet: 10.0.1.0/24 Private Subnet: 10.0.2.0/24
-
-
How do you create a Security Zone in the Console?
Answer:
Steps:-
Sign in to the OCI Console.
-
Navigate to Identity & Security → Security Zones.
-
Click Create Security Zone.
-
Fill in:
-
Name.
-
Compartment.
-
Configuration (policies to enforce).
-
-
Click Create.
What it does:
-
Enforces strict security policies.
-
Blocks risky actions (e.g., public buckets).
-
Ensures compliance (CIS, PCI-DSS).
-
Provides audit and reporting.
-
-
What is Oracle Cloud Tenancy?
Answer:
An Oracle Cloud Tenancy is your own secure, isolated space in Oracle Cloud where you create and manage all your resources like:-
Compute instances
-
Storage
-
Networking components
-
Databases
-
Applications
Key Characteristics:
-
Created when you sign up.
-
Has a unique OCID.
-
Contains a root compartment.
-
Has a home region.
-
Billing and administration are managed here.
Analogy: Think of a tenancy as your own private data center in the cloud.
-
-
How do you view tags on a resource?
Answer:
Via Console:-
Navigate to the resource (e.g., Compute Instance).
-
Select the resource.
-
Click the Tags tab.
-
View all associated tag namespaces and values.
Via CLI:
oci compute instance get --instance-id <ocid>
The output includes
freeform-tagsanddefined-tags.Example Output:
{ "freeform-tags": { "Environment": "Production", "Owner": "John" }, "defined-tags": { "CostCenter": { "Department": "Engineering" } } }
-
-
What is a Service Principal?
Answer:
A Service Principal is an identity representing a service or application, used to authenticate requests made by that service rather than a human user.Examples:
-
Object Storage service accessing a bucket.
-
Autonomous Database accessing a wallet.
-
API Gateway invoking a function.
Difference from Resource Principal:
Service Principal Resource Principal Represents a service Represents a resource Used by Oracle services Used by customer resources Managed by Oracle Managed by customer -
-
How do you create a compartment using the CLI?
Answer:
Run:oci iam compartment create \ --name <name> \ --description <desc> \ --compartment-id <parent-ocid>
Example:
oci iam compartment create \ --name "Dev" \ --description "Development compartment" \ --compartment-id ocid1.tenancy.oc1..aaaa
After Creation:
-
Apply policies.
-
Create sub-compartments.
-
Move resources.
-
Set budgets and quotas.
-
-
What is a Group Membership Rule?
Answer:
A Group Membership Rule is a rule defining the criteria for automatically adding users to a dynamic group based on their attributes.Note: In OCI, dynamic groups are for resources, not users. For user groups, membership is manual or via IDCS rules.
Example (IDCS):
user.department = "Engineering"
Example (OCI Dynamic Group for Resources):
instance.compartment.id = 'ocid1.compartment.oc1..aaaa'
Benefits:
-
Automation.
-
Consistency.
-
Reduced administrative overhead.
-
-
How do you generate an API Signing Key?
Answer:
Steps:-
Sign in to the OCI Console.
-
Click your Profile → API Keys.
-
Click Add API Key.
-
Select Generate API Key Pair.
-
Download the private key (save securely).
-
Click Add.
What you get:
-
Public key (uploaded to OCI).
-
Private key (stored locally).
-
Fingerprint (used for authentication).
Configuration File:
[DEFAULT] user=ocid1.user.oc1..aaaa fingerprint=aa:bb:cc:dd:ee:ff:... key_file=/path/to/private_key.pem tenancy=ocid1.tenancy.oc1..aaaa region=us-ashburn-1
-
-
What is a Compartment?
Answer:
A Compartment is a logical container inside your tenancy used to group and isolate resources. It makes access control and resource management much simpler.Key Characteristics:
-
Hierarchical (can contain sub-compartments).
-
Used for policy application.
-
Can be nested up to 6 levels.
-
Resources belong to exactly one compartment.
-
Cannot be deleted if it contains resources.
Example Structure:
Tenancy (Root) ├── Dev │ ├── Network │ └── Compute ├── Prod │ ├── Network │ └── Compute └── Shared ├── DNS └── Monitoring -
-
How do you create a Delegation Token using the CLI?
Answer:
Run:oci iam delegate-token create \ --compartment-id <ocid> \ --user-id <user-ocid> \ --description <desc>
Example:
oci iam delegate-token create \ --compartment-id ocid1.compartment.oc1..aaaa \ --user-id ocid1.user.oc1..aaaa \ --description "Temporary access for partner"
Output:
-
Token value (share securely).
-
Expiration time.
-
Token ID.
Note: Delegation tokens are short-lived and should be handled securely
-
-
What is a Federation Connection in IDCS?
Answer:
A Federation Connection in IDCS is the actual link established between IDCS and an external identity provider. It enables cross-system user access by trusting the external IdP’s authentication.How it works:
-
IDCS is configured as a Service Provider (SP) or Identity Provider (IdP).
-
A trust relationship is established using metadata (XML) and certificates.
-
Users authenticate with the external IdP.
-
IDCS receives the authentication assertion (SAML/OIDC).
-
User is granted access to OCI resources based on mapped groups.
Key Components:
Component Purpose Metadata Describes IdP/SP endpoints and certificates Signing Certificate Verifies message integrity Entity ID Unique identifier for the connection ACS URL Where assertions are sent Benefits:
-
Single Sign-On (SSO).
-
Centralized user management.
-
Reduced password fatigue.
-
Seamless cross-system access.
-
-
How do you view a policy’s details using the CLI?
Answer:
Run:oci iam policy get --policy-id <policy-ocid>
Example:
oci iam policy get --policy-id ocid1.policy.oc1..aaaaOutput includes:
-
Policy name
-
Description
-
Compartment ID
-
Policy statements
-
Version date
-
Lifecycle state
To list all policies in a compartment:
oci iam policy list --compartment-id <ocid>
To view policy statements only:
oci iam policy get --policy-id <ocid> --query 'data.statements'
-
-
What is a Launch Plan?
Answer:
A Launch Plan is a set of instructions for creating and managing multiple compute instances at once, ensuring they are all provisioned consistently.Key Features:
-
Define instance count.
-
Specify shape, image, and metadata.
-
Attach to instance configurations.
-
Automate provisioning.
Use Cases:
-
Web server farms.
-
Batch processing clusters.
-
High-availability setups.
-
Auto-scaling groups.
How to create:
oci compute-management instance-pool create \ --compartment-id <ocid> \ --instance-configuration-id <ocid> \ --size <number> \ --display-name <name>
Benefits:
-
Consistency across instances.
-
Reduced manual effort.
-
Faster deployment.
-
Easier scaling.
-
-
How do you apply a tag to a resource using the CLI?
Answer:
Run:oci resource-manager resource-tag-attach \ --resource-id <ocid> \ --tag-namespace <namespace> \ --tag <value>
Example:
oci resource-manager resource-tag-attach \ --resource-id ocid1.instance.oc1..aaaa \ --tag-namespace Environment \ --tag Production
Alternative (using generic CLI):
oci compute instance update \ --instance-id <ocid> \ --freeform-tags '{"Environment":"Production"}'
For defined tags:
oci compute instance update \ --instance-id <ocid> \ --defined-tags '{"CostCenter":{"Department":"Engineering"}}'
-
What is a Custom Role in IAM?
Answer:
A Custom Role is a user-defined role with precisely the permissions needed for a task — nothing more, nothing less — giving you fine-grained access control.Key Points:
-
Created by users (not Oracle-defined).
-
Contains specific permissions.
-
Can be assigned to groups.
-
Supports least-privilege principle.
How to create:
oci iam custom-role create \ --name <name> \ --description <desc> \ --compartment-id <ocid> \ --permissions '<json>'
Example Permissions:
{ "permissions": [ "INSTANCE_READ", "INSTANCE_LAUNCH", "VOLUME_READ" ] }
Benefits:
-
Least privilege.
-
Compliance.
-
Flexibility.
-
Auditability.
-
-
How do you request a Service Limit increase?
Answer:
Steps:-
Sign in to the OCI Console.
-
Navigate to Governance → Service Limits.
-
Identify the limit you want to increase.
-
Click Request Limit Increase (or create a support ticket).
-
Provide:
-
Service name.
-
Resource name.
-
Current limit.
-
Desired limit.
-
Justification.
-
-
Submit the request.
Via Support Ticket:
-
Go to Support → Create Ticket.
-
Select Service Limit Increase.
-
Fill in the details.
-
Submit.
Note: Approval depends on capacity and business justification.
-
-
What is an Internet Gateway?
Answer:
An Internet Gateway (IGW) is a networking component that connects your VCN to the public internet, enabling both inbound and outbound traffic.Key Characteristics:
-
Highly available and redundant.
-
Managed by Oracle.
-
Attached to a VCN.
-
Used in public subnets.
-
Requires route table entry.
Route Table Entry:
Destination Target 0.0.0.0/0 Internet Gateway Use Cases:
-
Public web servers.
-
Bastion hosts.
-
Load balancers.
-
NAT instances.
Difference from NAT Gateway:
Internet Gateway NAT Gateway Bidirectional Outbound only Public IP required No public IP Direct internet access Indirect access -
-
How do you create a group using the CLI?
Answer:
Run:oci iam group create \ --name <name> \ --description <desc> \ --compartment-id <ocid>
Example:
oci iam group create \ --name "Developers" \ --description "Development team" \ --compartment-id ocid1.tenancy.oc1..aaaa
After Creation:
-
Add users to the group.
-
Attach policies.
-
Manage permissions.
To add a user to a group:
oci iam group add-user \ --group-id <group-ocid> \ --user-id <user-ocid>
-
-
What is a Resource Manager Stack?
Answer:
A Resource Manager Stack is a collection of resources and Terraform configurations managed as a single unit, used to deploy and manage complex infrastructure consistently.Key Concepts:
-
Stack – Container for Terraform configuration.
-
Plan – Preview of changes.
-
Apply – Execute changes.
-
Destroy – Tear down resources.
-
Job – Execution of plan/apply/destroy.
How to create:
oci resource-manager stack create \ --compartment-id <ocid> \ --config-source <source>
Benefits:
-
Infrastructure as Code (IaC).
-
Version control.
-
Repeatable deployments.
-
Rollback capabilities.
-
-
How do you create a Network Source in the Console?
Answer:
Steps:-
Sign in to the OCI Console.
-
Navigate to Identity & Security → Network Sources.
-
Click Create Network Source.
-
Fill in:
-
Name (e.g.,
CorporateNetwork). -
Description.
-
IP Address Ranges (e.g.,
203.0.113.0/24).
-
-
Click Create.
Use in Policy:
Allow group Developers to read objects in compartment Dev where request.network.source.ip = '203.0.113.0/24'
Benefits:
-
IP-based access control.
-
Extra security layer.
-
Works with user and resource principals.
-
-
What is MFA in Oracle Cloud?
Answer:
MFA (Multi-Factor Authentication) is a security feature requiring users to verify their identity with an additional factor beyond just a password.Factors:
Factor Type Example Something you know Password, PIN Something you have Phone, token Something you are Fingerprint, face MFA Methods in OCI:
-
Oracle Mobile Authenticator (push notification).
-
SMS (text message).
-
Third-party authenticator (Google Authenticator, Authy).
-
Security questions (backup).
Benefits:
-
Prevents unauthorized access.
-
Protects against password theft.
-
Compliance requirement.
-
Reduces risk of breaches.
How to enable:
-
User level: Profile → Security → Enable MFA.
-
Tenancy level: IDCS Authentication Policies.
-
-
How do you enable MFA using the CLI?
Answer:
Run:oci iam user update \ --user-id <ocid> \ --auth-tokens-enabled true
Note: The CLI command above enables auth tokens, not MFA directly. MFA is typically managed through IDCS or the Console.
To enable MFA for a user in IDCS via CLI:
oci identity-domains user update \ --user-id <ocid> \ --mfa-enabled true
Alternative:
Use the OCI Console:-
Navigate to Identity & Security → Users.
-
Select the user.
-
Click Add MFA.
-
Follow the setup steps.
Best Practice: Enforce MFA at the tenancy level via Authentication Policies.
-
-
What is a Home Region?
Answer:
The Home Region is the region where your tenancy was first created. It stores your IAM policies and core networking resources. You cannot change it once set.Key Characteristics:
-
Determines where IAM resources live.
-
Cannot be changed.
-
Affects latency for IAM operations.
-
Other regions are called Subscribed Regions.
What’s Stored in Home Region:
-
IAM users, groups, policies.
-
Compartments.
-
Tag namespaces.
-
Dynamic groups.
-
Identity providers.
What’s NOT Stored in Home Region:
-
Compute instances (can be in any region).
-
Block volumes.
-
VCNs (region-specific).
-
Object Storage buckets.
How to find your Home Region:
-
Console → Region Management.
-
CLI:
oci iam region list.
-
-
How do you create a Custom Role using the CLI?
Answer:
Run:oci iam custom-role create \ --name <name> \ --description <desc> \ --compartment-id <ocid> \ --permissions '<json>'
Example:
oci iam custom-role create \ --name "InstanceReader" \ --description "Can read instances" \ --compartment-id ocid1.tenancy.oc1..aaaa \ --permissions '["INSTANCE_READ"]'
Available Permissions:
-
INSTANCE_READ -
INSTANCE_LAUNCH -
VOLUME_READ -
VOLUME_CREATE -
OBJECT_READ -
OBJECT_WRITE
Benefits:
-
Least privilege.
-
Fine-grained control.
-
Compliance.
-
-
What is Dynamic Group Membership?
Answer:
Dynamic Group Membership is a membership type where resources are added to a group automatically based on defined criteria, rather than a manually maintained list.Key Points:
-
Contains resources, not users.
-
Membership defined by matching rules.
-
Automatically updates.
-
Used for Instance Principals and Resource Principals.
Example Matching Rules:
instance.compartment.id = 'ocid1.compartment.oc1..aaaa' resource.type = 'computeinstance' instance.id = 'ocid1.instance.oc1..aaaa'
Example Policy:
Allow dynamic-group ComputeInstances to read objects in compartment Dev
Benefits:
-
Automation.
-
Consistency.
-
Reduced administrative overhead.
-
Scalability.
-
-
How do you launch a compute instance in a specific availability domain?
Answer:
Via Console:-
Navigate to Compute → Instances.
-
Click Create Instance.
-
Under Placement Configuration, choose the Availability Domain.
-
Complete the remaining configuration.
-
Click Create.
Via CLI:
oci compute instance launch \ --compartment-id <ocid> \ --availability-domain <ad-name> \ --shape <shape> \ --image-id <image-ocid> \ --subnet-id <subnet-ocid>
Example:
oci compute instance launch \ --compartment-id ocid1.compartment.oc1..aaaa \ --availability-domain "Uocm:PHX-AD-1" \ --shape "VM.Standard.E4.Flex" \ --image-id ocid1.image.oc1..aaaa \ --subnet-id ocid1.subnet.oc1..aaaa
Availability Domain Names:
-
Format:
<region-prefix>:<AD-number> -
Example:
Uocm:PHX-AD-1,Uocm:PHX-AD-2
-
-
What is a Signing Certificate in IDCS?
Answer:
A Signing Certificate in IDCS is a digital certificate used to sign and verify messages and tokens during authentication, ensuring message integrity.Purpose:
-
Sign SAML assertions.
-
Verify token authenticity.
-
Encrypt communication.
-
Establish trust between IdP and SP.
Key Components:
Component Purpose Public Key Shared with SP for verification Private Key Used by IdP to sign Certificate Contains public key and metadata Expiration Certificate validity period How to manage:
-
IDCS Console → Security → Certificates.
-
View, rotate, or upload certificates.
-
Configure signing and encryption settings.
Best Practice: Rotate certificates before expiration.
-
-
How do you view policies attached to a user or group?
Answer:
Via Console:-
Navigate to Identity & Security → Users or Groups.
-
Select the user or group.
-
Click the Policies tab.
-
View all attached policies.
Via CLI:
oci iam policy list --compartment-id <ocid>
Note: In OCI, policies are not directly attached to users or groups. Instead, policies reference groups in their statements. To find policies affecting a group, search for the group name in policy statements.
Example:
Allow group Developers to manage instances in compartment Dev
To list all policies:
oci iam policy list --compartment-id <tenancy-ocid> --all
-
-
What is an Availability Domain?
Answer:
An Availability Domain (AD) is a physically isolated data center within a region. Having multiple availability domains gives you redundancy and fault tolerance.Key Characteristics:
-
Physically separate.
-
Independent power, cooling, network.
-
Low-latency connectivity between ADs.
-
Region-specific (usually 3 ADs per region).
Benefits:
-
High availability.
-
Fault tolerance.
-
Disaster recovery.
-
Load distribution.
Example:
Region: US East (Ashburn) AD-1: Uocm:PHX-AD-1 AD-2: Uocm:PHX-AD-2 AD-3: Uocm:PHX-AD-3
Best Practice: Deploy across multiple ADs for production workloads.
-
-
How do you attach a policy to a resource using the CLI?
Answer:
Run:oci iam resource-attach-policy \ --resource-id <ocid> \ --policy-id <policy-ocid>
Note: In OCI, policies are not directly attached to resources. Instead, policies reference resources or compartments in their statements.
Correct Approach:
oci iam policy create \ --name "ResourcePolicy" \ --description "Policy for specific resource" \ --compartment-id <ocid> \ --statements '["Allow group Admins to manage instances in compartment Dev"]'
To attach a policy to a resource via tags:
Allow group Developers to manage instances in compartment Dev where target.resource.tag.Environment = 'Production'
-
What is a Service Connector Hub?
Answer:
A Service Connector Hub is a service that centrally connects multiple Oracle Cloud services and regions, simplifying cross-service workflows and enabling hybrid and multi-cloud setups.Key Features:
-
Source – Where data comes from (e.g., Object Storage, Logging).
-
Target – Where data goes (e.g., Functions, Streaming).
-
Task – What to do with data (e.g., filter, transform).
Use Cases:
-
Log aggregation.
-
Data replication.
-
Event-driven workflows.
-
Cross-region data transfer.
How to create:
-
Navigate to Analytics & AI → Service Connector Hub.
-
Click Create Service Connector.
-
Define source, target, and tasks.
-
Click Create.
Benefits:
-
Centralized integration.
-
Reduced custom code.
-
Scalability.
-
Cost efficiency.
-
-
How do you create a Resource Discovery Rule in the Console?
Answer:
Steps:-
Sign in to the OCI Console.
-
Navigate to Identity & Security → Dynamic Groups.
-
Select the dynamic group.
-
Click Add Rule.
-
Go to the Resource Discovery tab.
-
Enter the rule statement (e.g.,
instance.compartment.id = 'ocid1.compartment.oc1..aaaa'). -
Click Add Rule.
Example Rule:
All {instance.compartment.id = 'ocid1.compartment.oc1..aaaa'}Benefits:
-
Automatic resource discovery.
-
Dynamic membership.
-
Reduced manual maintenance.
-
Scalability.
-
-
What is the Oracle Cloud Infrastructure API?
Answer:
The Oracle Cloud Infrastructure (OCI) API is a set of REST APIs for programmatically creating, updating, deleting, and managing all your Oracle Cloud resources.Key Characteristics:
-
RESTful architecture.
-
JSON request/response.
-
OAuth 2.0 authentication.
-
Regional endpoints.
-
Rate-limited.
Common APIs:
Service API Endpoint Compute /compute/Networking /network/IAM /iam/Object Storage /objectstorage/Database /database/Authentication:
-
API Signing Key.
-
Instance Principal.
-
Resource Principal.
-
Delegation Token.
Example:
curl -X GET \ https://iaas.us-ashburn-1.oraclecloud.com/20160918/instances \ -H "Authorization: Bearer <token>"
-
-
How do you enable MFA for a user in IDCS?
Answer:
Steps:-
Sign in to the IDCS Console.
-
Navigate to Users.
-
Select the user.
-
Go to the Security tab.
-
Click Enable MFA.
-
Choose the preferred method:
-
Oracle Mobile Authenticator.
-
SMS.
-
Third-party authenticator.
-
-
Follow the setup steps.
-
Click Save.
Alternative (Console):
-
Navigate to Identity & Security → Users.
-
Select the user.
-
Click Add MFA.
-
Follow the setup steps.
Best Practice: Enforce MFA at the tenancy level via Authentication Policies.
-
-
What is an OCI Group in IDCS?
Answer:
An OCI Group in IDCS is a group in IDCS that syncs with a corresponding group in Oracle Cloud Infrastructure, keeping access control consistent between both systems.How it works:
-
Create a group in IDCS.
-
Map it to an OCI group.
-
Users in IDCS group are synced to OCI group.
-
Policies applied to OCI group affect synced users.
Benefits:
-
Centralized user management.
-
Consistent access control.
-
Reduced administrative overhead.
-
Seamless SSO.
Example:
IDCS Group: Developers OCI Group: Developers Sync: Automatic Policies: Applied to OCI Group
-
-
What is a Customer-Managed Key?
Answer:
A Customer-Managed Key is a cryptographic key you create and control in Oracle Cloud for encrypting your data, ensuring it stays secure and confidential.Key Characteristics:
-
Created and managed by you.
-
Stored in Key Management Service (KMS).
-
Can be rotated, disabled, or deleted.
-
Used for encryption at rest.
Key Shapes:
Algorithm Length Use Case AES 128, 192, 256 Data encryption RSA 2048, 3072, 4096 Asymmetric encryption ECDSA P256, P384, P521 Digital signatures How to create:
-
Navigate to Identity & Security → Key Management.
-
Click Create Key.
-
Fill in name, compartment, and key shape.
-
Click Create Key.
Benefits:
-
Full control over keys.
-
Compliance.
-
Security.
-
Auditability.
-
-
What is a Policy Attachment?
Answer:
A Policy Attachment is a link that connects a policy to a specific resource, applying the policy’s access rules directly to that resource.Note: In OCI, policies are not directly attached to resources. Instead, policies reference resources or compartments in their statements.
Correct Approach:
Allow group Developers to manage instances in compartment Dev
To attach a policy to a resource via tags:
Allow group Developers to manage instances in compartment Dev where target.resource.tag.Environment = 'Production'
Benefits:
-
Fine-grained access control.
-
Resource-level policies.
-
Flexibility.
-
Compliance.
-
-
What is a Service Account?
Answer:
A Service Account is an account used to authenticate requests from a service or application, keeping service access separate from human user accounts.Key Characteristics:
-
Not tied to a human user.
-
Used for automation.
-
Has its own credentials.
-
Can be assigned policies.
Examples:
-
CI/CD pipeline account.
-
Monitoring service account.
-
Backup service account.
How to create:
-
Create a user in IAM.
-
Generate API keys.
-
Assign policies.
-
Use in automation scripts.
Best Practice: Use Instance Principals or Resource Principals instead of service accounts where possible.
-
-
What is a Resource Discovery Rule in IAM?
Answer:
A Resource Discovery Rule in IAM is a rule that defines criteria for automatically discovering resources and adding them to a dynamic group.How it works:
-
Define a matching rule.
-
OCI scans for matching resources.
-
Matching resources are added to the dynamic group.
-
Policies applied to the group affect all matching resources.
Example Rule:
instance.compartment.id = 'ocid1.compartment.oc1..aaaa'
Benefits:
-
Automation.
-
Dynamic membership.
-
Reduced manual maintenance.
-
Scalability.
How to create:
-
Navigate to Dynamic Groups.
-
Select the group.
-
Click Add Rule.
-
Enter the rule statement.
-
Click Add Rule.
-
-
Can you change your home region?
Answer:
No. You cannot change your home region. If you need a different default region, you would have to create a brand new tenancy there.Why?
-
Home region stores IAM resources.
-
Changing it would break existing policies.
-
It’s tied to your tenancy’s identity.
-
Oracle does not support migration.
What you CAN do:
-
Subscribe to additional regions.
-
Deploy resources in other regions.
-
Use Cross-Region features (e.g., Object Storage replication).
How to find your Home Region:
-
Console → Region Management.
-
CLI:
oci iam region list.
Best Practice: Choose your home region carefully during signup.
-
-
How can you use tags in IAM Policies?
Answer:
You can reference specific tag values in policy statements to grant or deny access to resources based on their category or other attributes.Example Policies:
Allow group Developers to manage instances in compartment Dev where target.resource.tag.Environment = 'Development' Allow group Admins to manage all-resources in tenancy where target.resource.tag.CostCenter = 'CC-1234' Deny group Contractors to manage instances in compartment Prod where target.resource.tag.Environment = 'Production'
Benefits:
-
Fine-grained access control.
-
Dynamic policies.
-
Reduced policy count.
-
Compliance.
Supported Tag Types:
-
Free-form tags.
-
Defined tags.
-
-
What is the difference between a Group and a Compartment?
Answer:
Feature Group Compartment Purpose Collection of users Container for resources Used For Access control Resource organization Policies Referenced in policies Policies applied at level Hierarchy Flat Hierarchical Contains Users Resources and sub-compartments Deletion Can be deleted Cannot delete if resources exist Example:
-
Group:
Developers(contains users John, Jane). -
Compartment:
Dev(contains VCN, instances, databases).
How they work together:
Allow group Developers to manage instances in compartment Dev
Analogy: A group is like a team; a compartment is like a project folder.
-
-
What is an Instance Configuration?
Answer:
An Instance Configuration is a saved template of settings used to quickly and consistently create new compute instances with the same specifications.Key Components:
-
Shape (e.g., VM.Standard.E4.Flex).
-
Image (e.g., Oracle Linux 8).
-
Metadata (e.g., SSH keys).
-
Network (e.g., VCN, subnet).
-
Storage (e.g., boot volume size).
How to create:
oci compute-management instance-configuration create \ --name <name> \ --compartment-id <ocid> \ --instance-details '<json>'
Use Cases:
-
Auto-scaling groups.
-
Instance pools.
-
Consistent deployments.
-
Faster provisioning.
Benefits:
-
Consistency.
-
Speed.
-
Reduced errors.
-
Scalability.
-
-
How do you create a Group Membership Rule in the Console?
Answer:
Steps:-
Sign in to the OCI Console.
-
Navigate to Identity & Security → Dynamic Groups.
-
Select the dynamic group.
-
Click Add Rule.
-
Enter the rule statement (e.g.,
instance.compartment.id = 'ocid1.compartment.oc1..aaaa'). -
Set the priority (optional).
-
Click Add Rule.
Example Rule:
All {instance.compartment.id = 'ocid1.compartment.oc1..aaaa'}Note: In OCI, dynamic groups are for resources, not users. For user groups, membership is manual or via IDCS rules.
Benefits:
-
Automation.
-
Consistency.
-
Reduced administrative overhead.
-
Scalability.
-
-
What is the difference between a Security List and a Network Security Group (NSG)?
Answer:
Feature Security List Network Security Group (NSG) Applied To Subnet VNIC Scope All resources in subnet Specific resources Rules Ingress and egress Ingress and egress Stateful Yes Yes Use Case Subnet-level control Resource-level control Flexibility Less granular More granular Best Practice: Use NSGs for fine-grained control; use Security Lists for subnet-level defaults.
-
What is a NAT Gateway?
Answer:
A NAT Gateway allows instances in a private subnet to access the internet for outbound traffic without exposing them to inbound traffic.Key Characteristics:
-
Outbound only.
-
No public IP required.
-
Managed by Oracle.
-
Attached to a VCN.
Route Table Entry:
Destination Target 0.0.0.0/0 NAT Gateway Use Cases:
-
Private instances downloading updates.
-
Backend servers accessing APIs.
-
Secure outbound communication.
-
-
What is a Service Gateway?
Answer:
A Service Gateway provides access to Oracle Services (e.g., Object Storage, Autonomous Database) without traversing the internet.Key Characteristics:
-
Private access to Oracle services.
-
No internet required.
-
Managed by Oracle.
-
Attached to a VCN.
Route Table Entry:
Destination Target All IAD Services Service Gateway Use Cases:
-
Private access to Object Storage.
-
Secure database connections.
-
Compliance-friendly architecture.
-
-
What is a Dynamic Routing Gateway (DRG)?
Answer:
A Dynamic Routing Gateway (DRG) is a virtual router that provides a path for private traffic between your VCN and external networks (on-premises, other VCNs).Key Characteristics:
-
Connects VCN to on-premises.
-
Connects VCN to other VCNs.
-
Supports VPN and FastConnect.
-
Managed by Oracle.
Use Cases:
-
Hybrid cloud.
-
Multi-VCN connectivity.
-
Disaster recovery.
-
-
What is a Load Balancer in OCI?
Answer:
A Load Balancer distributes incoming traffic across multiple backend servers to ensure high availability and scalability.Types:
Type Layer Use Case Flexible Load Balancer Layer 7 HTTP/HTTPS Network Load Balancer Layer 4 TCP/UDP Key Features:
-
SSL termination.
-
Health checks.
-
Session persistence.
-
Auto-scaling.
How to create:
-
Navigate to Networking → Load Balancers.
-
Click Create Load Balancer.
-
Configure listeners, backends, and health checks.
-
Click Create.
-
-
What is Autonomous Database?
Answer:
Autonomous Database is a fully managed, self-driving database service in Oracle Cloud that automates patching, tuning, and scaling.Key Features:
-
Self-driving.
-
Self-securing.
-
Self-repairing.
-
Auto-scaling.
Types:
Type Workload ATP Transaction processing ADW Data warehousing AJD JSON database APEX Low-code development Benefits:
-
Reduced administration.
-
High availability.
-
Security.
-
Cost efficiency.
-
-
What is Object Storage?
Answer:
Object Storage is a scalable, durable storage service for unstructured data (e.g., images, videos, backups).Key Concepts:
-
Bucket – Container for objects.
-
Object – File and metadata.
-
Namespace – Top-level container.
-
Tier – Standard, Infrequent Access, Archive.
Use Cases:
-
Backup and recovery.
-
Media storage.
-
Data lakes.
-
Static website hosting.
How to create a bucket:
oci os bucket create \ --compartment-id <ocid> \ --name <bucket-name> \ --storage-tier Standard
-
-
What is Block Volume?
Answer:
Block Volume is a high-performance storage service for compute instances, providing persistent block-level storage.Key Features:
-
Persistent.
-
High performance.
-
Resizable.
-
Snapshot support.
Types:
Type Use Case Boot Volume OS and boot Block Volume Data storage How to create:
oci bv volume create \ --compartment-id <ocid> \ --availability-domain <ad> \ --size-in-gbs <size> \ --display-name <name>
-
-
What is File Storage?
Answer:
File Storage is a managed NFS file system service for shared storage across compute instances.Key Features:
-
NFSv3 compatible.
-
Shared access.
-
Scalable.
-
Managed by Oracle.
Use Cases:
-
Shared application data.
-
Home directories.
-
Content repositories.
How to create:
oci fs file-system create \ --compartment-id <ocid> \ --availability-domain <ad> \ --display-name <name>
-
-
What is a Compartment Quota?
Answer:
A Compartment Quota is a limit on the amount of resources that can be created in a compartment.Key Features:
-
Prevents over-provisioning.
-
Enforces budget.
-
Supports governance.
-
Can be set at compartment level.
How to create:
oci limits quota create \ --compartment-id <ocid> \ --name <name> \ --description <desc> \ --statements '["set compute quota instance-count to 10 in compartment Dev"]'
Benefits:
-
Cost control.
-
Resource governance.
-
Compliance.
-
-
What is a Budget in OCI?
Answer:
A Budget is a spending limit you set for a compartment or tenancy, with alerts when spending approaches or exceeds the limit.Key Features:
-
Track spending.
-
Set alerts.
-
Forecast costs.
-
Automate actions.
How to create:
-
Navigate to Governance → Budgets.
-
Click Create Budget.
-
Set amount and alert rules.
-
Click Create.
Benefits:
-
Cost control.
-
Financial governance.
-
Proactive alerts.
-
-
What is a Cost Analysis?
Answer:
Cost Analysis is a tool for visualizing and analyzing your Oracle Cloud spending.Key Features:
-
Filter by service, compartment, tag.
-
Group by dimensions.
-
Export reports.
-
Forecast costs.
How to access:
-
Navigate to Governance → Cost Analysis.
-
Apply filters.
-
View charts and tables.
Benefits:
-
Cost visibility.
-
Chargeback.
-
Optimization.
-
-
What is a Logging Service?
Answer:
Logging is a service for collecting, managing, and analyzing logs from Oracle Cloud resources.Key Features:
-
Centralized logging.
-
Search and filter.
-
Retention policies.
-
Integration with Service Connector Hub.
Log Types:
Type Source Audit IAM, API calls Service Compute, Networking Custom Applications How to enable:
-
Navigate to Observability & Management → Logging.
-
Click Create Log.
-
Select source and configuration.
-
Click Create.
-
-
What is Monitoring?
Answer:
Monitoring is a service for tracking metrics and setting alarms for Oracle Cloud resources.
Key Features:
-
Metrics collection.
-
Alarms and notifications.
-
Dashboards.
-
Integration with Notifications.
Common Metrics:
-
CPU utilization.
-
Memory usage.
-
Network throughput.
-
Disk I/O.
How to create an alarm:
-
Navigate to Observability & Management → Monitoring → Alarms.
-
Click Create Alarm.
-
Define metric, threshold, and notification.
-
Click Create
-
-
What is Notifications?
Answer:
Notifications is a service for sending messages to users or services via email, SMS, Slack, PagerDuty, etc.Key Concepts:
-
Topic – Channel for messages.
-
Subscription – Endpoint (email, SMS, HTTPS).
-
Message – Content sent.
How to create:
-
Navigate to Observability & Management → Notifications.
-
Click Create Topic.
-
Add subscriptions.
-
Publish messages.
Use Cases:
-
Alarm notifications.
-
Budget alerts.
-
Automation triggers.
-
-
What is a Function in OCI?
Answer:
Functions is a serverless compute service that lets you run code without provisioning servers.Key Features:
-
Serverless.
-
Auto-scaling.
-
Pay-per-use.
-
Container-based.
Use Cases:
-
Event-driven processing.
-
API backends.
-
Automation.
-
Data processing.
How to create:
oci fn function create \ --application-id <ocid> \ --display-name <name> \ --image <image>
-
-
What is a Container Engine for Kubernetes (OKE)?
Answer:
OKE is a managed Kubernetes service that simplifies deploying, managing, and scaling containerized applications.Key Features:
-
Managed control plane.
-
Auto-scaling.
-
Integration with OCI services.
-
High availability.
Use Cases:
-
Microservices.
-
CI/CD.
-
Hybrid cloud.
-
Machine learning.
How to create:
-
Navigate to Developer Services → Container Engine.
-
Click Create Cluster.
-
Configure node pools and networking.
-
Click Create.
-
-
What is a FastConnect?
Answer:
FastConnect is a dedicated private network connection between your on-premises data center and Oracle Cloud.Key Features:
-
High bandwidth.
-
Low latency.
-
Private connection.
-
Redundant options.
Use Cases:
-
Hybrid cloud.
-
Data migration.
-
Disaster recovery.
-
Compliance.
How to create:
-
Navigate to Networking → FastConnect.
-
Click Create FastConnect.
-
Configure virtual circuit and peering.
-
Click Create.
-
-
How do you list all instances in a compartment?
Answer:
oci compute instance list --compartment-id <ocid>
With filters:
oci compute instance list \ --compartment-id <ocid> \ --lifecycle-state RUNNING \ --availability-domain <ad>
-
How do you stop a compute instance?
Answer:
oci compute instance action \ --instance-id <ocid> \ --action STOP
Actions:
-
START -
STOP -
SOFTSTOP -
RESET -
SOFTRESET
-
-
How do you create a bucket in Object Storage?
Answer:
oci os bucket create \ --compartment-id <ocid> \ --name <bucket-name> \ --storage-tier Standard
Storage Tiers:
-
Standard -
InfrequentAccess -
Archive
-
-
How do you upload a file to Object Storage?
Answer:
oci os object put \ --bucket-name <bucket-name> \ --file <file-path> \ --name <object-name>
-
How do you create a block volume?
Answer:
oci bv volume create \ --compartment-id <ocid> \ --availability-domain <ad> \ --size-in-gbs <size> \ --display-name <name>
-
How do you attach a block volume to an instance?
Answer:
oci compute volume-attachment attach \ --instance-id <instance-ocid> \ --volume-id <volume-ocid> \ --type iscsi
-
How do you create a subnet?
Answer:
oci network subnet create \ --compartment-id <ocid> \ --vcn-id <vcn-ocid> \ --cidr-block "10.0.1.0/24" \ --display-name <name> \ --availability-domain <ad>
-
How do you create an Internet Gateway?
Answer:
oci network internet-gateway create \ --compartment-id <ocid> \ --vcn-id <vcn-ocid> \ --is-enabled true \ --display-name <name>
-
How do you create a NAT Gateway?
Answer:
oci network nat-gateway create \ --compartment-id <ocid> \ --vcn-id <vcn-ocid> \ --display-name <name>
-
How do you create a Service Gateway?
Answer:
oci network service-gateway create \ --compartment-id <ocid> \ --vcn-id <vcn-ocid> \ --services '[{"serviceId":"<service-ocid>"}]' \ --display-name <name>

