Skip to content

Commit 923cd11

Browse files
fix: to avoid password reset for existing additional users for mssql (#489)
1 parent b4430f9 commit 923cd11

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

modules/mssql/main.tf

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,14 @@ resource "google_sql_database" "additional_databases" {
180180
}
181181

182182
resource "random_password" "user-password" {
183-
length = 8
184-
special = true
183+
length = 8
184+
special = true
185+
186+
lifecycle {
187+
ignore_changes = [
188+
special, length
189+
]
190+
}
185191
depends_on = [null_resource.module_depends_on, google_sql_database_instance.default]
186192
}
187193

@@ -190,8 +196,14 @@ resource "random_password" "additional_passwords" {
190196
keepers = {
191197
name = google_sql_database_instance.default.name
192198
}
193-
length = 32
194-
special = true
199+
length = 32
200+
special = true
201+
202+
lifecycle {
203+
ignore_changes = [
204+
special, length
205+
]
206+
}
195207
depends_on = [null_resource.module_depends_on, google_sql_database_instance.default]
196208
}
197209

0 commit comments

Comments
 (0)