Skip to content

Commit 6867788

Browse files
committed
feat: Made it clear that we stand with Ukraine
1 parent ab731d1 commit 6867788

File tree

4 files changed

+21
-3
lines changed

4 files changed

+21
-3
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.62.3
3+
rev: v1.64.0
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_validate

README.md

+10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Terraform module which creates an EC2 instance 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
### Single EC2 Instance
@@ -214,6 +216,7 @@ No modules.
214216
| <a name="input_network_interface"></a> [network\_interface](#input\_network\_interface) | Customize network interfaces to be attached at instance boot time | `list(map(string))` | `[]` | no |
215217
| <a name="input_placement_group"></a> [placement\_group](#input\_placement\_group) | The Placement Group to start the instance in | `string` | `null` | no |
216218
| <a name="input_private_ip"></a> [private\_ip](#input\_private\_ip) | Private IP address to associate with the instance in a VPC | `string` | `null` | no |
219+
| <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 |
217220
| <a name="input_root_block_device"></a> [root\_block\_device](#input\_root\_block\_device) | Customize details about the root block device of the instance. See Block Devices below for details | `list(any)` | `[]` | no |
218221
| <a name="input_secondary_private_ips"></a> [secondary\_private\_ips](#input\_secondary\_private\_ips) | A list of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e. referenced in a `network_interface block` | `list(string)` | `null` | no |
219222
| <a name="input_source_dest_check"></a> [source\_dest\_check](#input\_source\_dest\_check) | Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. | `bool` | `true` | no |
@@ -263,3 +266,10 @@ Module is maintained by [Anton Babenko](https://github.com/antonbabenko) with he
263266
## License
264267

265268
Apache 2 Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-aws-ec2-instance/tree/master/LICENSE) for full details.
269+
270+
## Additional terms of use for users from Russia and Belarus
271+
272+
By using the code provided in this repository you agree with the following:
273+
* 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).
274+
* 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.
275+
* [Putin khuylo!](https://en.wikipedia.org/wiki/Putin_khuylo!)

main.tf

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
locals {
2+
create = var.create && var.putin_khuylo
3+
24
is_t_instance_type = replace(var.instance_type, "/^t(2|3|3a){1}\\..*$/", "1") == "1" ? true : false
35
}
46

57
resource "aws_instance" "this" {
6-
count = var.create && !var.create_spot_instance ? 1 : 0
8+
count = local.create && !var.create_spot_instance ? 1 : 0
79

810
ami = var.ami
911
instance_type = var.instance_type
@@ -136,7 +138,7 @@ resource "aws_instance" "this" {
136138
}
137139

138140
resource "aws_spot_instance_request" "this" {
139-
count = var.create && var.create_spot_instance ? 1 : 0
141+
count = local.create && var.create_spot_instance ? 1 : 0
140142

141143
ami = var.ami
142144
instance_type = var.instance_type

variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -298,3 +298,9 @@ variable "spot_valid_from" {
298298
type = string
299299
default = null
300300
}
301+
302+
variable "putin_khuylo" {
303+
description = "Do you agree that Putin doesn't respect Ukrainian sovereignty and territorial integrity? More info: https://en.wikipedia.org/wiki/Putin_khuylo!"
304+
type = bool
305+
default = true
306+
}

0 commit comments

Comments
 (0)