We have already learned that resources can have parent resources, and that child resources can be provisioned only after a parent resource is already provisioned. In the next example, we will provision a parent resource (sites) using ARM template. You will notice that the sites resource has an internal resources element. This element can declare multiple child resources within it. A resource of connectionstrings type is created within this resources section. This particular resource acts like a child resource for the sites parent resource. If you think about it, a connectionstrings resource can only be contained within a web app (sites); it does not make sense to deploy a connectionstrings resource without a web app, because connectionstrings are eventually placed within the web.config file of a web app.
The complete code for the following template is available...