Skip to content

Custom cloud configs? #64

Open
Open

Description

@a2geek

I'm wondering if there is a way to specify a custom cloud config? I've been copying an erb template into the templates folder in my test automation, which feels really hackish but does work.

Looking at the code, I see the load_template method which seems to be the only impacted code/spec location.

Thanks!

Activity

  1. aramprice commented on Jul 16, 2026

    @aramprice
    Member

    Maybe this would help: https://bosh.io/docs/configs/

    If not perhaps you can provide more context?

  2. a2geek commented on Jul 16, 2026

    @a2geek
    Author

    No, this is not a CPI configuration question.

    What I mean is when I run the BATs against my CPI, my CPI is not a part of the BATs template folder here: https://github.com/cloudfoundry/bosh-acceptance-tests/tree/master/templates

    I'm copying a file into that location to run the BATs. What I'm wondering is if there is an environment variable or argument that can be passed into the bats to just say "use this erb"?

  3. aramprice commented on Jul 16, 2026

    @aramprice
    Member

    Ah, thanks for the context.

    I don't know of anything off-hand. The template loading seems to happen in https://github.com/cloudfoundry/bosh-acceptance-tests/blob/master/lib/bat/cloud_config.rb#L56

    Perhaps there might be value in allowing some kind of override of the default location that templates are loaded from?

    I'd generally prefer passing a solution that passes some kind of config explicitly rather than loading an ENV var in some deeply nested function. I haven't looked at the internals of these specs in a while so I'm not sure what to suggest specifically.

    @rkoster may have some thoughts.

  4. a2geek commented on Jul 16, 2026

    @a2geek
    Author

    Exactly! I'd attempt it, but Ruby and I don't get along. ;-)

    Most of the configuration for the the bats run are environmental variables. So that does have a precedent...

    It just seemed "fidgety" that I needed to copy a custom template in. Figured there is a better way.
    -Rob

  5. aramprice commented on Jul 16, 2026

    @aramprice
    Member

    I created a draft PR => #65

    I think it should work but I don't have the time at the moment to properly tests so I'm leaving it as draft.

    I'm on holiday until the first week of August but perhaps you or someone else can validate this this works, or comment on the PR if it doesn't provide what you're looking for.

  6. moved this from Inbox to Pending Review | Discussion in Foundational Infrastructure Working Groupon Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions