» azurerm_stream_analytics_job
Manages a Stream Analytics Job.
» Example Usage
resource "azurerm_resource_group" "example" {
name = "example-resources"
location = "West Europe"
}
resource "azurerm_stream_analytics_job" "example" {
name = "example-job"
resource_group_name = "${azurerm_resource_group.example.name}"
location = "${azurerm_resource_group.example.location}"
compatibility_level = "1.1"
data_locale = "en-GB"
events_late_arrival_max_delay_in_seconds = 60
events_out_of_order_max_delay_in_seconds = 50
events_out_of_order_policy = "Adjust"
output_error_policy = "Drop"
streaming_units = 3
transformation_query = <<QUERY
SELECT *
INTO [YourOutputAlias]
FROM [YourInputAlias]
QUERY
}
» Argument Reference
The following arguments are supported:
-
name
- (Required) The name of the Stream Analytics Job. Changing this forces a new resource to be created. -
resource_group_name
- (Required) The name of the Resource Group where the Stream Analytics Job should exist. Changing this forces a new resource to be created. -
location
- (Required) The Azure Region in which the Resource Group exists. Changing this forces a new resource to be created. -
compatibility_level
- (Required) Specifies the compatibility level for this job - which controls certain runtime behaviors of the streaming job. Possible values are1.0
and 1.1`.
NOTE: Support for Compatibility Level 1.2 is dependent on a new version of the Stream Analytics API, which being tracked in this issue.
-
data_locale
- (Required) Specifies the Data Locale of the Job, which should be a supported .NET Culture. -
events_late_arrival_max_delay_in_seconds
- (Required) Specifies the maximum tolerable delay in seconds where events arriving late could be included. Supported range is-1
(indefinite) to1814399
(20d 23h 59m 59s). -
events_out_of_order_max_delay_in_seconds
- (Required) Specifies the maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order. Supported range is0
to599
(9m 59s). -
events_out_of_order_policy
- (Required) Specifies the policy which should be applied to events which arrive out of order in the input event stream. Possible values areAdjust
andDrop
. -
output_error_policy
- (Required) Specifies the policy which should be applied to events which arrive at the output and cannot be written to the external storage due to being malformed (such as missing column values, column values of wrong type or size). Possible values areDrop
andStop
. -
streaming_units
- (Required) Specifies the number of streaming units that the streaming job uses. Supported values are1
,3
,6
and multiples of6
up to120
. -
transformation_query
- (Required) Specifies the query that will be run in the streaming job, written in Stream Analytics Query Language (SAQL).
» Attributes Reference
The following attributes are exported in addition to the arguments listed above:
» Import
Stream Analytics Job's can be imported using the resource id
, e.g.
terraform import azurerm_stream_analytics_job.test /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group1/providers/Microsoft.StreamAnalytics/streamingjobs/job1