Skip to content

[FEATURE REQUEST] Dynamic saltenvs for s3fs mounts? (__env__) #64523

@mdschmitt

Description

@mdschmitt

Is your feature request related to a problem? Please describe.
As it stands, there are only 2 s3fs mount options:

  1. A single bucket per environment
s3.buckets:
  production:
    - bucket1
  staging:
    - bucket2
  1. Multiple environments per bucket
s3.buckets:
  - bucket1
  - bucket2

However, option 2 mandates that the bucket contents comply with a s3://bucket/<saltenv>/xxx file structure.

Describe the solution you'd like
It'd be quite useful to simply specify __env__ in option 1 and have the best of both worlds (any bucket file structure, applied to any named saltenv). Like so:

s3.buckets:
  __env__:
    - bucket1

Describe alternatives you've considered
N/A

Additional context
Example: an S3 bucket containing build artifacts from a CI system. Binaries/jars/rpms/debs aren't necessarily saltenv-specific, so creating dedicated s3://<environment>/builds directories doesn't make much sense (and the CI doesn't/shouldn't need to know anything about saltenvs).

...but if I just put the bins at the root of the bucket, I need to restart the saltmaster with new s3.buckets syntax every time I want to use a different saltenv (which, for me, is often just a temporary WIP git branch)..

Metadata

Metadata

Assignees

No one assigned

    Labels

    Featurenew functionality including changes to functionality and code refactors, etc.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions