After discussion with the Lagoon team, and further discovery with @bomoko - we can do the following:
Preserve existing lagoon wildcard behaviour - this will work with "ssh-legacy", or for single cluster users that update this alias with the correct remote-specific ssh details.
Rework drush la to support the LAGOON_CONFIG_X variables, and implement alias checking that returns aliases from the API, but verified against the wildcard alias in the drush filesystem, and notifies if there are any environments not covered by an alias
complete drush lg command to support the LAGOON_CONFIG_X variables. This will be useful for generating one-time static alias files.
implement a version of drush lg that can generate a series of cluster-specific wildcard alias files that can be committed to git - ie cluster1.site.yml and cluster2.site.yml - allowing @cluster1.prod or @cluster2.dev type aliases - drush la will then be able to verify against these that all environments are covered by a wildcard alias
write a lot of documentation outlining the use cases for the different implementations - same-cluster sites, off-cluster sites, static environment naming, dynamic environment naming etc.
Over time, we are working on whether we can introduce default hooks into drush, with a view that the @lagoon.X namespace uses a hook to identify the correct alias dynamically from the API instead of looking it up.
After discussion with the Lagoon team, and further discovery with @bomoko - we can do the following:
drush la
to support the LAGOON_CONFIG_X variables, and implement alias checking that returns aliases from the API, but verified against the wildcard alias in the drush filesystem, and notifies if there are any environments not covered by an aliasdrush lg
command to support the LAGOON_CONFIG_X variables. This will be useful for generating one-time static alias files.Over time, we are working on whether we can introduce default hooks into drush, with a view that the @lagoon.X namespace uses a hook to identify the correct alias dynamically from the API instead of looking it up.