Skip to main content
Version: 26.2

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.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.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.

  1. 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 the assignableScopes field with your Azure subscription ID.
  2. In the Azure Portal, go to Subscriptions and select your subscription.
  3. To create a custom role, select Access control (IAM), then Add in the Create a custom role section.
  4. 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.
  5. Select Next and review the permissions to confirm that all are included correctly.
  6. Select Next and confirm that the assignable scope is your subscription ID.
  7. Select Next. If you found errors in the previous step, you can edit the JSON file here.
  8. Select Next and then Create to save the role.

Next, create Azure Cloud credentials and assign this role to the service principal.

Permission reference​

Compute environment creation​

Seqera needs the following permissions to provision resources in the Azure account when you first create the compute environment:

{
"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.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": []
}
]
}
}

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/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": []
}
]
}
}