You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/governance/policy/how-to/guest-configuration-create-linux.md
+23-21Lines changed: 23 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ To learn about creating Guest Configuration policies for Windows, see the page
14
14
15
15
When auditing Linux, Guest Configuration uses [Chef InSpec](https://www.inspec.io/). The InSpec
16
16
profile defines the condition that the machine should be in. If the evaluation of the configuration
17
-
fails, the Policy effect **auditIfNotExists** is triggered and the machine is considered
17
+
fails, the policy effect **auditIfNotExists** is triggered and the machine is considered
18
18
**non-compliant**.
19
19
20
20
[Azure Policy Guest Configuration](../concepts/guest-configuration.md) can only be used to audit
@@ -28,13 +28,15 @@ non-Azure machine.
28
28
29
29
## Install the PowerShell module
30
30
31
-
Creating a Guest Configuration artifact, automated testing of the artifact, creating
32
-
a policy definition, and publishing the policy, is entirely automatable using the Guest Configuration module in PowerShell. The module can be installed on a machine running Windows, macOS, or Linux with PowerShell 6.2 or later
33
-
running locally, or with [Azure Cloud Shell](https://shell.azure.com), or with the
31
+
Creating a Guest Configuration artifact, automated testing of the artifact, creating a policy
32
+
definition, and publishing the policy, is entirely automatable using the Guest Configuration module
33
+
in PowerShell. The module can be installed on a machine running Windows, macOS, or Linux with
34
+
PowerShell 6.2 or later running locally, or with [Azure Cloud Shell](https://shell.azure.com), or
@@ -356,9 +358,10 @@ override values are provided through Azure Policy and don't impact how the Confi
356
358
authored or compiled.
357
359
358
360
With InSpec, parameters are typically handled as input either at runtime or as code using
359
-
attributes. Guest Configuration obfuscates this process so input can be provided when policy is assigned. An attributes file is automatically created within the machine. You
360
-
don't need to create and add a file in your project. There are two steps to adding parameters to
361
-
your Linux audit project.
361
+
attributes. Guest Configuration obfuscates this process so input can be provided when policy is
362
+
assigned. An attributes file is automatically created within the machine. You don't need to create
363
+
and add a file in your project. There are two steps to adding parameters to your Linux audit
364
+
project.
362
365
363
366
Define the input in the Ruby file where you script what to audit on the machine. An example is given
364
367
below.
@@ -376,8 +379,8 @@ parameter named **Parameters**. This parameter takes a hashtable including all d
376
379
about each parameter and automatically creates all the required sections of the files used to create
377
380
each Azure Policy definition.
378
381
379
-
The following example creates an Azure Policy to audit a file path, where the user provides the path
380
-
at the time of Policy assignment.
382
+
The following example creates an policy definition to audit a file path, where the user provides the
383
+
path at the time of policy assignment.
381
384
382
385
```azurepowershell-interactive
383
386
$PolicyParameterInfo = @(
@@ -392,7 +395,7 @@ $PolicyParameterInfo = @(
392
395
}
393
396
)
394
397
395
-
# The hashtable also supports a property named 'AllowedValues' with an array of strings if you would like to limit input to a list
398
+
# The hashtable also supports a property named 'AllowedValues' with an array of strings to limit input to a list
Copy file name to clipboardExpand all lines: articles/governance/policy/how-to/guest-configuration-create.md
+26-22Lines changed: 26 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ To learn about creating Guest Configuration policies for Linux, see the page
15
15
When auditing Windows, Guest Configuration uses a
16
16
[Desired State Configuration](/powershell/scripting/dsc/overview/overview) (DSC) resource module to
17
17
and configuration file. The DSC configuration defines the condition that the machine should be in.
18
-
If the evaluation of the configuration fails, the Policy effect **auditIfNotExists** is triggered
18
+
If the evaluation of the configuration fails, the policy effect **auditIfNotExists** is triggered
19
19
and the machine is considered **non-compliant**.
20
20
21
21
[Azure Policy Guest Configuration](../concepts/guest-configuration.md) can only be used to audit
@@ -29,9 +29,11 @@ non-Azure machine.
29
29
30
30
## Install the PowerShell module
31
31
32
-
Creating a Guest Configuration artifact, automated testing of the artifact, creating
33
-
a policy definition, and publishing the policy, is entirely automatable using the Guest Configuration module in PowerShell. The module can be installed on a machine running Windows, macOS, or Linux with PowerShell 6.2 or later
34
-
running locally, or with [Azure Cloud Shell](https://shell.azure.com), or with the
32
+
Creating a Guest Configuration artifact, automated testing of the artifact, creating a policy
33
+
definition, and publishing the policy, is entirely automatable using the Guest Configuration module
34
+
in PowerShell. The module can be installed on a machine running Windows, macOS, or Linux with
35
+
PowerShell 6.2 or later running locally, or with [Azure Cloud Shell](https://shell.azure.com), or
@@ -232,7 +234,7 @@ Test- cmdlet on the same OS platform as you plan to audit.
232
234
233
235
Parameters of the `Test-GuestConfigurationPackage` cmdlet:
234
236
235
-
-**Name**: Guest Configuration Policy name.
237
+
-**Name**: Guest Configuration policy name.
236
238
-**Parameter**: Policy parameters provided in hashtable format.
237
239
-**Path**: Full path of the Guest Configuration package.
238
240
@@ -348,11 +350,12 @@ Finally, publish the policy definitions using the `Publish-GuestConfigurationPol
348
350
cmdlet only has the **Path** parameter that points to the location of the JSON files created by
349
351
`New-GuestConfigurationPolicy`.
350
352
351
-
To run the Publish command, you need access to create Policies in Azure. The specific authorization requirements are documented in the [Azure Policy Overview](../overview.md) page. The best built-in role is **Resource Policy Contributor**.
353
+
To run the Publish command, you need access to create policies in Azure. The specific authorization
354
+
requirements are documented in the [Azure Policy Overview](../overview.md) page. The best built-in
0 commit comments