Placement Validator

A guide to understanding placement validation rules

Alex Metaxas avatar
Written by Alex Metaxas
Updated over a week ago

Cloud Maker has a powerful dependency engine built-in, allowing Cloud Maker to detect dependencies of droplets on the drawing surface automatically.

This resource dependency engine has several advantages, including removing the need to specify which droplets depend on each other manually.

To help ensure you create a valid design, Cloud Maker has a placement validator baked in that detects resource dependencies and alerts you when you place a droplet incorrectly.

This article describes some of the common errors you will see and the best way to fix them.

Invalid Parent

Parenting is when a droplet or container is placed inside another container. The outer container becomes the parent of the inner droplet or container. Parenting is essential as it allows Cloud Maker to determine resource dependencies automatically.

Azure, like any cloud provider, has strict rules over how droplets should depend on each other. Therefore, solving parenting issues is critical to be able to deploy to Azure.

If you do not place a droplet in a valid container in Cloud Maker, you will generate an error in the Problems Panel. For example, consider the following design:

An incorrect parent generates the following error in the Problems Panel:
​
​

The message describes the valid locations that the Azure Virtual Machine droplet can be placed to resolve the error.

In this case, we can resolve this error by adding an Azure Subnet to the Azure Virtual Network and placing the Virtual Machine inside:
​

Invalid Nesting

One of Cloud Maker's powerful features is that it allows the nesting of Azure Resource Groups - this feature isn't available natively in Azure.

Nesting enables you to visualise the exact layout of your cloud solution, including the ability to split up droplets into different Resource Groups within the same topology.

Cloud Maker then uses its in-built deployment engine to figure out how to deploy all the Azure Resource Groups and their droplets, as well as the dependencies between them.

When nesting Resource Groups, the placement validator checks the Resource Group's contents and ensures that the Resource Group is parented correctly based on the droplets inside it.

For example, we can place a Virtual Machine inside a Resource Group. We can then nest this Resource Group inside another Resource Group:

Whilst placing a Virtual Machine inside a Resource Group is valid. This design will generate an invalid nesting problem as we are missing a valid parent for the nested Resource Group and its Virtual Machine.

To resolve this issue, we must ensure that the inner Resource Group is nested within a parent that is valid for the Virtual Machine. In this case, an Virtual Network and Subnet:
​

In the architecture above, a nesting problem was raised due to missing containers (the Virtual Network and Subnet) required for the Virtual Machine.

Another scenario where a nesting problem could arise is where the nested Resource Group and its contents are placed in an invalid parent.

For example, if we replaced the Virtual Machine with an Azure Storage Account from the architecture above:

The placement validator would flag an invalid nesting problem because the Storage Account cannot be placed in a Virtual Network or Subnet:

To resolve this issue, we would need to move the nested Resource Group and Storage Account out of the Subnet and Virtual Network containers. For example, the following would be valid:

Containment Errors

To give you the best drawing experience, Cloud Maker does not restrict how you resize containers. If you wish, you can resize a parented container outside the boundary of its parent container; from a purely drawing perspective, multiple containers can overlap if you want.

However, where containers overlap, it is not possible for Cloud Maker to automatically determine correct parenting and, therefore, dependencies. For this reason, containment errors are triggered where droplets are not appropriately contained by a valid parent. N.B. The exception to this rule is spanning containers which are explained below.

For instance, a subnet must be wholly contained by a VNET. If the subnet overflows the edge of a VNET, then a containment error will be raised.

Spanning Errors

Several unique droplets don't consider the immediate container they are placed on as their parent. Instead, these spanning containers are parented at some other layer of the drawing.

These special spanning containers can span across multiple containers to deliver the correct functionality. Spanning containers include:

  • Azure Proximity Placement Group

  • Azure Availability Set

  • Resource Group

Cloud Maker can detect if spanning containers are placed correctly by looking through the drawing's various layers to find a valid parent.

An example of this is the Proximity Placement Group which must be contained by a Resource Group. In this instance, Cloud Maker will look through other resources that the Proximity Placement Group is placed on until it finds a Resource Group and then checks if that Resource Group wholly contains the Proximity Placement Group.

If no Resource Group is found, or the Resource Group does not wholly contain the Proximity Placement Group, an error will be raised.

Overlapping Droplets Errors

Another error that can stand in the way of a successful deployment are overlapping droplets:

If this happens, the Placement Validator will display the following error message in the Problem Panel:

Therefore it is important that the droplet boundaries do not intersect:

Summary

Placement validation is a powerful tool that will help ensure your design meets the minimum requirements needed to deploy to Azure!

Did this answer your question?