{"id":27302,"date":"2024-03-14T07:11:42","date_gmt":"2024-03-14T07:11:42","guid":{"rendered":"https:\/\/cloud-cod.com\/?p=27302"},"modified":"2025-08-05T10:04:53","modified_gmt":"2025-08-05T10:04:53","slug":"azure-logic-app-talking-to-storage-account-and-aviatrix-controller","status":"publish","type":"post","link":"https:\/\/cloud-cod.com\/index.php\/2024\/03\/14\/azure-logic-app-talking-to-storage-account-and-aviatrix-controller\/","title":{"rendered":"Azure Logic App talking to Storage Account, Azure Key Vault, and Aviatrix Controller &#8211; Part 1"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"27302\" class=\"elementor elementor-27302\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-aaeb2ae elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"aaeb2ae\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-fd1c57c\" data-id=\"fd1c57c\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-82cd78c elementor-toc--minimized-on-tablet elementor-widget elementor-widget-table-of-contents\" data-id=\"82cd78c\" data-element_type=\"widget\" data-settings=\"{&quot;exclude_headings_by_selector&quot;:[],&quot;marker_view&quot;:&quot;bullets&quot;,&quot;headings_by_tags&quot;:[&quot;h2&quot;,&quot;h3&quot;,&quot;h4&quot;,&quot;h5&quot;,&quot;h6&quot;],&quot;icon&quot;:{&quot;value&quot;:&quot;fas fa-circle&quot;,&quot;library&quot;:&quot;fa-solid&quot;},&quot;minimize_box&quot;:&quot;yes&quot;,&quot;minimized_on&quot;:&quot;tablet&quot;,&quot;hierarchical_view&quot;:&quot;yes&quot;,&quot;min_height&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;min_height_tablet&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;min_height_mobile&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]}}\" data-widget_type=\"table-of-contents.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<style>\/*! elementor-pro - v3.17.0 - 01-11-2023 *\/\n.elementor-widget-table-of-contents .elementor-toc__header-title{color:var(--header-color)}.elementor-widget-table-of-contents.elementor-toc--collapsed .elementor-toc__toggle-button--collapse,.elementor-widget-table-of-contents:not(.elementor-toc--collapsed) .elementor-toc__toggle-button--expand{display:none}.elementor-widget-table-of-contents .elementor-widget-container{min-height:var(--box-min-height);border:var(--box-border-width,1px) solid var(--box-border-color,#9da5ae);border-radius:var(--box-border-radius,3px);background-color:var(--box-background-color);transition:min-height .4s;overflow:hidden}.elementor-toc__header{display:flex;align-items:center;justify-content:space-between;padding:var(--box-padding,20px);background-color:var(--header-background-color);border-bottom:var(--separator-width,1px) solid var(--box-border-color,#9da5ae)}.elementor-toc__header-title{font-size:18px;margin:0;color:var(--header-color)}.elementor-toc__toggle-button{cursor:pointer;display:inline-flex}.elementor-toc__toggle-button i{color:var(--toggle-button-color)}.elementor-toc__toggle-button svg{height:1em;width:1em;fill:var(--toggle-button-color)}.elementor-toc__spinner-container{text-align:center}.elementor-toc__spinner{font-size:2em}.elementor-toc__spinner.e-font-icon-svg{height:1em;width:1em}.elementor-toc__body{padding:var(--box-padding,20px);max-height:var(--toc-body-max-height);overflow-y:auto}.elementor-toc__body::-webkit-scrollbar{width:7px}.elementor-toc__body::-webkit-scrollbar-thumb{background-color:#babfc5;border-radius:10px}.elementor-toc__list-wrapper{list-style:none;padding:0}.elementor-toc__list-item{margin-bottom:.5em}.elementor-toc__list-item.elementor-item-active{font-weight:700}.elementor-toc__list-item .elementor-toc__list-wrapper{margin-top:.5em;margin-left:var(--nested-list-indent,1em)}.elementor-toc__list-item-text:hover{color:var(--item-text-hover-color);-webkit-text-decoration:var(--item-text-hover-decoration);text-decoration:var(--item-text-hover-decoration)}.elementor-toc__list-item-text.elementor-item-active{color:var(--item-text-active-color);-webkit-text-decoration:var(--item-text-active-decoration);text-decoration:var(--item-text-active-decoration)}.elementor-toc__list-item-text-wrapper{display:flex;align-items:center}.elementor-toc__list-item-text-wrapper:before,.elementor-toc__list-item-text-wrapper i{margin-right:8px;color:var(--marker-color)}.elementor-toc__list-item-text-wrapper svg{margin-right:8px;fill:var(--marker-color);height:var(--marker-size,.5em);width:var(--marker-size,.5em)}.elementor-toc__list-item-text-wrapper i{font-size:var(--marker-size,.5em)}.elementor-toc__list-item-text-wrapper:before{font-size:var(--marker-size,1em)}.elementor-toc--content-ellipsis .elementor-toc__list-item-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.elementor-toc__list-items--collapsible>.elementor-toc__list-wrapper>.elementor-toc__list-item>.elementor-toc__list-wrapper{display:none}.elementor-toc__heading-anchor{position:absolute}.elementor-toc__body .elementor-toc__list-item-text{color:var(--item-text-color);-webkit-text-decoration:var(--item-text-decoration);text-decoration:var(--item-text-decoration)}.elementor-toc__body .elementor-toc__list-item-text:hover{color:var(--item-text-hover-color);-webkit-text-decoration:var(--item-text-hover-decoration);text-decoration:var(--item-text-hover-decoration)}.elementor-toc__body .elementor-toc__list-item-text.elementor-item-active{color:var(--item-text-active-color);-webkit-text-decoration:var(--item-text-active-decoration);text-decoration:var(--item-text-active-decoration)}ol.elementor-toc__list-wrapper{counter-reset:item}ol.elementor-toc__list-wrapper .elementor-toc__list-item{counter-increment:item}ol.elementor-toc__list-wrapper .elementor-toc__list-item-text-wrapper:before{content:counters(item,\".\") \". \"}<\/style>\t\t<div class=\"elementor-toc__header\">\n\t\t\t<h4 class=\"elementor-toc__header-title\">\n\t\t\t\tSITEMAP\t\t\t<\/h4>\n\t\t\t\t\t\t\t<div class=\"elementor-toc__toggle-button elementor-toc__toggle-button--expand\" role=\"button\" tabindex=\"0\" aria-controls=\"elementor-toc__82cd78c\" aria-expanded=\"true\" aria-label=\"Open table of contents\"><i aria-hidden=\"true\" class=\"fas fa-chevron-down\"><\/i><\/div>\n\t\t\t\t<div class=\"elementor-toc__toggle-button elementor-toc__toggle-button--collapse\" role=\"button\" tabindex=\"0\" aria-controls=\"elementor-toc__82cd78c\" aria-expanded=\"true\" aria-label=\"Close table of contents\"><i aria-hidden=\"true\" class=\"fas fa-chevron-up\"><\/i><\/div>\n\t\t\t\t\t<\/div>\n\t\t<div id=\"elementor-toc__82cd78c\" class=\"elementor-toc__body\">\n\t\t\t<div class=\"elementor-toc__spinner-container\">\n\t\t\t\t<i class=\"elementor-toc__spinner eicon-animation-spin eicon-loading\" aria-hidden=\"true\"><\/i>\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-418282f elementor-widget elementor-widget-heading\" data-id=\"418282f\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<style>\/*! elementor - v3.17.0 - 01-11-2023 *\/\n.elementor-heading-title{padding:0;margin:0;line-height:1}.elementor-widget-heading .elementor-heading-title[class*=elementor-size-]>a{color:inherit;font-size:inherit;line-height:inherit}.elementor-widget-heading .elementor-heading-title.elementor-size-small{font-size:15px}.elementor-widget-heading .elementor-heading-title.elementor-size-medium{font-size:19px}.elementor-widget-heading .elementor-heading-title.elementor-size-large{font-size:29px}.elementor-widget-heading .elementor-heading-title.elementor-size-xl{font-size:39px}.elementor-widget-heading .elementor-heading-title.elementor-size-xxl{font-size:59px}<\/style><h2 class=\"elementor-heading-title elementor-size-default\">Introduction<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-35c39be elementor-widget elementor-widget-text-editor\" data-id=\"35c39be\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<style>\/*! elementor - v3.17.0 - 01-11-2023 *\/\n.elementor-widget-text-editor.elementor-drop-cap-view-stacked .elementor-drop-cap{background-color:#69727d;color:#fff}.elementor-widget-text-editor.elementor-drop-cap-view-framed .elementor-drop-cap{color:#69727d;border:3px solid;background-color:transparent}.elementor-widget-text-editor:not(.elementor-drop-cap-view-default) .elementor-drop-cap{margin-top:8px}.elementor-widget-text-editor:not(.elementor-drop-cap-view-default) .elementor-drop-cap-letter{width:1em;height:1em}.elementor-widget-text-editor .elementor-drop-cap{float:left;text-align:center;line-height:1;font-size:50px}.elementor-widget-text-editor .elementor-drop-cap-letter{display:inline-block}<\/style>\t\t\t\t<p>I am going to show you (based on a sample application) how to create an Azure Logic App that talks to Azure Key Vault, Azure Storage Account, and Aviatrix Controller.\u00a0<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6fdbb8f elementor-widget elementor-widget-text-editor\" data-id=\"6fdbb8f\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>The topic is divided into two parts:<\/p><ul><li>Part 1: this article, presents the task, algorithm, and components used<\/li><li>Part 2: presents the real implementation of the Logic App ( <a href=\"https:\/\/cloud-cod.com\/index.php\/2024\/03\/14\/azure-logic-app-talking-to-storage-account-key-vault-and-aviatrix-controller-part-2\/\">https:\/\/cloud-cod.com\/index.php\/2024\/03\/14\/azure-logic-app-talking-to-storage-account-key-vault-and-aviatrix-controller-part-2\/<\/a> )<\/li><\/ul>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-313b5e4 elementor-widget elementor-widget-heading\" data-id=\"313b5e4\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Environment and Task<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-73cb6aa elementor-widget elementor-widget-text-editor\" data-id=\"73cb6aa\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Let me present you my Azure environment and the task that we want to achieve.\u00a0<\/p><p>My test environment consists of 2 Aviatrix Transit Gateways: <strong>az-10-120-tgw<\/strong> and <strong>az-10-130-tgw<\/strong>.\u00a0<span style=\"color: var( --e-global-color-text ); font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight ); font-size: 0.875rem;\">Those Transit Gateways have some VPN connections (Site-to-Cloud tunnels) created:<\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-694b4af elementor-widget elementor-widget-text-editor\" data-id=\"694b4af\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<ul><li><strong>conn120-1<\/strong> terminated on <strong>az-10-120-tgw<\/strong><\/li><li><strong>conn130-1<\/strong> and <strong>conn130-2<\/strong> terminated on <strong>az-10-130-tgw<\/strong><\/li><\/ul>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a038123 elementor-widget elementor-widget-text-editor\" data-id=\"a038123\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Please keep in mind that the number of Aviatrix Transit Gateways and VPN connections is not relevant. I have created a small number of them just to show you how the Logic App is going to work.\u00a0<\/p><p>What is important though, is that both Aviatrix Transit Gateways have <strong>BGP Route Approval<\/strong> feature enabled (more: <a href=\"https:\/\/docs.aviatrix.com\/documentation\/latest\/building-your-network\/transit-bgp-route-approval.html?expand=true\">https:\/\/docs.aviatrix.com\/documentation\/latest\/building-your-network\/transit-bgp-route-approval.html?expand=true<\/a>).<\/p><p>The Gateway <strong>az-120-tgw<\/strong> is using Route Approval in <strong>Gateway Mode<\/strong>. Whereas, <strong>az-130-tgw<\/strong> is using the feature in <strong>Connection Mode<\/strong>.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8ca4c5a elementor-widget elementor-widget-image\" data-id=\"8ca4c5a\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<style>\/*! elementor - v3.17.0 - 01-11-2023 *\/\n.elementor-widget-image{text-align:center}.elementor-widget-image a{display:inline-block}.elementor-widget-image a img[src$=\".svg\"]{width:48px}.elementor-widget-image img{vertical-align:middle;display:inline-block}<\/style>\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"http:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/topology.png\" data-elementor-open-lightbox=\"yes\" data-elementor-lightbox-title=\"topology\" data-elementor-lightbox-description=\"topology\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MjczMDYsInVybCI6Imh0dHBzOlwvXC9jbG91ZC1jb2QuY29tXC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wM1wvdG9wb2xvZ3kucG5nIn0%3D\">\n\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"499\" src=\"https:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/topology-768x499.png\" class=\"attachment-medium_large size-medium_large wp-image-27306\" alt=\"topology\" srcset=\"https:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/topology-768x499.png 768w, https:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/topology-300x195.png 300w, https:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/topology-1024x665.png 1024w, https:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/topology.png 1231w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8c5a44c elementor-widget elementor-widget-text-editor\" data-id=\"8c5a44c\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>The goal is to be notified whenever the number of approved CIDRs changes. There are different ways how we could do it. The Logic App is going to execute some API calls to the Aviatrix Controller to get the information about Route Approval feature for both Transit Gateways. I will just keep track of the number of approved CIDRs and not the CIDRs themselves (though the approach would be the same in the latter case).<\/p><p>What components\/services do we need?<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-29f3004 elementor-widget elementor-widget-image\" data-id=\"29f3004\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"http:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/workflow.png\" data-elementor-open-lightbox=\"yes\" data-elementor-lightbox-title=\"workflow\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MjczMTAsInVybCI6Imh0dHBzOlwvXC9jbG91ZC1jb2QuY29tXC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wM1wvd29ya2Zsb3cucG5nIn0%3D\">\n\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"543\" src=\"https:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/workflow-768x543.png\" class=\"attachment-medium_large size-medium_large wp-image-27310\" alt=\"\" srcset=\"https:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/workflow-768x543.png 768w, https:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/workflow-300x212.png 300w, https:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/workflow-1024x724.png 1024w, https:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/workflow.png 1449w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3c16b37 elementor-widget elementor-widget-text-editor\" data-id=\"3c16b37\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<ul><li>Aviatrix Controller (obviously)<\/li><li>Azure Key Vault &#8211; Secrets that store our Aviatrix Controller domain name, user, and password (we need them for API calls)<\/li><li>Azure Storage Account &#8211; to store the following:<ul><li>the list of Aviatrix Transit Gateways that we want to examine<\/li><li>the details Route Approval information (per Gateway)<\/li><li>the total number of approved CIDRs (per Connection or per Gateway depending on the Route Approval Mode)<\/li><\/ul><\/li><\/ul>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0ef07d5 elementor-widget elementor-widget-heading\" data-id=\"0ef07d5\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Algorithm of application<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f46859f elementor-widget elementor-widget-text-editor\" data-id=\"f46859f\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Before jumping in into the application itself, I am going to present the high-level algorithm of how the application is going to work.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c2e88ab elementor-widget elementor-widget-image\" data-id=\"c2e88ab\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"http:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/algorithm-2.png\" data-elementor-open-lightbox=\"yes\" data-elementor-lightbox-title=\"algorithm\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MjczMjUsInVybCI6Imh0dHBzOlwvXC9jbG91ZC1jb2QuY29tXC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wM1wvYWxnb3JpdGhtLTIucG5nIn0%3D\">\n\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"1204\" src=\"https:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/algorithm-2-768x1204.png\" class=\"attachment-medium_large size-medium_large wp-image-27325\" alt=\"\" srcset=\"https:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/algorithm-2-768x1204.png 768w, https:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/algorithm-2-191x300.png 191w, https:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/algorithm-2-653x1024.png 653w, https:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/algorithm-2-980x1536.png 980w, https:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/algorithm-2.png 1132w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0d3af08 elementor-widget elementor-widget-text-editor\" data-id=\"0d3af08\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Important parts:<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e7ac359 elementor-widget elementor-widget-text-editor\" data-id=\"e7ac359\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<ul><li>The application starts with Logic App Variables initialization<ul><li>all the Logic App Variables must be initialized before they can be used<\/li><\/ul><\/li><li>Next step is to execute an API Call to Aviatrix Controller to get a CID<ul><li>it is enough to make a call only once<\/li><\/ul><\/li><li>Once the CID is retrieved we will fetch the information about Route Approval for every Gateway from the list of Gateways<ul><li>this is where we need a for-each loop<\/li><li>the application is going to save all the Route Approval information received from the Controller in the Azure Storage Account Blob\u00a0<\/li><\/ul><\/li><li>the application determines whether the Route Approval Mode enabled on the Gateway is Connection or Gateway type<ul><li>Condition (true\/false) is needed here<\/li><\/ul><\/li><li>for Gateway Mode (&#8220;right leg&#8221; of the Condition)<ul><li>it is enough to execute this part once for every Gateway (with Route Approval Gateway Mode)<\/li><li>the previous number of approved CIDRs is compared to the current number<\/li><li>if the number of approved CIDRs is different (previous vs current) the new value is stored and notification is triggered (e-mail or MS Teams Adaptive Card)<\/li><\/ul><\/li><li>for Connection Mode (&#8220;left leg&#8221; of the Condition)<ul><li>it could happen that there are more than just 1 connections configured on a specific Transit Gateway<\/li><li>the application must check every connection<\/li><li>this is where we need another for-each loop<\/li><li>likewise the Gateway Mode,\u00a0the previous number of approved CIDRs is compared to the current number<\/li><li>if the number of approved CIDRs is different (previous vs current) the new value is stored and notification is triggered (e-mail or MS Teams Adaptive Card)<\/li><\/ul><\/li><\/ul>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-251d18e elementor-widget elementor-widget-heading\" data-id=\"251d18e\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Storing the Data<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d44da72 elementor-widget elementor-widget-text-editor\" data-id=\"d44da72\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>As you have probably noticed, I mentioned already few times Azure Blob Storage. Why is it required? The application is going to retrieve some pieces of information from Blob but also it is going to store some other important data. Let&#8217;s have a look at how and what kind of Blobs are going to be used.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1f6cf7d elementor-widget elementor-widget-text-editor\" data-id=\"1f6cf7d\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>The following files are required to be created before the application runs:<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-38b2d0b elementor-widget elementor-widget-image\" data-id=\"38b2d0b\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"http:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/azureblobstorage-4.png\" data-elementor-open-lightbox=\"yes\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6Mjc1NTAsInVybCI6ZmFsc2V9\">\n\t\t\t\t\t\t\t<img decoding=\"async\" src=\"http:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/azureblobstorage-4.png\" title=\"\" alt=\"azureblobstorage\" loading=\"lazy\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-80381b9 elementor-widget elementor-widget-text-editor\" data-id=\"80381b9\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<ul><li><strong>gw_list.txt<\/strong> &#8211; it contains a list with Transit Gateway names that we want to check<\/li><li>for Connection Mode Gateways: there is one file created for every single connection. Those files store the total number of Approved CIDRs. Every execution of the Logic App overwrites the existing file. The name of the files is: <strong>&lt;transit-gw-name&gt;-&lt;connection-name&gt;.txt<\/strong><\/li><li>for Gateway Mode Gateways: there is only one file created per Gateway. Those files store the total number of Approved CIDRs. Every execution of the Logic App overwrites the existing file. The name of the file is: <strong>&lt;transit-gw-name&gt;.txt<\/strong><\/li><\/ul>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8930648 elementor-widget elementor-widget-text-editor\" data-id=\"8930648\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>The application itself creates the following files:<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7420c5c elementor-widget elementor-widget-text-editor\" data-id=\"7420c5c\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<ul><li>for every single Gateway: there is a file created with all the information gathered by API Call &#8220;Show Transit Learned CIDRs Approval Info&#8221;. Please notice that the name of the file contains a timestamp. It means that every execution of the Logic App will create a new file (the existing files are not overwritten). The name of the file: <strong>&lt;transit-gw-name&gt;-&lt;timestamp&gt;.json<\/strong><\/li><\/ul>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f886842 elementor-widget elementor-widget-text-editor\" data-id=\"f886842\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>The example below shows the files created in my environment:<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-43eedd5 elementor-widget elementor-widget-image\" data-id=\"43eedd5\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"http:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/blobstorage.png\" data-elementor-open-lightbox=\"yes\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6Mjc1NDYsInVybCI6ZmFsc2V9\">\n\t\t\t\t\t\t\t<img decoding=\"async\" src=\"http:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/blobstorage.png\" title=\"\" alt=\"blobstorage\" loading=\"lazy\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1ee10ae elementor-widget elementor-widget-heading\" data-id=\"1ee10ae\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Logic App Implementation<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7983ca3 elementor-widget elementor-widget-text-editor\" data-id=\"7983ca3\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>The implementation of the Logic App is presented in the Part 2 blog article: <a href=\"https:\/\/cloud-cod.com\/index.php\/2024\/03\/14\/azure-logic-app-talking-to-storage-account-key-vault-and-aviatrix-controller-part-2\/\">https:\/\/cloud-cod.com\/index.php\/2024\/03\/14\/azure-logic-app-talking-to-storage-account-key-vault-and-aviatrix-controller-part-2\/<\/a><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-7ec32c8 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"7ec32c8\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-697ecaa\" data-id=\"697ecaa\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>The article presents the Logic App application that communicates to Azure Key Vault, Azure Blob Storage, and 3rd party HTTP Endpoint (Aviatrix Controller).<\/p>\n","protected":false},"author":2,"featured_media":28008,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[14,18,19],"tags":[],"class_list":["post-27302","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aviatrix","category-azure","category-monitoring"],"uagb_featured_image_src":{"full":["https:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/blog_post15.png",2013,1428,false],"thumbnail":["https:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/blog_post15-150x150.png",150,150,true],"medium":["https:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/blog_post15-300x213.png",300,213,true],"medium_large":["https:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/blog_post15-768x545.png",768,545,true],"large":["https:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/blog_post15-1024x726.png",800,567,true],"1536x1536":["https:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/blog_post15-1536x1090.png",1536,1090,true],"2048x2048":["https:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/blog_post15.png",2013,1428,false],"onepress-blog-small":["https:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/blog_post15-300x150.png",300,150,true],"onepress-small":["https:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/blog_post15-480x300.png",480,300,true],"onepress-medium":["https:\/\/cloud-cod.com\/wp-content\/uploads\/2024\/03\/blog_post15-640x400.png",640,400,true]},"uagb_author_info":{"display_name":"Jakub","author_link":"https:\/\/cloud-cod.com\/index.php\/author\/jakub\/"},"uagb_comment_info":6,"uagb_excerpt":"The article presents the Logic App application that communicates to Azure Key Vault, Azure Blob Storage, and 3rd party HTTP Endpoint (Aviatrix Controller).","_links":{"self":[{"href":"https:\/\/cloud-cod.com\/index.php\/wp-json\/wp\/v2\/posts\/27302","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloud-cod.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloud-cod.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloud-cod.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/cloud-cod.com\/index.php\/wp-json\/wp\/v2\/comments?post=27302"}],"version-history":[{"count":80,"href":"https:\/\/cloud-cod.com\/index.php\/wp-json\/wp\/v2\/posts\/27302\/revisions"}],"predecessor-version":[{"id":28011,"href":"https:\/\/cloud-cod.com\/index.php\/wp-json\/wp\/v2\/posts\/27302\/revisions\/28011"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloud-cod.com\/index.php\/wp-json\/wp\/v2\/media\/28008"}],"wp:attachment":[{"href":"https:\/\/cloud-cod.com\/index.php\/wp-json\/wp\/v2\/media?parent=27302"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloud-cod.com\/index.php\/wp-json\/wp\/v2\/categories?post=27302"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloud-cod.com\/index.php\/wp-json\/wp\/v2\/tags?post=27302"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}