Skip to content

Commit fad350d

Browse files
committed
feat: Made it clear that we stand with Ukraine
1 parent 6fe818d commit fad350d

File tree

3 files changed

+29
-9
lines changed

3 files changed

+29
-9
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 AWS EKS (Kubernetes) resources
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
## Available Features
68

79
- AWS EKS Cluster
@@ -905,6 +907,7 @@ Full contributing [guidelines are covered here](https://github.com/terraform-aws
905907
| <a name="input_node_security_group_use_name_prefix"></a> [node\_security\_group\_use\_name\_prefix](#input\_node\_security\_group\_use\_name\_prefix) | Determines whether node security group name (`node_security_group_name`) is used as a prefix | `string` | `true` | no |
906908
| <a name="input_openid_connect_audiences"></a> [openid\_connect\_audiences](#input\_openid\_connect\_audiences) | List of OpenID Connect audience client IDs to add to the IRSA provider | `list(string)` | `[]` | no |
907909
| <a name="input_prefix_separator"></a> [prefix\_separator](#input\_prefix\_separator) | The separator to use between the prefix and the generated timestamp for resource names | `string` | `"-"` | no |
910+
| <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 |
908911
| <a name="input_self_managed_node_group_defaults"></a> [self\_managed\_node\_group\_defaults](#input\_self\_managed\_node\_group\_defaults) | Map of self-managed node group default configurations | `any` | `{}` | no |
909912
| <a name="input_self_managed_node_groups"></a> [self\_managed\_node\_groups](#input\_self\_managed\_node\_groups) | Map of self-managed node group definitions to create | `any` | `{}` | no |
910913
| <a name="input_subnet_ids"></a> [subnet\_ids](#input\_subnet\_ids) | A list of subnet IDs where the EKS cluster (ENIs) will be provisioned along with the nodes/node groups. Node groups can be deployed within a different set of subnet IDs from within the node group configuration | `list(string)` | `[]` | no |
@@ -945,3 +948,10 @@ Full contributing [guidelines are covered here](https://github.com/terraform-aws
945948
## License
946949

947950
Apache 2 Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-aws-rds-aurora/tree/master/LICENSE) for full details.
951+
952+
## Additional terms of use for users from Russia and Belarus
953+
954+
By using the code provided in this repository you agree with the following:
955+
* 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).
956+
* 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.
957+
* [Putin khuylo!](https://en.wikipedia.org/wiki/Putin_khuylo!)

main.tf

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
data "aws_partition" "current" {}
22

3+
locals {
4+
create = var.create && var.putin_khuylo
5+
}
6+
37
################################################################################
48
# Cluster
59
################################################################################
610

711
resource "aws_eks_cluster" "this" {
8-
count = var.create ? 1 : 0
12+
count = local.create ? 1 : 0
913

1014
name = var.cluster_name
1115
role_arn = try(aws_iam_role.this[0].arn, var.iam_role_arn)
@@ -56,7 +60,7 @@ resource "aws_eks_cluster" "this" {
5660
}
5761

5862
resource "aws_cloudwatch_log_group" "this" {
59-
count = var.create && var.create_cloudwatch_log_group ? 1 : 0
63+
count = local.create && var.create_cloudwatch_log_group ? 1 : 0
6064

6165
name = "/aws/eks/${var.cluster_name}/cluster"
6266
retention_in_days = var.cloudwatch_log_group_retention_in_days
@@ -72,7 +76,7 @@ resource "aws_cloudwatch_log_group" "this" {
7276

7377
locals {
7478
cluster_sg_name = coalesce(var.cluster_security_group_name, "${var.cluster_name}-cluster")
75-
create_cluster_sg = var.create && var.create_cluster_security_group
79+
create_cluster_sg = local.create && var.create_cluster_security_group
7680

7781
cluster_security_group_id = local.create_cluster_sg ? aws_security_group.cluster[0].id : var.cluster_security_group_id
7882

@@ -147,13 +151,13 @@ resource "aws_security_group_rule" "cluster" {
147151
################################################################################
148152

149153
data "tls_certificate" "this" {
150-
count = var.create && var.enable_irsa ? 1 : 0
154+
count = local.create && var.enable_irsa ? 1 : 0
151155

152156
url = aws_eks_cluster.this[0].identity[0].oidc[0].issuer
153157
}
154158

155159
resource "aws_iam_openid_connect_provider" "oidc_provider" {
156-
count = var.create && var.enable_irsa ? 1 : 0
160+
count = local.create && var.enable_irsa ? 1 : 0
157161

158162
client_id_list = distinct(compact(concat(["sts.${data.aws_partition.current.dns_suffix}"], var.openid_connect_audiences)))
159163
thumbprint_list = concat([data.tls_certificate.this[0].certificates[0].sha1_fingerprint], var.custom_oidc_thumbprints)
@@ -170,7 +174,7 @@ resource "aws_iam_openid_connect_provider" "oidc_provider" {
170174
################################################################################
171175

172176
locals {
173-
create_iam_role = var.create && var.create_iam_role
177+
create_iam_role = local.create && var.create_iam_role
174178
iam_role_name = coalesce(var.iam_role_name, "${var.cluster_name}-cluster")
175179
policy_arn_prefix = "arn:${data.aws_partition.current.partition}:iam::aws:policy"
176180

@@ -182,7 +186,7 @@ locals {
182186
}
183187

184188
data "aws_iam_policy_document" "assume_role_policy" {
185-
count = var.create && var.create_iam_role ? 1 : 0
189+
count = local.create && var.create_iam_role ? 1 : 0
186190

187191
statement {
188192
sid = "EKSClusterAssumeRole"
@@ -261,7 +265,7 @@ resource "aws_iam_policy" "cluster_encryption" {
261265
################################################################################
262266

263267
resource "aws_eks_addon" "this" {
264-
for_each = { for k, v in var.cluster_addons : k => v if var.create }
268+
for_each = { for k, v in var.cluster_addons : k => v if local.create }
265269

266270
cluster_name = aws_eks_cluster.this[0].name
267271
addon_name = try(each.value.name, each.key)
@@ -291,7 +295,7 @@ resource "aws_eks_addon" "this" {
291295
################################################################################
292296

293297
resource "aws_eks_identity_provider_config" "this" {
294-
for_each = { for k, v in var.cluster_identity_providers : k => v if var.create }
298+
for_each = { for k, v in var.cluster_identity_providers : k => v if local.create }
295299

296300
cluster_name = aws_eks_cluster.this[0].name
297301

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,3 +422,9 @@ variable "eks_managed_node_group_defaults" {
422422
type = any
423423
default = {}
424424
}
425+
426+
variable "putin_khuylo" {
427+
description = "Do you agree that Putin doesn't respect Ukrainian sovereignty and territorial integrity? More info: https://en.wikipedia.org/wiki/Putin_khuylo!"
428+
type = bool
429+
default = true
430+
}

0 commit comments

Comments
 (0)