User Tools

Site Tools


wiki:updateing_azure_database_firewall_via_api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
wiki:updateing_azure_database_firewall_via_api [2022/09/02 15:29] – created antisawiki:updateing_azure_database_firewall_via_api [2024/04/25 13:15] (current) – [See also] add Connect to Azure database antisa
Line 2: Line 2:
  
 ====== Updateing Azure database firewall via Azure API ====== ====== Updateing Azure database firewall via Azure API ======
-Via bash script+Via bash script. (Install "jq" tool)
  
-<file bash>+<file bash azure_whitelist.sh>
 #!/bin/bash #!/bin/bash
  
Line 24: Line 24:
 To use in rundeck check this job definition: To use in rundeck check this job definition:
  
-<code yaml>+<file yaml azure_whitelist1.yaml>
 - defaultTab: nodes - defaultTab: nodes
   description: 'Update or create Azure firewall whitelist rule for IP to access the   description: 'Update or create Azure firewall whitelist rule for IP to access the
Line 65: Line 65:
     strategy: node-first     strategy: node-first
   uuid: d63d774f-1302-4ed7-aa50-cdcf1bc96810   uuid: d63d774f-1302-4ed7-aa50-cdcf1bc96810
-</code>+</file>
  
-Here is an alternative to the script above using the Rundecks "HTTP Request Node Step"+Here is an alternative to the script above using the Rundecks "HTTP Request Node Step" ([[https://docs.rundeck.com/docs/learning/howto/calling-apis.html#community-version-prerequisite|Install]] the plugin **Rundeck HTTP Workflow Step Plugin** and [[wiki:install_json_log_filter_parser_plugin_rundeck|jq filter plugin]])
  
-<code yaml>+<file yaml azure_whitelist2>
 - defaultTab: nodes - defaultTab: nodes
   description: 'Update or create Azure firewall whitelist rule for IP to access the   description: 'Update or create Azure firewall whitelist rule for IP to access the
Line 146: Line 146:
     strategy: node-first     strategy: node-first
   uuid: c1354a3d-c0f9-4b56-a30c-ddac083d99ec   uuid: c1354a3d-c0f9-4b56-a30c-ddac083d99ec
-</code>+</file>
  
 Replace the "xxxxxxxxxxx" with your values. Replace the "xxxxxxxxxxx" with your values.
Line 155: Line 155:
 ====== See also ====== ====== See also ======
   * [[wiki:connect_azure_rest_api|Connect to Azure REST API]]   * [[wiki:connect_azure_rest_api|Connect to Azure REST API]]
 +  * [[wiki:connect_azure_database|Connect to Azure database]]
 ====== References ====== ====== References ======
  
  
wiki/updateing_azure_database_firewall_via_api.1662125392.txt.gz · Last modified: 2022/09/02 15:29 by antisa

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki