|
| 1 | +variable "region" { |
| 2 | + type = string |
| 3 | + description = "AWS region" |
| 4 | +} |
| 5 | + |
| 6 | +variable "availability_zones" { |
| 7 | + type = list(string) |
| 8 | +} |
| 9 | + |
| 10 | +variable "namespace" { |
| 11 | + type = string |
| 12 | + description = "Namespace (e.g. `eg` or `cp`)" |
| 13 | +} |
| 14 | + |
| 15 | +variable "stage" { |
| 16 | + type = string |
| 17 | + description = "Stage (e.g. `prod`, `dev`, `staging`, `infra`)" |
| 18 | +} |
| 19 | + |
| 20 | +variable "name" { |
| 21 | + type = string |
| 22 | + description = "Name (e.g. `app` or `cluster`)" |
| 23 | +} |
| 24 | + |
| 25 | +variable "database_name" { |
| 26 | + type = string |
| 27 | + description = "The name of the database to create when the DB instance is created" |
| 28 | +} |
| 29 | + |
| 30 | +variable "database_user" { |
| 31 | + type = string |
| 32 | + description = "Username for the master DB user" |
| 33 | +} |
| 34 | + |
| 35 | +variable "database_password" { |
| 36 | + type = string |
| 37 | + description = "Password for the master DB user" |
| 38 | +} |
| 39 | + |
| 40 | +variable "database_port" { |
| 41 | + type = number |
| 42 | + description = "Database port (_e.g._ `3306` for `MySQL`). Used in the DB Security Group to allow access to the DB instance from the provided `security_group_ids`" |
| 43 | +} |
| 44 | + |
| 45 | +variable "deletion_protection" { |
| 46 | + type = bool |
| 47 | + description = "Set to true to enable deletion protection on the RDS instance" |
| 48 | +} |
| 49 | + |
| 50 | +variable "multi_az" { |
| 51 | + type = bool |
| 52 | + description = "Set to true if multi AZ deployment must be supported" |
| 53 | +} |
| 54 | + |
| 55 | +variable "storage_type" { |
| 56 | + type = string |
| 57 | + description = "One of 'standard' (magnetic), 'gp2' (general purpose SSD), or 'io1' (provisioned IOPS SSD)" |
| 58 | +} |
| 59 | + |
| 60 | +variable "storage_encrypted" { |
| 61 | + type = bool |
| 62 | + description = "(Optional) Specifies whether the DB instance is encrypted. The default is false if not specified" |
| 63 | +} |
| 64 | + |
| 65 | +variable "allocated_storage" { |
| 66 | + type = number |
| 67 | + description = "The allocated storage in GBs" |
| 68 | +} |
| 69 | + |
| 70 | +variable "engine" { |
| 71 | + type = string |
| 72 | + description = "Database engine type" |
| 73 | + # http://docs.aws.amazon.com/cli/latest/reference/rds/create-db-instance.html |
| 74 | + # - mysql |
| 75 | + # - postgres |
| 76 | + # - oracle-* |
| 77 | + # - sqlserver-* |
| 78 | +} |
| 79 | + |
| 80 | +variable "engine_version" { |
| 81 | + type = string |
| 82 | + description = "Database engine version, depends on engine type" |
| 83 | + # http://docs.aws.amazon.com/cli/latest/reference/rds/create-db-instance.html |
| 84 | +} |
| 85 | + |
| 86 | +variable "major_engine_version" { |
| 87 | + type = string |
| 88 | + description = "Database MAJOR engine version, depends on engine type" |
| 89 | + # https://docs.aws.amazon.com/cli/latest/reference/rds/create-option-group.html |
| 90 | +} |
| 91 | + |
| 92 | +variable "instance_class" { |
| 93 | + type = string |
| 94 | + description = "Class of RDS instance" |
| 95 | + # https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html |
| 96 | +} |
| 97 | + |
| 98 | +variable "db_parameter_group" { |
| 99 | + type = string |
| 100 | + description = "Parameter group, depends on DB engine used" |
| 101 | + # "mysql5.6" |
| 102 | + # "postgres9.5" |
| 103 | +} |
| 104 | + |
| 105 | +variable "publicly_accessible" { |
| 106 | + type = bool |
| 107 | + description = "Determines if database can be publicly available (NOT recommended)" |
| 108 | +} |
| 109 | + |
| 110 | +variable "apply_immediately" { |
| 111 | + type = bool |
| 112 | + description = "Specifies whether any database modifications are applied immediately, or during the next maintenance window" |
| 113 | +} |
| 114 | + |
| 115 | +variable "subnet_ids" { |
| 116 | + description = "A list of VPC subnet IDs" |
| 117 | + default = [] |
| 118 | + type = list(string) |
| 119 | +} |
| 120 | + |
| 121 | +variable "security_group_ids" { |
| 122 | + description = "List of VPC security groups to associate" |
| 123 | + default = [] |
| 124 | + type = list(string) |
| 125 | +} |
| 126 | + |
| 127 | +variable "vpc_id" { |
| 128 | + type = string |
| 129 | + default = "" |
| 130 | + description = "VPC ID the DB instance will be created in" |
| 131 | +} |
| 132 | + |
0 commit comments