PingOne Advanced Identity Cloud ESV diff between environments

When working with ESVs across multiple PingOne Advanced Identity Cloud environments (SBXs, DEV, UATs, STAGING, PROD etc.), there is often a need to make sure that all environments have all the required ESVs before firing off a promotion. If the number of ESVs is large (dozens or hundreds), comparing the ESVs manually can be error prone. It is also possible to export lists of ESVs from different environments (using a tool like frodo, or just API) to files and diff the files. This can be tedious too. What if there was a simpler way? Well, there is!

Below is a one line bash command (which requires frodo) to show the diff in a terminal window:

$ LEFT=tenantuse1-dev RIGHT=tenantuse1-uat bash -c 'diff -y <({ frodo esv secret list "$LEFT" 2>/dev/null; frodo esv variable list "$LEFT" 2>/dev/null; } | sort) <({ frodo esv secret list "$RIGHT" 2>/dev/null; frodo esv variable list "$RIGHT" 2>/dev/null; } | sort)'

Set the LEFT and RIGHT variables above to the correct PingOne AIC environment host names.

Below is part of the output from the command above. Some details have been blurred out for privacy/confidentiality. This output format (side by side diff) makes it quite easy to see which environment (LEFT is DEV and RIGHT is UAT) has which ESVs missing.

image

2 Likes