Skip to content

Commit

Permalink
Addind Ignore_changes value to SSM parameter (#29)
Browse files Browse the repository at this point in the history
* adding tags support for root username password

* adding tag support for rds instance

* adding ignore changes to modules

* adding ignore changes parameter

* adding ignore changes value to ssm parameter
  • Loading branch information
Jean-Michel Provencher authored and jmorissette committed Nov 11, 2019
1 parent 61c75fd commit 4d54018
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
8 changes: 8 additions & 0 deletions mysql_schema_configuration/mysql_schema_configuration.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ resource "aws_ssm_parameter" "username" {
key_id = "${lookup(var.optional_parameters, "username_kms_key_id", "")}"

tags = "${var.optional_ssm_parameter_tags}"

lifecycle {
ignore_changes = ["value"]
}
}

resource "aws_ssm_parameter" "password" {
Expand All @@ -44,4 +48,8 @@ resource "aws_ssm_parameter" "password" {
key_id = "${var.password_kms_key_id}"

tags = "${var.optional_ssm_parameter_tags}"

lifecycle {
ignore_changes = ["value"]
}
}
8 changes: 8 additions & 0 deletions rds_database_cluster/rds_database_cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ resource "aws_ssm_parameter" "db_root_master_username" {
type = "String"
value = "${lookup(var.optional_parameters, "master_username", "root")}"
tags = "${var.optional_ssm_parameter_tags}"

lifecycle {
ignore_changes = ["value"]
}
}

resource "aws_ssm_parameter" "db_root_master_password" {
Expand All @@ -24,6 +28,10 @@ resource "aws_ssm_parameter" "db_root_master_password" {

key_id = "${lookup(var.optional_parameters, "master_password_kms_key_id", "")}"
tags = "${var.optional_ssm_parameter_tags}"

lifecycle {
ignore_changes = ["value"]
}
}

resource "aws_rds_cluster" "rds_db_cluster" {
Expand Down
8 changes: 8 additions & 0 deletions rds_database_instance/rds_database_instance.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ resource "aws_ssm_parameter" "db_root_username" {
type = "String"
value = "${lookup(var.optional_parameters, "username", "root_db")}"
tags = "${var.optional_ssm_parameter_tags}"

lifecycle {
ignore_changes = ["value"]
}
}

resource "aws_ssm_parameter" "db_root_password" {
Expand All @@ -24,6 +28,10 @@ resource "aws_ssm_parameter" "db_root_password" {

key_id = "${lookup(var.optional_parameters, "password_kms_key_id", "")}"
tags = "${var.optional_ssm_parameter_tags}"

lifecycle {
ignore_changes = ["value"]
}
}

resource "aws_db_instance" "rds_db_instance" {
Expand Down

0 comments on commit 4d54018

Please sign in to comment.