-
Notifications
You must be signed in to change notification settings - Fork 0
AzDoGitRepository
Michael Zanatta edited this page Aug 19, 2026
·
4 revisions
AzDoGitRepository [string] #ResourceName
{
ProjectName = [String]$ProjectName
RepositoryName = [String]$RepositoryName
[ SourceRepository = [String]$SourceRepository ]
[ Ensure = [String] {'Present', 'Absent'} ]
}Not applicable for this resource.
Not applicable for this resource.
- Ensure: Specifies whether the repository should exist. Defaults to 'Present'.
- ProjectName: The name of the Azure DevOps project.
- RepositoryName: The name of the Git repository within the project.
- SourceRepository: (Optional) The source repository from which to create the new repository.
This resource manages Git repositories in Azure DevOps projects using Desired State Configuration (DSC). It supports creating repositories from scratch or initializing them from a source/template repository.
Configuration ExampleConfig {
Import-DscResource -ModuleName 'AzureDevOpsDscNative'
Node localhost {
AzDoGitRepository AddGitRepository {
Ensure = 'Present'
ProjectName = 'MyProject'
RepositoryName = 'MyRepository'
SourceRepository = 'TemplateRepository'
}
}
}
Start-DscConfiguration -Path ./ExampleConfig -Wait -Verbose# Return the current configuration for AzDoGitRepository
$properties = @{
ProjectName = 'MyProject'
RepositoryName = 'MyRepository'
}
Invoke-DscResource -Name 'AzDoGitRepository' -Method Get -Property $properties -ModuleName 'AzureDevOpsDscNative'parameters: {}
variables: {
ProjectName: MyProject,
RepositoryName: MyRepository
}
resources:
- name: My Git Repository
type: AzureDevOpsDscNative/AzDoGitRepository
dependsOn:
- AzureDevOpsDscNative/AzDoProject/MyProject
properties:
ProjectName: $ProjectName
RepositoryName: $RepositoryName
SourceRepository: TemplateRepository
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-DscPipelineRunner @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