-
Notifications
You must be signed in to change notification settings - Fork 53
Cleaned up terraform and fixed backends #67
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| provider "aws" { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To create the actual backend bucket and dynamo db. This will need to be run in a separate
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can move it to a seperate
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That wouldn't be a great workflow going forward though, because you wouldn't be able to run plan/apply in the main dir.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about using the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They have to be run separately, because one creates the global state and should never be run again, and the other one uses the global state.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, does it make sense to enclose the backend init in a shell script then or boto3?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That way we can both spin up and tear down the backend init based on
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Gonna stick with this for now and we'll see how complex the process gets to see if it warrants adding helpers.. |
||
| region = "{{ .Config.Infrastructure.AWS.Region }}" | ||
| } | ||
|
|
||
| resource "aws_s3_bucket" "terraform_remote_state" { | ||
| bucket = "project-{{ .Config.Name }}-terraform-state" | ||
| acl = "private" | ||
|
|
||
| versioning { | ||
| enabled = true | ||
| } | ||
| } | ||
|
|
||
| resource "aws_dynamodb_table" "terraform_state_locks" { | ||
| name = "{{ .Config.Name }}-terraform-state-locks" | ||
| read_capacity = 2 | ||
| write_capacity = 2 | ||
| hash_key = "LockID" | ||
|
|
||
| attribute { | ||
| name = "LockID" | ||
| type = "S" | ||
| } | ||
| } | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| # {{.Name}} | ||
| # {{.Config.Name}} | ||
|
|
||
| @TODO : Fill in readme about how to use all the components the user configured |
Uh oh!
There was an error while loading. Please reload this page.