Added Backend Configuration to Terraform#595
Conversation
…dule to point at github module
…utomation scripts
mwallert
left a comment
There was a problem hiding this comment.
These changes are really good, but we want to make them more generic. Let's set up some time to all chat about this next week!
michaelachrisco
left a comment
There was a problem hiding this comment.
@alexrdrgz I believe we will need to resolve the package.json conflicts before we can review again.
| bucket = "shift3-terraform-state" | ||
| key = "test-staging-boilerplate-client-react/terraform.tfstate" | ||
| region = "us-west-2" | ||
| profile = "shift3" No newline at end of file |
There was a problem hiding this comment.
@alexrdrgz I think shift3-super is the new default, let's swap this out, update the merge conflicts and this should be good to merge!
|
Converting to draft to reduce code review reminder noise. |
|
thanks corey! |
|
@michaelachrisco I've updated the documentation on here and have updated the code and fixed merge conflicts. I talked to wallert and he agreed before merging we need to setup some sort of training for devs on this new configuration. It requires a new workflow that could confuse devs without a headsup |
Gotcha. Lets take a look. |
michaelachrisco
left a comment
There was a problem hiding this comment.
I took a quick look at the PR and found a couple of git merge conflict lines that seem to have made their way into the code. Lets go ahead and remove those.
Terraform looks cool! Throwing things into their respective environments. I like it!
| "switch-state:stg": "npm run switch-state -target=staging", | ||
| "switch-state:prod": "npm run switch-state -target=production", | ||
| "terra:init": "cd terraform && terraform init -backend-config=\"environment/$npm_config_target.backend.conf\"", | ||
| "terra:init-wrks": "cd terraform && if ! terraform workspace list | grep -q \"\\s$npm_config_name$\"; then terraform workspace new \"$npm_config_name\"; fi", |
There was a problem hiding this comment.
Is terra:init-wrks needed here? Was this added to test?
There was a problem hiding this comment.
yeah and for the pre-provision
Changes
List Changes Introduced by this PR
Purpose
Within backend section of terraform you cant add vars. Instead the backend.conf let you have that section dynamic
Approach
Looked at porterville CMS project and mimicked how their terraform is setup.
Note
This PR will likely not be merged, as we don't want to change the way we use terraform to much and too fast. This is to shwo proof of concept to devops team
Closes #587