Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Enforce an init script for Azure Machine Learning Compute Instance via Azure Policy
{
"mode": "All",
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.MachineLearningServices/workspaces/computes"
},
{
"field": "Microsoft.MachineLearningServices/workspaces/computes/computeType",
"in": [
"ComputeInstance"
]
}
]
},
"then": {
"effect": "append",
"details": [{
"field": "Microsoft.MachineLearningServices/workspaces/computes/setupScripts.scripts.creationScript.scriptSource",
"value": "inline"
},
{
"field": "Microsoft.MachineLearningServices/workspaces/computes/setupScripts.scripts.creationScript.scriptData",
"value": "IyEvYmluL2Jhc2gKCmVjaG8gIkhlbGxvIFdvcmxkIg=="
}
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment