Patent attributes
A process for defining a cloud service in an Infrastructure as Code (IaC) tool is designed to dynamically determine numbers of clusters, availability domains, compute nodes, and/or load balancers at run time. These values are then used to determine a number of subnet levels required for a classless inter-domain routing (CIDR) slicing operation to generate subnets for each of the compute nodes and load balancer nodes in the service. Because IaC languages do not provide nested loop control constructs, labels for each of the subnets can be generated and assigned using a Cartesian product of label elements. These labels can be modified by a count variable that is incremented each time a resource is duplicated in the script to simulate the effect of a nested loop structure.