-
Notifications
You must be signed in to change notification settings - Fork 0
AzDoPipelineEnvironment
Michael Zanatta edited this page Aug 18, 2026
·
4 revisions
AzDoPipelineEnvironment [string] #ResourceName
{
ProjectName = [String]$ProjectName
EnvironmentName = [String]$EnvironmentName
[ Description = [String]$Description ]
[ Ensure = [String] {'Present', 'Absent'} ]
}- ProjectName: The name of the Azure DevOps project. This property is mandatory and serves as a key property for the resource.
- EnvironmentName: The name of the pipeline environment. This is a key property.
- Description: An optional description for the environment.
-
Ensure: Specifies whether the environment should exist. Valid values are
PresentandAbsent.
This resource manages pipeline environments in Azure DevOps. Environments represent deployment targets (e.g., Development, Staging, Production) and can be configured with approval gates and checks using the AzDoEnvironmentApproval and AzDoCheckConfiguration resources.
Configuration ExampleConfig {
Import-DscResource -ModuleName 'AzureDevOpsDscNative'
Node localhost {
AzDoPipelineEnvironment AddEnvironment {
Ensure = 'Present'
ProjectName = 'MyProject'
EnvironmentName = 'Production'
Description = 'Production deployment environment'
}
}
}
Start-DscConfiguration -Path ./ExampleConfig -Wait -Verbose# Return the current configuration for AzDoPipelineEnvironment
$properties = @{
ProjectName = 'MyProject'
EnvironmentName = 'Production'
}
Invoke-DscResource -Name 'AzDoPipelineEnvironment' -Method Get -Property $properties -ModuleName 'AzureDevOpsDscNative'parameters: {}
variables: {
ProjectName: MyProject,
EnvironmentName: Production
}
resources:
- name: Production Environment
type: AzureDevOpsDscNative/AzDoPipelineEnvironment
dependsOn:
- AzureDevOpsDscNative/AzDoProject/MyProject
properties:
ProjectName: $ProjectName
EnvironmentName: $EnvironmentName
Description: Production deployment environment
Ensure: PresentLCM Initialization:
$params = @{
AzureDevopsOrganizationName = "SampleAzDoOrgName"
ConfigurationDirectory = "C:\Datum\DSCOutput\"
ConfigurationUrl = 'https://configuration-path'
JITToken = 'SampleJITToken'
Mode = 'Set'
AuthenticationType = 'ManagedIdentity'
ReportPath = 'C:\Datum\DSCOutput\Reports'
}
Invoke-AzDoLCM @params- Assert-BoundParameter
- Assert-ElevatedUser
- Assert-IPAddress
- Assert-Module
- AzDoAPI_0_ProjectCache
- AzDoAPI_1_GroupCache
- AzDoAPI_2_UserCache
- AzDoAPI_3_GroupMemberCache
- AzDoAPI_4_GitRepositoryCache
- AzDoAPI_5_PermissionsCache
- AzDoAPI_6_ServicePrinciple
- AzDoAPI_7_IdentitySubjectDescriptors
- AzDoAPI_8_ProjectProcessTemplates
- AzDoAPI_9_DevOpsClassificationNodes
- Compare-DscParameterState
- Compare-ResourcePropertyState
- ConvertFrom-DscResourceInstance
- ConvertTo-Base64String
- ConvertTo-CimInstance
- ConvertTo-HashTable
- Find-Certificate
- Format-Path
- Get-AzDevOpsOperation
- Get-AzDevOpsServicesApiUri
- Get-AzDevOpsServicesUri
- AzDoAgentPool
- AzDoAgentPoolPermission
- AzDoAgentQueue
- AzDoAreaNodes
- AzDoAreaPermission
- AzDoArtifactFeed
- AzDoArtifactFeedPermission
- AzDoArtifactFeedSettings
- AzDoArtifactFeedView
- AzDoAuditStream
- AzDoBranchPolicy
- AzDoCheckConfiguration
- AzDoDeploymentGroup
- AzDoEnvironmentApproval
- AzDoEnvironmentPermission
- AzDoExtension
- AzDoGitPermission
- AzDoGitRepository
- AzDoGroupMember
- AzDoGroupPermission
- AzDoIterationNodes
- AzDoIterationPermission
- AzDoNotificationSubscription
- AzDoOrganizationGroup
- AzDoOrganizationSettings
- AzDoPipeline
- AzDoPipelineEnvironment
- AzDoPipelinePermission
- AzDoPipelineSettings
- AzDoProcess
- AzDoProcessPermission
- AzDoProject
- AzDoProjectGroup
- AzDoProjectPermission
- AzDoProjectServices
- AzDoRepositorySettings
- AzDoSecurityNamespacePermission
- AzDoServiceConnection
- AzDoServiceConnectionPermission
- AzDoServiceHook
- AzDoTaskGroup
- AzDoTeam
- AzDoTeamMember
- AzDoTeamSettings
- AzDoUserEntitlement
- AzDoVariableGroup
- AzDoVariableGroupPermission
- AzDoWiki
- AzDoWIPTags