---
layout: "azuredevops"
page_title: "AzureDevops: azuredevops_repository_policy_case_enforcement"
description: |- Manages a case enforcement repository policy within Azure DevOps project.
---
Manages a case enforcement repository policy within Azure DevOps project.
~> If both project and project policy are enabled, the project policy has high priority.
resource "azuredevops_project" "example" {
name = "Example Project"
visibility = "private"
version_control = "Git"
work_item_template = "Agile"
description = "Managed by Terraform"
}
resource "azuredevops_git_repository" "example" {
project_id = azuredevops_project.example.id
name = "Example Repository"
initialization {
init_type = "Clean"
}
}
resource "azuredevops_repository_policy_case_enforcement" "example" {
project_id = azuredevops_project.example.id
enabled = true
blocking = true
enforce_consistent_case = true
repository_ids = [azuredevops_git_repository.example.id]
}resource "azuredevops_project" "example" {
name = "Example Project"
visibility = "private"
version_control = "Git"
work_item_template = "Agile"
description = "Managed by Terraform"
}
resource "azuredevops_repository_policy_case_enforcement" "example" {
project_id = azuredevops_project.example.id
enabled = true
blocking = true
enforce_consistent_case = true
}The following arguments are supported:
-
project_id- (Required) The ID of the project in which the policy will be created. -
enforce_consistent_case- (Required) Avoid case-sensitivity conflicts by blocking pushes that change name casing on files, folders, branches, and tags.
-
blocking- (Optional) A flag indicating if the policy should be blocking. Defaults totrue. -
enabled- (Optional) A flag indicating if the policy should be enabled. Defaults totrue. -
repository_ids(Optional) Control whether the policy is enabled for the repository or the project. Ifrepository_idsnot configured, the policy will be set to the project.
In addition to all arguments above, the following attributes are exported:
id- The ID of the repository policy.
The timeouts block allows you to specify timeouts for certain actions:
create- (Defaults to 10 minutes) Used when creating the Case Enforcement Repository Policy.read- (Defaults to 5 minute) Used when retrieving the Case Enforcement Repository Policy.update- (Defaults to 10 minutes) Used when updating the Case Enforcement Repository Policy.delete- (Defaults to 10 minutes) Used when deleting the Case Enforcement Repository Policy.
Azure DevOps repository policies can be imported using the projectID/policyID or projectName/policyID:
terraform import azuredevops_repository_policy_case_enforcement.example 00000000-0000-0000-0000-000000000000/0