Skip to content

Commit 546847b

Browse files
committed
Make policy definition and assignment display names generic
Remove hardcoded license type references from policy displayName and description. The actual target license type is controlled by parameters at assignment time, so the definition metadata should not imply a specific value. Changes: - azurepolicy.json: displayName and description now use generic 'Configure Arc-enabled SQL Server license type' wording - deployment.ps1: collapsed the PAYG/SA conditional display name logic into a single generic label per platform
1 parent 74df34e commit 546847b

2 files changed

Lines changed: 4 additions & 10 deletions

File tree

samples/manage/azure-arc-enabled-sql-server/compliance/arc-sql-license-type-compliance/policy/azurepolicy.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"displayName": "Set Arc-enabled SQL Server license type to 'License With Software Assurance'",
2+
"displayName": "Configure Arc-enabled SQL Server license type",
33
"policyType": "Custom",
44
"mode": "Indexed",
5-
"description": "This policy sets the license type for Arc-enabled SQL Server to 'License With Software Assurance'. ",
5+
"description": "This policy configures the license type for Arc-enabled SQL Server extensions to a specified target value.",
66
"metadata": {
77
"category": ""
88
},

samples/manage/azure-arc-enabled-sql-server/compliance/arc-sql-license-type-compliance/scripts/deployment.ps1

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,8 @@ else {
6060
$PolicyDefinitionName = "activate-sql-arc-$LicenseToken-$PlatformToken"
6161
$PolicyAssignmentName = "sql-arc-$LicenseToken-$PlatformToken"
6262

63-
if ($TargetLicenseType -eq 'PAYG') {
64-
$PolicyDefinitionDisplayName = "Arc-enabled SQL Server ($PlatformLabel) license type to 'Pay-as-you-go'"
65-
$PolicyAssignmentDisplayName = "Arc-enabled SQL Server ($PlatformLabel) license type to 'Pay-as-you-go'"
66-
}
67-
else {
68-
$PolicyDefinitionDisplayName = "Set Arc-enabled SQL Server ($PlatformLabel) license type to 'License With Software Assurance'"
69-
$PolicyAssignmentDisplayName = "Set Arc-enabled SQL Server ($PlatformLabel) license type to 'License With Software Assurance'"
70-
}
63+
$PolicyDefinitionDisplayName = "Configure Arc-enabled SQL Server ($PlatformLabel) license type"
64+
$PolicyAssignmentDisplayName = "Configure Arc-enabled SQL Server ($PlatformLabel) license type"
7165

7266
#Create policy definition
7367
New-AzPolicyDefinition `

0 commit comments

Comments
 (0)