Instructions
Overview
This article walks you through connecting an Oracle Cloud Infrastructure (OCI) tenancy to Upwind. Onboarding covers the whole tenancy, including all of its compartments. To connect more than one tenancy, repeat the process for each.
Before you begin, make sure you meet the prerequisites.
| Step | Where | What you do |
|---|---|---|
| 1. Onboard your tenancy | Upwind Management Console | Enter your tenancy details, choose the identity domain, and generate Upwind client credentials. |
| 2. Deploy the Terraform module | Your terminal | Configure the module, run the readiness check, and apply the module in your tenancy. |
| 2.5. Grant federated access | Upwind Management Console | Enter three values from the Terraform outputs to complete the connection. |
| 3. Define resource scope | Upwind Management Console | Choose which compartments Upwind audits and scans, then test and save. |
Integration Steps
To start, log in to the Upwind Management Console , select the + (plus) symbol at the top of the screen, select Connect cloud account, then choose Oracle Cloud Infrastructure > Connect Oracle Cloud Tenancy.
Step 1: Onboard Your Oracle Cloud Tenancy
In this step, you provide key identifiers from your Oracle Cloud environment and register them in the Upwind Management Console.
Step 1.1: Provide Your Tenancy Details
- Sign in to the Oracle Cloud Console with an account that has tenancy-level access.
- Collect the following values and enter them in the corresponding fields in the Upwind Management Console:
| Field | Where to find it | Notes |
|---|---|---|
| Tenancy OCID | Administration > Tenancy Details | The unique identifier of your tenancy. Starts with ocid1.tenancy.. |
| Home Region | Administration > Tenancy Details | The primary region of your tenancy, such as us-ashburn-1. You deploy the Terraform module against this region in Step 2. |
| Orchestrator Compartment OCID | Identity & Security > Compartments, then select the compartment | The compartment where Upwind creates its own resources, including the Cloud Scanner infrastructure. We recommend a dedicated compartment for Upwind rather than the root compartment. See Prerequisites. |

Step 1.2: Configure the Identity Domain
Upwind authenticates to your tenancy through an identity domain:
- New domain (default): the Terraform module creates a dedicated identity domain for Upwind.
- Existing domain: provide the OCID of an existing identity domain. The identity that runs Terraform must hold an administrator role in that domain. See Prerequisites.

Step 1.3: Generate Credentials for Upwind
Click Generate new client credentials. Upwind generates two sets of client credentials, which allow your tenancy to authenticate with the Upwind Authorization Service:
| Credentials | Used for |
|---|---|
OracleCloudTenancyConnectionCredentials | Connecting your tenancy to Upwind, so Upwind can discover and audit your Oracle Cloud resources. |
OracleCloudScannersReportingCredentials | Reporting scan results, metadata, and status from the Cloud Scanners back to Upwind. |
Both sets are added to the Terraform snippet in Step 2. The module stores them as secrets in a Vault in the orchestrator compartment.
Treat the client secrets like passwords. Store them securely and don't commit them to source control.

