If you are logged into your OCI tenancy in the Commercial Realm (OC1), the button will take you directly to OCI Resource Manager where you can proceed to deploy. If you are not logged, the button takes you to Oracle Cloud initial page where you must enter your tenancy name and login to OCI.
Check CIS Landing Zone course in Oracle University for a comprehensive introduction.
Also check our Live Lab for key use cases and hands on deployment experience.
This Landing Zone template deploys a standardized environment in an Oracle Cloud Infrastructure (OCI) tenancy that helps organizations to comply with the CIS OCI Foundations Benchmark v2.0.0.
The template uses multiple compartments, groups, and IAM policies to segregate access to resources based on job function. The resources within the template are configured to meet the CIS OCI Foundations Benchmark settings related to:
IAM (Identity & Access Management)
Networking
Keys
Cloud Guard
Logging
Vulnerability Scanning
Bastion
Events
Alarms
Notifications
Object Storage
Budgets
Security Zone
This repository encloses two deliverables:
A reference implementation written in Terraform HCL (Hashicorp Language) that provisions fully functional resources in an OCI tenancy.
A Python script that performs compliance checks for most of the CIS OCI Foundations Benchmark recommendations. The script is completely independent of the Terraform code and can be used against any existing tenancy.
The Landing Zone template creates a few compartments in the tenancy root compartment or under an enclosing compartment:
The compartment design reflects a basic functional structure observed across different organizations, where IT responsibilities are typically split among networking, security, application development and database admin teams. Each compartment is assigned an admin group, with enough permissions to perform its duties. The provided permissions lists are not exhaustive and are expected to be appended with new statements as new resources are brought into the Terraform template.
The Terraform code provisions a standard three-tier network architecture within one or more Virtual Cloud Network (VCN)s. The three tiers are divided into:
Optionally, the Terraform code can provision one or more VCNs configured for Exadata deployments. These VCNs are comprised of:
The VCNs are either stand alone networks or in one of the below Hub and Spoke architectures:
The above can be deployed without the creation of Internet Gateways and NAT Gateways to provide a more isolated network.
The diagram below shows services and resources that are deployed in a single VCN deployment:
Get the diagram in SVG format.
The diagram below shows services and resources that are deployed in a Hub & Spoke VCN deployment:
Get the diagram in SVG format.
The greyed out icons in the AppDev and Database compartments indicate services not provisioned by the template.
This repository uses a broader collection of repositories containing modules that help customers align their OCI implementations with the CIS OCI Foundations Benchmark recommendations:
The modules in this collection are designed for flexibility, are straightforward to use, and enforce CIS OCI Foundations Benchmark recommendations when possible.
Using these modules does not require a user extensive knowledge of Terraform or OCI resource types usage. Users declare a JSON object describing the OCI resources according to each module’s specification and minimal Terraform code to invoke the modules. The modules generate outputs that can be consumed by other modules as inputs, allowing for the creation of independently managed operational stacks to automate your entire OCI infrastructure.
Open an issue in this repository.
This project welcomes contributions from the community. Before submitting a pull request, please review our contribution guide.
Please consult the security guide for our responsible security vulnerability disclosure process.
Copyright (c) 2020,2024 Oracle and/or its affiliates.
Released under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl/.
Terraform Apply Failure 404-NotAuthorizedorNotFound
2021/07/01 23:53:25[TERRAFORM_CONSOLE] [INFO]
2021/07/01 23:53:25[TERRAFORM_CONSOLE] [INFO] Error: 404-NotAuthorizedOrNotFound
2021/07/01 23:53:25[TERRAFORM_CONSOLE] [INFO] Provider version: 4.33.0, released on 2021-06-30.
2021/07/01 23:53:25[TERRAFORM_CONSOLE] [INFO] Service: Identity Policy
2021/07/01 23:53:25[TERRAFORM_CONSOLE] [INFO] Error Message: Authorization failed or requested resource not found
2021/07/01 23:53:25[TERRAFORM_CONSOLE] [INFO] OPC request ID: f14a700dc5d00272933a327c8feb2871/5053FB2DA16689F6421821A1B178D450/D3F2FE52F3BF8FB2C769AEFF7754A9B0
2021/07/01 23:53:25[TERRAFORM_CONSOLE] [INFO] Suggestion: Either the resource has been deleted or service Identity Policy need policy to access this resource. Policy reference: https://docs.oracle.com/en-us/iaas/Content/Identity/Reference/policyreference.htm
This is due to eventual consistency, where resources need to be propagated to all regions before becoming fully available. We have dealt with these type of issues in code by introducing artificial delays. However, they may still arise as the consistency is eventual. If you face errors like this, simply re-plan and re-apply the Terraform configuration (you do not need to destroy and start all over). The errors should go away in the subsequent run. If they still persist, the problem is of a different nature.
If your plan continues to fail, please ensure the OCI service is available in your realm. All the OCI services in the CIS OCI Landing Zone are available in the commercial (OC1) realm but may not be in others.
OCI Tags
defined_tags
. {}
) to defined_tags
or freeform_tags
deletes all prevouisly set values and also prevents tag defaults to be applied.null
value defined_tags = null
. OCI Compartment Deletion
OCI Vault Deletion
Enabling no internet access on an existing deployment
Resource Manager does not allow elements with same value in array type
Support for free tier tenancies