Git Product home page Git Product logo

tfscaffold's People

Contributors

avaines avatar briancollinson avatar carlinglisbjss avatar dandelo avatar edmundcraske avatar edmundcraske-bjss avatar harsha-s avatar lisaparrattbjss avatar masseyc avatar michalschott avatar zordrak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tfscaffold's Issues

Any plans to get round "Value for undeclared variable" in future releases

Hello,

We're using tfscaffold along with Terraform 0.12.6. Tf 12 returns the following warning when we run a component.

Warning: Value for undeclared variable
on ...../terraform/etc/env_eu-west-1_staging.tfvars line 28:
28: service_plugin_list = [
29: "key-auth",
30: "syslog"
31: ]
The root module does not declare a variable named "service_plugin_list". To
use this value, add a "variable" block to the configuration.
Using a variables file to set an undeclared variable is deprecated and will
become an error in a future release. If you wish to provide certain "global"
settings to all configurations in your organization

I'm using a standard setup of an env file containing variables for multiple components. Is there any plan to change how tfscaffold works to get around how terraform will be handling environment variables?

TF_VARs from secret file cannot contain certain chars

If the secrets file (stored in S3) contains certain characters, terraform.sh fails to export them as TF_VARs.
Specifically, I came across the issue when a password contained an open round bracket: (.

bash -x bin/terraform.sh -p my_proj -e my_env -c my_comp -r eu-west-1 -a apply

bin/terraform.sh: eval: line 399: syntax error near unexpected token `('
bin/terraform.sh: eval: line 399: `export TF_VAR_my_secret=char(fail'
...
...
Error: Required variable not set: my_secret

Usage with components separated into different repositories?

This project sounds really great! But I am unsure how to use it.

Current situation: 50 projects with their own Terraform states in S3. All of them have some variables in common like the account id.

As far as I understood the usage documents I have to move the whole infrastructure into the components folder. But then I have only one repository holding everything. I'd like to stay with 50 single repositories.

Any chance to use tfscaffold or is this a nogo?

Region specified with -r not fully honoured in bootstrapping

When bootstrapping for the first time, it's possible to get into a state where the S3 state bucket when initially created has the correct name but is placed in the wrong region.

When the region is specified via -r <region> the expectation is that this is honoured throughout all areas of the bootstrap.

However, if you have a different region specified in any of the .tfvars file within etc (such as global.tfvars) the S3 bootstrapping bucket ends up associated to this region, not the region that was specified by -r flag.

I would have the expectation that the -r flag overrides any other regions it adopts from .tfvars as an explicit value and overrides any picked up through vars.

The bucket is placed in the expected region if the -r value and any it finds in .tfvars matches up

Tested in version:

  • v1.7.0

Steps to reproduce:

  • Edit ./etc/global.tfvars and amend the value for region to region = eu-west-1
  • Run bootstrapping command ./bin/terraform.sh --bootstrap -r us-east-1 -p myproject -a plan

Expected:

  • S3 bucket for storing state is created in the region specified by -r - us-east-1

Actual:

  • S3 bucket for storing state is created in the region specified in .tfvars files picked up in the project - eu-west-1
  • S3 bucket name created does however have the expected name ending in us-east-1

Doesn't handle arguments after `--`

So- when I'm trying to pass additional arguments to terraform call after --, those arguments aren't being propagated to any terraform call.

Example invocation:

bash -x ./bin/terraform.sh --action plan --project XXX --environment XXX --component XXX --bucket-prefix XXX --region eu-west-1 -- -var journal_sha256sum=wRFZ/rvP3I8H4what3v3r9/qSmD2b1kZRQ=

invocation of terraform plan later in the script:

terraform plan -input=false -refresh=true -module-depth=-1 -var region=eu-west-1 -var project=XXX -var bucket_name=XXX -var aws_account_id=XXX -var-file=../../etc/env_eu-west-1_XXX.tfvars

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.