Skip to content

Commit 3d478e8

Browse files
authored
Add CI. Terraform fmt (#23)
* Terraform fmt. Add CI * Update `README`
1 parent 8eeaf56 commit 3d478e8

File tree

6 files changed

+68
-45
lines changed

6 files changed

+68
-45
lines changed

.README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## {{ (datasource "git").name }}
1+
## {{ (datasource "git").name }} [![Build Status](https://travis-ci.org/cloudposse/terraform-aws-elastic-beanstalk-environment.svg)](https://travis-ci.org/cloudposse/terraform-aws-elastic-beanstalk-environment)
22
{{ (datasource "section").warning }}
33

44
Terraform module to provision AWS Elastic Beanstalk environment

.travis.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
addons:
2+
apt:
3+
packages:
4+
- git
5+
- make
6+
- curl
7+
8+
install:
9+
- make init
10+
11+
script:
12+
- make terraform:install
13+
- make terraform:get-plugins
14+
- make terraform:get-modules
15+
- make terraform:lint
16+
- make terraform:validate

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1+
SHELL := /bin/bash
2+
13
-include $(shell curl -sSL -o .build-harness "https://git.io/build-harness"; echo .build-harness)
4+
5+
lint:
6+
$(SELF) terraform:install terraform:get-modules terraform:get-plugins terraform:lint terraform:validate

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
## terraform-aws-elastic-beanstalk-environment
1+
## terraform-aws-elastic-beanstalk-environment [![Build Status](https://travis-ci.org/cloudposse/terraform-aws-elastic-beanstalk-environment.svg)](https://travis-ci.org/cloudposse/terraform-aws-elastic-beanstalk-environment)
2+
23
<!---
34
--- This file was automatically generated by the `build-harness`
45
--- Make changes instead to `.README.md` and rebuild.

outputs.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
output "host" {
2-
value = "${module.tld.hostname}"
2+
value = "${module.tld.hostname}"
33
description = "DNS hostname"
44
}
55

66
output "name" {
7-
value = "${aws_elastic_beanstalk_environment.default.name}"
7+
value = "${aws_elastic_beanstalk_environment.default.name}"
88
description = "Name"
99
}
1010

1111
output "security_group_id" {
12-
value = "${aws_security_group.default.id}"
12+
value = "${aws_security_group.default.id}"
1313
description = "Security group id"
1414
}
1515

1616
output "elb_dns_name" {
17-
value = "${aws_elastic_beanstalk_environment.default.cname}"
17+
value = "${aws_elastic_beanstalk_environment.default.cname}"
1818
description = "ELB technical host"
1919
}
2020

2121
output "elb_zone_id" {
22-
value = "${var.alb_zone_id[data.aws_region.default.name]}"
22+
value = "${var.alb_zone_id[data.aws_region.default.name]}"
2323
description = "ELB zone id"
2424
}
2525

2626
output "ec2_instance_profile_role_name" {
27-
value = "${aws_iam_role.ec2.name}"
27+
value = "${aws_iam_role.ec2.name}"
2828
description = "Instance IAM role name"
2929
}

variables.tf

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,92 @@
11
variable "namespace" {
2-
default = "global"
2+
default = "global"
33
description = "Namespace, which could be your organization name, e.g. 'cp' or 'cloudposse'"
44
}
55

66
variable "stage" {
7-
default = "default"
7+
default = "default"
88
description = "Stage, e.g. 'prod', 'staging', 'dev', or 'test'"
99
}
1010

1111
variable "delimiter" {
12-
type = "string"
13-
default = "-"
12+
type = "string"
13+
default = "-"
1414
description = "Delimiter to be used between `name`, `namespace`, `stage`, etc."
1515
}
1616

1717
variable "attributes" {
18-
type = "list"
19-
default = []
18+
type = "list"
19+
default = []
2020
description = "Additional attributes (e.g. `policy` or `role`)"
2121
}
2222

2323
variable "name" {
24-
default = "app"
24+
default = "app"
2525
description = "Solution name, e.g. 'app' or 'jenkins'"
2626
}
2727

2828
variable "healthcheck_url" {
29-
default = "/healthcheck"
29+
default = "/healthcheck"
3030
description = "Application Health Check URL. Elastic Beanstalk will call this URL to check the health of the application running on EC2 instances"
3131
}
3232

3333
variable "notification_protocol" {
34-
default = "email"
34+
default = "email"
3535
description = "Notification protocol"
3636
}
3737

3838
variable "notification_endpoint" {
39-
default = ""
39+
default = ""
4040
description = "Notification endpoint"
4141
}
4242

4343
variable "notification_topic_arn" {
44-
default = ""
44+
default = ""
4545
description = "Notification topic arn"
4646
}
4747

4848
variable "notification_topic_name" {
49-
default = ""
49+
default = ""
5050
description = "Notification topic name"
5151
}
5252

5353
variable "loadbalancer_type" {
54-
default = "classic"
54+
default = "classic"
5555
description = "Load Balancer type, e.g. 'application' or 'classic'"
5656
}
5757

5858
variable "loadbalancer_certificate_arn" {
59-
default = ""
59+
default = ""
6060
description = "Load Balancer SSL certificate ARN. The certificate must be present in AWS Certificate Manager"
6161
}
6262

6363
variable "http_listener_enabled" {
64-
default = "false"
64+
default = "false"
6565
description = "Enable port 80 (http)"
6666
}
6767

6868
variable "ssh_listener_enabled" {
69-
default = "false"
69+
default = "false"
7070
description = "Enable ssh port"
7171
}
7272

7373
variable "ssh_listener_port" {
74-
default = "22"
74+
default = "22"
7575
description = "SSH port"
7676
}
7777

7878
variable "zone_id" {
79-
default = ""
79+
default = ""
8080
description = "Route53 parent zone ID. The module will create sub-domain DNS records in the parent zone for the EB environment"
8181
}
8282

8383
variable "config_source" {
84-
default = ""
84+
default = ""
8585
description = "S3 source for config"
8686
}
8787

8888
variable "security_groups" {
89-
type = "list"
89+
type = "list"
9090
description = "List of security groups to be allowed to connect to the EC2 instances"
9191
}
9292

@@ -99,12 +99,12 @@ variable "vpc_id" {
9999
}
100100

101101
variable "public_subnets" {
102-
type = "list"
102+
type = "list"
103103
description = "List of public subnets to place Elastic Load Balancer"
104104
}
105105

106106
variable "private_subnets" {
107-
type = "list"
107+
type = "list"
108108
description = "List of private subnets to place EC2 instances"
109109
}
110110

@@ -113,42 +113,42 @@ variable "keypair" {
113113
}
114114

115115
variable "updating_min_in_service" {
116-
default = "1"
116+
default = "1"
117117
description = "Minimum count of instances up during update"
118118
}
119119

120120
variable "updating_max_batch" {
121-
default = "1"
121+
default = "1"
122122
description = "Maximum count of instances up during update"
123123
}
124124

125125
variable "instance_type" {
126-
default = "t2.micro"
126+
default = "t2.micro"
127127
description = "Instances type"
128128
}
129129

130130
variable "autoscale_lower_bound" {
131-
default = "20"
131+
default = "20"
132132
description = "Minimum level of autoscale metric to add instance"
133133
}
134134

135135
variable "autoscale_upper_bound" {
136-
default = "80"
136+
default = "80"
137137
description = "Maximum level of autoscale metric to remove instance"
138138
}
139139

140140
variable "autoscale_min" {
141-
default = "2"
141+
default = "2"
142142
description = "Minumum instances in charge"
143143
}
144144

145145
variable "autoscale_max" {
146-
default = "3"
146+
default = "3"
147147
description = "Maximum instances in charge"
148148
}
149149

150150
variable "solution_stack_name" {
151-
default = ""
151+
default = ""
152152
description = "Elastic Beanstalk stack, e.g. Docker, Go, Node, Java, IIS. [Read more](http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.platforms.html)"
153153
}
154154

@@ -175,32 +175,33 @@ variable "alb_zone_id" {
175175
us-west-1 = "Z1LQECGX5PH1X"
176176
us-west-2 = "Z38NKT9BP95V3O"
177177
}
178+
178179
description = "ALB zone id"
179180
}
180181

