-
Notifications
You must be signed in to change notification settings - Fork 10
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
Added Backend Configuration to Terraform #595
base: develop
Are you sure you want to change the base?
Conversation
…dule to point at github module
…utomation scripts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is terra:init-wrks
needed here? Was this added to test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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