Comments (5)
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.
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.
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.
That'd work fine, as long as each plan output file has a unique name and/or path it'll be workable.
from terraspace.
Closed in favor of #156
from terraspace.
Related Issues (20)
- unable to use UTF-8 char in tfvars
- Exception Armrest::Error: #<Net::HTTPUnauthorized:0x0000561554b473e0> when executing terraspace up demo -y HOT 3
- Terraspace all should halt on any error HOT 2
- Retry output values from state before defaulting to mock value HOT 1
- terraspace all subcommand pass through terraform args doesn't work
- Terraspace hooks doesn't work
- depends_on and stack ordering detection not working correctly HOT 3
- [BUG] Intermittent output helper destroying resources HOT 1
- Terraspace stopped working after update to "tilt" Gem package HOT 4
- Terrraspace example project not working HOT 1
- bundle update doesn't work in centos image with 2.2.7 HOT 1
- Allow referring to output from another environment
- Preserve double-quotes when calling "terraform import"
- Newer images missing from DockerHub
- [FEATURE] Allow setting source mirror for rubygems.org
- Missing azurerm and none options for --plugin
- OpenSSL version builtin with Terraspace is obsolete
- `terraspace fmt` doesn't do recursive checks and does not support the `--recursive` flag like `terraform fmt` does HOT 1
- Problem with check terraform version HOT 1
- Loading and writing of statefiles for outputs is not threadsafe
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraspace.