pub async fn secret_presence_explicit(svcs: Vec<String>, conf: &Config, regions: Vec<String>) -> Result<()> {
    for r in regions {
        info!("validating secrets in {}", r);
        let reg = conf.get_region(&r)?; // verifies region or region alias exists
        reg.verify_secrets_exist().await?; // verify secrets for the region
        debug!("Validating {:?}", svcs);
        for svc in &svcs {
            debug!("Validating {}", svc);
            if let Ok(mf) = shipcat_filebacked::load_manifest(&svc, conf, &reg).await {
                if !mf.regions.contains(&r) {
                    debug!("ignoring {} for {} (not deployed there)", svc, r);
                    continue;
                }
                debug!("validating secrets for {} in {}", &svc, r);
                mf.verify_secrets_exist(&reg.vault).await?;
            }
        }
    }
    Ok(())
}
/// Validate the secrets exists in all regions for a subset of services
///
/// This is an optimization of secret_presence_git
Validate the secrets exists in all regions for a subset of services
This is an optimization of secret_presence_git
Validate the secrets exists in all regions for a subset of services This is an optimization of secret_presence_git
pub async fn secret_presence_explicit(svcs: Vec<String>, conf: &Config, regions: Vec<String>) -> Result<()> {
    for r in regions {
        info!("validating secrets in {}", r);
        let reg = conf.get_region(&r)?; // verifies region or region alias exists
        reg.verify_secrets_exist().await?; // verify secrets for the region
        debug!("Validating {:?}", svcs);
        for svc in &svcs {
            debug!("Validating {}", svc);
            if let Ok(mf) = shipcat_filebacked::load_manifest(&svc, conf, &reg).await {
                if !mf.regions.contains(&r) {
                    debug!("ignoring {} for {} (not deployed there)", svc, r);
                    continue;
                }
                debug!("validating secrets for {} in {}", &svc, r);
                mf.verify_secrets_exist(&reg.vault).await?;
            }
        }
    }
    Ok(())
}
pub async fn secret_presence_explicit ( svcs : Vec < String > , conf : & Config , regions : Vec < String > ) -> Result < ( ) > { for r in regions { info ! ( " " r ) ; let reg = conf . get_region ( & r ) ? ; // verifies region or region alias exists reg . verify_secrets_exist ( ) . await ? ; // verify secrets for the region debug ! ( " " svcs ) ; for svc in & svcs { debug ! ( " " svc ) ; if let Ok ( mf ) = shipcat_filebacked :: load_manifest ( & svc , conf , & reg ) . await { if ! mf . regions . contains ( & r ) { debug ! ( " " svc r ) ; continue ; } debug ! ( " " svc r ) ; mf . verify_secrets_exist ( & reg . vault ) . await ? ; } } } Ok ( ( ) ) }
Validate the secrets exists in all regions for a subset of services
This is an optimization of secret_presence_git
Validate the secrets exists in all regions for a subset of services This is an optimization of secret_presence_git
svcs
Vec<String>
conf
&Config
regions
Vec<String>
svcs
Vec<String>
conf
&Config
regions
Vec<String>