layout | page_title | description |
---|---|---|
azuredevops |
AzureDevops: azuredevops_check_required_template |
Manages a Required Template Check. |
Manages a Required Template Check.
resource "azuredevops_project" "example" {
name = "Example Project"
}
resource "azuredevops_serviceendpoint_generic" "example" {
project_id = azuredevops_project.example.id
server_url = "https://some-server.example.com"
username = "username"
password = "password"
service_endpoint_name = "Example Generic"
description = "Managed by Terraform"
}
resource "azuredevops_check_required_template" "example" {
project_id = azuredevops_project.example.id
target_resource_id = azuredevops_serviceendpoint_generic.example.id
target_resource_type = "endpoint"
required_template {
repository_type = "azuregit"
repository_name = "project/repository"
repository_ref = "refs/heads/main"
template_path = "template/path.yml"
}
}
resource "azuredevops_project" "example" {
name = "Example Project"
}
resource "azuredevops_environment" "example" {
project_id = azuredevops_project.example.id
name = "Example Environment"
}
resource "azuredevops_check_required_template" "example" {
project_id = azuredevops_project.example.id
target_resource_id = azuredevops_environment.example.id
target_resource_type = "environment"
required_template {
repository_name = "project/repository"
repository_ref = "refs/heads/main"
template_path = "template/path.yml"
}
required_template {
repository_name = "project/repository"
repository_ref = "refs/heads/main"
template_path = "template/alternate-path.yml"
}
}
The following arguments are supported:
-
project_id
- (Required) The project ID. Changing this forces a new Required Template Check to be created. -
target_resource_id
- (Required) The ID of the resource being protected by the check. Changing this forces a new Required Template Check to be created. -
target_resource_type
- (Required) The type of resource being protected by the check. Valid values:endpoint
,environment
,queue
,repository
,securefile
,variablegroup
. Changing this forces a new Required Template Check to be created. -
required_template
- (Required) One or morerequired_template
blocks documented below.
A required_template
block supports the following:
repository_type
- (Optional) The type of the repository storing the template. Valid values:azuregit
,github
,githubenterprise
,bitbucket
. Defaults toazuregit
.repository_name
- (Required) The name of the repository storing the template.repository_ref
- (Required) The branch in which the template will be referenced.template_path
- (Required) The path to the template yaml.
In addition to the Arguments listed above - the following attribute are exported:
id
- The ID of the check.version
- The version of the check.
Importing this resource is not supported.