-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MSSQL: Adding two missing arguments for aws_db_instance: timezone & character_set_name #51
MSSQL: Adding two missing arguments for aws_db_instance: timezone & character_set_name #51
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the main reason why this module didn't have support for MSSQL:
1 error(s) occurred:
* module.db.module.db_instance.aws_db_instance.this: 1 error(s) occurred:
* aws_db_instance.this: Error creating DB Instance: InvalidParameterCombination: You can't specify a time zone when you create a DB instance running mysql.
status code: 400, request id: be0591d3-f240-46b7-8528-184412c1a342
The workaround is to create another resource aws_db_instance
with these values when creating mssql
and change outputs
to be conditional.
main.tf
Outdated
@@ -88,4 +88,7 @@ module "db_instance" { | |||
create_monitoring_role = "${var.create_monitoring_role}" | |||
|
|||
tags = "${var.tags}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep tags
as a last line.
@antonbabenko good point, I didn't think about that. I took a stab at having the separate db_instance and having conditional outputs. Both mssql and mysql seem to work now. Let me know anything else that needs changed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good, let me run it and merge. Probably tomorrow or the day after. Or even the week later (vacations time).
@@ -63,4 +67,57 @@ resource "aws_db_instance" "this" { | |||
backup_window = "${var.backup_window}" | |||
|
|||
tags = "${merge(var.tags, map("Name", format("%s", var.identifier)))}" | |||
|
|||
character_set_name = "${var.character_set_name}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't character_set_name also supported in mssql?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@antonbabenko actually looking at the docs, character_set_name only applies to Oracle instances. I'll go ahead and remove this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well never mind actually. It doesn't break deploying like timezone does, so it seems safe to leave it in.
Great work @aloisbarreras ! This PR has been released as part of v1.15.0 release. |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
…r_set_name