en-US/about_AzDoVariableGroup.help.txt

.NAME
    AzDoVariableGroup
 
.SYNOPSIS
    DSC resource for managing Azure DevOps pipeline variable groups.
 
.DESCRIPTION
    This resource manages variable groups in Azure DevOps, allowing shared variables and secrets to
    be used across multiple pipelines within a project.
 
.PARAMETER ProjectName
    Key - System.String
    The name of the Azure DevOps project. This property is mandatory and serves as a key property for the resource.
 
.PARAMETER VariableGroupName
    Required - System.String
    The name of the variable group. This is a key property.
 
.PARAMETER Description
    Write - System.String
    An optional description for the variable group.
 
.PARAMETER VariableGroupType
    Write - System.String
    Allowed values: Vsts, AzureKeyVault
    The type of variable group. Valid values are Vsts (standard) and AzureKeyVault. Defaults to Vsts.
 
.PARAMETER Variables
    Write - HashTable
    A hashtable of key-value pairs representing the variables.
 
.PARAMETER AllowAccess
    Write - System.Boolean
    Whether all pipelines can access this variable group. Defaults to $false.
 
.EXAMPLE 1
 
This example shows how to create a variable group in an Azure DevOps project.
 
Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'
 
    node localhost
    {
        AzDoVariableGroup 'AddAzDoVariableGroup'
        {
            Ensure = 'Present'
            ProjectName = 'MyProject'
            VariableGroupName = 'MyVariableGroup'
            Description = 'Shared pipeline variables'
            VariableGroupType = 'Vsts'
            AllowAccess = $true
            Variables = @{
                APP_ENV = 'production'
                APP_LOG_LEVEL = 'warn'
            }
        }
    }
}
 
.EXAMPLE 2
 
This example shows how to update a variable group in an Azure DevOps project.
 
Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'
 
    node localhost
    {
        AzDoVariableGroup 'UpdateAzDoVariableGroup'
        {
            Ensure = 'Present'
            ProjectName = 'MyProject'
            VariableGroupName = 'MyVariableGroup'
            Description = 'Shared pipeline variables - updated'
            VariableGroupType = 'Vsts'
            AllowAccess = $true
            Variables = @{
                APP_ENV = 'production'
                APP_LOG_LEVEL = 'info'
                APP_VERSION = '2.0.0'
            }
        }
    }
}
 
.EXAMPLE 3
 
This example shows how to remove a variable group from an Azure DevOps project.
 
Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'
 
    node localhost
    {
        AzDoVariableGroup 'RemoveAzDoVariableGroup'
        {
            Ensure = 'Absent'
            ProjectName = 'MyProject'
            VariableGroupName = 'MyVariableGroup'
        }
    }
}