Skip to content

Commit

Permalink
Add support for ssm tags (#27)
Browse files Browse the repository at this point in the history
* added support for ssm tags

[SRC-3427]

* fix formatting.
  • Loading branch information
Jean-Michel Provencher authored and jmorissette committed Nov 11, 2019
1 parent 44ad823 commit 65e46f1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions mysql_schema_configuration/mysql_schema_configuration.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ resource "aws_ssm_parameter" "username" {
value = "${mysql_user.user.user}"

key_id = "${lookup(var.optional_parameters, "username_kms_key_id", "")}"

tags = "${var.optional_ssm_parameter_tags}"
}

resource "aws_ssm_parameter" "password" {
Expand All @@ -40,4 +42,6 @@ resource "aws_ssm_parameter" "password" {
value = "${var.password}"

key_id = "${var.password_kms_key_id}"

tags = "${var.optional_ssm_parameter_tags}"
}
9 changes: 8 additions & 1 deletion mysql_schema_configuration/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@ variable "optional_parameters" {
default = {}
}

variable "optional_ssm_parameter_tags" {
type = "map"
description = "Additional tags to add to the SSM parameter resources"
default = {}
}

variable "user_privileges" {
type = "list"
default = ["EXECUTE", "SELECT", "SHOW VIEW", "ALTER", "ALTER ROUTINE", "CREATE", "CREATE ROUTINE", "CREATE TEMPORARY TABLES", "CREATE VIEW", "DELETE", "DROP", "INDEX", "INSERT", "TRIGGER", "UPDATE"]
default = ["EXECUTE", "SELECT", "SHOW VIEW", "ALTER", "ALTER ROUTINE", "CREATE", "CREATE ROUTINE",
"CREATE TEMPORARY TABLES", "CREATE VIEW", "DELETE", "DROP", "INDEX", "INSERT", "TRIGGER", "UPDATE"]
}

0 comments on commit 65e46f1

Please sign in to comment.