Step 2: Deploy the Terraform Module
In this step, you deploy the Upwind Terraform module in your tenancy. The module creates the identity domain, workload identity federation, users, groups, dynamic group, policies, and Vault that Upwind needs. For the full list, see the Glossary.
Authentication uses workload identity federation: the identity domain accepts only short-lived tokens signed by Upwind, verified against Upwind's published keys for your Upwind region. No long-lived API keys are created for Upwind.
Step 2.1: Configure the Terraform Module
- Create a new directory for your Terraform project and open it in your terminal.
- Create a file named
main.tf. - Copy the snippet from the Terraform setup section of the Upwind Management Console and paste it into
main.tf. The snippet is pre-filled with the values you entered in Step 1. - Review the values before you continue.
module "upwind_integration_oci_onboarding" {
source = "upwindsecurity/onboarding/oci"
# Optional: pin the module version
# version = "~> 1.13"
deployment_mode = "tenant"
upwind_region = "us"
# Upwind Credentials
upwind_client_id = "<client-id>"
upwind_client_secret = "<client-secret>"
# Cloud Scanner Credentials
scanner_client_id = "<scanner-client-id>"
scanner_client_secret = "<scanner-client-secret>"
# Upwind Organization Info
upwind_organization_id = "<your-upwind-organization-id>"
# Oracle Cloud Organization Info
oci_tenancy_id = "<tenancy-id>"
# Oracle Cloud Region - must be the tenancy's home region
oci_region = "<oci-home-region>"
# Compartment to act as the orchestrator
upwind_orchestrator_compartment = "<orchestrator-compartment-id>"
# Enable or disable Cloud Scanners
enable_cloudscanners = true
enable_cloudlogs = true
resource_suffix = "<suffix - auto generated>"
}
output "identity_domain_oidc_issuer_url" {
description = "OIDC issuer URL for the Identity Domain (for AWS IAM OIDC provider configuration)"
value = module.upwind_integration_oci_onboarding.identity_domain_oidc_issuer_url
}
output "identity_domain_id" {
description = "OCID of the Identity Domain (needed for offboarding)"
value = module.upwind_integration_oci_onboarding.identity_domain_id
}
output "management_sa_email" {
description = "Email of the management service account"
value = module.upwind_integration_oci_onboarding.upwind_management_service_account_email
}
output "confidential_app_client_id" {
description = "The client ID of the confidential OAuth client app for workload identity federation"
value = module.upwind_integration_oci_onboarding.confidential_app_client_id
}
output "confidential_app_client_secret" {
description = "The client secret of the confidential OAuth client app for workload identity federation"
value = module.upwind_integration_oci_onboarding.confidential_app_client_secret
sensitive = true
}
output "vault_id" {
description = "The OCID of the Vault (either created or provided by user)"
value = module.upwind_integration_oci_onboarding.vault_id
}

