Giter Site home page Giter Site logo

Comments (5)

tongueroo avatar tongueroo commented on June 27, 2024

Args files are just ruby, so it wouldn't be ERB. Instead, it would be something like this:

config/args/terraform.rb

command("plan",
  args: ["-lock-timeout=22m", "-out=#{expansion(":ENV-:ACCOUNT-:REGION-:MOD_NAME-:INSTANCE")}.tfplan.json"],
)

Unfortunately, it's not simple as including the helper methods to the args builder. The reason is that helpers are currently designed for tfvars file where the dependency graph is calculated. Terraspace actually evaluates the tfvars files twice and caches the calculated results of the helpers methods for performance reasons. The dependency graph processing logic would needed to be altered so the first pass would not be a regular ruby eval but possibly a parser. This avoids the the helpers actually being invoked in the first pass. Then helpers would be more easily be included elsewhere. Think the original reason took the ruby eval twice approach was because it's faster than writing a decent parser.

So it's a bit complex right now 🧐 Will take a decent amount of time. Will consider PRs. Of course no sweat either way 👍

from terraspace.

gwvandesteeg avatar gwvandesteeg commented on June 27, 2024

The main reason is that i'm trying to get hold of an uniquely named plan file for each stack being spun up when using terraspace all plan, I've got a project with 13 stacks and growing that i'd like to get artefacts for during the plan stage to validate and integrate with my CI/CD platform (GitLab.com).

from terraspace.

tongueroo avatar tongueroo commented on June 27, 2024

Thinking will add an option to handle plans. Perhaps:

terraspace all plan --outs

Maybe the default conventional saves the plan to an expanded path. But you can also provide specify pattern the command

terraspace all plan --outs ":ENV-:ACCOUNT-:REGION-:MOD_NAME-:INSTANCE"

Unsure when will get to this, probably not for a while. Would like to provide this ability though. Happy to consider PRs. No sweat either way of course. 👍 Thanks!

from terraspace.

gwvandesteeg avatar gwvandesteeg commented on June 27, 2024

That'd work fine, as long as each plan output file has a unique name and/or path it'll be workable.

from terraspace.

tongueroo avatar tongueroo commented on June 27, 2024

Closed in favor of #156

from terraspace.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.