I am using AZAPI code to deploy marketplace subscription and Serverless Endpoint for the model as below ? How to get PublisherId, OfferId , PlanId of any model ?
I want for below models :
1. Mistral-Nemo
2. Phi-4-multimodal-instruct
3. Mistral-Large-2411
resource "azapi_resource" "marketplace_subscriptionmistrallarge2411" {
type = "Microsoft.MachineLearningServices/workspaces/marketplaceSubscriptions@2024-01-01-preview"
name = "mktplmistrallarge2411"
parent_id = azurerm_ai_foundry_project.aif_proj.id
body = {
properties = {
modelId = "azureml://registries/azureml-mistral/models/Mistral-Large-2411"
marketplacePlan = {
publisherId =
offerId =
planId =
}
}
}
schema_validation_enabled = false
}
#########################################
# Serverless endpoint
#########################################
resource "azapi_resource" "mistral-large-2411" {
type = "Microsoft.MachineLearningServices/workspaces/serverlessEndpoints@2024-01-01-preview"
name = "se-Mistral-large"
location = "eastus"
parent_id = azurerm_ai_foundry_project.aif_proj.id
body = jsonencode({
sku = {
name = "Consumption"
}
properties = {
modelSettings = {
modelId = "azureml://registries/azureml-mistral/models/Mistral-Large-2411"
}
marketplaceSubscriptionId = azapi_resource.marketplace_subscriptionmistrallarge.id
}
})
schema_validation_enabled = false
}
Getting PublisherId, OfferId , PlanId of AI foundry model to be provisioned using AzAPI terraform
The requirement you mentioned is indeed possible and this can be fetched from portal or CLI based on the availability.
Under your subscription, navigate to marketplace and search for the model you're looking for.
For an instance, I took “Mistral-Large-2411” which you mentioned in the query.
Marketplace --> search for the model name “Mistral-Large-2411”
You can see multiple options in which you need to select the “Usage Information + Support”
Click on it, you can see the details you're looking for as mentioned below
Once you get that details, here offerID refers to product ID you can use them in the configuration you tried and for CLI command refer to documents attached in the comment section.
resource "azapi_resource" "marketplace_subscription" {
type = "Microsoft.MachineLearningServices/workspaces/marketplaceSubscriptions@2024-01-01-preview"
name = "mistral-large-2411-subscription"
parent_id = azapi_resource.ai_project.id
body = {
properties = {
modelId = "azureml://registries/azureml-mistral/models/Mistral-Large-2411"
marketplacePlan = {
publisherId = "000-000"
offerId = "mistral-large-2411"
planId = "mistral-large-2411-plan-prod"
}
}
}
}
Refer:
How to find Plan and Marketplace details for a given Azure VM Image reference - Stack Overflow answered by Venkat V