A method is provided for designing and optimizing a pattern by considering heterogeneous cloud environments. Building blocks within the pattern can be deployed into different cloud environments and different cloud providers, depending on where the pattern fits users need best. Further, building block configuration within the pattern can be optimized by target environments, along with runtime bursting among multiple environments.