Set oci_region to your tenancy's Home Region and run Terraform against that region. OCI accepts changes to users, groups, dynamic groups, and policies only in the home region, so applying from any other region fails.
upwind_regiontakes a single value: the region where your Upwind organization is hosted. Valid values areus,eu, andap.- The
confidential_app_client_secretoutput must be markedsensitive = true, as shown above. If the snippet you copied doesn't include it, add it, orterraform applyfails with an error about a sensitive value. - The Terraform setup snippet in the console does not pin a module version. To pin one, uncomment the
versionargument and set it to the release you want to use. To move to a newer release later, see Upgrade the Module.
Configure the OCI Provider (Recommended)
The snippet doesn't configure the OCI provider, so Terraform uses the DEFAULT profile in ~/.oci/config, including the region set in that profile. To make sure Terraform uses the intended profile and targets your home region, add the following blocks to main.tf. Choose the tab that matches how you authenticate to OCI:
- API key profile
- Session token
Use this for a profile created with oci setup config.
terraform {
required_providers {
oci = {
source = "oracle/oci"
version = ">= 8.0.0"
}
}
}
provider "oci" {
config_file_profile = "<profile-name>"
region = "<oci-home-region>"
}
Use this for a profile created with oci session authenticate, which signs in through the browser and issues a short-lived session token instead of an API key.
oci session authenticate --profile-name <profile-name> --region <oci-home-region>
terraform {
required_providers {
oci = {
source = "oracle/oci"
version = ">= 8.0.0"
}
}
}
provider "oci" {
config_file_profile = "<profile-name>"
auth = "SecurityToken"
region = "<oci-home-region>"
}
Session tokens expire after a short time. If the token expires before or during terraform apply, refresh it with oci session refresh --profile <profile-name>, or authenticate again.
Replace <profile-name> with the name of your profile in ~/.oci/config (for example, DEFAULT), and <oci-home-region> with your tenancy's home region (for example, us-ashburn-1).
Tag the Resources (Optional)
To tag every resource the module creates, add either or both of these arguments to the module block:
| Variable | Description |
|---|---|
tags | A map of free-form tags to apply to all resources. |
defined_tags | A map of defined tags, keyed by <namespace>.<key>. The tag namespaces and keys must already exist in your tenancy and must not be retired. |
tags = {
"Owner" = "security"
}
defined_tags = {
"mandatory_tags.Environment" = "prod"
}
Enable Cloud Logs
Setting enable_cloudlogs = true creates a read-only cloudlogs user and group in the identity domain, behind the same token exchange trust that Upwind uses for the other service users.
Upwind uses this identity to read logs from your tenancy. It has no API key, no secret, and no access of its own: it can read only the log resources that are explicitly shared with it, which happens when you set up a log integration for the tenancy.
If your tenancy is already onboarded without the flag, add enable_cloudlogs = true to your module block, then follow Upgrade the Module. Run terraform init -upgrade first: an existing deployment stays on the module version it was initialized with, and older versions fail with an unsupported argument error. The apply adds the cloudlogs user and group and leaves your existing onboarding resources unchanged.
Step 2.2: Run the Readiness Check and Apply the Module
Run the Readiness Check
Before you apply, run the Upwind preflight check to confirm your tenancy is ready for onboarding. The check is read-only and reports problems before Terraform creates anything - such as an apply from outside the home region, missing caller permissions, an unusable identity domain or Vault, or resources left over from an earlier onboarding. Catching these early matters: a failure halfway through an apply can leave tenancy-level resources behind that have to be cleaned up by hand.
The check runs with upwindctl. If you don't have it yet, see Install upwindctl. If you already have it, update it to the latest version first.
Using the same ~/.oci/config profile as Terraform, run the following. If you use a profile other than DEFAULT, add --oci-profile <profile-name>, and for a session token profile, also add --oci-auth security_token.
upwindctl oracle onboarding preflight \
--tenancy-id <tenancy-id> \
--organization-id <your-upwind-organization-id> \
--orchestrator-compartment-id <orchestrator-compartment-id> \
--region <oci-home-region> \
--upwind-region us \
--resource-suffix <resource-suffix>
Use the same values as in your main.tf. In particular, set --resource-suffix to the resource_suffix from the snippet, so the check looks for leftovers under the exact resource names the module will create. If you set any of these optional arguments in the module block, pass them to the check too:
| Module argument | Readiness check flag |
|---|---|
oci_domain_id | --domain-id <identity-domain-id> |
defined_tags | --defined-tags <namespace>.<key>=<value> (repeat or comma-separate for several tags) |
tags | --tags <key>=<value> |
enable_cloudscanners = false | --enable-cloudscanners=false |
create_timeout | --create-timeout <duration> |
The command exits non-zero if anything would block the apply. Resolve the reported issues and re-run it before you continue. Run upwindctl oracle onboarding preflight --help to view all available options.
Apply the Module
From the directory that contains main.tf, run:
terraform init
terraform plan
terraform apply
Review the plan, then confirm the apply. Creating and replicating the identity domain can take several minutes.
You can run the module manually as shown above, but it is designed to fit into an Infrastructure-as-Code workflow such as Terragrunt or a CI/CD pipeline. Inject the client secrets with your tool's secret management rather than writing them into main.tf.
The Terraform state contains the Upwind client credentials and the confidential application's client secret. Store it in a secure backend with restricted access.

When the apply completes, retrieve the three values you need for Step 2.5:
terraform output -raw identity_domain_oidc_issuer_url
terraform output -raw confidential_app_client_id
terraform output -raw confidential_app_client_secret
Step 2.5: Grant Federated Access to Upwind
In this step, you give Upwind the values it needs to authenticate to your tenancy through OCI workload identity federation, without long-lived credentials.
- Enter the Terraform outputs in the matching fields:
| Field | Terraform output |
|---|---|
| Identity Domain URL | identity_domain_oidc_issuer_url |
| Confidential Application Client ID | confidential_app_client_id |
| Confidential Application Client Secret | confidential_app_client_secret |
- Click Save.

