Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kwame-mintah/terraform-azuredevops-git-repositories
Terraform module for creating Azure DevOps Git repositories
https://github.com/kwame-mintah/terraform-azuredevops-git-repositories
azure-devops terraform terraform-module
Last synced: 3 days ago
JSON representation
Terraform module for creating Azure DevOps Git repositories
- Host: GitHub
- URL: https://github.com/kwame-mintah/terraform-azuredevops-git-repositories
- Owner: kwame-mintah
- License: apache-2.0
- Created: 2023-09-03T13:25:25.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-04T14:33:59.000Z (about 1 year ago)
- Last Synced: 2024-12-05T20:15:01.996Z (2 months ago)
- Topics: azure-devops, terraform, terraform-module
- Language: HCL
- Homepage: https://registry.terraform.io/modules/kwame-mintah/git-repositories/azuredevops/latest
- Size: 32.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Terraform Azure DevOps Git Repositories
This module aids in the creation of multiple git repositories, within your Azure DevOps project.
## Usage
```hcl
module "git-repositories" {
source = "kwame-mintah/git-repositories/azuredevops"
version = "0.2.0"
init_git_repositories = [
{
name = "import-repository",
default_branch = "refs/heads/main"
source_type = "Git",
source_url = "https://github.com/kwame-mintah/terraform-azuredevops-git-repositories.git",
init_type = "Import",
},
{
name = "clean-repository"
default_branch = "refs/heads/master"
source_type = null
source_url = null
init_type = "Clean"
}]
}
```## Pre-Commit hooks
Git hook scripts are very helpful for identifying simple issues before pushing any changes. Hooks will run on every commit automatically pointing out issues in the code e.g. trailing whitespace.
To help with the maintenance of these hooks, [pre-commit](https://pre-commit.com/) is used, along with [pre-commit-hooks](https://pre-commit.com/#install).
Please following [these instructions](https://pre-commit.com/#install) to install `pre-commit` locally and ensure that you have run `pre-commit install` to install the hooks for this project.
Additionally, once installed, the hooks can be updated to the latest available version with `pre-commit autoupdate`.
## Documentation Generation
Code formatting and documentation for `variables` and `outputs` is generated using [pre-commit-terraform](https://github.com/antonbabenko/pre-commit-terraform/releases) hooks that in turn uses [terraform-docs](https://github.com/terraform-docs/terraform-docs) that will insert/update documentation. The following markers have been added to the `README.md`:
```
```
## Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.4.5 |
| [azuredevops](#requirement\_azuredevops) | >= 0.8.0 |## Providers
| Name | Version |
|------|---------|
| [azuredevops](#provider\_azuredevops) | 0.8.0 |## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [azuredevops_git_repository.repo](https://registry.terraform.io/providers/microsoft/azuredevops/latest/docs/resources/git_repository) | resource |
| [azuredevops_git_repository.repo_attr](https://registry.terraform.io/providers/microsoft/azuredevops/latest/docs/data-sources/git_repository) | data source |
| [azuredevops_project.project](https://registry.terraform.io/providers/microsoft/azuredevops/latest/docs/data-sources/project) | data source |## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [init\_git\_repositories](#input\_init\_git\_repositories) | (Optional) Names of git repositories to add into the
project. |list(object({| `[]` | no |
name = string
default_branch = string
source_type = string
source_url = string
init_type = string
}))
| [project\_name](#input\_project\_name) | Name of the Project. | `string` | n/a | yes |## Outputs
| Name | Description |
|------|-------------|
| [git\_repos\_attributes](#output\_git\_repos\_attributes) | Retrieve the git repository attributes. |