Activity 1: Lets create a virtual network using ARM Template contd
- Order of deploying resources in ARM Template:
- When deploying some resources, you may need to make sure some resources exist before other resources
- In the example which we have dealt, the virtual network should exist before we create a subnet.
- You can establish this relationship by making one resource as dependent on other resource, which can be done by dependsOn Refer Here
- Depends on function accepts resource Id of the function which can be generated using
resourceIdfunction Refer Here
- For the fix which we have done in last session
- Now lets also add the depends on between subnets to create subnets in the order
- Refer Here for the changes
- Now Execute the deployment
- In the template we have created multiple subnets by creating resources defintions, it would be good if we can have some kind of iteration. Azure Provides Resource iteration by using
- Refer Here for the changes done
- Lets make our variables with different network name and subnet name.
- Refer Here for the changes made
- Now lets try to create a network security group which opens all the incoming connections on port 22, 80 and allows everything for outgoing traffic
- Manual Steps
- Exercise: Try to Create this from ARM Template
- Default Outbound rules are enough.