Add SQL license type compliance Azure Policy samples#1490
Open
claestom wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add SQL license type compliance Azure Policy samples
Summary
Adds four self-contained Azure Policy samples under
samples/manage/that detect and remediate thelicenseTypesetting (Azure Hybrid Benefit vs. Pay-As-You-Go) across the SQL resource family. Each sample includes a custom policy definition, a deployment script, a remediation script, and a README.What's included
samples/manage/azure-sql-db-managed-instance/sql-mi-license-type-compliance/Microsoft.Sql/managedInstancessamples/manage/sql-vm/sql-iaas-license-type-compliance/Microsoft.SqlVirtualMachine/sqlVirtualMachinessamples/manage/azure-sql-db/sql-paas-license-type-compliance/Microsoft.Sql/servers/databasessamples/manage/azure-data-factory-ssis/sql-ssis-license-type-compliance/Microsoft.DataFactory/factories/integrationRuntimesEach sample contains
policy/azurepolicy.json— custom policy definition.scripts/deployment.ps1— creates/updates the policy definition and assignment.scripts/start-remediation.ps1— remediates non-compliant resources.README.md— overview, license-type mapping, and step-by-step usage.Notes
licenseTyperequires the IR to be inInitial/Stoppedstate, sostart-remediation.ps1stops the IR, sets the newlicenseType, then restarts it. Plan remediation during a maintenance window, as the IR is briefly unavailable.computeProperties), automatic DeployIfNotExists remediation isn't supported. Remediation is performed viaSet-AzDataFactoryV2IntegrationRuntime(internal GET → merge → PUT), consistent with the existing Microsoft sampleenable-payg-for-azure-sql.ps1.helpLink,source) point to themicrosoft/sql-server-samplesmasterpaths.Testing