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

RDS fail to add event_categories to aws_db_event_subscription #3100

Closed
ghost opened this issue Jan 22, 2018 · 2 comments
Closed

RDS fail to add event_categories to aws_db_event_subscription #3100

ghost opened this issue Jan 22, 2018 · 2 comments
Labels
bug Addresses a defect in current functionality. service/rds Issues and PRs that pertain to the rds service.
Milestone

Comments

@ghost
Copy link

ghost commented Jan 22, 2018

This issue was originally opened by @cassianoleal as hashicorp/terraform#17155. It was migrated here as a result of the provider split. The original body of the issue is below.


Terraform Version

Terraform v0.10.7

Terraform Configuration Files

Initially this resource is applied:

resource "aws_db_event_subscription" "rds-backup-instance-backup-db-ready" {
  name             = "rds-backup-instance-backup-db"
  sns_topic        = "${aws_sns_topic.rds-backup-db-ready.arn}"
  source_type      = "db-instance"
  event_categories = ["restoration"]
}

Then the error happens when I try to add a category to event_categories:

resource "aws_db_event_subscription" "rds-backup-instance-backup-db-ready" {
  name             = "rds-backup-instance-backup-db"
  sns_topic        = "${aws_sns_topic.rds-backup-db-ready.arn}"
  source_type      = "db-instance"
  event_categories = ["restoration", "creation"]
}

Output

$ aws-profile terraform apply terraform.tfplan
module.rds-backup.aws_db_event_subscription.rds-backup-instance-backup-db-ready: Modifying... (ID: rds-backup-instance-backup-db)
  event_categories.#:          "1" => "2"
  event_categories.1475249524: "" => "creation"
  event_categories.1866582008: "restoration" => "restoration"

Error: Error applying plan:

1 error(s) occurred:

* module.rds-backup.aws_db_event_subscription.rds-backup-instance-backup-db-ready: 1 error(s) occurred:

* aws_db_event_subscription.rds-backup-instance-backup-db-ready: Modifying RDS Event Subscription rds-backup-instance-backup-db failed: InvalidParameterCombination: If SourceType is null, Categories must also be null.
        status code: 400, request id: a1b4ffb6-aed1-46ac-b48e-6be9dd75d416

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.

Expected Behavior

Category should be added to the subscription.

Actual Behavior

AWS complains about missing parameters on the request.

Steps to Reproduce

  1. Create a aws_db_event_subscription
  2. Add an item to event_categories
  3. Run terraform apply

Notes

I haven't added the full trace log because there's a lot of sensitive information there. Please let me know if the information provided is insufficient and I'll reproduce it in a clean state.

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

bflad commented Jan 23, 2018

Hi @cassianoleal! Turns out this is a duplicate of #1817 and was previously fixed in terraform-provider-aws version 1.7.0 and has been available in all releases since. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@bflad bflad closed this as completed Jan 23, 2018
@bflad bflad added this to the v1.7.0 milestone Jan 23, 2018
@ghost
Copy link
Author

ghost commented Apr 8, 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 8, 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
Development

No branches or pull requests

1 participant