Coder Social home page Coder Social logo

craftypath / gotf Goto Github PK

View Code? Open in Web Editor NEW
25.0 4.0 3.0 16.93 MB

Managing multiple environments with Terraform made easy

License: Apache License 2.0

Go 98.25% Shell 1.61% Dockerfile 0.14%
terraform golang infrastructure-as-code iac go devops environments hashicorp-terraform hashicorp

gotf's People

Contributors

andreasek avatar dependabot[bot] avatar unguiculus 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

Watchers

 avatar  avatar  avatar  avatar

gotf's Issues

Allow for ignoring non-existant module variable files

When working with module var files, it is possible to define a hierarchy of files as those are being evaluated in the order given.
In many cases, all the necessary content may be already given in the top - level file, default-vars.tfvars in the attached screenshot.

Still, it is currently required to also have the environment specific files present.
This may lead to module folders being cluttered with unnecessary variable files.

image

It could be worthwhile to introduce an option that allows for not providing variable files that are defined in gotf.yaml.
This would allow for only specifying environment specific var files if the content deviates from default-vars.tfvars

Is this can be regarded a general pattern for your GOTF module, i would suggest to introduce this as a global option ignoreMissingVarFiles in gotf.yaml

Backend configuration does not properly support boolean values

Hi,
thanks for sharing the project, the idea is quite promising.
I used gotf to try it in one of our projects.
We use azurerm as backend and I applied to following configuration in gotf.yaml for the state configuration:

backendConfigs:
  key: "{{ .Vars.state_key }}"
  storage_account_name: "xxx"
  resource_group_name: "xxx"
  container_name: "xxx"
  snapshot: true

On every gotf command, it complains that I have to reconfigure the backend.

Error: configured backend does not match current environment

snapshot: got=true, want=true

Run terraform init -reconfigure!

It does not matter if I set snapshot to true or 'true'
There is probably a problem with the datatypes of string vs. bool.

gotf --version
v0.17.0 (commit=49e4788, date=2022-02-09T17:18:13Z)

Check if module directory exists

gotf should check whether a module directory exists and print a meaningful error if it doesn't. Otherwise, depending on the templating use in gotf.yaml, error messages might not be helpful (e.g. Error: could not load config file "gotf.yaml": template: gotpl:1:24: executing "gotpl" at <.Params.moduleDir>: map has no entry for key "_1").

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.