layout | page_title | description |
---|---|---|
azuredevops |
AzureDevops: azuredevops_check_approval |
Manages an Approval Check. |
Manages a Approval 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"
}
data "azuredevops_users" "example" {
principal_name = "[email protected]"
}
resource "azuredevops_check_approval" "example" {
project_id = azuredevops_project.example.id
target_resource_id = azuredevops_serviceendpoint_generic.example.id
target_resource_type = "endpoint"
requester_can_approve = false
approvers = [
one(data.azuredevops_users.example.users).id,
]
timeout = 43200
}
resource "azuredevops_project" "example" {
name = "Example Project"
}
resource "azuredevops_environment" "example" {
project_id = azuredevops_project.example.id
name = "Example Environment"
}
resource "azuredevops_group" "example" {
display_name = "some-azdo-group"
}
resource "azuredevops_check_approval" "example" {
project_id = azuredevops_project.example.id
target_resource_id = azuredevops_environment.example.id
target_resource_type = "environment"
requester_can_approve = true
approvers = [
azuredevops_group.example.origin_id,
]
}
The following arguments are supported:
-
project_id
- (Required) The project ID. Changing this forces a new Approval Check to be created. -
target_resource_id
- (Required) The ID of the resource being protected by the check. Changing this forces a new Approval 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 Approval Check to be created. -
approvers
- (Required) Specifies a list of approver IDs.
-
instructions
- (Optional) The instructions for the approvers. -
minimum_required_approvers
- (Optional) The minimum number of approvers. This property is applicable when there is more than 1 approver. -
requester_can_approve
- (Optional) Can the requestor approve? Defaults tofalse
. -
timeout
- (Optional) The timeout in minutes for the approval. Defaults to43200
.
In addition to the Arguments listed above - the following Attributes are exported:
id
- The ID of the check.version
- The version of the check.
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 2 minutes) Used when creating the Approval Check.read
- (Defaults to 1 minute) Used when retrieving the Approval Check.update
- (Defaults to 2 minutes) Used when updating the Approval Check.delete
- (Defaults to 2 minutes) Used when deleting the Approval Check.
Importing this resource is not supported.