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

create aurora instance error with audit logs enabled #5121

Closed
iwasnobody opened this issue Jul 9, 2018 · 6 comments · Fixed by #5124
Closed

create aurora instance error with audit logs enabled #5121

iwasnobody opened this issue Jul 9, 2018 · 6 comments · Fixed by #5124
Labels
bug Addresses a defect in current functionality. service/rds Issues and PRs that pertain to the rds service.
Milestone

Comments

@iwasnobody
Copy link

should be related to "enabled_cloudwatch_logs_exports = ["audit"]"

Terraform Version

Terraform v0.11.7

  • provider.aws v1.26.0

Affected Resource(s)

aws_rds_cluster_instance

Terraform Configuration Files

resource "aws_rds_cluster" "web" {
provider = "aws.${var.project}"
cluster_identifier = "${var.project}-${var.env}-web-db"
availability_zones = "${var.aws_az}"
database_name = "web"
master_username = "XXXX"
master_password = "XXXXXXX"
backtrack_window = 259200
backup_retention_period = 5
port = 3306
vpc_security_group_ids = ["${aws_security_group.web_db.id}"]
storage_encrypted = true
db_subnet_group_name = "${aws_db_subnet_group.db_net.id}"
db_cluster_parameter_group_name = "${aws_rds_cluster_parameter_group.web.id}"
engine = "aurora"
enabled_cloudwatch_logs_exports = ["audit"]
skip_final_snapshot = true
tags {
Name = "${var.project}-${var.env}-web-cluster"
}
}
resource "aws_rds_cluster_instance" "web_instances_master" {
provider = "aws.${var.project}"
promotion_tier = 0
count = 1
identifier = "${var.project}-${var.env}-web-db"
cluster_identifier = "${aws_rds_cluster.web.id}"
instance_class = "db.r3.4xlarge"
db_subnet_group_name = "${aws_db_subnet_group.db_net.id}"
db_parameter_group_name = "${aws_db_parameter_group.web.id}"
auto_minor_version_upgrade = false
tags {
Name = "${var.project}-${var.env}-web-instance"
}
}
resource "aws_rds_cluster_instance" "web_instances_reader1" {
provider = "aws.${var.project}"
promotion_tier = 1
count = 1
identifier = "${var.project}-${var.env}-web-db-reader1"
cluster_identifier = "${aws_rds_cluster.web.id}"
instance_class = "db.r3.4xlarge"
db_subnet_group_name = "${aws_db_subnet_group.db_net.id}"
db_parameter_group_name = "${aws_db_parameter_group.web.id}"
auto_minor_version_upgrade = false
tags {
Name = "${var.project}-${var.env}-web-instance"
}
}

Actual Behavior

  • aws_rds_cluster_instance.web_instances_reader1: 1 error(s) occurred:

  • aws_rds_cluster_instance.web_instances_reader1: unexpected state 'configuring-log-exports', wanted target 'available'. last error: %!s()

  • aws_rds_cluster_instance.web_instances_master: 1 error(s) occurred:

  • aws_rds_cluster_instance.web_instances_master: unexpected state 'configuring-log-exports', wanted target 'available'. last error: %!s()

@bflad bflad added bug Addresses a defect in current functionality. service/rds Issues and PRs that pertain to the rds service. labels Jul 9, 2018
@bflad
Copy link
Contributor

bflad commented Jul 9, 2018

Hi @iwasnobody 👋 Thanks for submitting this and sorry for the trouble.

Currently, we explicitly check the RDS instance status when performing create/update/delete operations to try and catch when they are complete. When RDS adds new functionality, sometimes they add a new status which the code is not expecting yet. We may switch up the logic at some point to only look for error conditions but for now we can add configuring-log-exports as an expected status.

I have a branch with the code update ready, I'm just running acceptance testing on it now. 👍

@bflad
Copy link
Contributor

bflad commented Jul 9, 2018

Pull request submitted: #5124

@bflad bflad added this to the v1.27.0 milestone Jul 9, 2018
@bflad
Copy link
Contributor

bflad commented Jul 9, 2018

The fix for this has been merged into master and will release with version 1.27.0 of the AWS provider, likely middle of this week.

@bflad
Copy link
Contributor

bflad commented Jul 11, 2018

This has been released in version 1.27.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@iwasnobody
Copy link
Author

Many thx

@ghost
Copy link

ghost commented Apr 4, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/rds Issues and PRs that pertain to the rds service.
Projects
None yet
2 participants