Step 3: Define Resource Scope
In the final step, you choose which compartments Upwind audits and scans. The view shows your tenancy structure and compartments, and you set the scope for each:
| Option | What it does |
|---|---|
| Cloud API | Lets Upwind discover and audit the compartment's resources through OCI APIs. |
| Cloud Scanner | Scans the compartment's resources with Upwind Cloud Scanners, deployed in your orchestrator compartment. Requires Cloud API. |
| Enable Auto-Connect for New Compartments | Connects compartments created later under the tenancy automatically, with Cloud API access and Cloud Scanner scanning, so new compartments are covered without further setup. |
Cloud Scanner scope depends on Cloud API scope. If you enable Cloud Scanner for a compartment, Cloud API must also be enabled for it.
When you're done, click Test & Save. Upwind saves the scope settings and tests the connection to your tenancy, and shows a success message when the connection works.
It may take up to 30 minutes for scope changes to reach the Cloud Scanner.
Verify the Integration
After a successful connection:
- The integration status shows as Active.
- Upwind begins an initial full scan of your tenancy, and discovers and inventories resources automatically.
- Initial discovery typically takes 30-60 minutes, depending on tenancy size.
- You can monitor progress in the Inventory section.
Your Oracle Cloud tenancy is now connected to Upwind.
Upgrade the Module
Upwind releases new versions of the onboarding module regularly, with new features and fixes. We recommend keeping your deployment up to date. Each release is listed on the module's GitHub releases page and in the Terraform Registry .
To upgrade, use the same main.tf, Terraform state, and OCI profile you used to onboard, and run Terraform against the tenancy's home region:
-
If you pinned the module version, update the
versionargument inmain.tfto include the release you want, for exampleversion = "~> 1.14". If you didn't pin a version, you don't need to change anything. -
Download the new version:
terraform init -upgrade -
Optionally, run the readiness check again to confirm the tenancy is still ready.
-
Review the planned changes:
terraform planIf the plan would destroy or replace any resources, contact Upwind Support before you apply.
-
Apply the upgrade:
terraform apply
- If you use a session token profile, refresh the token before you start with
oci session refresh --profile <profile-name>. - Without a pinned version,
terraform init -upgradedownloads the latest release. With a constraint such as~> 1.13, it downloads the latest release that matches the constraint.
Offboarding
Run terraform destroy to remove everything the module created. Use the same OCI credentials you used to apply the module.
If the module also created the identity domain (the default, when oci_domain_id is not set), the destroy needs one manual step in the middle. OCI deletes an identity domain only after it has been deactivated, and the OCI provider deletes the domain without deactivating it first. As a result, the first terraform destroy removes everything inside the domain - the Upwind OAuth app, users, groups, and token-exchange trust - and then fails on the domain itself.
Before you start, save the domain OCID with terraform output -raw identity_domain_id. A partly completed destroy can leave outputs unreadable. The commands below read the OCID from the Terraform state instead, so they work either way.
-
Destroy the module. It removes everything except the identity domain, then fails on the domain.
terraform destroy -
Deactivate the identity domain. Upwind's OAuth app is already gone, so OCI accepts the deactivation.
DOMAIN_ID=$(terraform state show -no-color "$(terraform state list | grep 'oci_identity_domain.upwind_identity_domain\[0\]')" \
| awk -F'"' '/^ *id *=/ {print $2; exit}')
oci iam domain deactivate --domain-id "$DOMAIN_ID" -
Destroy again. It deletes the now-inactive domain.
terraform destroy
- Existing domain: if you supplied your own identity domain with
oci_domain_id, it is not deleted. The firstterraform destroyremoves Upwind's users, groups, and OAuth app from your domain and completes, so steps 2 and 3 are not needed. - Replicas: deleting the domain removes it from every region it was replicated to. You don't need to remove replicas separately.
- Access: Upwind loses access to your tenancy as soon as the first destroy starts.
Troubleshooting
If you run into issues during onboarding or after connecting, see Troubleshooting.