Commit a96ca100 authored by Bryant Biggs's avatar Bryant Biggs Committed by GitHub

chore: remove default values and replace with null to use upstream default settings (#315)

parent 47f00d88
......@@ -242,11 +242,11 @@ No resources.
| allow\_major\_version\_upgrade | Indicates that major version upgrades are allowed. Changing this parameter does not result in an outage and the change is asynchronously applied as soon as possible | `bool` | `false` | no |
| apply\_immediately | Specifies whether any database modifications are applied immediately, or during the next maintenance window | `bool` | `false` | no |
| auto\_minor\_version\_upgrade | Indicates that minor engine upgrades will be applied automatically to the DB instance during the maintenance window | `bool` | `true` | no |
| availability\_zone | The Availability Zone of the RDS instance | `string` | `""` | no |
| availability\_zone | The Availability Zone of the RDS instance | `string` | `null` | no |
| backup\_retention\_period | The days to retain backups for | `number` | `null` | no |
| backup\_window | The daily time range (in UTC) during which automated backups are created if they are enabled. Example: '09:46-10:16'. Must not overlap with maintenance\_window | `string` | n/a | yes |
| ca\_cert\_identifier | Specifies the identifier of the CA certificate for the DB instance | `string` | `"rds-ca-2019"` | no |
| character\_set\_name | (Optional) The character set name to use for DB encoding in Oracle instances. This can't be changed. See Oracle Character Sets Supported in Amazon RDS and Collations and Character Sets for Microsoft SQL Server for more information. This can only be set on creation. | `string` | `""` | no |
| ca\_cert\_identifier | Specifies the identifier of the CA certificate for the DB instance | `string` | `null` | no |
| character\_set\_name | (Optional) The character set name to use for DB encoding in Oracle instances. This can't be changed. See Oracle Character Sets Supported in Amazon RDS and Collations and Character Sets for Microsoft SQL Server for more information. This can only be set on creation. | `string` | `null` | no |
| copy\_tags\_to\_snapshot | On delete, copy all Instance tags to the final snapshot (if final\_snapshot\_identifier is specified) | `bool` | `false` | no |
| create\_db\_instance | Whether to create a database instance | `bool` | `true` | no |
| create\_db\_option\_group | (Optional) Create a database option group | `bool` | `true` | no |
......@@ -254,12 +254,12 @@ No resources.
| create\_db\_subnet\_group | Whether to create a database subnet group | `bool` | `true` | no |
| create\_monitoring\_role | Create IAM role with a defined name that permits RDS to send enhanced monitoring metrics to CloudWatch Logs. | `bool` | `false` | no |
| db\_subnet\_group\_description | Description of the DB subnet group to create | `string` | `""` | no |
| db\_subnet\_group\_name | Name of DB subnet group. DB instance will be created in the VPC associated with the DB subnet group. If unspecified, will be created in the default VPC | `string` | `""` | no |
| db\_subnet\_group\_name | Name of DB subnet group. DB instance will be created in the VPC associated with the DB subnet group. If unspecified, will be created in the default VPC | `string` | `null` | no |
| db\_subnet\_group\_use\_name\_prefix | Determines whether to use `subnet_group_name` as is or create a unique name beginning with the `subnet_group_name` as the prefix | `bool` | `true` | no |
| delete\_automated\_backups | Specifies whether to remove automated backups immediately after the DB instance is deleted | `bool` | `true` | no |
| deletion\_protection | The database can't be deleted when this value is set to true. | `bool` | `false` | no |
| domain | The ID of the Directory Service Active Directory domain to create the instance in | `string` | `""` | no |
| domain\_iam\_role\_name | (Required if domain is provided) The name of the IAM role to be used when making API calls to the Directory Service | `string` | `""` | no |
| domain | The ID of the Directory Service Active Directory domain to create the instance in | `string` | `null` | no |
| domain\_iam\_role\_name | (Required if domain is provided) The name of the IAM role to be used when making API calls to the Directory Service | `string` | `null` | no |
| enabled\_cloudwatch\_logs\_exports | List of log types to enable for exporting to CloudWatch logs. If omitted, no logs will be exported. Valid values (depending on engine): alert, audit, error, general, listener, slowquery, trace, postgresql (PostgreSQL), upgrade (PostgreSQL). | `list(string)` | `[]` | no |
| engine | The database engine to use | `string` | n/a | yes |
| engine\_version | The engine version to use | `string` | n/a | yes |
......@@ -270,16 +270,16 @@ No resources.
| identifier | The name of the RDS instance, if omitted, Terraform will assign a random, unique identifier | `string` | n/a | yes |
| instance\_class | The instance type of the RDS instance | `string` | n/a | yes |
| iops | The amount of provisioned IOPS. Setting this implies a storage\_type of 'io1' | `number` | `0` | no |
| kms\_key\_id | The ARN for the KMS encryption key. If creating an encrypted replica, set this to the destination KMS ARN. If storage\_encrypted is set to true and kms\_key\_id is not specified the default KMS key created in your account will be used | `string` | `""` | no |
| license\_model | License model information for this DB instance. Optional, but required for some DB engines, i.e. Oracle SE1 | `string` | `""` | no |
| kms\_key\_id | The ARN for the KMS encryption key. If creating an encrypted replica, set this to the destination KMS ARN. If storage\_encrypted is set to true and kms\_key\_id is not specified the default KMS key created in your account will be used | `string` | `null` | no |
| license\_model | License model information for this DB instance. Optional, but required for some DB engines, i.e. Oracle SE1 | `string` | `null` | no |
| maintenance\_window | The window to perform maintenance in. Syntax: 'ddd:hh24:mi-ddd:hh24:mi'. Eg: 'Mon:00:00-Mon:03:00' | `string` | n/a | yes |
| major\_engine\_version | Specifies the major version of the engine that this option group should be associated with | `string` | `""` | no |
| max\_allocated\_storage | Specifies the value for Storage Autoscaling | `number` | `0` | no |
| monitoring\_interval | The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance. To disable collecting Enhanced Monitoring metrics, specify 0. The default is 0. Valid Values: 0, 1, 5, 10, 15, 30, 60. | `number` | `0` | no |
| monitoring\_role\_arn | The ARN for the IAM role that permits RDS to send enhanced monitoring metrics to CloudWatch Logs. Must be specified if monitoring\_interval is non-zero. | `string` | `""` | no |
| monitoring\_role\_arn | The ARN for the IAM role that permits RDS to send enhanced monitoring metrics to CloudWatch Logs. Must be specified if monitoring\_interval is non-zero. | `string` | `null` | no |
| monitoring\_role\_name | Name of the IAM role which will be created when create\_monitoring\_role is enabled. | `string` | `"rds-monitoring-role"` | no |
| multi\_az | Specifies if the RDS instance is multi-AZ | `bool` | `false` | no |
| name | The DB name to create. If omitted, no database is created initially | `string` | `""` | no |
| name | The DB name to create. If omitted, no database is created initially | `string` | `null` | no |
| option\_group\_description | The description of the option group | `string` | `""` | no |
| option\_group\_name | Name of the option group | `string` | `null` | no |
| option\_group\_timeouts | Define maximum timeout for deletion of `aws_db_option_group` resource | `map(string)` | <pre>{<br> "delete": "15m"<br>}</pre> | no |
......@@ -300,11 +300,11 @@ No resources.
| skip\_final\_snapshot | Determines whether a final DB snapshot is created before the DB instance is deleted. If true is specified, no DBSnapshot is created. If false is specified, a DB snapshot is created before the DB instance is deleted, using the value from final\_snapshot\_identifier | `bool` | `false` | no |
| snapshot\_identifier | Specifies whether or not to create this database from a snapshot. This correlates to the snapshot ID you'd find in the RDS console, e.g: rds:production-2015-06-26-06-05. | `string` | `null` | no |
| storage\_encrypted | Specifies whether the DB instance is encrypted | `bool` | `false` | no |
| storage\_type | One of 'standard' (magnetic), 'gp2' (general purpose SSD), or 'io1' (provisioned IOPS SSD). The default is 'io1' if iops is specified, 'gp2' if not. | `string` | `"gp2"` | no |
| storage\_type | One of 'standard' (magnetic), 'gp2' (general purpose SSD), or 'io1' (provisioned IOPS SSD). The default is 'io1' if iops is specified, 'gp2' if not. | `string` | `null` | no |
| subnet\_ids | A list of VPC subnet IDs | `list(string)` | `[]` | no |
| tags | A mapping of tags to assign to all resources | `map(string)` | `{}` | no |
| timeouts | (Optional) Updated Terraform resource management timeouts. Applies to `aws_db_instance` in particular to permit resource management times | `map(string)` | <pre>{<br> "create": "40m",<br> "delete": "40m",<br> "update": "80m"<br>}</pre> | no |
| timezone | (Optional) Time zone of the DB instance. timezone is currently only supported by Microsoft SQL Server. The timezone can only be set on creation. See MSSQL User Guide for more information. | `string` | `""` | no |
| timezone | (Optional) Time zone of the DB instance. timezone is currently only supported by Microsoft SQL Server. The timezone can only be set on creation. See MSSQL User Guide for more information. | `string` | `null` | no |
| username | Username for the master DB user | `string` | n/a | yes |
| vpc\_security\_group\_ids | List of VPC security groups to associate | `list(string)` | `[]` | no |
......
This diff is collapsed.
......@@ -2,6 +2,9 @@ locals {
is_mssql = element(split("-", var.engine), 0) == "sqlserver"
}
# Ref. https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces
data "aws_partition" "current" {}
resource "random_id" "snapshot_identifier" {
count = var.create && !var.skip_final_snapshot ? 1 : 0
......@@ -209,5 +212,5 @@ resource "aws_iam_role_policy_attachment" "enhanced_monitoring" {
count = var.create_monitoring_role ? 1 : 0
role = aws_iam_role.enhanced_monitoring[0].name
policy_arn = "arn:${var.iam_partition}:iam::aws:policy/service-role/AmazonRDSEnhancedMonitoringRole"
policy_arn = "arn:${data.aws_partition.current.partition}:iam::aws:policy/service-role/AmazonRDSEnhancedMonitoringRole"
}
......@@ -17,7 +17,7 @@ variable "allocated_storage" {
variable "storage_type" {
description = "One of 'standard' (magnetic), 'gp2' (general purpose SSD), or 'io1' (provisioned IOPS SSD). The default is 'io1' if iops is specified, 'standard' if not. Note that this behaviour is different from the AWS web console, where the default is 'gp2'."
type = string
default = "gp2"
default = null
}
variable "storage_encrypted" {
......@@ -29,7 +29,7 @@ variable "storage_encrypted" {
variable "kms_key_id" {
description = "The ARN for the KMS encryption key. If creating an encrypted replica, set this to the destination KMS ARN. If storage_encrypted is set to true and kms_key_id is not specified the default KMS key created in your account will be used"
type = string
default = ""
default = null
}
variable "replicate_source_db" {
......@@ -41,7 +41,7 @@ variable "replicate_source_db" {
variable "license_model" {
description = "License model information for this DB instance. Optional, but required for some DB engines, i.e. Oracle SE1"
type = string
default = ""
default = null
}
variable "iam_database_authentication_enabled" {
......@@ -53,13 +53,13 @@ variable "iam_database_authentication_enabled" {
variable "domain" {
description = "The ID of the Directory Service Active Directory domain to create the instance in"
type = string
default = ""
default = null
}
variable "domain_iam_role_name" {
description = "(Required if domain is provided) The name of the IAM role to be used when making API calls to the Directory Service"
type = string
default = ""
default = null
}
variable "engine" {
......@@ -80,7 +80,7 @@ variable "instance_class" {
variable "name" {
description = "The DB name to create. If omitted, no database is created initially"
type = string
default = ""
default = null
}
variable "username" {
......@@ -149,7 +149,7 @@ variable "parameter_group_name" {
variable "availability_zone" {
description = "The Availability Zone of the RDS instance"
type = string
default = ""
default = null
}
variable "multi_az" {
......@@ -179,7 +179,7 @@ variable "monitoring_interval" {
variable "monitoring_role_arn" {
description = "The ARN for the IAM role that permits RDS to send enhanced monitoring metrics to CloudWatch Logs. Must be specified if monitoring_interval is non-zero."
type = string
default = ""
default = null
}
variable "monitoring_role_name" {
......@@ -243,13 +243,13 @@ variable "option_group_name" {
variable "timezone" {
description = "(Optional) Time zone of the DB instance. timezone is currently only supported by Microsoft SQL Server. The timezone can only be set on creation. See MSSQL User Guide for more information."
type = string
default = ""
default = null
}
variable "character_set_name" {
description = "(Optional) The character set name to use for DB encoding in Oracle instances. This can't be changed. See Oracle Character Sets Supported in Amazon RDS and Collations and Character Sets for Microsoft SQL Server for more information. This can only be set on creation."
type = string
default = ""
default = null
}
variable "enabled_cloudwatch_logs_exports" {
......@@ -301,7 +301,7 @@ variable "max_allocated_storage" {
variable "ca_cert_identifier" {
description = "Specifies the identifier of the CA certificate for the DB instance"
type = string
default = "rds-ca-2019"
default = null
}
variable "delete_automated_backups" {
......@@ -310,12 +310,6 @@ variable "delete_automated_backups" {
default = true
}
variable "iam_partition" {
description = "IAM Partition to use when generating ARN's. For most regions this can be left at default. China/Govcloud use different partitions"
type = string
default = "aws"
}
variable "s3_import" {
description = "Restore from a Percona Xtrabackup in S3 (only MySQL is supported)"
type = map(string)
......
......@@ -11,7 +11,7 @@ variable "allocated_storage" {
variable "storage_type" {
description = "One of 'standard' (magnetic), 'gp2' (general purpose SSD), or 'io1' (provisioned IOPS SSD). The default is 'io1' if iops is specified, 'gp2' if not."
type = string
default = "gp2"
default = null
}
variable "storage_encrypted" {
......@@ -23,7 +23,7 @@ variable "storage_encrypted" {
variable "kms_key_id" {
description = "The ARN for the KMS encryption key. If creating an encrypted replica, set this to the destination KMS ARN. If storage_encrypted is set to true and kms_key_id is not specified the default KMS key created in your account will be used"
type = string
default = ""
default = null
}
variable "replicate_source_db" {
......@@ -35,7 +35,7 @@ variable "replicate_source_db" {
variable "license_model" {
description = "License model information for this DB instance. Optional, but required for some DB engines, i.e. Oracle SE1"
type = string
default = ""
default = null
}
variable "iam_database_authentication_enabled" {
......@@ -47,13 +47,13 @@ variable "iam_database_authentication_enabled" {
variable "domain" {
description = "The ID of the Directory Service Active Directory domain to create the instance in"
type = string
default = ""
default = null
}
variable "domain_iam_role_name" {
description = "(Required if domain is provided) The name of the IAM role to be used when making API calls to the Directory Service"
type = string
default = ""
default = null
}
variable "engine" {
......@@ -104,7 +104,7 @@ variable "instance_class" {
variable "name" {
description = "The DB name to create. If omitted, no database is created initially"
type = string
default = ""
default = null
}
variable "username" {
......@@ -131,7 +131,7 @@ variable "vpc_security_group_ids" {
variable "availability_zone" {
description = "The Availability Zone of the RDS instance"
type = string
default = ""
default = null
}
variable "multi_az" {
......@@ -161,7 +161,7 @@ variable "monitoring_interval" {
variable "monitoring_role_arn" {
description = "The ARN for the IAM role that permits RDS to send enhanced monitoring metrics to CloudWatch Logs. Must be specified if monitoring_interval is non-zero."
type = string
default = ""
default = null
}
variable "monitoring_role_name" {
......@@ -232,7 +232,7 @@ variable "create_db_subnet_group" {
variable "db_subnet_group_name" {
description = "Name of DB subnet group. DB instance will be created in the VPC associated with the DB subnet group. If unspecified, will be created in the default VPC"
type = string
default = ""
default = null
}
variable "db_subnet_group_use_name_prefix" {
......@@ -336,13 +336,13 @@ variable "create_db_instance" {
variable "timezone" {
description = "(Optional) Time zone of the DB instance. timezone is currently only supported by Microsoft SQL Server. The timezone can only be set on creation. See MSSQL User Guide for more information."
type = string
default = ""
default = null
}
variable "character_set_name" {
description = "(Optional) The character set name to use for DB encoding in Oracle instances. This can't be changed. See Oracle Character Sets Supported in Amazon RDS and Collations and Character Sets for Microsoft SQL Server for more information. This can only be set on creation."
type = string
default = ""
default = null
}
variable "enabled_cloudwatch_logs_exports" {
......@@ -402,7 +402,7 @@ variable "max_allocated_storage" {
variable "ca_cert_identifier" {
description = "Specifies the identifier of the CA certificate for the DB instance"
type = string
default = "rds-ca-2019"
default = null
}
variable "delete_automated_backups" {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment