I have an error below when I tried to publish from Azure Data Factory after It is deployed via Terraform.
Publishing error: Invalid references or dependencies found. This is
likely due to publishing outside of Git mode or editing and deleting
linked services in other branches. To recover from this state, please
refer to the errors below and our Git troubleshooting guide
https://learn.microsoft.com/en-gb/azure/data-factory/source-control#stale-publish-branch
The repo settings in the Data Factory is below:
The Data Factory is created and deployed by Terraform. All pipelines in JSON files created in the DF are stored in a GitHub repo like below:
resource "azurerm_data_factory" "data-factory" {
name = "data-factory"
location = azurerm_resource_group.data-factory.location
resource_group_name = azurerm_resource_group.data-factory.name
github_configuration {
account_name = "xxxx"
branch_name = "main"
git_url = "https://github.com/xxxx/azure-data-factory-etl-demo"
repository_name = "azure-data-factory-etl-demo"
root_folder = "/"
}
I publish from Data Factory after the deployment without making changes to the repo and anything in Data Factory.
I tried both Options 1&2 in the link below, but it is still not working.
https://learn.microsoft.com/en-gb/azure/data-factory/source-control#stale-publish-branch
The Github repository is public
Data Factory in Github for Authorized OAuth Apps is below (GitHub -> Settings -> Applications -> Authorized OAuth Apps)
I am able to create a new branch in my Github repo from Data Factory, which means it has write permission.
The example is from the link below:
https://medium.com/twodigits/deploy-your-azure-data-factory-through-terraform-2a9c2bd2d75d
The issue has been raised from below:
https://stackoverflow.com/questions/70854827/publish-error-via-azure-data-factory-after-terraform-deployment-pointing-to-exis/70862483