Connect or update multiple Azure subscriptions to Trend Vision One using a single app registration and service principal, reducing the amount of resources deployed to your environment.
If you manage a large number of Azure subscriptions and are concerned with the amount
of resources created or deployed, you can use the following steps to reduce the
amount of resources deployed to your environment by using a single app registration
and service principal. These steps can be used when creating new connections with
Trend Vision One or when updating legacy connections migrated
from Server & Workload Protection.
Procedure
- Create the modified resource script terraform file.Copy the Azure reduced resource connection script and save the code to your local machine as a terraform (.TF) file.
- Connect or update one of your Azure subscriptions as normal.
-
To make a new connection, see Adding an Azure subscription.
-
To update a legacy connection, see Updating a legacy Azure connection.
-
- Copy the values from the following attributes in the terraform output:
-
app-registration-id
-
service-principal-object-id
-
- Create and download a terraform file for the account you want to connect.
- In the Trend Vision One console, go to .
- In the Cloud Accounts screen,
click Add.The Connect Azure Subscription screen appears.
- Specify the Subscription ID for the Azure subscription you want to connect.
- Specify a Name for the subscription which appears in the Cloud Accounts list.
- Specify a Description to help identify the purpose of the connection.
- If you have more than one Server & Workload Protection Manager instance, select the instance to associate with the connected subscription.
- Click Download Azure Resource Creation Script.
- Open the resource creation script terraform file downloaded from Trend Vision One in a text or code editor program like Visual Studio Code.
- Use parameters from the resource creation script and the terraform output to
modify the reduced resource connection script terraform file.
- Replace the first set of
locals
parameters with values form the resource creation script.The parameter set looks like the following example.locals { issuer_url = "https://cloudaccounts-us.xdr.trendmicro.com" subject_urn = "urn:visionone:identity:us:{your_v1_business_id}:account/{your_v1_business_id}" subscription_id = {your_subscription_id} cloud_account_name = {your_cloud_account_name} cloud_account_description = "" v1_account_id = {your_v1_business_id} api_key = {your_api_key} endpoint = "https://api.xdr.trendmicro.com/public/v2/direct/cam/public/cam/api/v1" connected_security_services_json = {your_connected_security_services_json} }
- Locate the second set of
locals
parameters.The parameter set looks like the following example.locals { custom-role-name = "v1-custom-role-${local.subscription_id}" service-principal-id = {first_deploy_output_service_principal_id} app-registration-id = {first_deploy_output_app_registration_id} }
- Replace the following parameters using the terraform output values obtained from connecting your first
subscription.
-
app-registration-id
-
service-principal-object-id
-
- Replace the first set of
- Upload and apply the reduced resource connection script terraform file in the
account you are connecting.
- In Azure Cloud Shell, access the command line
interface.
Note
The Connect Azure Subscription screen in the Trend Vision One console provides a set of commands to help complete the following steps. To complete the connection process, you must copy each command provided in the screen to enable the Done button. While you can alter some parameters, Trend Micro recommends using the provided commands as is to prevent the deployment failing. - Create a new directory for the deployment folder and then
access the folder.Copy the command or type mkdir [directoryName] && cd [directoryName].
Note
The commands provided by Trend Vision One use your subscription ID as the directory name. While you can specify any directory name you want, you must ensure the folder has a unique name and that there are no other terraform files in the deployment folder. - Upload the reduced resource connection script terraform file to your Azure Cloud Shell.
- Move the terraform file to the deployment folder.
Important
The reduced resource connection script terraform file must be the only terraform file in the directory. Having more than one terraform file in the folder interferes with the deployment process and might cause the connection to fail. - Initiate and apply the terraform script.Copy the command or type terraform init && terraform apply.
- In the Trend Vision One console, in the Connect Azure Subscription
screen, click Done.Once the terraform process is complete, your Azure subscription connects to Trend Vision One automatically. Refresh the Cloud Accounts screen to check the connection is complete.
- In Azure Cloud Shell, access the command line
interface.
- Repeat steps 4-7 for each additional Azure subscription you want to connect or update.