SOPS should recogonize .env.* files as DOTENV filetype
When using something such as dotenv-flow in react/node projects you can load various environments in env files named for example .env.development, .env.stage etc.
SOPS will recognize .env and filename.env as a DOTENV file but not .env.something. Is there a way to make sops treat files prefixed with .env.* as DOTENV filetype without having to specify input/output type on command line every time?
I don't think we should do this, there's too many open questions. What if it's called .env.yaml?
SOPS uses the extension, and if that fails, you can use a flag. I believe that's enough. If spelling the flag out every time is too repetitive, creating a shell alias takes about a minute.
Having the extension list be configurable, or even a regex, would be nice, but I'm not sure the complexity is worth it.
An extension list would be nice, or if possible to configure regex in .sops.yaml -- this is more of a feature request but would be a good addition IMO. As said, I'm not sure how complex the addition would be and if worth it in the end.
Does specifying the input and output type solve it?
For me this works:
$ sops --input-type=dotenv --output-type=dotenv -i .env.prod
creation_rules:
- path_regex: \.env\.prod$
kms: 'arn:aws:kms:us-east-1:123:key/my-key'