founders_template 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ac82f9d50d8c044af8f2bf04873f30f3f6eb0132533554f93959c45433171efd
4
- data.tar.gz: 31a286ebc4c208731cb5191c3b06def09373e5dfbdef0f401b457c83c893d057
3
+ metadata.gz: 4cdc29895e665803c7b35555ec090faaeee2e2843cbb1d8d65421556375ce4b4
4
+ data.tar.gz: ffbae93bf4d2032a50cec815a6db168ea33b9906649650b84f99f3ed0583a95b
5
5
  SHA512:
6
- metadata.gz: 1465802ede48423bdf322fad3cf7bf203bf351b0d29be460b82b27230d34475a113ff7d0b3db2d95f3f5a4594be7f7d4572cd56df6b2787d4d3979541fd7548c
7
- data.tar.gz: 28e11ac9af3ed046b2a2f3b5ab21d1590dcd733ea35c79065b5022a47d9323e5d454fa3f1caf216deb797dad0929669d4f4b98e885236ca35d1c14ad8b73d2a5
6
+ metadata.gz: 762c09c7b11a0bc97b8367848e62610405e57013d1c9d43d885e782c1f77e335e01a815df939ae46302cbd59aeb66f8d158986e6437be29d29a13867a884db55
7
+ data.tar.gz: 430acb4d185b35a17e1d08a4a6abcd7d524b1c3c9eed4282aa796e362cbdd82dbc384da277a15c5ab1a83d79b554eacaedfa9eb1199213ce51518075574be721
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- founders_template (0.2.2)
4
+ founders_template (0.2.3)
5
5
  activesupport
6
6
  aws-sdk-core
7
7
  aws-sdk-ec2
@@ -71,18 +71,9 @@ module FoundersTemplate
71
71
  def install_terraform_project
72
72
  directory 'terraform', 'terraform'
73
73
 
74
+ template 'terraform-production-backend.tf.erb', 'terraform/production/backend.tf'
74
75
  template 'terraform-production.tfvars.erb', 'terraform/production/terraform.tfvars'
75
76
  template 'terraform-shared.tfvars.erb', 'terraform/shared/terraform.tfvars'
76
-
77
- gsub_file 'terraform/production/main.tf',
78
- /(bucket\s+=\s+)".+-terraform-production"/,
79
- %(\\1"#{app_config.slugified_name}-terraform-production")
80
- gsub_file 'terraform/production/main.tf',
81
- /(dynamodb_table\s+=\s+)".+-terraform-production"/,
82
- %(\\1"#{app_config.slugified_name}-terraform-production")
83
- gsub_file 'terraform/production/main.tf',
84
- /(region\s+=\s+)".+"/,
85
- %(\\1"#{app_config.aws_region}")
86
77
  end
87
78
 
88
79
  def ensure_aws_credentials
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FoundersTemplate
4
- VERSION = '0.2.2'
4
+ VERSION = '0.2.3'
5
5
  end
@@ -0,0 +1,9 @@
1
+ terraform {
2
+ backend "s3" {
3
+ encrypt = true
4
+ bucket = "<%= app_config.slugified_name %>-terraform-production"
5
+ dynamodb_table = "<%= app_config.slugified_name %>-terraform-production"
6
+ region = "<%= app_config.aws_region %>"
7
+ key = "statefile"
8
+ }
9
+ }
@@ -28,17 +28,6 @@ locals {
28
28
  EOF
29
29
  }
30
30
 
31
- # You MUST run the TF files in the "shared" environment before this will work
32
- terraform {
33
- backend "s3" {
34
- encrypt = true
35
- bucket = "rails-app-terraform-production"
36
- dynamodb_table = "rails-app-terraform-production"
37
- region = "us-east-1"
38
- key = "statefile"
39
- }
40
- }
41
-
42
31
  module "vpc" {
43
32
  source = "git://github.com/trobrock/terraform-vpc.git?ref=v1.0.0"
44
33
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: founders_template
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trae Robrock
@@ -136,6 +136,7 @@ files:
136
136
  - templates/docker/nginx/nginx.conf
137
137
  - templates/dockerignore.erb
138
138
  - templates/ft.yml.erb
139
+ - templates/terraform-production-backend.tf.erb
139
140
  - templates/terraform-production.tfvars.erb
140
141
  - templates/terraform-shared.tfvars.erb
141
142
  - templates/terraform/modules/application/main.tf