/cloud-skills:oci-landing-zone-setupfrom cloud-skills
Guides designing and implementing an OCI landing zone with compartment hierarchy, IAM policies, Identity Domains, Cloud Guard/Security Zones, and hub network via DRG. Use when structuring an OCI tenancy or onboarding workloads.
Ships in cloud-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
OCI has no separate-account model like AWS or GCP-project model — a single
tenancy is the entire organization, and everything inside it is
organized by Compartments, a hierarchical logical container that is
simultaneously the OU-equivalent grouping construct and the place
resources actually live. Get the compartment design wrong and every
workload ends up flat in the root compartment with IAM policies that can't
be scoped cleanly, no separation between security tooling and application
resources, and no way to delegate administration without granting
tenancy-wide access. This skill defines a landing zone aligned to Oracle's
CIS OCI Landing Zone reference architecture: a compartment hierarchy
that encodes environment/function boundaries, IAM policies written in
OCI's plain-language policy grammar and scoped per compartment, Identity
Domains for identity isolation, Cloud Guard and Security Zones for
guardrail enforcement, and a hub network built on the Dynamic Routing
Gateway (DRG) — so new workloads land compliant and network-connected from
the first terraform apply.
oci iam region-subscription create. Decide the home region and the
initial subscribed-region set before building anything region-specific
(Vault keys, Identity Domains, and some other resources have region
affinity).oci provider ≥ 5.x if
using infrastructure as code — pin the provider version, since
Identity Domain resources changed materially between provider 4.x and
5.x generations.free, premium,
oracle-apps-premium, external-user).Design the compartment hierarchy before creating any resource. A defensible starting structure, modeled on the CIS OCI Landing Zone:
Tenancy (root compartment)
├── Security
│ ├── (Cloud Guard, Vault, centralized Object Storage log archive)
├── Network
│ ├── (DRG hub, hub VCN, FastConnect/Site-to-Site VPN)
├── Workloads
│ ├── Production
│ │ ├── payments-prod
│ │ └── checkout-prod
│ └── NonProduction
│ ├── payments-dev
│ └── checkout-staging
└── Sandbox
└── individual developer compartments
Unlike an AWS OU (which only ever contains accounts) or a GCP folder
(which only contains projects), an OCI compartment can hold both
sub-compartments and resources directly — put actual workload
resources only in leaf compartments (checkout-prod, not Workloads
or Production), or IAM policies scoped to the leaf become
unenforceable because resources leak into the parent.
Create the compartment hierarchy with Terraform:
resource "oci_identity_compartment" "network" {
compartment_id = var.tenancy_ocid
name = "Network"
description = "Hub networking resources"
enable_delete = false
}
resource "oci_identity_compartment" "workloads_prod" {
compartment_id = oci_identity_compartment.workloads.id
name = "Production"
description = "Production workload compartments"
}
resource "oci_identity_compartment" "checkout_prod" {
compartment_id = oci_identity_compartment.workloads_prod.id
name = "checkout-prod"
description = "checkout-prod workload"
}
Or via CLI for a quick bootstrap:
oci iam compartment create \
--compartment-id <TENANCY_OCID> \
--name Network \
--description "Hub networking resources"
Write IAM policies scoped to compartments, using OCI's
plain-language policy grammar (Allow <subject> to <verb> <resource-type> in compartment <path>), referencing nested
compartments with a colon-separated path:
resource "oci_identity_policy" "network_admins" {
compartment_id = var.tenancy_ocid
name = "network-admins-policy"
description = "Network team manages networking resources"
statements = [
"Allow group NetworkAdmins to manage virtual-network-family in compartment Network",
"Allow group NetworkAdmins to manage virtual-network-family in compartment Workloads:Production:checkout-prod",
]
}
resource "oci_identity_policy" "checkout_team_delegated_admin" {
compartment_id = oci_identity_compartment.checkout_prod.id
name = "checkout-team-admin-policy"
description = "Delegate self-service admin within the leaf compartment only"
statements = [
"Allow group CheckoutTeam to manage all-resources in compartment checkout-prod",
]
}
The four policy verbs (inspect < read < use < manage) are
additive in privilege — grant the narrowest verb that satisfies the
need, the same discipline as scoping an AWS IAM action list or a GCP
custom role.
Use Dynamic Groups for workload identity, not embedded API keys. OCI's analog to an AWS instance profile or a GCP attached service account is a Dynamic Group — a rule-based group matching compute instances or resources, granted permissions via ordinary policy statements:
resource "oci_identity_dynamic_group" "checkout_compute" {
compartment_id = var.tenancy_ocid
name = "checkout-prod-compute"
description = "Compute instances in checkout-prod"
matching_rule = "ALL {instance.compartment.id = '${oci_identity_compartment.checkout_prod.id}'}"
}
resource "oci_identity_policy" "checkout_compute_policy" {
compartment_id = var.tenancy_ocid
name = "checkout-compute-policy"
statements = [
"Allow dynamic-group checkout-prod-compute to read secret-bundles in compartment Security",
]
}
This gives compute instances short-lived instance-principal
authentication instead of long-lived API signing keys — apply the same
"eliminate long-lived credentials" discipline covered in
cloud-iam-hardening.
Deploy the CIS OCI Landing Zone Terraform reference (or the hand-rolled equivalent above at smaller scale) to get the compartment structure, baseline IAM policies, Cloud Guard, and centralized logging provisioned consistently rather than assembled ad hoc across multiple console sessions.
Stand up the hub network first, in the Network compartment: a
hub VCN with a Dynamic Routing Gateway (DRG) attached, and spoke VCNs
(one per workload compartment) attached to the DRG:
resource "oci_core_drg" "hub" {
compartment_id = oci_identity_compartment.network.id
display_name = "drg-hub"
}
resource "oci_core_drg_attachment" "checkout_prod" {
drg_id = oci_core_drg.hub.id
vcn_id = oci_core_vcn.checkout_prod.id
display_name = "checkout-prod-attachment"
}
For hybrid connectivity to on-premises or another cloud, provision FastConnect (OCI's dedicated-interconnect equivalent to AWS Direct Connect / Azure ExpressRoute / GCP Cloud Interconnect) with a Site-to-Site VPN as failover — never a VPN-only path for production-critical hybrid traffic.
Centralize audit and flow logs by routing them through a Service
Connector Hub into an Object Storage bucket in the Security
compartment, with a retention rule so logs can't be shortened or
deleted even by a compromised workload-compartment credential:
oci sch service-connector create \
--compartment-id <SECURITY_COMPARTMENT_OCID> \
--display-name "audit-log-archive" \
--source '{"kind":"logging","logSources":[{"compartmentId":"<TENANCY_OCID>","logGroupId":"_Audit_Include_Subcompartment"}]}' \
--target '{"kind":"objectStorage","namespace":"<OBJECT_STORAGE_NAMESPACE>","bucketName":"security-audit-logs"}'
Enable Cloud Guard tenancy-wide and layer Security Zones on production compartments. Cloud Guard is OCI's detective posture service (the rough analog of AWS GuardDuty + Security Hub, or Azure Defender for Cloud / GCP Security Command Center):
oci cloud-guard configuration update \
--compartment-id <TENANCY_OCID> \
--reporting-region us-ashburn-1 \
--status ENABLED \
--self-manage-resources false
Security Zones go further than Cloud Guard's detect-and-alert model —
attaching a Security Zone recipe to Workloads:Production blocks
the non-compliant API call itself (e.g. creating a public Object
Storage bucket, or a boot volume without encryption) rather than only
flagging it after the fact, closer to an SCP/Org Policy hard guardrail
than a Config rule.
Set compartment-scoped budgets so a runaway Sandbox workload alerts before it becomes a cost surprise:
oci budgets budget create \
--compartment-id <TENANCY_OCID> \
--target-compartment-id <SANDBOX_COMPARTMENT_OCID> \
--amount 5000 \
--reset-period MONTHLY \
--display-name "sandbox-monthly-budget"
Validate with a canary compartment. Vend one throwaway leaf compartment through the full pipeline, confirm the delegated-admin policy, Dynamic Group, Security Zone enforcement, and centralized logging all behave as expected, then delete it before opening the pipeline to real workload teams.
Workloads, Production, or
any non-leaf compartment — reserve non-leaf compartments purely for
grouping and policy inheritance, exactly the discipline the AWS/Azure/
GCP landing-zone skills apply to OUs/Management Groups/folders.inspect/read/use before
reaching for manage) and scope every statement to a specific
compartment path — avoid manage all-resources in tenancy, the OCI
equivalent of AdministratorAccess/Owner/roles/owner.cloud-iam-hardening).Symptom: A policy statement referencing in compartment Production grants access far more broadly than intended, or a policy
written for a leaf compartment silently does nothing.
Fix: Nested compartments must be referenced by their full
colon-separated path (Workloads:Production:checkout-prod), not just
the leaf name, once there's ambiguity across the hierarchy — or,
conversely, granting manage ... in compartment Production also
applies to every sub-compartment beneath it (including NonProduction
siblings if the hierarchy was flattened incorrectly). Confirm the
actual compartment path with oci iam compartment list --compartment-id-in-subtree true before trusting a policy's scope.
Symptom: A policy statement referencing a group in a non-default
Identity Domain (e.g. an isolated Partners domain) fails to grant
access, even though the group clearly exists.
Fix: Groups outside the default Identity Domain must be qualified
with the domain name in policy statements —
Allow group Partners/PartnerViewers to read object-family in compartment Shared, not just Allow group PartnerViewers to ....
Forgetting the domain prefix is the single most common OCI multi-domain
policy authoring mistake.
Symptom: Resources keep appearing directly in the Production or
Workloads compartment instead of a team's leaf compartment, and the
team's delegated-admin policy doesn't apply to them.
Fix: Because OCI compartments can hold resources at every level of
the hierarchy (unlike an AWS OU or GCP folder), nothing stops an
engineer from creating a resource one level too high. Enforce leaf-only
resource placement with a Security Zone recipe requiring resources to
live in a tagged "leaf" compartment, and periodically audit with
oci search resource structured-search for resources sitting in
non-leaf compartments.
Symptom: A Terraform apply that provisions Vault keys or an Identity Domain in a newly subscribed region fails or behaves inconsistently with the home region's equivalent resource. Fix: Some resources (Vault master encryption keys, Identity Domains) have region affinity and don't automatically replicate to newly subscribed regions the way compartments and policies (which are tenancy-wide) do. Explicitly provision the region-scoped resource in each subscribed region rather than assuming it inherits from the home region.
Symptom: A Dynamic Group's matching rule stops granting access
after a compute instance is moved to a different compartment as part of
a reorg.
Fix: Dynamic Group matching rules keyed on instance.compartment.id
are evaluated live — moving the instance changes which dynamic groups
it matches, silently revoking (or granting) access. Prefer matching on
a stable freeform/defined tag (instance.tag.namespace.key = 'value')
over compartment ID when instances are expected to move between
compartments during their lifecycle.
Scenario: A company with one flat OCI tenancy (all resources sitting in the root compartment, one shared Administrators-group login for everyone) needs a real landing zone before launching a second product line and before OCI resources fail their first security audit.
Security, Network, Workloads
(with Production/NonProduction), and Sandbox, all under the
tenancy root, using the Terraform module shown above.Workloads:Production:legacy-app via compartment move operations
(oci iam compartment ... resource moves are per-resource-type; plan
this as a tracked migration, not a bulk operation).Workloads:Production blocking public bucket creation and
unencrypted boot volumes.Network, with FastConnect ordered for
the primary on-premises connection and a Site-to-Site VPN configured
as immediate failover while the physical circuit provisions.Workloads:Production:checkout-prod and
Workloads:NonProduction:checkout-staging for the new product line,
each with a DRG attachment to the hub, a delegated-admin policy scoped
to CheckoutTeam, and a Dynamic Group granting the compartment's
compute instances read access to Vault secrets in Security — no
embedded API keys anywhere in the deployment.Security with a retention rule, and set a
compartment-scoped budget on Sandbox.What SKILL.md sets; muted values are Claude Code's defaults
14 skills in this plugin
/aws-landing-zone-setupGuides designing and implementing a multi-account AWS landing zone using AWS Organizations, Control Tower, and Account Factory — including the account/OU hierarchy, Service Control Policies, centralized logging, and baseline guardrails. Use when a user asks to "set up a new AWS account structure", "design an AWS landing zone", "implement AWS Control Tower", "create OUs and SCPs", "bootstrap a multi-account AWS environment", or "onboard a new AWS account into our organization".
/azure-landing-zone-setupGuides designing and implementing an Azure landing zone using Management Groups, subscription democratization, Azure Policy, and the Cloud Adoption Framework (CAF) Landing Zone Accelerator pattern. Use when a user asks to "design an Azure landing zone", "set up Management Groups and subscriptions", "implement Azure Policy guardrails", "onboard a new Azure subscription", "structure our Azure tenant", or "migrate to the CAF enterprise-scale landing zone".
/cloud-access-request-and-iam-lifecycle-managementHandles the everyday operational request to grant, time-box, and later revoke a scoped IAM permission for a contractor, new hire, or a temporary need (e.g. "give the new contractor read-only S3 access for 30 days," "grant break-fix access to prod for this incident," "revoke Priya's access, she left the team," "why does this access request keep getting rejected") — including expiry enforcement and the audit trail a security review will ask for. Use for a single access grant/revoke transaction, not for designing the underlying IAM policy/role structure (see cloud-iam-hardening for that).
npx claudepluginhub selvarajmurugesan90/ops-engineering-skills --plugin cloud-skillsOther plugins' skills for the same job