{"id":13562,"date":"2017-03-24T09:04:22","date_gmt":"2017-03-24T16:04:22","guid":{"rendered":"http:\/\/joedantoni.wordpress.com\/?p=1822"},"modified":"2017-03-24T09:04:22","modified_gmt":"2017-03-24T16:04:22","slug":"azure-resource-locks-are-your-friend-in-development","status":"publish","type":"post","link":"https:\/\/www.dcac.com\/2017\/03\/24\/azure-resource-locks-are-your-friend-in-development\/","title":{"rendered":"Azure Resource Locks are Your Friend in Development"},"content":{"rendered":"

One of the great advantages of the cloud computing is the ability to power off resources that are not in use to save some money. Sure, your production database servers should be running 24×7, but that VM, or SQL Data Warehouse you are developing against during the week? You can shut it down at 7 PM (1900 for the Europeans reading this) and not start it up. Azure even recently introduced an auto-shutdown feature for VMs.<\/p>\n

\"Screen<\/a><\/p>\n

Unfortunately, there is no auto-startup feature, but that is easy enough to code using an Azure automation job. <\/p>\n

This sounds great, can it walk my dog, too?<\/h2>\n

Unfortunately, there\u2019s one problem with our awesome budget saving proposal. Sometimes developers have jobs that run beyond the time they leave the office. For example, last night at one of my clients a developer had an SSIS package running after he left, and it got killed when the SSIS machine auto-shutdown at 7. That isn\u2019t good.<\/p>\n

The solution for this is Azure resource locks\u2014you can put a lock on any resource in Azure. A lock can do one of the two things\u2014first there are delete locks<\/strong> which simply keep a resource from being deleted. It is not a bad idea to put a delete lock on all of your production resources to prevent any accidental deletion from happening. The second type of lock is a read-only lock<\/strong>, and these are a little more aggressive. You can\u2019t do anything to a resource with a read-only lock\u2014you can\u2019t add a drive to a VM, you can\u2019t resize, and most importantly, you can\u2019t shutdown the resource.<\/p>\n

You can use the portal, PowerShell, or CLI to create a lock. It\u2019s a fairly simple construct that can be extremely beneficial. You can get current details for lock creation from the Azure Documentation<\/a>.<\/p>\n

My developers have access to the portal (thanks to role based access control and resource groups), so I\u2019ve instructed them on how to place locks on resources, and how to remove them. As an administrator, you probably want to monitor for locks, to ensure that they aren\u2019t left in place after they are needed.<\/p>\n

\"\"<\/a> \"\"<\/p>\n","protected":false},"excerpt":{"rendered":"

One of the great advantages of the cloud computing is the ability to power off resources that are not in use to save some money. Sure, your production database servers should be running 24×7, but that VM, or SQL Data Warehouse you are developing against during the week? You can shut it down at 7 […]\"\"<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[551,63,46],"tags":[],"class_list":["post-13562","post","type-post","status-publish","format-standard","hentry","category-blog","category-sql","category-syndication"],"yoast_head":"\nAzure Resource Locks are Your Friend in Development – Denny Cherry & Associates Consulting<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dcac.com\/2017\/03\/24\/azure-resource-locks-are-your-friend-in-development\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Azure Resource Locks are Your Friend in Development – Denny Cherry & Associates Consulting\" \/>\n<meta property=\"og:description\" content=\"One of the great advantages of the cloud computing is the ability to power off resources that are not in use to save some money. Sure, your production database servers should be running 24×7, but that VM, or SQL Data Warehouse you are developing against during the week? You can shut it down at 7 […]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dcac.com\/2017\/03\/24\/azure-resource-locks-are-your-friend-in-development\/\" \/>\n<meta property=\"og:site_name\" content=\"Denny Cherry & Associates Consulting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DennyCherryAssociatesConsulting\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-03-24T16:04:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/joedantoni.files.wordpress.com\/2017\/03\/screen-shot-2017-03-24-at-8-55-37-am_thumb.png?w=244&h=160\" \/>\n<meta name=\"author\" content=\"Joey D'Antoni\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dcacco\" \/>\n<meta name=\"twitter:site\" content=\"@dcacco\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Joey D'Antoni\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dcac.com\/2017\/03\/24\/azure-resource-locks-are-your-friend-in-development\/\",\"url\":\"https:\/\/www.dcac.com\/2017\/03\/24\/azure-resource-locks-are-your-friend-in-development\/\",\"name\":\"Azure Resource Locks are Your Friend in Development – Denny Cherry & Associates Consulting\",\"isPartOf\":{\"@id\":\"https:\/\/www.dcac.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dcac.com\/2017\/03\/24\/azure-resource-locks-are-your-friend-in-development\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.dcac.com\/2017\/03\/24\/azure-resource-locks-are-your-friend-in-development\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/joedantoni.files.wordpress.com\/2017\/03\/screen-shot-2017-03-24-at-8-55-37-am_thumb.png?w=244&h=160\",\"datePublished\":\"2017-03-24T16:04:22+00:00\",\"dateModified\":\"2017-03-24T16:04:22+00:00\",\"author\":{\"@id\":\"https:\/\/www.dcac.com\/#\/schema\/person\/ac58f2207d3f180aa3e4ee0ce6af0885\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dcac.com\/2017\/03\/24\/azure-resource-locks-are-your-friend-in-development\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dcac.com\/2017\/03\/24\/azure-resource-locks-are-your-friend-in-development\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dcac.com\/2017\/03\/24\/azure-resource-locks-are-your-friend-in-development\/#primaryimage\",\"url\":\"https:\/\/joedantoni.files.wordpress.com\/2017\/03\/screen-shot-2017-03-24-at-8-55-37-am_thumb.png?w=244&h=160\",\"contentUrl\":\"https:\/\/joedantoni.files.wordpress.com\/2017\/03\/screen-shot-2017-03-24-at-8-55-37-am_thumb.png?w=244&h=160\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dcac.com\/2017\/03\/24\/azure-resource-locks-are-your-friend-in-development\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.dcac.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Azure Resource Locks are Your Friend in Development\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dcac.com\/#website\",\"url\":\"https:\/\/www.dcac.com\/\",\"name\":\"Denny Cherry & Associates Consulting\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dcac.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dcac.com\/#\/schema\/person\/ac58f2207d3f180aa3e4ee0ce6af0885\",\"name\":\"Joey D'Antoni\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dcac.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3fede03569772a55a091b587d76f78d4?s=96&r=x\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3fede03569772a55a091b587d76f78d4?s=96&r=x\",\"caption\":\"Joey D'Antoni\"},\"url\":\"https:\/\/www.dcac.com\/author\/joeydcac-co\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Azure Resource Locks are Your Friend in Development – Denny Cherry & Associates Consulting","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dcac.com\/2017\/03\/24\/azure-resource-locks-are-your-friend-in-development\/","og_locale":"en_US","og_type":"article","og_title":"Azure Resource Locks are Your Friend in Development – Denny Cherry & Associates Consulting","og_description":"One of the great advantages of the cloud computing is the ability to power off resources that are not in use to save some money. Sure, your production database servers should be running 24×7, but that VM, or SQL Data Warehouse you are developing against during the week? You can shut it down at 7 […]","og_url":"https:\/\/www.dcac.com\/2017\/03\/24\/azure-resource-locks-are-your-friend-in-development\/","og_site_name":"Denny Cherry & Associates Consulting","article_publisher":"https:\/\/www.facebook.com\/DennyCherryAssociatesConsulting\/","article_published_time":"2017-03-24T16:04:22+00:00","og_image":[{"url":"https:\/\/joedantoni.files.wordpress.com\/2017\/03\/screen-shot-2017-03-24-at-8-55-37-am_thumb.png?w=244&h=160","type":"","width":"","height":""}],"author":"Joey D'Antoni","twitter_card":"summary_large_image","twitter_creator":"@dcacco","twitter_site":"@dcacco","twitter_misc":{"Written by":"Joey D'Antoni","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.dcac.com\/2017\/03\/24\/azure-resource-locks-are-your-friend-in-development\/","url":"https:\/\/www.dcac.com\/2017\/03\/24\/azure-resource-locks-are-your-friend-in-development\/","name":"Azure Resource Locks are Your Friend in Development – Denny Cherry & Associates Consulting","isPartOf":{"@id":"https:\/\/www.dcac.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dcac.com\/2017\/03\/24\/azure-resource-locks-are-your-friend-in-development\/#primaryimage"},"image":{"@id":"https:\/\/www.dcac.com\/2017\/03\/24\/azure-resource-locks-are-your-friend-in-development\/#primaryimage"},"thumbnailUrl":"https:\/\/joedantoni.files.wordpress.com\/2017\/03\/screen-shot-2017-03-24-at-8-55-37-am_thumb.png?w=244&h=160","datePublished":"2017-03-24T16:04:22+00:00","dateModified":"2017-03-24T16:04:22+00:00","author":{"@id":"https:\/\/www.dcac.com\/#\/schema\/person\/ac58f2207d3f180aa3e4ee0ce6af0885"},"breadcrumb":{"@id":"https:\/\/www.dcac.com\/2017\/03\/24\/azure-resource-locks-are-your-friend-in-development\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dcac.com\/2017\/03\/24\/azure-resource-locks-are-your-friend-in-development\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dcac.com\/2017\/03\/24\/azure-resource-locks-are-your-friend-in-development\/#primaryimage","url":"https:\/\/joedantoni.files.wordpress.com\/2017\/03\/screen-shot-2017-03-24-at-8-55-37-am_thumb.png?w=244&h=160","contentUrl":"https:\/\/joedantoni.files.wordpress.com\/2017\/03\/screen-shot-2017-03-24-at-8-55-37-am_thumb.png?w=244&h=160"},{"@type":"BreadcrumbList","@id":"https:\/\/www.dcac.com\/2017\/03\/24\/azure-resource-locks-are-your-friend-in-development\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dcac.com\/"},{"@type":"ListItem","position":2,"name":"Azure Resource Locks are Your Friend in Development"}]},{"@type":"WebSite","@id":"https:\/\/www.dcac.com\/#website","url":"https:\/\/www.dcac.com\/","name":"Denny Cherry & Associates Consulting","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dcac.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dcac.com\/#\/schema\/person\/ac58f2207d3f180aa3e4ee0ce6af0885","name":"Joey D'Antoni","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dcac.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3fede03569772a55a091b587d76f78d4?s=96&r=x","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3fede03569772a55a091b587d76f78d4?s=96&r=x","caption":"Joey D'Antoni"},"url":"https:\/\/www.dcac.com\/author\/joeydcac-co\/"}]}},"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.dcac.com\/wp-json\/wp\/v2\/posts\/13562","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dcac.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dcac.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dcac.com\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dcac.com\/wp-json\/wp\/v2\/comments?post=13562"}],"version-history":[{"count":1,"href":"https:\/\/www.dcac.com\/wp-json\/wp\/v2\/posts\/13562\/revisions"}],"predecessor-version":[{"id":13572,"href":"https:\/\/www.dcac.com\/wp-json\/wp\/v2\/posts\/13562\/revisions\/13572"}],"wp:attachment":[{"href":"https:\/\/www.dcac.com\/wp-json\/wp\/v2\/media?parent=13562"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dcac.com\/wp-json\/wp\/v2\/categories?post=13562"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dcac.com\/wp-json\/wp\/v2\/tags?post=13562"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}