> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/cortex-xdr/configure-cortex-xdr/cortex-xdr-data-sources/cloud-service-provider-csp-onboarding/edit-your-onboarded-csp-configuration.md).

# Edit your onboarded CSP configuration

Configure cloud service provider onboarding for Cortex XDR.

In order to make changes to your onboarded CSP configuration, you first modify the cloud instance settings in Cortex XDR and download an updated authentication template. After uploading the updated template to the CSP environment, you execute the template and then the changes take affect.

{% hint style="info" %}
**IBM Cloud:** For the IBM Cloud procedure, including which edits require a Terraform run and how to apply them with **Manually apply edit**, see [Edit an IBM Cloud cloud instance](https://cortex-docs.paloaltonetworks.com/cortex-xdr/configure-cortex-xdr/cortex-xdr-data-sources/cloud-service-provider-csp-onboarding/ibm-cloud-cloud-onboarding/edit-an-ibm-cloud-cloud-instance.md). To rotate the API key, see [Rotate the IBM Cloud API key](https://cortex-docs.paloaltonetworks.com/cortex-xdr/configure-cortex-xdr/cortex-xdr-data-sources/cloud-service-provider-csp-onboarding/ibm-cloud-cloud-onboarding/rotate-the-ibm-cloud-api-key.md).
{% endhint %}

1. Navigate to **Settings → Data Sources & Integrations**.
2. Identify the Cloud Service Provider you want to update and click **View Details**.
3. In the **Cloud Instances** page, identify the cloud instance you want to edit and click the **Configuration** pencil icon to edit the instance.
4. Make changes to the configuration settings. Click **Save**.

   If the changes you made require re-deploying the authentication template, you will be prompted to to download the file. Click **Download CloudFormation** or **Download Terraform** as relevant to your CSP type.

{% hint style="warning" %}

#### Important

When using Terraform authentication templates, you must execute the updated Terraform template from the same folder where the original Terraform template was executed. Terraform stores its state file in that folder, which is how it identifies existing cloud resources and updates them in place rather than creating new ones. For more information, see [Introduction to Terraform for Cloud Service Provider (CSP) Onboarding](https://cortex-docs.paloaltonetworks.com/cortex-xdr/configure-cortex-xdr/cortex-xdr-data-sources/cloud-service-provider-csp-onboarding/introduction-to-terraform-for-cloud-service-provider-csp-onboarding.md).
{% endhint %}

5. On the **Cloud Instances** page, a notification appears stating that there are pending changes for the cloud instance you updated. These changes are not applied until you execute the updated template in the CSP environment.

   To manage pending changes, click the **Configuration** pencil icon for the cloud instance. Under **Manage unsaved changes**, select one of the following options:

   * **Revoke pending changes:** Discards the pending changes and returns the cloud instance to the last successfully executed state. Click **Revoke**. The cloud instance exits the *Pending Changes* state, and you don't need to execute a template.
   * **Edit pending state:** Opens the configuration wizard with the pending changes already applied, so you continue editing from the pending state. Click **Edit**. For example, if you added a capability and saved the updated template without executing it, the wizard opens with that capability already selected.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>If you already executed a setup file from a previous edit in your cloud instance, those changes are applied. Saving a new edit replaces any earlier pending changes.</p></div>
6. Execute the updated authentication template in your CSP environment by selecting the appropriate procedure below.

{% hint style="info" %}
**Note:** (Azure) If you turn on **Allow connection to private serverless functions** for an existing instance, download and apply the updated template. Cortex XDR doesn't scan private serverless functions until you do.
{% endhint %}

{% tabs %}
{% tab title="AWS CloudFormation" %}
After you have downloaded the updated CloudFormation authentication template, connect to AWS Management Console to perform a direct update to the stack using the updated template file. With a direct update, you submit a template or input parameters that specify updates to the resources in the stack, and CloudFormation immediately deploys them.

1. Log in to the AWS Management Console and open the [CloudFormation console](https://console.aws.amazon.com/cloudformation/).
2. On the **Stacks** page, select the existing stack that you want to update.
3. In the stack details pane, select **Update stack → Make a direct update.**
4. On the **Update stack** page, select **Replace existing template**.
5. Under **Specify template**, select **Upload a template file**. Select the updated authentication template you downloaded from Cortex XDR.
6. Click **Next**. If you onboarded an organization and set `DeploymentTargetOUs`, in **Parameters**, enter the OU IDs again. The updated template resets `DeploymentTargetOUs` to empty. For details, see [Deploy the authentication template in AWS](https://cortex-docs.paloaltonetworks.com/cortex-xdr/configure-cortex-xdr/cortex-xdr-data-sources/cloud-service-provider-csp-onboarding/amazon-web-services-cloud-onboarding/deploy-the-authentication-template-in-aws.md#expand-the-deployment-to-more-organizational-units-optional).

   <div data-gb-custom-block data-tag="hint" data-style="warning" class="hint hint-warning"><p><strong>Important:</strong> If you leave <code>DeploymentTargetOUs</code> empty, CloudFormation deploys the Cortex XDR resources to all accounts under the organization root. If you leave out an OU that you deployed to before, CloudFormation deletes the Cortex XDR resources from the accounts in that OU.</p></div>
7. Click **Next** again.
8. Select to acknowledge that AWS CloudFormation might create IAM resources with custom names. Click **Next**.
9. Click **Submit**. The stack update is complete when it appears in the Stacks list with status of **UPDATE\_COMPLETE**.
   {% endtab %}

{% tab title="AWS Terraform" %}
Using a Terraform template is only available for AWS account scope. After you have downloaded the updated Terraform template file, log in to your AWS account using the AWS CLI:

1. Open your local terminal (Command prompt, PowerShell, or Terminal).
2. Log in to your AWS account using the AWS CLI:

   ```
   aws login
   ```
3. Navigate to the directory you originally used for the Terraform template when onboarding your CSP and extract the Terraform files.

   ```
   cd ~/terraform/aws-connector-1
   tar -xzvf <your_template>.tar.gz
   ```
4. Initialize the upgrade of the Terraform in your project directory:

   ```
   terraform init -upgrade
   ```
5. Apply your Terraform configuration using the downloaded parameter file:

   ```
   terraform apply --var-file=template_params.tfvars
   ```

The updated Terraform template is deployed.
{% endtab %}

{% tab title="GCP" %}
After you have downloaded the updated Terraform template file, connect to Google Cloud Console to update the stack using the updated template file.

1. Open your local terminal (Command prompt, PowerShell, or Terminal).
2. Log in to your GCP account using the gcloud CLI:

   ```
   gcloud auth login
   ```
3. Navigate to the directory you originally used for the Terraform template when onboarding your CSP and extract the Terraform files.

   ```
   cd ~/terraform/gcp-connector-1
   tar -xzvf <your_template>.tar.gz
   ```
4. Initialize the upgrade of the Terraform in your project directory:

   ```
   terraform init -upgrade
   ```
5. Apply your Terraform configuration using the downloaded parameter file. When prompted, enter the project ID if you configured one in the onboarding wizard:

   ```
   terraform apply --var-file=template_params.tfvars
   ```

   The updated Terraform template is deployed.
   {% endtab %}

{% tab title="Azure ARM using CLI" %}
After you have downloaded the updated authentication template file, lot in to Azure portal to update the stack using the updated template file.

1. Log in to the Azure portal. Select Cloud Shell from the top navigation and then select Bash.
2. Navigate to the directory you originally used for the authentication template when onboarding your CSP and extract the files.

   ```
   cd ~/azure-connector-1
   tar -xzvf <your_template>.tar.gz.
   ```
3. In Cloud Shell, run the onboard.sh file:

   ```
   bash onboard.sh
   ```

   The updated authentication template is deployed.
   {% endtab %}

{% tab title="Azure subscriptions" %}
After you have downloaded the updated authentication template file, use the same method you used initially to execute the template in Microsoft Azure:

#### Execute the Terraform authentication template

1. Open your local terminal (Command prompt, PowerShell, or Terminal).
2. Log in to your Azure account using the Azure CLI:

   ```
   az login
   ```
3. Navigate to the directory you originally used for the Terraform template when onboarding your CSP and extract the Terraform files.

   ```
   cd ~/terraform/azure-connector-1
   tar -xzvf <your_template>.tar.gz.
   ```
4. Initialize the upgrade of the Terraform in your project directory:

   ```
   terraform init -upgrade
   ```
5. Apply your Terraform configuration using the downloaded parameter file. :

   ```
   terraform apply --var-file=template_params.tfvars
   ```

   The updated Terraform template is deployed.

#### Deploy the authentication template in Azure Resource Manager

The authentication template that you download is a `tar.gz` file that contains the ARM template and the `onboard_subscription.sh` script. To deploy the updated template, extract the files and run the script.

1. Open your local terminal.
2. Log in to the Azure tenant that contains the subscription:

   ```
   az login --tenant <TENANT_ID>
   ```
3. Go to the folder that contains the downloaded file, and extract it:

   ```
   tar -xzvf <your_template>.tar.gz
   ```
4. Run the onboarding script:

   ```
   bash onboard_subscription.sh
   ```

   When prompted, enter the tenant ID, the subscription ID, and the Azure region for the onboarding resources. If you collect audit logs through an existing Event Hub, also enter the Event Hub namespace name, the Event Hub name, and the Event Hub resource group name.

   The updated template is deployed.

For more information, see [Finalize Microsoft Azure onboarding by executing the authentication template](https://cortex-docs.paloaltonetworks.com/cortex-xdr/configure-cortex-xdr/cortex-xdr-data-sources/cloud-service-provider-csp-onboarding/microsoft-azure-cloud-onboarding/finalize-microsoft-azure-onboarding-by-executing-the-authentication-template.md).

<br>
{% endtab %}
{% endtabs %}

#### Start scanning an environment that you onboarded without scanning

To start scanning a cloud instance that you onboarded with **Environment Scanning** turned off, edit the cloud instance.

{% hint style="warning" %}
**Important:** After you turn on environment scanning, you can't turn it off again.
{% endhint %}

1. Navigate to **Settings → Data Sources & Integrations**.
2. Identify the cloud service provider and click **View Details**.
3. In the **Cloud Instances** page, identify the cloud instance and click the **Configuration** pencil icon.
4. Turn on **Environment Scanning**.
5. (Optional) Change the discovery scope, and turn on **Agentless Disk Scanning** or **Data Security Scanning** where available.
6. Click **Save**. Cortex XDR starts account discovery, a permission check, and scanning. You don't need to redeploy the authentication template unless you also changed cloud tags, security capabilities, or log collection.

#### Override the scanning configuration for a single account

You can override the instance-level scanning settings for one or more accounts. In the cloud instance, select one or more accounts from the accounts list and edit their settings:

* **Agentless Disk Scanning:** Turn agentless disk scanning on or off for the selected accounts. Optionally, select **Modify scope by tags** to include or exclude resources by tag.
* **Kubernetes Security (Agentless KSPM) scope:** Optionally, select **Modify cluster exclusions by tags**.
* **Registry Scanning scope:** Optionally, select **Modify scanning scope**.
* **Data security management:** Turn data asset classification on or off for the selected accounts. Under **Data assets classification options**, choose the managed services and self-managed assets to classify, and how often to classify them.
  * **Managed Services:** Native cloud services that are managed directly by your cloud provider.
  * **Self-Managed Assets:** Databases that you run on your cloud virtual machines.
  * **Scan every:** How often Cortex classifies the selected assets.

Click **Save**.

{% hint style="warning" %}
**Important:** When you save account-level settings, they override the settings configured at the cloud instance level for those accounts. When you edit several accounts at once, the bulk edit overrides all existing settings, except settings that you keep as **Unchanged**.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/cortex-xdr/configure-cortex-xdr/cortex-xdr-data-sources/cloud-service-provider-csp-onboarding/edit-your-onboarded-csp-configuration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
