Skip to content

Commit 7f7491a

Browse files
tbilouactions-bot
andauthored
Configuration option for disabling Cross Zone Load Balancing (for classic LB) (#128)
Co-authored-by: tiago bilou <[email protected]> Co-authored-by: actions-bot <[email protected]>
1 parent dfc707e commit 7f7491a

File tree

5 files changed

+54
-60
lines changed

5 files changed

+54
-60
lines changed

README.md

+43-58
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
1-
<!--
2-
3-
4-
5-
6-
7-
1+
# terraform-aws-elastic-beanstalk-environment
82

3+
[![Latest Release](https://img.shields.io/github/release/cloudposse/terraform-aws-elastic-beanstalk-environment.svg)](https://github.com/cloudposse/terraform-aws-elastic-beanstalk-environment/releases/latest) [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
94

5+
[![README Header][readme_header_img]][readme_header_link]
106

7+
[![Cloud Posse][logo]](https://cpco.io/homepage)
118

9+
<!--
1210
1311
1412
1513
1614
** DO NOT EDIT THIS FILE
17-
**
18-
** This file was automatically generated by the `build-harness`.
19-
** 1) Make all changes to `README.yaml`
15+
**
16+
** This file was automatically generated by the `build-harness`.
17+
** 1) Make all changes to `README.yaml`
2018
** 2) Run `make init` (you only need to do this once)
21-
** 3) Run`make readme` to rebuild this file.
19+
** 3) Run`make readme` to rebuild this file.
2220
**
2321
** (We maintain HUNDREDS of open source projects. This is how we maintain our sanity.)
2422
**
@@ -27,32 +25,14 @@
2725
2826
2927
30-
31-
32-
33-
34-
35-
36-
37-
38-
39-
40-
-->
41-
[![README Header][readme_header_img]][readme_header_link]
42-
43-
[![Cloud Posse][logo]](https://cpco.io/homepage)
44-
45-
# terraform-aws-elastic-beanstalk-environment
46-
47-
[![Latest Release](https://img.shields.io/github/release/cloudposse/terraform-aws-elastic-beanstalk-environment.svg)](https://github.com/cloudposse/terraform-aws-elastic-beanstalk-environment/releases/latest) [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
48-
28+
-->
4929

5030
Terraform module to provision AWS Elastic Beanstalk environment
5131

5232

5333
---
5434

55-
This project is part of our comprehensive ["SweetOps"](https://cpco.io/sweetops) approach towards DevOps.
35+
This project is part of our comprehensive ["SweetOps"](https://cpco.io/sweetops) approach towards DevOps.
5636
[<img align="right" title="Share via Email" src="https://docs.cloudposse.com/images/ionicons/ios-email-outline-2.0.1-16x16-999999.svg"/>][share_email]
5737
[<img align="right" title="Share on Google+" src="https://docs.cloudposse.com/images/ionicons/social-googleplus-outline-2.0.1-16x16-999999.svg" />][share_googleplus]
5838
[<img align="right" title="Share on Facebook" src="https://docs.cloudposse.com/images/ionicons/social-facebook-outline-2.0.1-16x16-999999.svg" />][share_facebook]
@@ -73,7 +53,7 @@ It's 100% Open Source and licensed under the [APACHE2](LICENSE).
7353

7454

7555

76-
We literally have [*hundreds of terraform modules*][terraform_modules] that are Open Source and well-maintained. Check them out!
56+
We literally have [*hundreds of terraform modules*][terraform_modules] that are Open Source and well-maintained. Check them out!
7757

7858

7959

@@ -183,8 +163,9 @@ For a complete example, see [examples/complete](examples/complete)
183163

184164

185165

166+
<!-- markdownlint-disable -->
186167
## Makefile Targets
187-
```
168+
```text
188169
Available targets:
189170
190171
help Help screen
@@ -193,6 +174,7 @@ Available targets:
193174
lint Lint terraform code
194175
195176
```
177+
<!-- markdownlint-restore -->
196178
## Requirements
197179

198180
| Name | Version |
@@ -257,6 +239,7 @@ Available targets:
257239
| instance\_type | Instances type | `string` | `"t2.micro"` | no |
258240
| keypair | Name of SSH key that will be deployed on Elastic Beanstalk and DataPipeline instance. The key should be present in AWS | `string` | `""` | no |
259241
| loadbalancer\_certificate\_arn | Load Balancer SSL certificate ARN. The certificate must be present in AWS Certificate Manager | `string` | `""` | no |
242+
| loadbalancer\_crosszone | Configure the classic load balancer to route traffic evenly across all instances in all Availability Zones rather than only within each zone. | `bool` | `true` | no |
260243
| loadbalancer\_managed\_security\_group | Load balancer managed security group | `string` | `""` | no |
261244
| loadbalancer\_security\_groups | Load balancer security groups | `list(string)` | `[]` | no |
262245
| loadbalancer\_ssl\_policy | Specify a security policy to apply to the listener. This option is only applicable to environments with an application load balancer | `string` | `""` | no |
@@ -315,9 +298,9 @@ Available targets:
315298

316299

317300

318-
## Share the Love
301+
## Share the Love
319302

320-
Like this project? Please give it a ★ on [our GitHub](https://github.com/cloudposse/terraform-aws-elastic-beanstalk-environment)! (it helps us **a lot**)
303+
Like this project? Please give it a ★ on [our GitHub](https://github.com/cloudposse/terraform-aws-elastic-beanstalk-environment)! (it helps us **a lot**)
321304

322305
Are you using this project or any of our other projects? Consider [leaving a testimonial][testimonial]. =)
323306

@@ -335,7 +318,7 @@ Check out these related projects.
335318

336319
## Help
337320

338-
**Got a question?** We got answers.
321+
**Got a question?** We got answers.
339322

340323
File a GitHub [issue](https://github.com/cloudposse/terraform-aws-elastic-beanstalk-environment/issues), send us an [email][email] or join our [Slack Community][slack].
341324

@@ -344,7 +327,7 @@ File a GitHub [issue](https://github.com/cloudposse/terraform-aws-elastic-beanst
344327
## DevOps Accelerator for Startups
345328

346329

347-
We are a [**DevOps Accelerator**][commercial_support]. We'll help you build your cloud infrastructure from the ground up so you can own it. Then we'll show you how to operate it and stick around for as long as you need us.
330+
We are a [**DevOps Accelerator**][commercial_support]. We'll help you build your cloud infrastructure from the ground up so you can own it. Then we'll show you how to operate it and stick around for as long as you need us.
348331

349332
[![Learn More](https://img.shields.io/badge/learn%20more-success.svg?style=for-the-badge)][commercial_support]
350333

@@ -373,11 +356,11 @@ Participate in our [Discourse Forums][discourse]. Here you'll find answers to co
373356

374357
## Newsletter
375358

376-
Sign up for [our newsletter][newsletter] that covers everything on our technology radar. Receive updates on what we're up to on GitHub as well as awesome new projects we discover.
359+
Sign up for [our newsletter][newsletter] that covers everything on our technology radar. Receive updates on what we're up to on GitHub as well as awesome new projects we discover.
377360

378361
## Office Hours
379362

380-
[Join us every Wednesday via Zoom][office_hours] for our weekly "Lunch & Learn" sessions. It's **FREE** for everyone!
363+
[Join us every Wednesday via Zoom][office_hours] for our weekly "Lunch & Learn" sessions. It's **FREE** for everyone!
381364

382365
[![zoom](https://img.cloudposse.com/fit-in/200x200/https://cloudposse.com/wp-content/uploads/2019/08/Powered-by-Zoom.png")][office_hours]
383366

@@ -408,28 +391,30 @@ Copyright © 2017-2020 [Cloud Posse, LLC](https://cpco.io/copyright)
408391

409392

410393

411-
## License
394+
## License
412395

413-
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
396+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
414397

415398
See [LICENSE](LICENSE) for full details.
416399

417-
Licensed to the Apache Software Foundation (ASF) under one
418-
or more contributor license agreements. See the NOTICE file
419-
distributed with this work for additional information
420-
regarding copyright ownership. The ASF licenses this file
421-
to you under the Apache License, Version 2.0 (the
422-
"License"); you may not use this file except in compliance
423-
with the License. You may obtain a copy of the License at
424-
425-
https://www.apache.org/licenses/LICENSE-2.0
426-
427-
Unless required by applicable law or agreed to in writing,
428-
software distributed under the License is distributed on an
429-
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
430-
KIND, either express or implied. See the License for the
431-
specific language governing permissions and limitations
432-
under the License.
400+
```text
401+
Licensed to the Apache Software Foundation (ASF) under one
402+
or more contributor license agreements. See the NOTICE file
403+
distributed with this work for additional information
404+
regarding copyright ownership. The ASF licenses this file
405+
to you under the Apache License, Version 2.0 (the
406+
"License"); you may not use this file except in compliance
407+
with the License. You may obtain a copy of the License at
408+
409+
https://www.apache.org/licenses/LICENSE-2.0
410+
411+
Unless required by applicable law or agreed to in writing,
412+
software distributed under the License is distributed on an
413+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
414+
KIND, either express or implied. See the License for the
415+
specific language governing permissions and limitations
416+
under the License.
417+
```
433418

434419

435420

@@ -451,7 +436,7 @@ This project is maintained and funded by [Cloud Posse, LLC][website]. Like it? P
451436

452437
We're a [DevOps Professional Services][hire] company based in Los Angeles, CA. We ❤️ [Open Source Software][we_love_open_source].
453438

454-
We offer [paid support][commercial_support] on all of our projects.
439+
We offer [paid support][commercial_support] on all of our projects.
455440

456441
Check out [our other projects][github], [follow us on twitter][twitter], [apply for a job][jobs], or [hire us][hire] to help with your cloud strategy and implementation.
457442

docs/targets.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
<!-- markdownlint-disable -->
12
## Makefile Targets
2-
```
3+
```text
34
Available targets:
45
56
help Help screen
@@ -8,3 +9,4 @@ Available targets:
89
lint Lint terraform code
910
1011
```
12+
<!-- markdownlint-restore -->

docs/terraform.md

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
| instance\_type | Instances type | `string` | `"t2.micro"` | no |
6363
| keypair | Name of SSH key that will be deployed on Elastic Beanstalk and DataPipeline instance. The key should be present in AWS | `string` | `""` | no |
6464
| loadbalancer\_certificate\_arn | Load Balancer SSL certificate ARN. The certificate must be present in AWS Certificate Manager | `string` | `""` | no |
65+
| loadbalancer\_crosszone | Configure the classic load balancer to route traffic evenly across all instances in all Availability Zones rather than only within each zone. | `bool` | `true` | no |
6566
| loadbalancer\_managed\_security\_group | Load balancer managed security group | `string` | `""` | no |
6667
| loadbalancer\_security\_groups | Load balancer security groups | `list(string)` | `[]` | no |
6768
| loadbalancer\_ssl\_policy | Specify a security policy to apply to the listener. This option is only applicable to environments with an application load balancer | `string` | `""` | no |

main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ locals {
333333
{
334334
namespace = "aws:elb:loadbalancer"
335335
name = "CrossZone"
336-
value = "true"
336+
value = var.loadbalancer_crosszone
337337
},
338338
{
339339
namespace = "aws:elb:loadbalancer"

variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ variable "loadbalancer_type" {
6767
description = "Load Balancer type, e.g. 'application' or 'classic'"
6868
}
6969

70+
variable "loadbalancer_crosszone" {
71+
type = bool
72+
default = true
73+
description = "Configure the classic load balancer to route traffic evenly across all instances in all Availability Zones rather than only within each zone."
74+
}
75+
7076
variable "dns_zone_id" {
7177
type = string
7278
default = ""

0 commit comments

Comments
 (0)