After downloading and extracting the tag collector agent terraform template, you
must deploy it in your Azure environment. The tag collector
architecture folder has two
subdirectories—tc_project and
tc_peer_project. You must manually add private
cluster details to the tc_project terraform.tfvars file
cd architecture
tc_project
tc_peer_project
Modify the tc_project terraform.tfvars file for peering the private
clusters.
You need to add your private cluster ID, name, resource group name,. The
private cluster ID must include the path in the following
format:
/subscriptions/<sub-id>/resourceGroups/rg-name/providers/Microsoft.Network/virtualNetworks/<private-cluster>
tc_resource_subscription_id = "<test-resource-sub-id>"
resource_group_name = "test-template-Resource-Group-1"
location = "eastus"
name_prefix = "test-template-"
tags = {
ManagedBy = "terraform"
Product = "Palo Alto Networks AI Runtime Security"
"paloaltonetworks.com-managedby" = "cloud"
"paloaltonetworks.com-mode" = "Tag Collector Agent"
"paloaltonetworks.com-occupied" = "6ZO1m-zvR"
"paloaltonetworks.com-trust" = "6ZO1m-zvR"
}
create_resource_group = false
vnets = {
application-vnet = {
create_virtual_network = false
id = "<private-cluster-path-and-id>"
name = "<private-cluster-name>"
resource_group_name = "<private-cluster-resource-group-name>"
tc_resource_group_name = "test-template-Resource-Group-1"
tc_vnet_id = "/subscriptions/<sub-id>/resourceGroups/test-template-Resource-Group-1/providers/Microsoft.Network/virtualNetworks/test-template-tag-collector-vnet"
tc_vnet_name = "test-template-tag-collector-vnet"
}
}
Add the application VNet details for each private cluster to the
terraform.tfvars file.
application-vnet = {
id = "/subscriptions/<sub-id>/resourceGroups/<rg-name>/providers/Microsoft.Network/virtualNetworks/<app-vnet-name>"
name = "<app-vnet-name>"
resource_group_name = "<app-vnet-resource-group-name>"
Update the
private_cluster_dns_tc_peering block for
each private cluster. Add cluster1 (increment the number for each cluster),
the resource group name, and private DNS name for each cluster The
following example shows the addition of one private cluster.
private_cluster_dns_tc_peering = {
clusters_group_1 = {
clusters = {
cluster1 = {
resource_group_name = "<private-cluster1-rg-name>"
private_dns_name = "<private-dns-name>"
}
cluster2 = {
resource_group_name = "<private-cluster2-rg-name>"
private_dns_name = "<private-dns-name>"
}
}
tag_collector_vnet_id = "/subscriptions/<sub-id>/resourceGroups/test-template-Resource-Group-1/providers/Microsoft.Network/virtualNetworks/test-template-tag-collector-vnet"
}
}
Initialize and apply the Terraform for the Tag Collector agent.