Skip to content

Commit

Permalink
Add 'iam_database_authentication_enabled' variable (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
leehuffman authored and osterman committed Jun 25, 2018
1 parent 0f2dc7c commit ceca14a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 22 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ module "rds_cluster_aurora_mysql" {
},
]
}
```
```

## Input

Expand All @@ -116,6 +116,7 @@ module "rds_cluster_aurora_mysql" {
| enabled |"true" |Set to false to prevent the module from creating any resources|
| engine |"aurora" |The name of the database engine to be used for this DB cluster. Valid values: `aurora`, `aurora-postgresql`|
| engine_version |"" |The version number of the database engine to use|
| iam_database_authentication_enabled | "false" | Specifies whether or mappings of AWS Identity and Access Management (IAM) accounts to database accounts is enabled |
| instance_type |"db.t2.small" |Instance type to use|
| maintenance_window |"wed:03:00-wed:04:00" |Weekly time range during which system maintenance can occur, in UTC|
| name |__REQUIRED__ |Name of the application|
Expand Down Expand Up @@ -195,7 +196,7 @@ See [LICENSE](LICENSE) for full details.

## About

This project is maintained and funded by [Cloud Posse, LLC][website].
This project is maintained and funded by [Cloud Posse, LLC][website].

![Cloud Posse](https://cloudposse.com/logo-300x69.png)

Expand Down
41 changes: 21 additions & 20 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,27 @@ resource "aws_security_group" "default" {
}

resource "aws_rds_cluster" "default" {
count = "${var.enabled == "true" ? 1 : 0}"
cluster_identifier = "${module.label.id}"
availability_zones = ["${var.availability_zones}"]
database_name = "${var.db_name}"
master_username = "${var.admin_user}"
master_password = "${var.admin_password}"
backup_retention_period = "${var.retention_period}"
preferred_backup_window = "${var.backup_window}"
final_snapshot_identifier = "${lower(module.label.id)}"
skip_final_snapshot = "${var.skip_final_snapshot}"
apply_immediately = "${var.apply_immediately}"
storage_encrypted = "${var.storage_encrypted}"
snapshot_identifier = "${var.snapshot_identifier}"
vpc_security_group_ids = ["${aws_security_group.default.id}"]
preferred_maintenance_window = "${var.maintenance_window}"
db_subnet_group_name = "${aws_db_subnet_group.default.name}"
db_cluster_parameter_group_name = "${aws_rds_cluster_parameter_group.default.name}"
tags = "${module.label.tags}"
engine = "${var.engine}"
engine_version = "${var.engine_version}"
count = "${var.enabled == "true" ? 1 : 0}"
cluster_identifier = "${module.label.id}"
availability_zones = ["${var.availability_zones}"]
database_name = "${var.db_name}"
master_username = "${var.admin_user}"
master_password = "${var.admin_password}"
backup_retention_period = "${var.retention_period}"
preferred_backup_window = "${var.backup_window}"
final_snapshot_identifier = "${lower(module.label.id)}"
skip_final_snapshot = "${var.skip_final_snapshot}"
apply_immediately = "${var.apply_immediately}"
storage_encrypted = "${var.storage_encrypted}"
snapshot_identifier = "${var.snapshot_identifier}"
vpc_security_group_ids = ["${aws_security_group.default.id}"]
preferred_maintenance_window = "${var.maintenance_window}"
db_subnet_group_name = "${aws_db_subnet_group.default.name}"
db_cluster_parameter_group_name = "${aws_rds_cluster_parameter_group.default.name}"
iam_database_authentication_enabled = "${var.iam_database_authentication_enabled}"
tags = "${module.label.tags}"
engine = "${var.engine}"
engine_version = "${var.engine_version}"
}

resource "aws_rds_cluster_instance" "default" {
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,8 @@ variable "apply_immediately" {
description = "Specifies whether any cluster modifications are applied immediately, or during the next maintenance window"
default = "true"
}

variable "iam_database_authentication_enabled" {
description = "Specifies whether or mappings of AWS Identity and Access Management (IAM) accounts to database accounts is enabled."
default = "false"
}

0 comments on commit ceca14a

Please sign in to comment.