Visualizer for IaC

the visual blocker
in creating complex architecture with IaC templates makes it  
non-user friendly

the learning curve for creating custom templates
and portal knowledge creates a significant gap between experts and beginners

>>>

what's our problem?

repetitive effort involved
in creating & deploying multiple infrastructure with same or similar base architecture 

{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
      "existingVNETName": {
        "type": "string",
        "metadata": {
          "description": "Name of the VNET to add a subnet to"
        }
      },
      "subnetName": {
        "type": "string",
        "metadata": {
          "description": "Name of the subnet to add"
        }
      },
      "properties": {
        "type": "object",
        "metadata": {
          "description": "Address space of the subnet to add"
        }
      },
      "location": {
        "type": "string",
        "defaultValue": "[resourceGroup().location]",
        "metadata": {
          "description": "Location for all resources."
        }
      },
      "constants": {
        "type": "object",
        "metadata": {
          "description": "Constants object containing common api versions, name prefixes etc."
        }
      }
    },
    "variables": {
      "subnetFullName": "[concat(parameters('existingVNETName'), '/', parameters('subnetName'))]"
    },
    "resources": [
      {
        "comments": "Basic component for attaching Subnet to existing virtual network.",
        "type": "Microsoft.Network/virtualNetworks/subnets",
        "apiVersion": "[parameters('constants').apiVersions['Microsoft.Network']['virtualNetworks/subnets']]",
        "name": "[variables('subnetFullName')]",
        "location": "[parameters('location')]",
        "properties": "[parameters('properties')]"
      }
    ],
    "outputs": {
      "resourceId": {
        "type": "string",
        "value": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('existingVNETName'), parameters('subnetName'))]"
      },
      "resourceName": {
        "type": "string",
        "value": "[variables('subnetFullName')]"
      },
      "properties": {
        "type": "object",
        "value": "[parameters('properties')]"
      }
    }
  }
{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
      "vnetParams": {
        "type": "object",
        "metadata": {
          "description": "The parameters like name, address cidr and location for the vnet."
        }
      },
      "subnetParams": {
        "type": "object",
        "metadata": {
          "description": "The parameters like name, properties and location for the subnet."
        }
      },
      "artifactsLocation": {
        "type": "string",
        "metadata": {
          "description": "Storage location for all artifacts"
        }
      },
      "artifactsLocationSASToken": {
        "type": "string",
        "metadata": {
          "description": "This parameter holds the location of the SAS token that is valid for a stipulated duration."
        }
      },
      "constants": {
        "type": "object",
        "metadata": {
          "description": "Constants object containing common api versions, name prefixes etc."
        }
      },
      "tags": {
        "type": "object",
        "metadata": {
          "description": "Constants object containing common api versions, name prefixes etc."
        }
      }
    },
    "variables": {
      "deploymentApiVersion": "[parameters('constants').apiVersions['Microsoft.Resources']['deployments']]",
      "vnetTemplateURI": "[concat(parameters('artifactsLocation'),'components/Microsoft.Network/vnet/vnet.json',parameters('artifactsLocationSASToken'))]",
      "vnetDeploymentName": "[concat(parameters('constants').deploymentNamePrefix, 'spk-vnet-', parameters('constants').uniqueString)]",
      "subnetDeploymentName": "[concat(parameters('constants').deploymentNamePrefix, 'spk-subnet-', parameters('constants').uniqueString)]",
      "addSubnetTemplateURI": "[concat(parameters('artifactsLocation'), 'components/Microsoft.Network/subnet/subnet.json', parameters('artifactsLocationSASToken'))]"
    },
    "resources": [
      {
        "comments": "Create or Update VNET",
        "name": "[variables('vnetDeploymentName')]",
        "type": "Microsoft.Resources/deployments",
        "apiVersion": "[variables('deploymentApiVersion')]",
        "properties": {
          "mode": "Incremental",
          "templateLink": {
            "uri": "[variables('vnetTemplateURI')]"
          },
          "parameters": {
            "name": {
              "value": "[parameters('vnetParams').name]"
            },
            "addressPrefix": {
              "value": "[parameters('vnetParams').cidr]"
            },
            "location": {
              "value": "[parameters('vnetParams').location]"
            },
            "enableDdosProtection": {
              "value": "[parameters('vnetParams').enableDdosProtection]"
            }
          }
        }
      },
        {
        "comments": "Add subnet to the above VNET",
        "name": "[variables('subnetDeploymentName')]",
        "type": "Microsoft.Resources/deployments",
        "apiVersion": "[variables('deploymentApiVersion')]",
        "properties": {
          "mode": "Incremental",
          "templateLink": {
            "uri": "[variables('addSubnetTemplateURI')]"
          },
          "parameters": {
            "existingVNETName": {
              "value": "[reference(variables('vnetDeploymentName')).outputs.resourceName.value]"
            },
            "subnetName": {
              "value": "[parameters('subnetParams').name]"
            },
            "properties": {
              "value": "[parameters('subnetParams').properties]"
            },
            "location": {
              "value": "[parameters('subnetParams').location]"
            },
            "constants": {
              "value": "[parameters('constants')]"
            }
          }
        }
      }
    ],
    "outputs": {
    }
  }

subnet ARM template

vnet+subnet ARM template

a visually intuitive user interface for modelling architecture as code templates

a multi-functional, yet simple & straightforward platform for creating, manipulating, storing and deploying templates

>>>

>>>

what do we need?

support for reusability of saved user generated (custom) templates to increase efficiency

>>>

what did we build?

IaC modelling (allows user to create, store and delete templates)

a simple cloud automation + visualizer tool

improved UX (an interactive drag-and-drop interface)

reusability (support for composite components)

automation (deployment of resources with generated templates)

how did we build it?

high level flow diagram

future scope

  • accommodate for any IaC templates 
  • support multi-user

Visualizer for IaC

By Rohini Senthil