For the complete documentation index, see llms.txt. This page is also available as Markdown.
Cortex XDR

Deploy the Terraform authentication template in IBM Cloud

Run the Cortex XDR Terraform authentication template in your IBM Cloud account, and then manually connect the pending cloud instance with the Terraform outputs.

After you download the Terraform authentication template from the IBM Cloud onboarding wizard, run it in your IBM Cloud account. Then manually connect the pending cloud instance in Cortex XDR with the values that Terraform outputs. Both parts are required to complete onboarding.

Before you begin, ensure you meet the prerequisites for onboarding IBM Cloud.

Run the Terraform authentication template

Run the template from a machine that has Terraform installed. The template creates the read-only service ID, its custom roles and access policies, and an API key for the service ID.

  1. Create a directory to store and run the Terraform files. If you onboard more than one IBM Cloud account, use a separate directory for each one.

    mkdir -p ~/terraform/ibm-cloud-connector-1
  2. Navigate to the directory you created and extract the Terraform files from the archive you downloaded. Ensure all the Terraform files are present, including template_params.tfvars.

    cd ~/terraform/ibm-cloud-connector-1
    tar -xzvf <your_template>.tar.gz
  3. Set your IBM Cloud administrator API key as an environment variable. The IBM Cloud Terraform provider reads the key from this variable.

    export IC_API_KEY="<your IBM Cloud administrator API key>"
  4. Initialize Terraform:

    terraform init
  5. Apply the Terraform configuration with the downloaded parameter file:

    terraform apply --var-file=template_params.tfvars
  6. When prompted, review the actions that Terraform performs, and then enter yes to approve them.

Terraform creates the resources in your IBM Cloud account. For the full list, see IBM Cloud resource inventory.

Retrieve the Terraform outputs

The template outputs the values you need to connect the cloud instance in Cortex XDR. Retrieve them in the same directory where you ran Terraform.

Check that the account_id output is the ID of the IBM Cloud account you want to onboard. You can find the account ID in the IBM Cloud console under Manage → Account → Account settings. If the account ID is different, you ran the template with an administrator API key from another account. Don't connect the cloud instance. Run terraform destroy --var-file=template_params.tfvars to remove the resources from that account, and then run the template again with an administrator API key from the correct account.

The api_key output is the API key for the service ID.

Manually connect the cloud instance

Enter the Terraform outputs in Cortex XDR to connect the pending cloud instance. Until you complete this step, the cloud instance stays in Pending status and Cortex XDR doesn't scan the account.

  1. In Cortex XDR, select Settings → Data Sources & Integrations, and then open the IBM Cloud cloud instances.

  2. On the Cloud Instances page, find the pending instance:

    • Remove the default filter that excludes pending instances.

    • To find the exact instance, filter the Instance ID column by the value of the template_id output. The instance ID of the pending instance is the same as the template ID.

  3. Optional: To confirm you have the right instance, right-click it, select View Details, and check the instance name and settings.

  4. Right-click the pending instance and select Manually connect an instance.

  5. Enter the values in the Connect Instance form, as described in the following table:

    Connect Instance input field
    Value

    Authentication Method

    Select the Terraform authentication method. It's the only method available for IBM Cloud.

    IBM Cloud Account ID

    The value of the account_id output.

    Service ID

    The value of the service_id output (the service ID's IAM ID, which starts with iam-ServiceId-).

    API Key

    The value of the api_key output.

  6. Click Connect.

Cortex XDR validates the values, encrypts and stores the API key, and connects the cloud instance. The cloud instance status changes to Connected and the first discovery scan starts.

To confirm that onboarding succeeded, see IBM Cloud post-deployment verification.

Last updated

Was this helpful?