@@ -49,11 +49,14 @@ related:
49
49
description : " Terraform Module to define an ElasticBeanstalk Application"
50
50
url : " https://github.com/cloudposse/terraform-aws-elastic-beanstalk-application"
51
51
- name : " geodesic"
52
- description : " Geodesic is the fastest way to get up and running with a rock solid, production grade cloud platform built on strictly Open Source tools."
52
+ description : " Geodesic is the fastest way to get up and running with a rock solid, production grade cloud platform built on strictly Open Source tools."
53
53
url : " https://github.com/cloudposse/geodesic"
54
54
- name : " terraform-aws-elasticache-cloudwatch-sns-alarms"
55
- description : " Terraform module that configures CloudWatch SNS alerts for ElastiCache"
55
+ description : " Terraform module that configures CloudWatch SNS alerts for ElastiCache"
56
56
url : " https://github.com/cloudposse/terraform-aws-elasticache-cloudwatch-sns-alarms"
57
+ - name : " General options for all Elastic Beanstalk environments"
58
+ description : " General configuration options for all Elastic Beanstalk environments"
59
+ url : " https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options-general.html"
57
60
58
61
# Short description of this project
59
62
description : |-
@@ -76,108 +79,120 @@ usage: |-
76
79
provider "aws" {
77
80
region = var.region
78
81
}
79
-
82
+
80
83
module "vpc" {
81
- source = "git::https://github.com/ cloudposse/terraform-aws- vpc.git?ref=tags/0.8.0 "
82
- namespace = var.namespace
83
- stage = var.stage
84
- name = var.name
84
+ source = "cloudposse/vpc/aws "
85
+ # Cloud Posse recommends pinning every module to a specific version
86
+ version = "x.x.x"
87
+
85
88
cidr_block = "172.16.0.0/16"
89
+
90
+ context = module.this.context
86
91
}
87
-
92
+
88
93
module "subnets" {
89
- source = "git::https://github.com/cloudposse/terraform-aws-dynamic-subnets.git?ref=tags/0.16.0"
94
+ source = "cloudposse/dynamic-subnets/aws"
95
+ # Cloud Posse recommends pinning every module to a specific version
96
+ version = "x.x.x"
97
+
90
98
availability_zones = var.availability_zones
91
- namespace = var.namespace
92
- stage = var.stage
93
- name = var.name
94
99
vpc_id = module.vpc.vpc_id
95
100
igw_id = module.vpc.igw_id
96
101
cidr_block = module.vpc.vpc_cidr_block
97
102
nat_gateway_enabled = true
98
103
nat_instance_enabled = false
104
+
105
+ context = module.this.context
99
106
}
100
-
107
+
101
108
module "elastic_beanstalk_application" {
102
- source = "git::https://github.com/cloudposse/terraform-aws-elastic-beanstalk-application.git?ref=tags/0.3.0"
103
- namespace = var.namespace
104
- stage = var.stage
105
- name = var.name
106
- description = "Test elastic_beanstalk_application"
109
+ source = "cloudposse/elastic-beanstalk-application/aws"
110
+ # Cloud Posse recommends pinning every module to a specific version
111
+ version = "x.x.x"
112
+
113
+ description = "Test Elastic Beanstalk application"
114
+
115
+ context = module.this.context
107
116
}
108
-
117
+
109
118
module "elastic_beanstalk_environment" {
110
- source = "cloudposse/elastic-beanstalk-environment/aws"
111
- # Cloud Posse recommends pinning every module to a specific version
112
- # version = "x.x.x"
113
- namespace = var.namespace
114
- stage = var.stage
115
- name = var.name
116
- description = "Test elastic_beanstalk_environment"
117
- region = var.region
118
- availability_zone_selector = "Any 2"
119
- dns_zone_id = var.dns_zone_id
119
+ source = "../../"
120
+
121
+ description = var.description
122
+ region = var.region
123
+ availability_zone_selector = var.availability_zone_selector
124
+ dns_zone_id = var.dns_zone_id
125
+
126
+ wait_for_ready_timeout = var.wait_for_ready_timeout
120
127
elastic_beanstalk_application_name = module.elastic_beanstalk_application.elastic_beanstalk_application_name
121
-
122
- instance_type = "t3.small"
123
- autoscale_min = 1
124
- autoscale_max = 2
125
- updating_min_in_service = 0
126
- updating_max_batch = 1
127
-
128
- loadbalancer_type = "application"
128
+ environment_type = var.environment_type
129
+ loadbalancer_type = var.loadbalancer_type
130
+ elb_scheme = var.elb_scheme
131
+ tier = var.tier
132
+ version_label = var.version_label
133
+ force_destroy = var.force_destroy
134
+
135
+ instance_type = var.instance_type
136
+ root_volume_size = var.root_volume_size
137
+ root_volume_type = var.root_volume_type
138
+
139
+ autoscale_min = var.autoscale_min
140
+ autoscale_max = var.autoscale_max
141
+ autoscale_measure_name = var.autoscale_measure_name
142
+ autoscale_statistic = var.autoscale_statistic
143
+ autoscale_unit = var.autoscale_unit
144
+ autoscale_lower_bound = var.autoscale_lower_bound
145
+ autoscale_lower_increment = var.autoscale_lower_increment
146
+ autoscale_upper_bound = var.autoscale_upper_bound
147
+ autoscale_upper_increment = var.autoscale_upper_increment
148
+
129
149
vpc_id = module.vpc.vpc_id
130
150
loadbalancer_subnets = module.subnets.public_subnet_ids
131
151
application_subnets = module.subnets.private_subnet_ids
132
- security_group_rules = [
133
- {
134
- type = "egress"
135
- from_port = 0
136
- to_port = 65535
137
- protocol = "-1"
138
- cidr_blocks = ["0.0.0.0/0"]
139
- source_security_group_id = null
140
- description = "Allow all outbound traffic"
141
- },
152
+
153
+ allow_all_egress = true
154
+
155
+ additional_security_group_rules = [
142
156
{
143
157
type = "ingress"
144
158
from_port = 0
145
159
to_port = 65535
146
160
protocol = "-1"
147
- source_security_group_id = [module.vpc.vpc_default_security_group_id]
148
- cidr_blocks = null
149
- description = "Allow all ingress traffic from trusted Security Groups"
150
- },
161
+ source_security_group_id = module.vpc.vpc_default_security_group_id
162
+ description = "Allow all inbound traffic from trusted Security Groups"
163
+ }
151
164
]
165
+
166
+ rolling_update_enabled = var.rolling_update_enabled
167
+ rolling_update_type = var.rolling_update_type
168
+ updating_min_in_service = var.updating_min_in_service
169
+ updating_max_batch = var.updating_max_batch
170
+
171
+ healthcheck_url = var.healthcheck_url
172
+ application_port = var.application_port
173
+
174
+ solution_stack_name = var.solution_stack_name
175
+ additional_settings = var.additional_settings
176
+ env_vars = var.env_vars
177
+
178
+ extended_ec2_policy_document = data.aws_iam_policy_document.minimal_s3_permissions.json
179
+ prefer_legacy_ssm_policy = false
152
180
prefer_legacy_service_policy = false
153
-
154
- // https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platforms-supported.html
155
- // https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platforms-supported.html#platforms-supported.docker
156
- solution_stack_name = "64bit Amazon Linux 2018.03 v2.12.17 running Docker 18.06.1-ce"
157
-
158
- additional_settings = [
159
- {
160
- namespace = "aws:elasticbeanstalk:application:environment"
161
- name = "DB_HOST"
162
- value = "xxxxxxxxxxxxxx"
163
- },
164
- {
165
- namespace = "aws:elasticbeanstalk:application:environment"
166
- name = "DB_USERNAME"
167
- value = "yyyyyyyyyyyyy"
168
- },
169
- {
170
- namespace = "aws:elasticbeanstalk:application:environment"
171
- name = "DB_PASSWORD"
172
- value = "zzzzzzzzzzzzzzzzzzz"
173
- },
174
- {
175
- namespace = "aws:elasticbeanstalk:application:environment"
176
- name = "ANOTHER_ENV_VAR"
177
- value = "123456789"
178
- }
181
+ scheduled_actions = var.scheduled_actions
182
+
183
+ context = module.this.context
184
+ }
185
+
186
+ data "aws_iam_policy_document" "minimal_s3_permissions" {
187
+ statement {
188
+ sid = "AllowS3OperationsOnElasticBeanstalkBuckets"
189
+ actions = [
190
+ "s3:ListAllMyBuckets",
191
+ "s3:GetBucketLocation"
179
192
]
193
+ resources = ["*"]
180
194
}
195
+ }
181
196
```
182
197
183
198
include :
@@ -188,11 +203,11 @@ include:
188
203
contributors :
189
204
- name : " Erik Osterman"
190
205
homepage : " https://github.com/osterman"
191
- avatar : " http ://s.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb?s=144"
206
+ avatar : " https ://s.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb?s=144"
192
207
github : " osterman"
193
208
- name : " Igor Rodionov"
194
209
homepage : " https://github.com/goruha/"
195
- avatar : " http ://s.gravatar.com/avatar/bc70834d32ed4517568a1feb0b9be7e2?s=144"
210
+ avatar : " https ://s.gravatar.com/avatar/bc70834d32ed4517568a1feb0b9be7e2?s=144"
196
211
github : " goruha"
197
212
- name : " Andriy Knysh"
198
213
homepage : " https://github.com/aknysh/"
0 commit comments