Azure Cloud custom role
Seqera accesses your Azure subscription through a custom role assigned to the service principal in your Azure Cloud credentials. Create the role first, then create the credentials that use it.
Role
For granular control over the permissions granted to Seqera, use Azure custom roles and assign them to the service principal. The full role JSON definition is:
{
"properties": {
"roleName": "seqera-azure-cloud",
"description": "Role assumed by Seqera Platform to create Azure Cloud compute environments",
"assignableScopes": [
"/subscriptions/<SUBSCRIPTION-ID>"
],
"permissions": [
{
"actions": [
"Microsoft.Compute/virtualMachines/read",
"Microsoft.Compute/virtualMachines/write",
"Microsoft.Compute/virtualMachines/delete",
"Microsoft.Compute/virtualMachines/deallocate/action",
"Microsoft.Compute/virtualMachines/attachDetachDataDisks/action",
"Microsoft.Resources/subscriptions/resourceGroups/write",
"Microsoft.Resources/subscriptions/resourceGroups/read",
"Microsoft.Resources/subscriptions/resourceGroups/delete",
"Microsoft.Network/virtualNetworks/read",
"Microsoft.Network/virtualNetworks/write",
"Microsoft.Network/virtualNetworks/delete",
"Microsoft.Network/virtualNetworks/subnets/read",
"Microsoft.Network/virtualNetworks/subnets/write",
"Microsoft.Network/virtualNetworks/subnets/delete",
"Microsoft.Network/virtualNetworks/subnets/join/action",
"Microsoft.Network/networkInterfaces/delete",
"Microsoft.Network/networkInterfaces/write",
"Microsoft.Network/networkInterfaces/read",
"Microsoft.Network/networkInterfaces/join/action",
"Microsoft.Network/publicIPAddresses/read",
"Microsoft.Network/publicIPAddresses/write",
"Microsoft.Network/publicIPAddresses/delete",
"Microsoft.Network/publicIPAddresses/join/action",
"Microsoft.Network/natGateways/read",
"Microsoft.Network/natGateways/write",
"Microsoft.Network/natGateways/delete",
"Microsoft.Network/natGateways/join/action",
"Microsoft.ManagedIdentity/userAssignedIdentities/read",
"Microsoft.ManagedIdentity/userAssignedIdentities/write",
"Microsoft.ManagedIdentity/userAssignedIdentities/delete",
"Microsoft.ManagedIdentity/userAssignedIdentities/assign/action",
"Microsoft.Authorization/roleAssignments/read",
"Microsoft.Authorization/roleAssignments/write",
"Microsoft.Authorization/roleAssignments/delete",
"Microsoft.Authorization/roleDefinitions/read",
"Microsoft.Authorization/roleDefinitions/write",
"Microsoft.Authorization/roleDefinitions/delete",
"Microsoft.Insights/DataCollectionRules/Read",
"Microsoft.Insights/DataCollectionRules/Write",
"Microsoft.Insights/DataCollectionRules/Delete",
"Microsoft.Insights/DataCollectionEndpoints/Write",
"Microsoft.Insights/DataCollectionEndpoints/Delete",
"Microsoft.OperationalInsights/workspaces/write",
"Microsoft.OperationalInsights/workspaces/read",
"Microsoft.OperationalInsights/workspaces/delete",
"Microsoft.OperationalInsights/workspaces/sharedkeys/action",
"Microsoft.OperationalInsights/workspaces/tables/read",
"Microsoft.OperationalInsights/workspaces/tables/write",
"Microsoft.OperationalInsights/workspaces/tables/delete",
"Microsoft.OperationalInsights/workspaces/query/read",
"Microsoft.OperationalInsights/workspaces/query/Tables.Custom/read",
"Microsoft.Compute/virtualMachines/retrieveBootDiagnosticsData/action",
"Microsoft.Resources/tags/write",
"Microsoft.Storage/storageAccounts/blobServices/containers/read",
"Microsoft.Storage/storageAccounts/blobServices/generateUserDelegationKey/action"
],
"notActions": [],
"dataActions": [
"Microsoft.Insights/Telemetry/Write",
"Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read",
"Microsoft.Storage/storageAccounts/blobServices/containers/blobs/tags/read",
"Microsoft.Storage/storageAccounts/blobServices/containers/blobs/write",
"Microsoft.Storage/storageAccounts/blobServices/containers/blobs/tags/write",
"Microsoft.OperationalInsights/workspaces/tables/data/read"
],
"notDataActions": []
}
]
}
}
See Start from JSON to create this custom role in the Azure Portal.
You can apply this role definition as-is for convenience, or break it down into smaller roles. The permission reference describes the purpose of each permission.
Create the custom role in the Azure Portal
Create a custom role with the permissions Seqera requires to manage Azure resources.
- Save the role definition from Role to a local JSON file. To create smaller roles instead, save the permissions you need from the permission reference. Replace
<SUBSCRIPTION-ID>in theassignableScopesfield with your Azure subscription ID. - In the Azure Portal, go to Subscriptions and select your subscription.
- To create a custom role, select Access control (IAM), then Add in the Create a custom role section.
- Provide the following details:
- Custom role name: For example,
seqera-azure-cloud. - Description: For example,
Role for Seqera Platform to manage Azure Cloud compute environments. - Baseline permissions: Select Start from JSON.
- File: Select the local JSON file you saved earlier.
- Custom role name: For example,
- Select Next and review the permissions to confirm that all are included correctly.
- Select Next and confirm that the assignable scope is your subscription ID.
- Select Next. If you found errors in the previous step, you can edit the JSON file here.
- Select Next and then Create to save the role.
Next, create Azure Cloud credentials and assign this role to the service principal.
Intelligent Compute
Intelligent Compute needs additional roles on the same service principal. See Intelligent Compute required permissions.
Permission reference
Compute environment creation
Seqera needs the following permissions to provision resources in the Azure account when you first create the compute environment.
- If you specify an existing virtual network (VNet):
- You can omit
Microsoft.Network/virtualNetworks/writeandMicrosoft.Network/virtualNetworks/subnets/writefrom this role, because Seqera Platform skips network provisioning and never writes to your VNet or its subnets. Microsoft.Network/virtualNetworks/deleteandMicrosoft.Network/virtualNetworks/subnets/deletebecome optional.- You can omit the
Microsoft.Network/publicIPAddresses/*andMicrosoft.Network/natGateways/*permissions, because Seqera Platform doesn't create a NAT gateway or public IP address.
- You can omit
- If Seqera creates the virtual network, the
join/actionpermissions on public IP addresses and NAT gateways let Seqera Platform attach the public IP address to the NAT gateway and the NAT gateway to the subnet.
If your custom role doesn't include the Microsoft.Network/publicIPAddresses/* and Microsoft.Network/natGateways/* permissions, add them. Without them, Seqera can't create the virtual network, and compute environment creation fails unless you specify an existing virtual network.
{
"properties": {
"roleName": "seqera-azure-cloud-create",
"description": "Role assumed by Seqera Platform to create Azure Cloud compute environments",
"assignableScopes": [
"/subscriptions/<SUBSCRIPTION-ID>"
],
"permissions": [
{
"actions": [
"Microsoft.Resources/subscriptions/resourceGroups/read",
"Microsoft.Resources/subscriptions/resourceGroups/write",
"Microsoft.Storage/storageAccounts/blobServices/containers/read",
"Microsoft.Network/virtualNetworks/read",
"Microsoft.Network/virtualNetworks/write",
"Microsoft.Network/virtualNetworks/subnets/read",
"Microsoft.Network/virtualNetworks/subnets/write",
"Microsoft.Network/publicIPAddresses/read",
"Microsoft.Network/publicIPAddresses/write",
"Microsoft.Network/publicIPAddresses/join/action",
"Microsoft.Network/natGateways/read",
"Microsoft.Network/natGateways/write",
"Microsoft.Network/natGateways/join/action",
"Microsoft.ManagedIdentity/userAssignedIdentities/read",
"Microsoft.ManagedIdentity/userAssignedIdentities/write",
"Microsoft.Authorization/roleAssignments/read",
"Microsoft.Authorization/roleAssignments/write",
"Microsoft.Authorization/roleDefinitions/read",
"Microsoft.Authorization/roleDefinitions/write",
"Microsoft.Insights/DataCollectionRules/Read",
"Microsoft.Insights/DataCollectionRules/Write",
"Microsoft.Insights/DataCollectionEndpoints/Write",
"Microsoft.OperationalInsights/workspaces/read",
"Microsoft.OperationalInsights/workspaces/write",
"Microsoft.OperationalInsights/workspaces/tables/write"
],
"notActions": [],
"dataActions": [],
"notDataActions": []
}
]
}
}
Pipeline and Studio launch
Seqera needs the following permissions to launch pipelines and Studios:
{
"properties": {
"roleName": "seqera-azure-cloud-launch",
"description": "Role assumed by Seqera Platform to launch Studios and pipelines on Azure Cloud compute environments",
"assignableScopes": [
"/subscriptions/<SUBSCRIPTION-ID>"
],
"permissions": [
{
"actions": [
"Microsoft.Compute/virtualMachines/read",
"Microsoft.Compute/virtualMachines/write",
"Microsoft.Compute/virtualMachines/delete",
"Microsoft.Compute/virtualMachines/deallocate/action",
"Microsoft.Compute/virtualMachines/attachDetachDataDisks/action",
"Microsoft.Network/networkInterfaces/read",
"Microsoft.Network/networkInterfaces/write",
"Microsoft.Network/networkInterfaces/join/action",
"Microsoft.Network/virtualNetworks/subnets/join/action",
"Microsoft.ManagedIdentity/userAssignedIdentities/assign/action",
"Microsoft.Insights/DataCollectionRules/Write",
"Microsoft.Insights/DataCollectionEndpoints/Write"
],
"notActions": [],
"dataActions": [
"Microsoft.Insights/Telemetry/Write"
],
"notDataActions": []
}
]
}
}
Live stream log fetching
Seqera needs the following permissions to fetch logs for the pipeline run while the task is running:
{
"properties": {
"roleName": "seqera-azure-cloud-logs",
"description": "Role to be assumed by Seqera Platform to read live-streamed logs for Azure Cloud compute environments",
"assignableScopes": [
"/subscriptions/<SUBSCRIPTION-ID>"
],
"permissions": [
{
"actions": [
"Microsoft.OperationalInsights/workspaces/query/read",
"Microsoft.OperationalInsights/workspaces/query/Tables.Custom/read"
],
"notActions": [],
"dataActions": [
"Microsoft.OperationalInsights/workspaces/tables/data/read"
],
"notDataActions": []
}
]
}
}
Userdata script error detection (optional)
Seqera Platform can retrieve the serial console output of the Azure virtual machine (VM) to detect errors in the userdata script that bootstraps the VM during instance startup. If the userdata script fails, Seqera Platform shows the failure as a warning on the workflow. Without this permission, Seqera Platform does not detect userdata script failures and shows no warning.
This requires boot diagnostics to be enabled on the VM and the following permission on the service principal:
{
"properties": {
"roleName": "seqera-azure-cloud-userdata-check",
"description": "Role to retrieve boot diagnostics for pre-run script error detection",
"assignableScopes": [
"/subscriptions/<SUBSCRIPTION-ID>"
],
"permissions": [
{
"actions": [
"Microsoft.Compute/virtualMachines/retrieveBootDiagnosticsData/action"
],
"notActions": [],
"dataActions": [],
"notDataActions": []
}
]
}
}
OS disk cost attribution (optional)
When a compute environment runs with Seqera Intelligent Compute, Seqera queries run cost by the run's tags. Azure does not copy a VM's tags onto the managed OS disk it creates with the VM. Shortly after each launch, Seqera writes the VM's tags onto its OS disk. Without this permission, launches work as before, but the OS disk's cost is left out of the run's cost.
The permission writes tags only. It grants no access to the disk itself, and it is the action behind the built-in Tag Contributor role. If you created the custom role before this permission was listed, add it to your existing role.
{
"properties": {
"roleName": "seqera-azure-cloud-os-disk-tags",
"description": "Role to tag virtual machine OS disks for run cost attribution",
"assignableScopes": [
"/subscriptions/<SUBSCRIPTION-ID>"
],
"permissions": [
{
"actions": [
"Microsoft.Resources/tags/write"
],
"notActions": [],
"dataActions": [],
"notDataActions": []
}
]
}
}
Data links
Seqera needs the following permissions to work with Data Explorer data links on Azure:
{
"properties": {
"roleName": "seqera-azure-cloud-data-links",
"description": "Role assumed by Seqera Platform to access data-links in Azure Cloud compute environments",
"assignableScopes": [
"/subscriptions/<SUBSCRIPTION-ID>"
],
"permissions": [
{
"actions": [
"Microsoft.Storage/storageAccounts/blobServices/containers/read",
"Microsoft.Storage/storageAccounts/blobServices/generateUserDelegationKey/action"
],
"notActions": [],
"dataActions": [
"Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read",
"Microsoft.Storage/storageAccounts/blobServices/containers/blobs/tags/read",
"Microsoft.Storage/storageAccounts/blobServices/containers/blobs/write",
"Microsoft.Storage/storageAccounts/blobServices/containers/blobs/tags/write"
],
"notDataActions": []
}
]
}
}
Compute environment termination and resource disposal
Seqera needs the following permissions to delete the resources created for the compute environment:
{
"properties": {
"roleName": "seqera-azure-cloud-dispose",
"description": "Role assumed by Seqera Platform to delete Azure Cloud compute environment resources",
"assignableScopes": [
"/subscriptions/<SUBSCRIPTION-ID>"
],
"permissions": [
{
"actions": [
"Microsoft.Resources/subscriptions/resourceGroups/delete",
"Microsoft.Network/virtualNetworks/delete",
"Microsoft.Network/virtualNetworks/subnets/delete",
"Microsoft.Network/natGateways/delete",
"Microsoft.Network/publicIPAddresses/delete",
"Microsoft.Network/networkInterfaces/delete",
"Microsoft.ManagedIdentity/userAssignedIdentities/delete",
"Microsoft.Authorization/roleAssignments/delete",
"Microsoft.Authorization/roleDefinitions/delete",
"Microsoft.Insights/DataCollectionRules/Delete",
"Microsoft.Insights/DataCollectionEndpoints/Delete",
"Microsoft.OperationalInsights/workspaces/delete",
"Microsoft.OperationalInsights/workspaces/tables/delete"
],
"notActions": [],
"dataActions": [],
"notDataActions": []
}
]
}
}