Skip to content

Commit 34ba506

Browse files
committed
feat: Made it clear that we stand with Ukraine
1 parent cc6fa57 commit 34ba506

File tree

3 files changed

+28
-8
lines changed

3 files changed

+28
-8
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Terraform module which creates Application and Network Load Balancer resources on AWS.
44

5+
[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)
6+
57
## Usage
68

79
### Application Load Balancer
@@ -350,6 +352,7 @@ No modules.
350352
| <a name="input_load_balancer_update_timeout"></a> [load\_balancer\_update\_timeout](#input\_load\_balancer\_update\_timeout) | Timeout value when updating the ALB. | `string` | `"10m"` | no |
351353
| <a name="input_name"></a> [name](#input\_name) | The resource name and Name tag of the load balancer. | `string` | `null` | no |
352354
| <a name="input_name_prefix"></a> [name\_prefix](#input\_name\_prefix) | The resource name prefix and Name tag of the load balancer. Cannot be longer than 6 characters | `string` | `null` | no |
355+
| <a name="input_putin_khuylo"></a> [putin\_khuylo](#input\_putin\_khuylo) | Do you agree that Putin doesn't respect Ukrainian sovereignty and territorial integrity? More info: https://en.wikipedia.org/wiki/Putin_khuylo! | `bool` | `true` | no |
353356
| <a name="input_security_groups"></a> [security\_groups](#input\_security\_groups) | The security groups to attach to the load balancer. e.g. ["sg-edcd9784","sg-edcd9785"] | `list(string)` | `[]` | no |
354357
| <a name="input_subnet_mapping"></a> [subnet\_mapping](#input\_subnet\_mapping) | A list of subnet mapping blocks describing subnets to attach to network load balancer | `list(map(string))` | `[]` | no |
355358
| <a name="input_subnets"></a> [subnets](#input\_subnets) | A list of subnets to associate with the load balancer. e.g. ['subnet-1a2b3c4d','subnet-1a2b3c4e','subnet-1a2b3c4f'] | `list(string)` | `null` | no |
@@ -384,3 +387,10 @@ Module is maintained by [Anton Babenko](https://github.com/antonbabenko) with he
384387
## License
385388

386389
Apache 2 Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-aws-alb/tree/master/LICENSE) for full details.
390+
391+
## Additional terms of use for users from Russia and Belarus
392+
393+
By using the code provided in this repository you agree with the following:
394+
* Russia has [illegally annexed Crimea in 2014](https://en.wikipedia.org/wiki/Annexation_of_Crimea_by_the_Russian_Federation) and [brought the war in Donbas](https://en.wikipedia.org/wiki/War_in_Donbas) followed by [full-scale invasion of Ukraine in 2022](https://en.wikipedia.org/wiki/2022_Russian_invasion_of_Ukraine).
395+
* Russia has brought sorrow and devastations to millions of Ukrainians, killed hundreds of innocent people, damaged thousands of buildings, and forced several million people to flee.
396+
* [Putin khuylo!](https://en.wikipedia.org/wiki/Putin_khuylo!)

main.tf

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
locals {
2+
create_lb = var.create_lb && var.putin_khuylo
3+
}
4+
15
resource "aws_lb" "this" {
2-
count = var.create_lb ? 1 : 0
6+
count = local.create_lb ? 1 : 0
37

48
name = var.name
59
name_prefix = var.name_prefix
@@ -56,7 +60,7 @@ resource "aws_lb" "this" {
5660
}
5761

5862
resource "aws_lb_target_group" "main" {
59-
count = var.create_lb ? length(var.target_groups) : 0
63+
count = local.create_lb ? length(var.target_groups) : 0
6064

6165
name = lookup(var.target_groups[count.index], "name", null)
6266
name_prefix = lookup(var.target_groups[count.index], "name_prefix", null)
@@ -132,7 +136,7 @@ locals {
132136
}
133137

134138
resource "aws_lb_target_group_attachment" "this" {
135-
for_each = var.create_lb && local.target_group_attachments != null ? local.target_group_attachments : {}
139+
for_each = local.create_lb && local.target_group_attachments != null ? local.target_group_attachments : {}
136140

137141
target_group_arn = aws_lb_target_group.main[each.value.tg_index].arn
138142
target_id = each.value.target_id
@@ -141,7 +145,7 @@ resource "aws_lb_target_group_attachment" "this" {
141145
}
142146

143147
resource "aws_lb_listener_rule" "https_listener_rule" {
144-
count = var.create_lb ? length(var.https_listener_rules) : 0
148+
count = local.create_lb ? length(var.https_listener_rules) : 0
145149

146150
listener_arn = aws_lb_listener.frontend_https[lookup(var.https_listener_rules[count.index], "https_listener_index", count.index)].arn
147151
priority = lookup(var.https_listener_rules[count.index], "priority", null)
@@ -388,7 +392,7 @@ resource "aws_lb_listener_rule" "https_listener_rule" {
388392
}
389393

390394
resource "aws_lb_listener_rule" "http_tcp_listener_rule" {
391-
count = var.create_lb ? length(var.http_tcp_listener_rules) : 0
395+
count = local.create_lb ? length(var.http_tcp_listener_rules) : 0
392396

393397
listener_arn = aws_lb_listener.frontend_http_tcp[lookup(var.http_tcp_listener_rules[count.index], "http_tcp_listener_index", count.index)].arn
394398
priority = lookup(var.http_tcp_listener_rules[count.index], "priority", null)
@@ -554,7 +558,7 @@ resource "aws_lb_listener_rule" "http_tcp_listener_rule" {
554558
}
555559

556560
resource "aws_lb_listener" "frontend_http_tcp" {
557-
count = var.create_lb ? length(var.http_tcp_listeners) : 0
561+
count = local.create_lb ? length(var.http_tcp_listeners) : 0
558562

559563
load_balancer_arn = aws_lb.this[0].arn
560564

@@ -602,7 +606,7 @@ resource "aws_lb_listener" "frontend_http_tcp" {
602606
}
603607

604608
resource "aws_lb_listener" "frontend_https" {
605-
count = var.create_lb ? length(var.https_listeners) : 0
609+
count = local.create_lb ? length(var.https_listeners) : 0
606610

607611
load_balancer_arn = aws_lb.this[0].arn
608612

@@ -697,7 +701,7 @@ resource "aws_lb_listener" "frontend_https" {
697701
}
698702

699703
resource "aws_lb_listener_certificate" "https_listener" {
700-
count = var.create_lb ? length(var.extra_ssl_certs) : 0
704+
count = local.create_lb ? length(var.extra_ssl_certs) : 0
701705

702706
listener_arn = aws_lb_listener.frontend_https[var.extra_ssl_certs[count.index]["https_listener_index"]].arn
703707
certificate_arn = var.extra_ssl_certs[count.index]["certificate_arn"]

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,3 +207,9 @@ variable "desync_mitigation_mode" {
207207
type = string
208208
default = "defensive"
209209
}
210+
211+
variable "putin_khuylo" {
212+
description = "Do you agree that Putin doesn't respect Ukrainian sovereignty and territorial integrity? More info: https://en.wikipedia.org/wiki/Putin_khuylo!"
213+
type = bool
214+
default = true
215+
}

0 commit comments

Comments
 (0)