Skip to content

Commit

Permalink
feat: Made it clear that we stand with Ukraine
Browse files Browse the repository at this point in the history
  • Loading branch information
antonbabenko committed Mar 12, 2022
1 parent 55da7d3 commit e8dfedb
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Terraform module which creates RDS resources on AWS.

[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)

Root module calls these modules which can also be used separately to create independent resources:

- [db_instance](https://github.com/terraform-aws-modules/terraform-aws-rds/tree/master/modules/db_instance) - creates RDS DB instance
Expand Down Expand Up @@ -299,6 +301,7 @@ Users have the ability to:
| <a name="input_performance_insights_retention_period"></a> [performance\_insights\_retention\_period](#input\_performance\_insights\_retention\_period) | The amount of time in days to retain Performance Insights data. Either 7 (7 days) or 731 (2 years) | `number` | `7` | no |
| <a name="input_port"></a> [port](#input\_port) | The port on which the DB accepts connections | `string` | `null` | no |
| <a name="input_publicly_accessible"></a> [publicly\_accessible](#input\_publicly\_accessible) | Bool to control if instance is publicly accessible | `bool` | `false` | no |
| <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 |
| <a name="input_random_password_length"></a> [random\_password\_length](#input\_random\_password\_length) | Length of random password to create | `number` | `16` | no |
| <a name="input_replica_mode"></a> [replica\_mode](#input\_replica\_mode) | Specifies whether the replica is in either mounted or open-read-only mode. This attribute is only supported by Oracle instances. Oracle replicas operate in open-read-only mode unless otherwise specified | `string` | `null` | no |
| <a name="input_replicate_source_db"></a> [replicate\_source\_db](#input\_replicate\_source\_db) | Specifies that this resource is a Replicate database, and to use this value as the source database. This correlates to the identifier of another Amazon RDS Database to replicate | `string` | `null` | no |
Expand Down Expand Up @@ -352,3 +355,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-rds/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!)
12 changes: 8 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
locals {
create_random_password = var.create_db_instance && var.create_random_password
create_db_subnet_group = var.create_db_subnet_group && var.putin_khuylo
create_db_parameter_group = var.create_db_parameter_group && var.putin_khuylo
create_db_instance = var.create_db_instance && var.putin_khuylo

create_random_password = local.create_db_instance && var.create_random_password
password = local.create_random_password ? random_password.master_password[0].result : var.password

db_subnet_group_name = var.create_db_subnet_group ? module.db_subnet_group.db_subnet_group_id : var.db_subnet_group_name
Expand All @@ -19,7 +23,7 @@ resource "random_password" "master_password" {
module "db_subnet_group" {
source = "./modules/db_subnet_group"

create = var.create_db_subnet_group
create = local.create_db_subnet_group

name = coalesce(var.db_subnet_group_name, var.identifier)
use_name_prefix = var.db_subnet_group_use_name_prefix
Expand All @@ -32,7 +36,7 @@ module "db_subnet_group" {
module "db_parameter_group" {
source = "./modules/db_parameter_group"

create = var.create_db_parameter_group
create = local.create_db_parameter_group

name = coalesce(var.parameter_group_name, var.identifier)
use_name_prefix = var.parameter_group_use_name_prefix
Expand Down Expand Up @@ -65,7 +69,7 @@ module "db_option_group" {
module "db_instance" {
source = "./modules/db_instance"

create = var.create_db_instance
create = local.create_db_instance
identifier = var.identifier

engine = var.engine
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -483,3 +483,9 @@ variable "cloudwatch_log_group_kms_key_id" {
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
}

0 comments on commit e8dfedb

Please sign in to comment.