rails_template_18f 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +92 -70
- data/README.md +60 -63
- data/lib/generators/rails_template18f/terraform/templates/terraform/README.md.tt +3 -3
- data/lib/generators/rails_template18f/terraform/templates/terraform/bootstrap/main.tf.tt +1 -1
- data/lib/generators/rails_template18f/terraform/templates/terraform/bootstrap/run.sh.tt +1 -1
- data/lib/generators/rails_template18f/terraform/templates/terraform/bootstrap/teardown_creds.sh.tt +1 -1
- data/lib/generators/rails_template18f/terraform/templates/terraform/production/main.tf.tt +11 -6
- data/lib/generators/rails_template18f/terraform/templates/terraform/staging/main.tf.tt +9 -5
- data/lib/generators/rails_template18f/terraform/terraform_generator.rb +0 -10
- data/lib/rails_template18f/version.rb +1 -1
- data/template.rb +18 -1
- data/templates/Brewfile +3 -0
- data/templates/README.md.tt +1 -0
- data/templates/bin/ops/create_service_account.sh.tt +72 -0
- data/templates/bin/ops/destroy_service_account.sh.tt +53 -0
- data/{lib/generators/rails_template18f/terraform/templates/terraform → templates/bin/ops}/set_space_egress.sh.tt +1 -1
- data/templates/config/environments/ci.rb +1 -1
- data/templates/config/environments/staging.rb +1 -1
- data/templates/doc/compliance/TODO.md +37 -0
- metadata +7 -21
- data/lib/generators/rails_template18f/terraform/templates/terraform/create_space_deployer.sh +0 -33
- data/lib/generators/rails_template18f/terraform/templates/terraform/destroy_space_deployer.sh +0 -19
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/clamav/main.tf.tt +0 -50
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/clamav/providers.tf +0 -16
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/clamav/variables.tf +0 -47
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/database/main.tf.tt +0 -23
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/database/providers.tf +0 -16
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/database/variables.tf +0 -42
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/domain/main.tf.tt +0 -46
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/domain/providers.tf +0 -16
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/domain/variables.tf +0 -47
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/redis/main.tf.tt +0 -23
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/redis/providers.tf +0 -16
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/redis/variables.tf +0 -42
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/s3/main.tf +0 -27
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/s3/providers.tf +0 -16
- data/lib/generators/rails_template18f/terraform/templates/terraform/shared/s3/variables.tf +0 -43
data/lib/generators/rails_template18f/terraform/templates/terraform/shared/domain/variables.tf
DELETED
@@ -1,47 +0,0 @@
|
|
1
|
-
variable "cf_api_url" {
|
2
|
-
type = string
|
3
|
-
description = "cloud.gov api url"
|
4
|
-
default = "https://api.fr.cloud.gov"
|
5
|
-
}
|
6
|
-
|
7
|
-
variable "cf_user" {
|
8
|
-
type = string
|
9
|
-
description = "cloud.gov deployer account user"
|
10
|
-
}
|
11
|
-
|
12
|
-
variable "cf_password" {
|
13
|
-
type = string
|
14
|
-
description = "secret; cloud.gov deployer account password"
|
15
|
-
sensitive = true
|
16
|
-
}
|
17
|
-
|
18
|
-
variable "cf_org_name" {
|
19
|
-
type = string
|
20
|
-
description = "cloud.gov organization name"
|
21
|
-
}
|
22
|
-
|
23
|
-
variable "cf_space_name" {
|
24
|
-
type = string
|
25
|
-
description = "cloud.gov space name (staging or prod)"
|
26
|
-
}
|
27
|
-
|
28
|
-
variable "env" {
|
29
|
-
type = string
|
30
|
-
description = "deployment environment (staging, production)"
|
31
|
-
}
|
32
|
-
|
33
|
-
variable "recursive_delete" {
|
34
|
-
type = bool
|
35
|
-
description = "when true, deletes service bindings attached to the resource (not recommended for production)"
|
36
|
-
default = false
|
37
|
-
}
|
38
|
-
|
39
|
-
variable "cdn_plan_name" {
|
40
|
-
type = string
|
41
|
-
description = "name of the service plan name to create"
|
42
|
-
}
|
43
|
-
|
44
|
-
variable "domain_name" {
|
45
|
-
type = string
|
46
|
-
description = "DNS name users will be accessing site"
|
47
|
-
}
|
@@ -1,23 +0,0 @@
|
|
1
|
-
###
|
2
|
-
# Target space/org
|
3
|
-
###
|
4
|
-
|
5
|
-
data "cloudfoundry_space" "space" {
|
6
|
-
org_name = var.cf_org_name
|
7
|
-
name = var.cf_space_name
|
8
|
-
}
|
9
|
-
|
10
|
-
###
|
11
|
-
# RDS instance
|
12
|
-
###
|
13
|
-
|
14
|
-
data "cloudfoundry_service" "redis" {
|
15
|
-
name = "aws-elasticache-redis"
|
16
|
-
}
|
17
|
-
|
18
|
-
resource "cloudfoundry_service_instance" "redis" {
|
19
|
-
name = "<%= app_name %>-redis-${var.env}"
|
20
|
-
space = data.cloudfoundry_space.space.id
|
21
|
-
service_plan = data.cloudfoundry_service.redis.service_plans[var.redis_plan_name]
|
22
|
-
recursive_delete = var.recursive_delete
|
23
|
-
}
|
data/lib/generators/rails_template18f/terraform/templates/terraform/shared/redis/providers.tf
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
terraform {
|
2
|
-
required_version = "~> 1.0"
|
3
|
-
required_providers {
|
4
|
-
cloudfoundry = {
|
5
|
-
source = "cloudfoundry-community/cloudfoundry"
|
6
|
-
version = "0.15.0"
|
7
|
-
}
|
8
|
-
}
|
9
|
-
}
|
10
|
-
|
11
|
-
provider "cloudfoundry" {
|
12
|
-
api_url = var.cf_api_url
|
13
|
-
user = var.cf_user
|
14
|
-
password = var.cf_password
|
15
|
-
app_logs_max = 30
|
16
|
-
}
|
data/lib/generators/rails_template18f/terraform/templates/terraform/shared/redis/variables.tf
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
variable "cf_api_url" {
|
2
|
-
type = string
|
3
|
-
description = "cloud.gov api url"
|
4
|
-
default = "https://api.fr.cloud.gov"
|
5
|
-
}
|
6
|
-
|
7
|
-
variable "cf_user" {
|
8
|
-
type = string
|
9
|
-
description = "cloud.gov deployer account user"
|
10
|
-
}
|
11
|
-
|
12
|
-
variable "cf_password" {
|
13
|
-
type = string
|
14
|
-
description = "secret; cloud.gov deployer account password"
|
15
|
-
sensitive = true
|
16
|
-
}
|
17
|
-
|
18
|
-
variable "cf_org_name" {
|
19
|
-
type = string
|
20
|
-
description = "cloud.gov organization name"
|
21
|
-
}
|
22
|
-
|
23
|
-
variable "cf_space_name" {
|
24
|
-
type = string
|
25
|
-
description = "cloud.gov space name (staging or prod)"
|
26
|
-
}
|
27
|
-
|
28
|
-
variable "env" {
|
29
|
-
type = string
|
30
|
-
description = "deployment environment (staging, production)"
|
31
|
-
}
|
32
|
-
|
33
|
-
variable "recursive_delete" {
|
34
|
-
type = bool
|
35
|
-
description = "when true, deletes service bindings attached to the resource (not recommended for production)"
|
36
|
-
default = false
|
37
|
-
}
|
38
|
-
|
39
|
-
variable "redis_plan_name" {
|
40
|
-
type = string
|
41
|
-
description = "name of the service plan name to create"
|
42
|
-
}
|
@@ -1,27 +0,0 @@
|
|
1
|
-
###
|
2
|
-
# Target space/org
|
3
|
-
###
|
4
|
-
|
5
|
-
data "cloudfoundry_space" "space" {
|
6
|
-
org_name = var.cf_org_name
|
7
|
-
name = var.cf_space_name
|
8
|
-
}
|
9
|
-
|
10
|
-
###
|
11
|
-
# S3 instance
|
12
|
-
###
|
13
|
-
|
14
|
-
data "cloudfoundry_service" "s3" {
|
15
|
-
name = "s3"
|
16
|
-
}
|
17
|
-
|
18
|
-
resource "cloudfoundry_service_instance" "bucket" {
|
19
|
-
name = var.s3_service_name
|
20
|
-
space = data.cloudfoundry_space.space.id
|
21
|
-
service_plan = data.cloudfoundry_service.s3.service_plans[var.s3_plan_name]
|
22
|
-
recursive_delete = var.recursive_delete
|
23
|
-
}
|
24
|
-
|
25
|
-
output "bucket_id" {
|
26
|
-
value = cloudfoundry_service_instance.bucket.id
|
27
|
-
}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
terraform {
|
2
|
-
required_version = "~> 1.0"
|
3
|
-
required_providers {
|
4
|
-
cloudfoundry = {
|
5
|
-
source = "cloudfoundry-community/cloudfoundry"
|
6
|
-
version = "0.15.0"
|
7
|
-
}
|
8
|
-
}
|
9
|
-
}
|
10
|
-
|
11
|
-
provider "cloudfoundry" {
|
12
|
-
api_url = var.cf_api_url
|
13
|
-
user = var.cf_user
|
14
|
-
password = var.cf_password
|
15
|
-
app_logs_max = 30
|
16
|
-
}
|
@@ -1,43 +0,0 @@
|
|
1
|
-
variable "cf_api_url" {
|
2
|
-
type = string
|
3
|
-
description = "cloud.gov api url"
|
4
|
-
default = "https://api.fr.cloud.gov"
|
5
|
-
}
|
6
|
-
|
7
|
-
variable "cf_user" {
|
8
|
-
type = string
|
9
|
-
description = "cloud.gov deployer account user"
|
10
|
-
}
|
11
|
-
|
12
|
-
variable "cf_password" {
|
13
|
-
type = string
|
14
|
-
description = "secret; cloud.gov deployer account password"
|
15
|
-
sensitive = true
|
16
|
-
}
|
17
|
-
|
18
|
-
variable "cf_org_name" {
|
19
|
-
type = string
|
20
|
-
description = "cloud.gov organization name"
|
21
|
-
}
|
22
|
-
|
23
|
-
variable "cf_space_name" {
|
24
|
-
type = string
|
25
|
-
description = "cloud.gov space name (staging or prod)"
|
26
|
-
}
|
27
|
-
|
28
|
-
variable "recursive_delete" {
|
29
|
-
type = bool
|
30
|
-
description = "when true, deletes service bindings attached to the resource (not recommended for production)"
|
31
|
-
default = false
|
32
|
-
}
|
33
|
-
|
34
|
-
variable "s3_service_name" {
|
35
|
-
type = string
|
36
|
-
description = "name for the cloud.gov managed service"
|
37
|
-
}
|
38
|
-
|
39
|
-
variable "s3_plan_name" {
|
40
|
-
type = string
|
41
|
-
description = "name of the service plan to create"
|
42
|
-
default = "basic"
|
43
|
-
}
|