Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/mysql/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ resource "google_sql_database_instance" "default" {
min_length = lookup(password_validation_policy.value, "min_length", null)
complexity = lookup(password_validation_policy.value, "complexity", null)
disallow_username_substring = lookup(password_validation_policy.value, "disallow_username_substring", null)
reuse_interval = lookup(password_validation_policy.value, "reuse_interval", null)
}
}
dynamic "ip_configuration" {
Expand Down
1 change: 1 addition & 0 deletions modules/mysql/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ variable "password_validation_policy_config" {
min_length = number
complexity = string
disallow_username_substring = bool
reuse_interval = number
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anluuhoai if it is not required can u make it optional?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is already an option. If you don't fill it in, it will be null. In this case, I need to config the reuse_interval, but the current module doesn't have this option.
In the console, if you fill in the reuse interval, when I run this module without reuse_interval, it will remove the reuse interval.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any update? @imrannayer

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anluuhoai if this is not required can u plz define as optional

reuse_interval = optional(number)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think reuse_interval is no different from min_length or complexity @imrannayer

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw, I updated.

})
default = null
}
Expand Down