A new pipeline is created, including the property "escapeQuoteEscaping": true.
Actual Behaviour
The "escapeQuoteEscaping" property is always present in terraform plan but then it is not applied. More details on what happens, step by step:
Running terraform plan produces a nice looking plan:
Terraform will perform the following actions:
# module.jira-pipeline.azurerm_data_factory_pipeline.test_pipeline_quotes will be created
+ resource "azurerm_data_factory_pipeline" "test_pipeline_quotes" {
+ activities_json = jsonencode(
[
+ {
+ inputs = [
+ {
+ referenceName = "source_xxxx"
+ type = "DatasetReference"
},
]
+ name = "CopyDataTestActivity"
+ outputs = [
+ {
+ referenceName = "destination_xxxx"
+ type = "DatasetReference"
},
]
+ policy = {
+ retry = 1
+ retryIntervalInSeconds = 30
+ secureInput = false
+ secureOutput = false
+ timeout = "0.12:00:00"
}
+ type = "Copy"
+ typeProperties = {
+ enableStaging = true
+ escapeQuoteEscaping = true
+ sink = {
+ importSettings = {
+ type = "SnowflakeImportCopyCommand"
}
+ type = "SnowflakeSink"
}
+ source = {
+ query = {
+ type = "Expression"
+ value = "select 1 as testcol"
}
+ type = "JiraSource"
}
+ stagingSettings = {
+ linkedServiceName = {
+ referenceName = "linked_service_xxxx"
+ type = "LinkedServiceReference"
}
}
}
+ userProperties = []
},
]
)
+ data_factory_id = "**********"
+ id = (known after apply)
+ name = "test_quotes_escaping_pipeline"
}
Plan: 1 to add, 0 to change, 0 to destroy.
2. Run `terraform apply` to deploy the pipeline, and inspected the pipeline manually (in Azure UI). The pipeline JSON does not have the "escapeQuotesEscaping" property. This is how the JSON on ADF looks like:
3. Tried to re-run `terraform plan`, and to my surprise, there was a detected change. This is how the plan looks.
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
module.jira-pipeline.azurerm_data_factory_pipeline.test_pipeline_quotes will be updated in-place
}
# (5 unchanged attributes hidden)
},
]
)
id = "*****"
name = "test_quotes_escaping_pipeline"
# (5 unchanged attributes hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
5. Ran `terraform apply`, but sadly got the same results - the property was not applied.
6. Applied the property manually via the UI.
7. Ran `terraform plan`, and had the exact same plan as before.
8. Ran `terraform apply` and the property that I manually added was removed.
### Steps to Reproduce
1. Run `terraform apply` for all resources except for the last one (pipeline `test_pipeline_quotes`);
2. Create 2 datasets in Azure Data Factory UI: `source_xxxx` and `destination_xxxx`. I used jira for the source and Snowflake for the destination but in practice it should not matter much. If you use different ones, make sure to update the type in the JSON file (as of now it is `JiraSource` and `SnowflakeSink`);
3. Remaining instructions to help reproduce are stated in the "Actual Behaviour".
### Important Factoids
_No response_
### References
_No response_
Is there an existing issue for this?
Community Note
Terraform Version
1.5.2
AzureRM Provider Version
3.70.0
Affected Resource(s)/Data Source(s)
azurerm_data_factory_pipeline
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
A new pipeline is created, including the property
"escapeQuoteEscaping": true
.Actual Behaviour
The
"escapeQuoteEscaping"
property is always present interraform plan
but then it is not applied. More details on what happens, step by step:Running
terraform plan
produces a nice looking plan:Plan: 1 to add, 0 to change, 0 to destroy.
{ "name": "test_quotes_escaping_pipeline", "properties": { "activities": [ { "name": "CopyDataTestActivity", "type": "Copy", "dependsOn": [], "policy": { "timeout": "0.12:00:00", "retry": 1, "retryIntervalInSeconds": 30, "secureOutput": false, "secureInput": false }, "userProperties": [], "typeProperties": { "source": { "type": "JiraSource", "query": { "value": "select 1 as testcol", "type": "Expression" } }, "sink": { "type": "SnowflakeSink", "importSettings": { "type": "SnowflakeImportCopyCommand" } }, "enableStaging": true, "stagingSettings": { "linkedServiceName": { "referenceName": "linked_service_xxxx", "type": "LinkedServiceReference" } } }, "inputs": [ { "referenceName": "destination_xxxx", "type": "DatasetReference" } ], "outputs": [ { "referenceName": "source_xxxx", "type": "DatasetReference" } ] } ], "annotations": [], "lastPublishTime": "2023-10-09T12:04:16Z" }, "type": "Microsoft.DataFactory/factories/pipelines" }
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: ~ update in-place
Terraform will perform the following actions:
module.jira-pipeline.azurerm_data_factory_pipeline.test_pipeline_quotes will be updated in-place
~ resource "azurerm_data_factory_pipeline" "test_pipeline_quotes" { ~ activities_json = jsonencode( ~ [ ~ { name = "CopyDataTestActivity" ~ typeProperties = {
(4 unchanged attributes hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.