#variant (2020-06)

https://github.com/mumoshu/variant

Discuss variant (the “Universal CLI”) https://github.com/mumoshu/variant

Archive: https://archive.sweetops.com/variant/

2020-06-02

Robert Horrox avatar
Robert Horrox

I’m hoping someone knows the answer to this, I’m working with variant2 and variantmod and I’m trying to pull an entire directory using variant. I can’t only figure out how to pull single files. I see in the code that Directories are supported in some fashion, I just can’t figure out the right config to pull them

Robert Horrox avatar
Robert Horrox

ok it seems I was missing a field on my HCL to make it work. I wasn’t putting a template block in the directory block and I guess that was causing the block to not process

:--1:1
Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

Maybe share an example though - since it will help others (everything is archived)

Robert Horrox avatar
Robert Horrox

ok bakery.variantmod

module "bakery" {
  directory "mods/bakery" {
    source = "../module-repos/bakery"
    template "test" {}
  }
}

master.variant

job "bakemod" {
    module = "bakery"
}

The command variant run bakemod will pull the contents of “../module-repos/bakery” and place it in “mods/bakery” after running any of the replacements in the template block.

:100:1
1
    keyboard_arrow_up