Skip to content

Commit

Permalink
added instance availability zone (#47)
Browse files Browse the repository at this point in the history
* Squashed commit of the following:

commit ddb166ecd2f41fc31bba35efecc406846b3e7850
Author: Divyam Khandelwal <[email protected]>
Date:   Thu Feb 28 16:40:02 2019 +0530

    pushed sql

commit 46a87fd33a35461462fde74cbd73fc05d329d768
Merge: 51da030 bc9fa99
Author: Divyam Khandelwal <[email protected]>
Date:   Wed Feb 27 17:03:27 2019 +0530

    Merge branch 'master' of https://gitlab.com/niki-infra/dev.niki.ai into feature/nc-1561

commit 51da03098ee9962c97fa47dcf4191693051f06ba
Author: Divyam Khandelwal <[email protected]>
Date:   Wed Feb 27 16:02:28 2019 +0530

    Deployed eks

* rds preferred az

* Updated Readme

* Update variables.tf

Co-Authored-By: rverma-nikiai <[email protected]>

* Updated Readme

* Updated fmt
  • Loading branch information
rverma-nikiai authored and aknysh committed Apr 12, 2019
1 parent 37e43fa commit 4c2166d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,14 +264,15 @@ Available targets:
| db_port | Database port | string | `3306` | no |
| delimiter | Delimiter to be used between `name`, `namespace`, `stage` and `attributes` | string | `-` | no |
| enabled | Set to false to prevent the module from creating any resources | string | `true` | no |
| enabled_cloudwatch_logs_exports | List of log types to export to cloudwatch. Valid values: `audit`, `error`, `general`, `slowquery` | list | `<list>` | no |
| enabled_cloudwatch_logs_exports | List of log types to export to cloudwatch. The following log types are supported: audit, error, general, slowquery. | list | `<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 |
| iam_database_authentication_enabled | Specifies whether or mappings of AWS Identity and Access Management (IAM) accounts to database accounts is enabled. | string | `false` | no |
| instance_availability_zone | Optional parameter to place cluster instances in a specific availability zone. If left empty, will place randomly | string | `` | no |
| instance_parameters | List of DB instance parameters to apply | list | `<list>` | no |
| instance_type | Instance type to use | string | `db.t2.small` | no |
| kms_key_id | The ARN for the KMS encryption key. | string | `` | no |
| kms_key_id | The ARN for the KMS encryption key. When specifying kms_key_id, storage_encrypted needs to be set to true. | string | `` | no |
| maintenance_window | Weekly time range during which system maintenance can occur, in UTC | string | `wed:03:00-wed:04:00` | no |
| name | Name of the application | string | - | yes |
| namespace | Namespace (e.g. `eg` or `cp`) | string | - | yes |
Expand Down
5 changes: 3 additions & 2 deletions docs/terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@
| db_port | Database port | string | `3306` | no |
| delimiter | Delimiter to be used between `name`, `namespace`, `stage` and `attributes` | string | `-` | no |
| enabled | Set to false to prevent the module from creating any resources | string | `true` | no |
| enabled_cloudwatch_logs_exports | List of log types to export to cloudwatch. Valid values: `audit`, `error`, `general`, `slowquery` | list | `<list>` | no |
| enabled_cloudwatch_logs_exports | List of log types to export to cloudwatch. The following log types are supported: audit, error, general, slowquery. | list | `<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 |
| iam_database_authentication_enabled | Specifies whether or mappings of AWS Identity and Access Management (IAM) accounts to database accounts is enabled. | string | `false` | no |
| instance_availability_zone | Optional parameter to place cluster instances in a specific availability zone. If left empty, will place randomly | string | `` | no |
| instance_parameters | List of DB instance parameters to apply | list | `<list>` | no |
| instance_type | Instance type to use | string | `db.t2.small` | no |
| kms_key_id | The ARN for the KMS encryption key. | string | `` | no |
| kms_key_id | The ARN for the KMS encryption key. When specifying kms_key_id, storage_encrypted needs to be set to true. | string | `` | no |
| maintenance_window | Weekly time range during which system maintenance can occur, in UTC | string | `wed:03:00-wed:04:00` | no |
| name | Name of the application | string | - | yes |
| namespace | Namespace (e.g. `eg` or `cp`) | string | - | yes |
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ resource "aws_rds_cluster_instance" "default" {
monitoring_role_arn = "${var.rds_monitoring_role_arn}"
performance_insights_enabled = "${var.performance_insights_enabled}"
performance_insights_kms_key_id = "${var.performance_insights_kms_key_id}"
availability_zone = "${var.instance_availability_zone}"
}

resource "aws_db_subnet_group" "default" {
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -272,3 +272,8 @@ variable "autoscaling_max_capacity" {
default = 5
description = "Maximum number of instances to be maintained by the autoscaler"
}

variable "instance_availability_zone" {
default = ""
description = "Optional parameter to place cluster instances in a specific availability zone. If left empty, will place randomly"
}

0 comments on commit 4c2166d

Please sign in to comment.