{"id":311,"date":"2019-11-11T21:03:39","date_gmt":"2019-11-11T21:03:39","guid":{"rendered":"https:\/\/iddles.co.uk\/?p=311"},"modified":"2019-11-11T21:03:39","modified_gmt":"2019-11-11T21:03:39","slug":"deploying-infrastructure-without-public-ip-addresses-in-azure-part-2","status":"publish","type":"post","link":"https:\/\/iddles.co.uk\/index.php\/2019\/11\/11\/deploying-infrastructure-without-public-ip-addresses-in-azure-part-2\/","title":{"rendered":"Deploying Infrastructure without Public IP addresses in Azure &#8211; Part 2"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">So now we have discussed the issue of Public IP addresses as well as concepts around Azure ARM templates.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Next step is to remove their use.   Its really quite a simple process of removing entries from both the <strong>parameters.json<\/strong> and <strong>template.json<\/strong> files.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"alignleft size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"660\" height=\"1024\" src=\"https:\/\/iddles.co.uk\/wp-content\/uploads\/2019\/11\/image-8-660x1024.png\" alt=\"ASAv public ip json\" class=\"wp-image-334\" srcset=\"https:\/\/iddles.co.uk\/wp-content\/uploads\/2019\/11\/image-8-660x1024.png 660w, https:\/\/iddles.co.uk\/wp-content\/uploads\/2019\/11\/image-8-193x300.png 193w, https:\/\/iddles.co.uk\/wp-content\/uploads\/2019\/11\/image-8-768x1192.png 768w, https:\/\/iddles.co.uk\/wp-content\/uploads\/2019\/11\/image-8-676x1049.png 676w, https:\/\/iddles.co.uk\/wp-content\/uploads\/2019\/11\/image-8.png 920w\" sizes=\"auto, (max-width: 660px) 100vw, 660px\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"> Consider the Cisco ASAv deployment from the previous deployment.   <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Looking through the values a number of items relating to the devices Public IP address can be found.   Luckilly Cisco used the string <strong>public<\/strong> to make things simple to find.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">They set things like Public IP sku (Basic), Allocation method, the DNS name along with the address object name.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">These values are referenced within the <strong>template.json<\/strong> file.  Again looking at the ASAv version an excerpt is shown below<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/iddles.co.uk\/wp-content\/uploads\/2019\/11\/image-9-1024x829.png\" alt=\"ASAv public ip json\" class=\"wp-image-335\" width=\"601\" height=\"485\" srcset=\"https:\/\/iddles.co.uk\/wp-content\/uploads\/2019\/11\/image-9-300x243.png 300w, https:\/\/iddles.co.uk\/wp-content\/uploads\/2019\/11\/image-9-676x547.png 676w, https:\/\/iddles.co.uk\/wp-content\/uploads\/2019\/11\/image-9.png 1774w\" sizes=\"auto, (max-width: 601px) 100vw, 601px\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The first section is used to describe the varibles for interactive deploymentsor if they are not specified within the parameters.json or overwridden during deploment.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Further down each one is described as a resource.  This is the main section that defines the underlying Azure resource.  Consider the snip shown below showing a public IP address name object, along with the Azure ARM API that is called to create the object.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/iddles.co.uk\/wp-content\/uploads\/2019\/11\/image-10-1024x535.png\" alt=\"\" class=\"wp-image-336\" width=\"624\" height=\"326\" srcset=\"https:\/\/iddles.co.uk\/wp-content\/uploads\/2019\/11\/image-10-1024x535.png 1024w, https:\/\/iddles.co.uk\/wp-content\/uploads\/2019\/11\/image-10-300x157.png 300w, https:\/\/iddles.co.uk\/wp-content\/uploads\/2019\/11\/image-10-768x401.png 768w, https:\/\/iddles.co.uk\/wp-content\/uploads\/2019\/11\/image-10-676x353.png 676w, https:\/\/iddles.co.uk\/wp-content\/uploads\/2019\/11\/image-10.png 1432w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"> Lastly, towards the bottom of the file is an area where the public IP address is bound to the network adaptor.  In this case its <strong>Nic0<\/strong> the ASAv&#8217;s primary interface.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/iddles.co.uk\/wp-content\/uploads\/2019\/11\/image-12-1024x552.png\" alt=\"\" class=\"wp-image-338\" width=\"782\" height=\"421\" srcset=\"https:\/\/iddles.co.uk\/wp-content\/uploads\/2019\/11\/image-12-1024x552.png 1024w, https:\/\/iddles.co.uk\/wp-content\/uploads\/2019\/11\/image-12-300x162.png 300w, https:\/\/iddles.co.uk\/wp-content\/uploads\/2019\/11\/image-12-768x414.png 768w, https:\/\/iddles.co.uk\/wp-content\/uploads\/2019\/11\/image-12-676x365.png 676w\" sizes=\"auto, (max-width: 782px) 100vw, 782px\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;d love to tell you there is a magic way of editing this but sadly there is not.   Using a little bit of search\/delete my method is to:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Back all files up<\/li><li>Identify in <strong>parameters.json<\/strong> any entry relating to the Public IP address.<\/li><li>Search for those names within the <strong>deploy.json<\/strong> file.<\/li><li>Remove the entries and the regions around them, remembering to keep the json formatting.<\/li><li>Delete the entry from the <strong>parameters.json<\/strong><\/li><li>Repeat until entries are removed.<\/li><li>Test a deployment, verifying using the Azure Activity Log for your subscription <\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">I have successfully created these for the following infrastructure devices:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Cisco ASAv<\/li><li>Palo Alto NG Firewall<\/li><li>CheckPoint NGX Firewall<\/li><li>Pulse VPN appliance (used to be Juniper)<\/li><li>RSA Authentication Server<\/li><li>F5 BIG-IP<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Ill add some links to some before and after examples, however be aware that the templates as well as Azure API&#8217;s could in theory change.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Good luck.   As I say its not easy however is <span style=\"text-decoration: underline;\">very<\/span> possible.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So now we have discussed the issue of Public IP addresses as well as concepts around Azure ARM templates. Next step is to remove their use. Its really quite a simple process of removing entries from both the parameters.json and template.json files. Consider the Cisco ASAv deployment from the previous deployment. Looking through the values [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[71,68,82,81],"tags":[],"class_list":["post-311","post","type-post","status-publish","format-standard","hentry","category-azure","category-cloud","category-powershell","category-scripting","post-preview"],"_links":{"self":[{"href":"https:\/\/iddles.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/311","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/iddles.co.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/iddles.co.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/iddles.co.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/iddles.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=311"}],"version-history":[{"count":4,"href":"https:\/\/iddles.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/311\/revisions"}],"predecessor-version":[{"id":341,"href":"https:\/\/iddles.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/311\/revisions\/341"}],"wp:attachment":[{"href":"https:\/\/iddles.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/iddles.co.uk\/index.php\/wp-json\/wp\/v2\/categories?post=311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/iddles.co.uk\/index.php\/wp-json\/wp\/v2\/tags?post=311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}