@@ -425,6 +425,7 @@ resource stopTriggers 'Microsoft.Resources/deploymentScripts@2020-10-01' = {
425
425
//------------------------------------------------------------------------------
426
426
427
427
// cSpell:ignore linkedservices
428
+ // TODO: Move to the hub-app module
428
429
resource linkedService_keyVault 'Microsoft.DataFactory/factories/linkedservices@2018-06-01' = if (!empty (remoteHubStorageUri )) {
429
430
name : keyVault .name
430
431
parent : dataFactory
@@ -443,6 +444,7 @@ resource linkedService_keyVault 'Microsoft.DataFactory/factories/linkedservices@
443
444
}
444
445
}
445
446
447
+ // TODO: Move to the hub-app module
446
448
resource linkedService_storageAccount 'Microsoft.DataFactory/factories/linkedservices@2018-06-01' = {
447
449
name : storageAccount .name
448
450
parent : dataFactory
@@ -812,97 +814,68 @@ resource dataset_ftkReleaseFile 'Microsoft.DataFactory/factories/datasets@2018-0
812
814
// Triggers
813
815
//------------------------------------------------------------------------------
814
816
815
- resource trigger_ExportManifestAdded 'Microsoft.DataFactory/factories/triggers@2018-06-01' = {
816
- name : exportManifestAddedTriggerName
817
- parent : dataFactory
817
+ // TODO: Create apps_PublishEvent pipeline { event, properties }
818
+
819
+ module trigger_ExportManifestAdded 'hub-event-trigger.bicep' = {
820
+ name : 'trigger_ExportManifestAdded'
818
821
dependsOn : [
819
822
stopTriggers
820
823
]
821
- properties : {
822
- annotations : []
823
- pipelines : [
824
- {
825
- pipelineReference : {
826
- referenceName : pipeline_ExecuteExportsETL .name
827
- type : 'PipelineReference'
828
- }
829
- parameters : {
830
- folderPath : '@triggerBody().folderPath'
831
- fileName : '@triggerBody().fileName'
832
- }
833
- }
834
- ]
835
- type : 'BlobEventsTrigger'
836
- typeProperties : {
837
- blobPathBeginsWith : '/${exportContainerName }/blobs/'
838
- blobPathEndsWith : 'manifest.json'
839
- ignoreEmptyBlobs : true
840
- scope : storageAccount .id
841
- events : [
842
- 'Microsoft.Storage.BlobCreated'
843
- ]
824
+ params : {
825
+ dataFactoryName : dataFactory .name
826
+ triggerName : exportManifestAddedTriggerName
827
+
828
+ // TODO: Replace pipeline with event: 'Microsoft.FinOpsToolkit.CostManagement.ExportManifestAdded'
829
+ pipelineName : pipeline_ExecuteExportsETL .name
830
+ pipelineParameters : {
831
+ folderPath : '@triggerBody().folderPath'
832
+ fileName : '@triggerBody().fileName'
844
833
}
834
+
835
+ storageAccountName : storageAccount .name
836
+ storageContainer : exportContainerName
837
+ storagePathEndsWith : 'manifest.json'
845
838
}
846
839
}
847
840
848
- resource trigger_IngestionManifestAdded 'Microsoft.DataFactory/factories/triggers@2018-06-01' = if (deployDataExplorer ) {
849
- name : ingestionManifestAddedTriggerName
850
- parent : dataFactory
841
+ module trigger_IngestionManifestAdded 'hub-event-trigger.bicep' = {
842
+ name : 'trigger_IngestionManifestAdded'
851
843
dependsOn : [
852
844
stopTriggers
853
845
]
854
- properties : {
855
- annotations : []
856
- pipelines : [
857
- {
858
- pipelineReference : {
859
- referenceName : pipeline_ExecuteIngestionETL .name
860
- type : 'PipelineReference'
861
- }
862
- parameters : {
863
- folderPath : '@triggerBody().folderPath'
864
- }
865
- }
866
- ]
867
- type : 'BlobEventsTrigger'
868
- typeProperties : {
869
- blobPathBeginsWith : '/${ingestionContainerName }/blobs/'
870
- blobPathEndsWith : 'manifest.json'
871
- ignoreEmptyBlobs : true
872
- scope : storageAccount .id
873
- events : [
874
- 'Microsoft.Storage.BlobCreated'
875
- ]
846
+ params : {
847
+ dataFactoryName : dataFactory .name
848
+ triggerName : ingestionManifestAddedTriggerName
849
+
850
+ // TODO: Replace pipeline with event: 'Microsoft.FinOpsToolkit.Hubs.IngestionManifestAdded'
851
+ pipelineName : pipeline_ExecuteIngestionETL .name
852
+ pipelineParameters : {
853
+ folderPath : '@triggerBody().folderPath'
876
854
}
855
+
856
+ storageAccountName : storageAccount .name
857
+ storageContainer : ingestionContainerName
858
+ storagePathEndsWith : 'manifest.json'
877
859
}
878
860
}
879
861
880
- resource trigger_SettingsUpdated 'Microsoft.DataFactory/factories/triggers@2018-06-01' = {
881
- name : updateConfigTriggerName
882
- parent : dataFactory
862
+ module trigger_SettingsUpdated 'hub-event-trigger.bicep' = {
863
+ name : 'trigger_SettingsUpdated'
883
864
dependsOn : [
884
865
stopTriggers
885
866
]
886
- properties : {
887
- annotations : []
888
- pipelines : [
889
- {
890
- pipelineReference : {
891
- referenceName : pipeline_ConfigureExports .name
892
- type : 'PipelineReference'
893
- }
894
- }
895
- ]
896
- type : 'BlobEventsTrigger'
897
- typeProperties : {
898
- blobPathBeginsWith : '/${configContainerName }/blobs/'
899
- blobPathEndsWith : 'settings.json'
900
- ignoreEmptyBlobs : true
901
- scope : storageAccount .id
902
- events : [
903
- 'Microsoft.Storage.BlobCreated'
904
- ]
905
- }
867
+ params : {
868
+ dataFactoryName : dataFactory .name
869
+ triggerName : updateConfigTriggerName
870
+
871
+ // TODO: Replace pipeline with event: 'Microsoft.FinOpsToolkit.Hubs.SettingsUpdated'
872
+ pipelineName : pipeline_ConfigureExports .name
873
+ pipelineParameters : {}
874
+
875
+ storageAccountName : storageAccount .name
876
+ storageContainer : configContainerName
877
+ // TODO: Change this to startswith
878
+ storagePathEndsWith : 'settings.json'
906
879
}
907
880
}
908
881
0 commit comments