181182
variable "tags" {
182-
type = "map"
183-
default = {}
183+
type = "map"
184+
default = {}
184185
description = "Additional tags (e.g. `map('BusinessUnit`,`XYZ`)"
185186
}
186187

187188
variable "env_default_key" {
188-
default = "DEFAULT_ENV_%d"
189+
default = "DEFAULT_ENV_%d"
189190
description = "Default ENV variable key for Elastic Beanstalk `aws:elasticbeanstalk:application:environment` setting"
190191
}
191192

192193
variable "env_default_value" {
193-
default = "UNSET"
194+
default = "UNSET"
194195
description = "Default ENV variable value for Elastic Beanstalk `aws:elasticbeanstalk:application:environment` setting"
195196
}
196197

197198
variable "env_vars" {
198-
default = {}
199-
type = "map"
199+
default = {}
200+
type = "map"
200201
description = "Map of custom ENV variables to be provided to the Jenkins application running on Elastic Beanstalk, e.g. `env_vars = { JENKINS_USER = 'admin' JENKINS_PASS = 'xxxxxx' }`"
201202
}
202203

203204
variable "tier" {
204-
default = "WebServer"
205+
default = "WebServer"
205206
description = "Elastic Beanstalk Environment tier, e.g. ('WebServer', 'Worker')"
206207
}

0 commit comments

Comments
 (0)