Azure / bicep

Bicep is a declarative language for describing and deploying Azure resources
MIT License
3.25k stars 754 forks source link

Add support for azure devops resources (project/repo/build) #7274

Open IanSmith232 opened 2 years ago

IanSmith232 commented 2 years ago

Issues: Im working on automating creation of CI/CD environments in AzureDevops and looking at using Terraform's azuredevops provider. This is a great solution but has limitation; For example there isn't support to create pipelines. Bicep supports azure devops pipelines, but nothing else (as far as I can tell). To accomplish what I want I'll have to use a mix of tools (Terraform/Bicep/REST API) and it will be complicated.

Proposed Solution: Add arm template and bicep support to cover AzureDevops resource creation (Projects, Git Repo, Build, Pipelines). This will simplify similar solutions by consolidating work into one tool (bicep).

------====Example config====--------

resource my_project 'Microsoft.DevOps/project' {
  name: 'My Awesome Project'
  description: 'All of my awesomee things'
}

resource my_git_repo 'Microsoft.DevOps/repository' {
  project_id: my_project.id
  name: 'My Awesome Repo'
  initialization: {
    init_type: 'Clean'
  }
}

resource my_build_def 'Microsoft.DevOps/build_definition' {
  project_id: my_project.id
  name: 'My Awesome Build Pipeline'
  path: '\\'

  repository: {
    repo_type: 'TfsGit'
    repo_id: my_git_repo.id
    branch_name: my_git_repo.default_branch
    yml_path: 'azure-pipelines.yml'
  }
}
fsdrw08 commented 1 month ago

any updates?