Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terraform/Ansible/etc Defaults #18

Closed
mickmcgrath13 opened this issue Aug 5, 2020 · 5 comments
Closed

Terraform/Ansible/etc Defaults #18

mickmcgrath13 opened this issue Aug 5, 2020 · 5 comments
Labels

Comments

@mickmcgrath13
Copy link
Contributor

Similar to how helm allows specification of _default, can we do the same with Terraform?

Options

  • Terraform multiple var files? (something to this effect: terraform apply -auto-approve -f $DEFAULT_VARS_FILE -f $ENV_VARS_FILE)
    • how does it handle the same keys/vars in multiple files?
  • Terragrunt
  • yaml-based stuff:
@mickmcgrath13 mickmcgrath13 changed the title Bitops - Terraform Defaults Bitops - Terraform/Ansible/etc Defaults Sep 14, 2020
@ConnorGraham
Copy link
Contributor

I'm interested in expanding this to not only include hosting var files in the _default environment, but also arbitrary .tf or yaml files to allow common terraform or ansible logic to not be duplicated across environments.

This could be accomplished using an rsync operation, but we'd be forfeiting merging functionality in this case.

@mickmcgrath13
Copy link
Contributor Author

Let's chat about this in the next strategery topics meeting. I want to make sure it's clear how the current _default pattern works (for helm specifically) and how we've done arbitrary helm files (a la ytt) for halyard

@mickmcgrath13
Copy link
Contributor Author

mickmcgrath13 commented Sep 16, 2020

per file extension, we can have a default-merger that decides how files are merged from default to the deployed environment

i.e.

  • yaml files: ytt
  • .sh/.bash/etc: skip/replace/duplicate&rename (rsync?)
  • terraform: skip/replace/duplicate&rename (rsync?)

maybe in bitops.config.yaml, we could have a copy section like:

terraform:
  copy:
    - extension: .tf
      operaton: rsync

@ConnorGraham ConnorGraham transferred this issue from another repository Sep 25, 2020
@ConnorGraham
Copy link
Contributor

Expected behaviour for file-mergers documented https://bitovi.github.io/bitops/default-environment/#file-mergers-todo

@ConnorGraham ConnorGraham changed the title Bitops - Terraform/Ansible/etc Defaults Terraform/Ansible/etc Defaults Sep 28, 2020
@PhillypHenning
Copy link
Contributor

BitOps V2 version - #177

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants