Skip to content

Instantly share code, notes, and snippets.

@chriskuech
Created April 13, 2019 22:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chriskuech/d1d5380fb4f5184f9b905244a8266712 to your computer and use it in GitHub Desktop.
Save chriskuech/d1d5380fb4f5184f9b905244a8266712 to your computer and use it in GitHub Desktop.
function Get-Cluster {
[OutputType([Cluster])
Param(
[ValidateNotNullOrEmpty()]
[string[]] $serviceIds
)
$serviceIds | ForEach-Object {
$service, $flightingRing, $region, $idx = $_ -split "-"
[Cluster]@{
Service = $service
FlightingRing = $flightingRing
Region = $region
Index = $idx
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment