Skip to content

Commit

Permalink
Allow creation of a cluster without creation of a database (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuru authored May 17, 2020
1 parent 27915f7 commit 0fb1a21
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,15 +305,15 @@ Available targets:
| cluster_parameters | List of DB cluster parameters to apply | object | `<list>` | no |
| cluster_size | Number of DB instances to create in the cluster | number | `2` | no |
| copy_tags_to_snapshot | Copy tags to backup snapshots | bool | `false` | no |
| db_name | Database name | string | - | yes |
| db_name | Database name (default is not to create a database) | string | `` | no |
| db_port | Database port | number | `3306` | no |
| deletion_protection | If the DB instance should have deletion protection enabled | bool | `false` | no |
| delimiter | Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes` | string | `-` | no |
| enabled | Set to false to prevent the module from creating any resources | bool | `true` | no |
| enabled_cloudwatch_logs_exports | List of log types to export to cloudwatch. The following log types are supported: audit, error, general, slowquery | list(string) | `<list>` | no |
| engine | The name of the database engine to be used for this DB cluster. Valid values: `aurora`, `aurora-mysql`, `aurora-postgresql` | string | `aurora` | no |
| engine_mode | The database engine mode. Valid values: `parallelquery`, `provisioned`, `serverless` | string | `provisioned` | no |
| engine_version | The version number of the database engine to use | string | `` | no |
| engine_version | The version of the database engine to use. See `aws rds describe-db-engine-versions` | string | `` | no |
| environment | Environment, e.g. 'prod', 'staging', 'dev', 'pre-prod', 'UAT' | string | `` | no |
| global_cluster_identifier | ID of the Aurora global cluster | string | `` | no |
| iam_database_authentication_enabled | Specifies whether or mappings of AWS Identity and Access Management (IAM) accounts to database accounts is enabled | bool | `false` | no |
Expand Down
4 changes: 2 additions & 2 deletions docs/terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
| cluster_parameters | List of DB cluster parameters to apply | object | `<list>` | no |
| cluster_size | Number of DB instances to create in the cluster | number | `2` | no |
| copy_tags_to_snapshot | Copy tags to backup snapshots | bool | `false` | no |
| db_name | Database name | string | - | yes |
| db_name | Database name (default is not to create a database) | string | `` | no |
| db_port | Database port | number | `3306` | no |
| deletion_protection | If the DB instance should have deletion protection enabled | bool | `false` | no |
| delimiter | Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes` | string | `-` | no |
| enabled | Set to false to prevent the module from creating any resources | bool | `true` | no |
| enabled_cloudwatch_logs_exports | List of log types to export to cloudwatch. The following log types are supported: audit, error, general, slowquery | list(string) | `<list>` | no |
| engine | The name of the database engine to be used for this DB cluster. Valid values: `aurora`, `aurora-mysql`, `aurora-postgresql` | string | `aurora` | no |
| engine_mode | The database engine mode. Valid values: `parallelquery`, `provisioned`, `serverless` | string | `provisioned` | no |
| engine_version | The version number of the database engine to use | string | `` | no |
| engine_version | The version of the database engine to use. See `aws rds describe-db-engine-versions` | string | `` | no |
| environment | Environment, e.g. 'prod', 'staging', 'dev', 'pre-prod', 'UAT' | string | `` | no |
| global_cluster_identifier | ID of the Aurora global cluster | string | `` | no |
| iam_database_authentication_enabled | Specifies whether or mappings of AWS Identity and Access Management (IAM) accounts to database accounts is enabled | bool | `false` | no |
Expand Down
2 changes: 1 addition & 1 deletion examples/complete/fixtures.us-west-1.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ stage = "test"

name = "rds-cluster"

instance_type = "db.t2.small"
instance_type = "db.t3.small"

cluster_family = "aurora5.6"

Expand Down
2 changes: 1 addition & 1 deletion outputs.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
output "database_name" {
value = join("", aws_rds_cluster.default.*.database_name)
value = var.db_name
description = "Database name"
}

Expand Down
5 changes: 3 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ variable "snapshot_identifier" {

variable "db_name" {
type = string
description = "Database name"
default = ""
description = "Database name (default is not to create a database)"
}

variable "db_port" {
Expand Down Expand Up @@ -168,7 +169,7 @@ variable "engine_mode" {
variable "engine_version" {
type = string
default = ""
description = "The version number of the database engine to use"
description = "The version of the database engine to use. See `aws rds describe-db-engine-versions` "
}

variable "scaling_configuration" {
Expand Down

0 comments on commit 0fb1a21

Please sign in to comment.