Added use_sops and use_aws_sso_login scripts for direnv #15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Agrego 2 scripts para usar con direnv de la siguiente forma
use_sops
Permite recuperar calves age de nuestro bitwarden
Pre-requisitos
Tener instalado y configurado el cliente de bitwarden,
bw
Uso
# .envrc use_sops NOMBRE_CLIENTE
La clave age debe existir en el campo
password
y el nombre del elemento debe seguir el siguiente formato<NOMBRE_CLIENTE> - Age - Private Key
La clave privada se va a almacenar en el valor de la variable
SOPS_AGE_KEY_FILE
, por lo que se debe agregar dicho archivo al.gitignore
para evitar subirlouse_aws_sso_login
Recupera todos los perfiles configurados mediante variables de ambiente y ejecuta la acción
aws sso login
secuencialmentePre-requisitos
Los perfiles deben configurarse en variables que contengan la palabra
PROFILE
en su nombre y el prefijomw_
en su valorUso
Esta función usa un archivo auxiliar llamado
.sso-login-expire
para almacenar el proximo timestamp en el que se debe ejecutar, por lo que se recomienda agregarlo al.gitignore
Se cuenta con las variables
USE_AWS_SSO_LOGIN_DISABLE
yUSE_AWS_SSO_LOGIN_DRY_RUN