Skip to content

Commit c7fd6c5

Browse files
feat: Add support for Oracle nchar_character_set_name (#487)
feat: Add support for Oracle nchar_character_set_name
1 parent aa23ea2 commit c7fd6c5

File tree

7 files changed

+20
-3
lines changed

7 files changed

+20
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ Users have the ability to:
293293
| <a name="input_monitoring_role_permissions_boundary"></a> [monitoring\_role\_permissions\_boundary](#input\_monitoring\_role\_permissions\_boundary) | ARN of the policy that is used to set the permissions boundary for the monitoring IAM role | `string` | `null` | no |
294294
| <a name="input_monitoring_role_use_name_prefix"></a> [monitoring\_role\_use\_name\_prefix](#input\_monitoring\_role\_use\_name\_prefix) | Determines whether to use `monitoring_role_name` as is or create a unique identifier beginning with `monitoring_role_name` as the specified prefix | `bool` | `false` | no |
295295
| <a name="input_multi_az"></a> [multi\_az](#input\_multi\_az) | Specifies if the RDS instance is multi-AZ | `bool` | `false` | no |
296+
| <a name="input_nchar_character_set_name"></a> [nchar\_character\_set\_name](#input\_nchar\_character\_set\_name) | The national character set is used in the NCHAR, NVARCHAR2, and NCLOB data types for Oracle instances. This can't be changed. | `string` | `null` | no |
296297
| <a name="input_network_type"></a> [network\_type](#input\_network\_type) | The type of network stack to use | `string` | `null` | no |
297298
| <a name="input_option_group_description"></a> [option\_group\_description](#input\_option\_group\_description) | The description of the option group | `string` | `null` | no |
298299
| <a name="input_option_group_name"></a> [option\_group\_name](#input\_option\_group\_name) | Name of the option group | `string` | `null` | no |

examples/complete-oracle/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ module "db" {
6868
create_monitoring_role = true
6969

7070
# See here for support character sets https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.OracleCharacterSets.html
71-
character_set_name = "AL32UTF8"
71+
character_set_name = "AL32UTF8"
72+
nchar_character_set_name = "AL16UTF16"
7273

7374
tags = local.tags
7475
}

main.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,9 @@ module "db_instance" {
132132
create_monitoring_role = var.create_monitoring_role
133133
monitoring_role_permissions_boundary = var.monitoring_role_permissions_boundary
134134

135-
character_set_name = var.character_set_name
136-
timezone = var.timezone
135+
character_set_name = var.character_set_name
136+
nchar_character_set_name = var.nchar_character_set_name
137+
timezone = var.timezone
137138

138139
enabled_cloudwatch_logs_exports = var.enabled_cloudwatch_logs_exports
139140
create_cloudwatch_log_group = var.create_cloudwatch_log_group

modules/db_instance/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ No modules.
7878
| <a name="input_monitoring_role_permissions_boundary"></a> [monitoring\_role\_permissions\_boundary](#input\_monitoring\_role\_permissions\_boundary) | ARN of the policy that is used to set the permissions boundary for the monitoring IAM role | `string` | `null` | no |
7979
| <a name="input_monitoring_role_use_name_prefix"></a> [monitoring\_role\_use\_name\_prefix](#input\_monitoring\_role\_use\_name\_prefix) | Determines whether to use `monitoring_role_name` as is or create a unique identifier beginning with `monitoring_role_name` as the specified prefix | `bool` | `false` | no |
8080
| <a name="input_multi_az"></a> [multi\_az](#input\_multi\_az) | Specifies if the RDS instance is multi-AZ | `bool` | `false` | no |
81+
| <a name="input_nchar_character_set_name"></a> [nchar\_character\_set\_name](#input\_nchar\_character\_set\_name) | The national character set is used in the NCHAR, NVARCHAR2, and NCLOB data types for Oracle instances. This can't be changed. | `string` | `null` | no |
8182
| <a name="input_network_type"></a> [network\_type](#input\_network\_type) | The type of network stack | `string` | `null` | no |
8283
| <a name="input_option_group_name"></a> [option\_group\_name](#input\_option\_group\_name) | Name of the DB option group to associate. | `string` | `null` | no |
8384
| <a name="input_parameter_group_name"></a> [parameter\_group\_name](#input\_parameter\_group\_name) | Name of the DB parameter group to associate | `string` | `null` | no |

modules/db_instance/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ resource "aws_db_instance" "this" {
9898
monitoring_role_arn = var.monitoring_interval > 0 ? local.monitoring_role_arn : null
9999

100100
character_set_name = var.character_set_name
101+
nchar_character_set_name = var.nchar_character_set_name
101102
timezone = var.timezone
102103
enabled_cloudwatch_logs_exports = var.enabled_cloudwatch_logs_exports
103104

modules/db_instance/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,12 @@ variable "character_set_name" {
302302
default = null
303303
}
304304

305+
variable "nchar_character_set_name" {
306+
description = "The national character set is used in the NCHAR, NVARCHAR2, and NCLOB data types for Oracle instances. This can't be changed."
307+
type = string
308+
default = null
309+
}
310+
305311
variable "enabled_cloudwatch_logs_exports" {
306312
description = "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)."
307313
type = list(string)

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,12 @@ variable "character_set_name" {
430430
default = null
431431
}
432432

433+
variable "nchar_character_set_name" {
434+
description = "The national character set is used in the NCHAR, NVARCHAR2, and NCLOB data types for Oracle instances. This can't be changed."
435+
type = string
436+
default = null
437+
}
438+
433439
variable "enabled_cloudwatch_logs_exports" {
434440
description = "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)"
435441
type = list(string)

0 commit comments

Comments
 (0)