| layout | page_title | description |
|---|---|---|
azuredevops |
AzureDevops: azuredevops_servicehook_storage_queue_pipelines |
Manages a Storage Queue Pipelines Service Hook. |
Manages a Storage Queue Pipelines Service Hook .
resource "azuredevops_project" "example" {
name = "example-project"
}
resource "azurerm_resource_group" "example" {
name = "example-resources"
location = "West Europe"
}
resource "azurerm_storage_account" "example" {
name = "servicehookexamplestacc"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
account_tier = "Standard"
account_replication_type = "LRS"
}
resource "azurerm_storage_queue" "example" {
name = "examplequeue"
storage_account_name = azurerm_storage_account.example.name
}
resource "azuredevops_servicehook_storage_queue_pipelines" "example" {
project_id = azuredevops_project.example.id
account_name = azurerm_storage_account.example.name
account_key = azurerm_storage_account.example.primary_access_key
queue_name = azurerm_storage_queue.example.name
visi_timeout = 30
run_state_changed_event {
run_state_filter = "Completed"
run_result_filter = "Succeeded"
}
}An empty configuration block will occur in all events triggering the associated action.
resource "azuredevops_servicehook_storage_queue_pipelines" "example" {
project_id = azuredevops_project.example.id
account_name = azurerm_storage_account.example.name
account_key = azurerm_storage_account.example.primary_access_key
queue_name = azurerm_storage_queue.example.name
visi_timeout = 30
run_state_changed_event {}
}The following arguments are supported:
-
account_key- (Required) A valid account key from the queue's storage account. -
account_name- (Required) The queue's storage account name. -
project_id- (Required) The ID of the associated project. Changing this forces a new Service Hook Storage Queue Pipelines to be created. -
queue_name- (Required) The name of the queue that will store the events.
-
run_state_changed_event- (Optional) Arun_state_changed_eventblock as defined below. Conflicts withstage_state_changed_event -
stage_state_changed_event- (Optional) Astage_state_changed_eventblock as defined below. Conflicts withrun_state_changed_event
-> Note At least one of run_state_changed_event and stage_state_changed_event has to be set.
-
ttl- (Optional) event time-to-live - the duration a message can remain in the queue before it's automatically removed. Defaults to604800. -
visi_timeout- (Optional) event visibility timout - how long a message is invisible to other consumers after it's been dequeued. Defaults to0.
A run_state_changed_event block supports the following:
-
pipeline_id- (Optional) The pipeline ID that will generate an event. If not specified, all pipelines in the project will trigger the event. -
run_result_filter- (Optional) Which run result should generate an event. Only valid if published_event isRunStateChanged. If not specified, all results will trigger the event. -
run_state_filter- (Optional) Which run state should generate an event. Only valid if published_event isRunStateChanged. If not specified, all states will trigger the event.
A stage_state_changed_event block supports the following:
-
pipeline_id- (Optional) The pipeline ID that will generate an event. -
stage_name- (Optional) Which stage should generate an event. Only valid if published_event isStageStateChanged. If not specified, all stages will trigger the event. -
stage_result_filter- (Optional) Which stage result should generate an event. Only valid if published_event isStageStateChanged. If not specified, all results will trigger the event. -
stage_state_filter- (Optional) Which stage state should generate an event. Only valid if published_event isStageStateChanged. If not specified, all states will trigger the event.
In addition to the Arguments listed above - the following Attributes are exported:
id- The ID of the Service Hook Storage Queue Pipelines.
The timeouts block allows you to specify timeouts for certain actions:
create- (Defaults to 10 minutes) Used when creating the Storage Queue Pipelines Service Hook.read- (Defaults to 5 minute) Used when retrieving the Storage Queue Pipelines Service Hook.update- (Defaults to 10 minutes) Used when updating the Storage Queue Pipelines Service Hook.delete- (Defaults to 10 minutes) Used when deleting the Storage Queue Pipelines Service Hook.
Storage Queue Pipelines Service Hook can be imported using the resource id, e.g.
terraform import azuredevops_servicehook_storage_queue_pipelines.example 00000000-0000-0000-0000-000000000000