DEV Community

Cover image for Azure Management Tasks Part 5: Keeping an Azure Environment Organized and Protected.
SULIAT
SULIAT

Posted on

Azure Management Tasks Part 5: Keeping an Azure Environment Organized and Protected.

INTRODUCTION

Everything built so far actually works, the VM is on the right network, the storage account holds real files with real access controls. But none of it is labeled, and none of it is protected from a stray click. This part fixes both of those, in about five minutes' worth of clicking.

We'll add tags to a couple of resources so it's obvious at a glance what they're for and who they belong to, and we'll add a resource lock to the VM so it can't be accidentally deleted, which matters more than it sounds like, given this VM is now serving as an FTP server.

What You'll Need

  • Access to the Azure portal
  • The VM and VNet from earlier parts of this series already deployed

Step 1: Add tags to a virtual machine.

  • From the Azure portal home page, in the search box, enter virtual machines.
  • Select virtual machines under services.
  • Select the guided-project-vm virtual machine. MACHINE
  • From the menu pane, select Tags.
  • On one line for Name enter Department and for Value enter Customer Service.
  • On the next line, for Name enter Purpose and for Value enter FTP Server.
  • Select Apply.
  • Select Home to return to the Azure portal home page. SERVER

Step 2: Add a resource lock to a VM.

  • If necessary, expand the Settings submenu.
  • Select Locks.
  • Select + Add.
  • For the name, enter VM-delete-lock.
  • For the Lock type, select Delete.
  • You may enter a note to help remind you why you created the lock.
  • Select OK. Lock

Step 3: Add tags to network resources.

  • From the Azure portal home page, in the search box, enter virtual networks.
  • Select virtual networks under services.
  • Select the guided-project-vnet network. IVnet
  • From the menu pane, select Tags. Note: Notice that now you can select an existing tag to apply or add a new tag. You can also select just the name or value and apply create something new in the other field.
  • For the Name select Department.
  • For the Value enter IT.
  • Select Apply. Tags

CONCLUSION

Two small governance habits, now in place: resources are labeled with who they belong to and what they're for, and the one resource that would genuinely hurt to lose is protected from accidental deletion. Neither of these took more than a few clicks, but they're the kind of thing that quietly saves a lot of pain once an environment has more than a handful of resources in it.
This wraps up the hands-on management tasks in this series from standing up the environment, to securing the network, resizing and rebuilding the VM, controlling storage access, and now tagging and locking things down. All that's left is one final part: tearing everything down cleanly so nothing keeps racking up cost after we're done.

Top comments (0)