keith-turner commented on a change in pull request #336: Support terminate for 
Azure Log Analytics artifacts
URL: https://github.com/apache/fluo-muchos/pull/336#discussion_r398592296
 
 

 ##########
 File path: ansible/roles/azure/tasks/terminate_cluster.yml
 ##########
 @@ -19,6 +19,38 @@
 
 - hosts: localhost
   tasks:
+    - block:
+      - import_tasks: log_analytics_ws_common.yml
+
+      - name: Delete workbook
+        azure_rm_resource:
+           resource_group: "{{ resource_group }}"
+           provider: insights
+           resource_type: workbooks
+           resource_name: "{{ workbook_exists|join('') }}"
+           api_version: '2020-02-12'
+           state: absent
+        when: workbook_exists is defined
+
+      - name: Delete dashboard
+        azure_rm_resource:
+           resource_group: "{{ resource_group }}"
+           provider: Portal
+           resource_type: dashboards
+           resource_name:  "{{ monitor_name.stdout + '-db' }}"
+           api_version: '2019-01-01-preview'
+           state: absent
+
+      - name: Delete log analytics workspace
+        azure_rm_resource:
+           resource_group: "{{ resource_group }}"
+           provider: OperationalInsights
+           resource_type: workspaces
+           resource_name: "{{ monitor_name.stdout + '-la' }}"
 
 Review comment:
   Could `{{ log_workspace_name }}` be used here?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to