Skip to content

Commit c7f9729

Browse files
CGreenPayTMaknysh
authored andcommitted
Allow setting elb_scheme for choosing internal or public LB (#72)
* elb_scheme = "internal" or "public" * terraform fmt * default ELBScheme to "" Co-Authored-By: CGreenPayTM <42248651+CGreenPayTM@users.noreply.github.com> * Description for ELBScheme Co-Authored-By: CGreenPayTM <42248651+CGreenPayTM@users.noreply.github.com> * remake docs * default elb_scheme to public * docs * contrib
1 parent 2163301 commit c7f9729

File tree

5 files changed

+18
-2
lines changed

5 files changed

+18
-2
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ Available targets:
8383
| config_source | S3 source for config | string | `` | no |
8484
| delimiter | Delimiter to be used between `name`, `namespace`, `stage`, etc. | string | `-` | no |
8585
| description | Short description of the Environment | string | `` | no |
86+
| elb_scheme | Specify `internal` if you want to create an internal load balancer in your Amazon VPC so that your Elastic Beanstalk application cannot be accessed from outside your Amazon VPC | string | `public` | no |
8687
| enable_log_publication_control | Copy the log files for your application's Amazon EC2 instances to the Amazon S3 bucket associated with your application. | string | `false` | no |
8788
| enable_managed_actions | Enable managed platform updates. When you set this to true, you must also specify a `PreferredStartTime` and `UpdateLevel` | string | `true` | no |
8889
| enable_stream_logs | Whether to create groups in CloudWatch Logs for proxy and deployment logs, and stream logs from each instance in your environment. | string | `false` | no |
@@ -298,8 +299,8 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply
298299

299300
### Contributors
300301

301-
| [![Erik Osterman][osterman_avatar]][osterman_homepage]<br/>[Erik Osterman][osterman_homepage] | [![Igor Rodionov][goruha_avatar]][goruha_homepage]<br/>[Igor Rodionov][goruha_homepage] | [![Andriy Knysh][aknysh_avatar]][aknysh_homepage]<br/>[Andriy Knysh][aknysh_homepage] | [![Guillaume Delacour][guikcd_avatar]][guikcd_homepage]<br/>[Guillaume Delacour][guikcd_homepage] | [![Viktor Erpylev][velmoga_avatar]][velmoga_homepage]<br/>[Viktor Erpylev][velmoga_homepage] | [![Lucas Pearson][pearson-lucas-dev_avatar]][pearson-lucas-dev_homepage]<br/>[Lucas Pearson][pearson-lucas-dev_homepage] |
302-
|---|---|---|---|---|---|
302+
| [![Erik Osterman][osterman_avatar]][osterman_homepage]<br/>[Erik Osterman][osterman_homepage] | [![Igor Rodionov][goruha_avatar]][goruha_homepage]<br/>[Igor Rodionov][goruha_homepage] | [![Andriy Knysh][aknysh_avatar]][aknysh_homepage]<br/>[Andriy Knysh][aknysh_homepage] | [![Guillaume Delacour][guikcd_avatar]][guikcd_homepage]<br/>[Guillaume Delacour][guikcd_homepage] | [![Viktor Erpylev][velmoga_avatar]][velmoga_homepage]<br/>[Viktor Erpylev][velmoga_homepage] | [![Lucas Pearson][pearson-lucas-dev_avatar]][pearson-lucas-dev_homepage]<br/>[Lucas Pearson][pearson-lucas-dev_homepage] | [![Chris Green][DirectRoot_avatar]][DirectRoot_homepage]<br/>[Chris Green][DirectRoot_homepage] |
303+
|---|---|---|---|---|---|---|
303304

304305
[osterman_homepage]: https://github.com/osterman
305306
[osterman_avatar]: https://github.com/osterman.png?size=150
@@ -313,6 +314,8 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply
313314
[velmoga_avatar]: https://github.com/velmoga.png?size=150
314315
[pearson-lucas-dev_homepage]: https://github.com/pearson-lucas-dev
315316
[pearson-lucas-dev_avatar]: https://github.com/pearson-lucas-dev.png?size=150
317+
[DirectRoot_homepage]: https://github.com/DirectRoot
318+
[DirectRoot_avatar]: https://github.com/DirectRoot.png?size=150
316319

317320

318321

README.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,5 @@ contributors:
8181
github: "velmoga"
8282
- name: "Lucas Pearson"
8383
github: "pearson-lucas-dev"
84+
- name: "Chris Green"
85+
github: "DirectRoot"

docs/terraform.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
| config_source | S3 source for config | string | `` | no |
2121
| delimiter | Delimiter to be used between `name`, `namespace`, `stage`, etc. | string | `-` | no |
2222
| description | Short description of the Environment | string | `` | no |
23+
| elb_scheme | Specify `internal` if you want to create an internal load balancer in your Amazon VPC so that your Elastic Beanstalk application cannot be accessed from outside your Amazon VPC | string | `public` | no |
2324
| enable_log_publication_control | Copy the log files for your application's Amazon EC2 instances to the Amazon S3 bucket associated with your application. | string | `false` | no |
2425
| enable_managed_actions | Enable managed platform updates. When you set this to true, you must also specify a `PreferredStartTime` and `UpdateLevel` | string | `true` | no |
2526
| enable_stream_logs | Whether to create groups in CloudWatch Logs for proxy and deployment logs, and stream logs from each instance in your environment. | string | `false` | no |

main.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,11 @@ resource "aws_elastic_beanstalk_environment" "default" {
543543
name = "ManagedSecurityGroup"
544544
value = "${var.loadbalancer_managed_security_group}"
545545
}
546+
setting {
547+
namespace = "aws:ec2:vpc"
548+
name = "ELBScheme"
549+
value = "${var.environment_type == "LoadBalanced" ? var.elb_scheme : ""}"
550+
}
546551
setting {
547552
namespace = "aws:elb:listener"
548553
name = "ListenerProtocol"

variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,3 +371,8 @@ variable "force_destroy" {
371371
default = false
372372
description = "Destroy S3 bucket for load balancer logs"
373373
}
374+
375+
variable "elb_scheme" {
376+
default = "public"
377+
description = "Specify `internal` if you want to create an internal load balancer in your Amazon VPC so that your Elastic Beanstalk application cannot be accessed from outside your Amazon VPC"
378+
}

0 commit comments

Comments
 (0)