diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 093121e0..8a010fdd 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/antonbabenko/pre-commit-terraform
- rev: v1.62.3
+ rev: v1.64.0
hooks:
- id: terraform_fmt
- id: terraform_validate
diff --git a/README.md b/README.md
index 7a61c6e0..0ae475fc 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,8 @@
Terraform module which creates an EC2 instance on AWS.
+[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)
+
## Usage
### Single EC2 Instance
@@ -214,6 +216,7 @@ No modules.
| [network\_interface](#input\_network\_interface) | Customize network interfaces to be attached at instance boot time | `list(map(string))` | `[]` | no |
| [placement\_group](#input\_placement\_group) | The Placement Group to start the instance in | `string` | `null` | no |
| [private\_ip](#input\_private\_ip) | Private IP address to associate with the instance in a VPC | `string` | `null` | no |
+| [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 |
| [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 |
| [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 |
| [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
## License
Apache 2 Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-aws-ec2-instance/tree/master/LICENSE) for full details.
+
+## Additional terms of use for users from Russia and Belarus
+
+By using the code provided in this repository you agree with the following:
+* 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).
+* 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.
+* [Putin khuylo!](https://en.wikipedia.org/wiki/Putin_khuylo!)
diff --git a/main.tf b/main.tf
index 6d8a82e8..e1029dd4 100644
--- a/main.tf
+++ b/main.tf
@@ -1,9 +1,11 @@
locals {
+ create = var.create && var.putin_khuylo
+
is_t_instance_type = replace(var.instance_type, "/^t(2|3|3a){1}\\..*$/", "1") == "1" ? true : false
}
resource "aws_instance" "this" {
- count = var.create && !var.create_spot_instance ? 1 : 0
+ count = local.create && !var.create_spot_instance ? 1 : 0
ami = var.ami
instance_type = var.instance_type
@@ -136,7 +138,7 @@ resource "aws_instance" "this" {
}
resource "aws_spot_instance_request" "this" {
- count = var.create && var.create_spot_instance ? 1 : 0
+ count = local.create && var.create_spot_instance ? 1 : 0
ami = var.ami
instance_type = var.instance_type
diff --git a/variables.tf b/variables.tf
index 65a38baa..00d82fb8 100644
--- a/variables.tf
+++ b/variables.tf
@@ -298,3 +298,9 @@ variable "spot_valid_from" {
type = string
default = null
}
+
+variable "putin_khuylo" {
+ description = "Do you agree that Putin doesn't respect Ukrainian sovereignty and territorial integrity? More info: https://en.wikipedia.org/wiki/Putin_khuylo!"
+ type = bool
+ default = true
+}