Skip to content
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

Merged
merged 7 commits into from
Apr 3, 2018

Conversation

aloisbarreras
Copy link
Contributor

…r_set_name

Copy link
Member

@antonbabenko antonbabenko left a 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}"
Copy link
Member

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 antonbabenko changed the title adding two missing arguments for aws_db_instance: timezone & character_set_name MSSQL: Adding two missing arguments for aws_db_instance: timezone & character_set_name Mar 22, 2018
@aloisbarreras
Copy link
Contributor Author

@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.

Copy link
Member

@antonbabenko antonbabenko left a 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}"
Copy link
Member

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?

Copy link
Contributor Author

@aloisbarreras aloisbarreras Mar 22, 2018

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.

Copy link
Contributor Author

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.

@antonbabenko antonbabenko merged commit 4c1cd3b into terraform-aws-modules:master Apr 3, 2018
@antonbabenko
Copy link
Member

Great work @aloisbarreras ! This PR has been released as part of v1.15.0 release.

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants