> 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/ibm-cloud-cloud-onboarding/ibm-cloud-resource-inventory.md).

# IBM Cloud resource inventory

Review the IBM Cloud resources that the Cortex XDR Terraform authentication template creates in your IBM Cloud account.

The Terraform authentication template creates the following resources in your IBM Cloud account. All resources are IAM resources. The template doesn't create any compute, storage, or network resources, and it doesn't change any of your existing resources.

In the resource names, `<suffix>` is a unique suffix that Cortex XDR generates for each cloud instance.

| Resource                        | IBM Cloud resource type (Terraform) | Name                                                                                              | Purpose                                                                                                                                                                                                                                                                                                                                      |
| ------------------------------- | ----------------------------------- | ------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Service ID                      | `ibm_iam_service_id`                | `cortex-<suffix>-service-id`                                                                      | The read-only identity that Cortex XDR authenticates as.                                                                                                                                                                                                                                                                                     |
| Custom roles                    | `ibm_iam_custom_role`               | `CortexKmsRole<SUFFIX>`, `CortexSmRole<SUFFIX>`, `CortexIamRole<SUFFIX>`, `CortexCosRole<SUFFIX>` | Read-only roles for Key Protect, Secrets Manager, IAM Identity, and Cloud Object Storage, where no built-in IBM Cloud role grants only the read access Cortex XDR needs.                                                                                                                                                                     |
| Access policies                 | `ibm_iam_service_policy`            | Not named                                                                                         | Assign the built-in Viewer and Reader roles and the custom roles to the service ID. For details, see [IBM Cloud provider permissions](https://cortex-docs.paloaltonetworks.com/cortex-xdr/configure-cortex-xdr/cortex-xdr-data-sources/cloud-service-provider-csp-onboarding/ibm-cloud-cloud-onboarding/ibm-cloud-provider-permissions.md).  |
| API key                         | `ibm_iam_service_api_key`           | `cortex-<suffix>-api-key`                                                                         | The credential that Cortex XDR uses to authenticate as the service ID. The key doesn't expire.                                                                                                                                                                                                                                               |
| Second API key (after rotation) | `ibm_iam_service_api_key`           | `cortex-<suffix>-api-key-2`                                                                       | Created the first time you rotate the API key. Rotations alternate between the two keys. For details, 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). |
| Tags                            | `ibm_resource_tag`                  | `managed_by:paloaltonetworks` and any tags you add                                                | User tags attached to the service ID.                                                                                                                                                                                                                                                                                                        |

IBM Cloud doesn't support user tags on custom roles, access policies, or API keys. Only the service ID carries the tags. This is expected IBM Cloud behavior.

{% hint style="warning" %}
**Important:** Terraform writes the API key value to the Terraform state file (`terraform.tfstate`). Store the state file securely and restrict access to it, as you would for any credential. You need the state file to rotate the API key and to offboard the account with Terraform.
{% 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/ibm-cloud-cloud-onboarding/ibm-cloud-resource-inventory.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.
