public static void DryRunStatus() { if (!applyChanges) { BeautifulLogger.Info("This is a dry run! Add argument 'apply' after command call to persist."); } else { BeautifulLogger.Warn("Running on apply changes mode. Changes will be persisted!"); } }
public static async Task CredentialsLoop() { try { BeautifulLogger.Input("Enter Paswword for SEQ:"); string password = GetMaskedConsoleInput(); BeautifulLogger.Info("Authenticating..."); await Login("admin", password); } catch (SeqApiException) { BeautifulLogger.Err("Invalid Password."); await CredentialsLoop(); } }
private static async Task Main(string[] args) { applyChanges = args.Length > 0 && args[0].Equals("apply"); DryRunStatus(); BeautifulLogger.Input("Enter Product Name: "); _productName = Console.ReadLine(); await CredentialsLoop(); foreach (string _env in _envKV.Keys) { foreach (string _ie in _ieArray) { string outName = $"{_env}-{_productName}-{_ie}"; BeautifulLogger.Info($"Attempting to create key for [{outName}]"); //await CreateApiKey(outName, _env); BeautifulLogger.Info($"Attempting to create signal for [{outName}]"); //await CreateSignal(outName); } } BeautifulLogger.Info($"All done, bye bye"); }