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 enabled_cloudwatch_logs_exports - InvalidParameterCombination: No modifications were requested #6799

Closed
Constantin07 opened this issue Dec 11, 2018 · 3 comments · Fixed by #15404
Assignees
Labels
bug Addresses a defect in current functionality. service/rds Issues and PRs that pertain to the rds service.
Milestone

Comments

@Constantin07
Copy link

Constantin07 commented Dec 11, 2018

Terraform Version

Terraform v0.11.10

Affected Resource(s)

aws_db_instance

Terraform Configuration Files

RDS instance with the below attribute configuration.

enabled_cloudwatch_logs_exports = ["audit", "slowquery", "error"]

Debug Output

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  ~ module.db.module.db_instance.aws_db_instance.this
      enabled_cloudwatch_logs_exports.1: "error" => "slowquery"
      enabled_cloudwatch_logs_exports.2: "slowquery" => "error"

Plan: 0 to add, 1 to change, 0 to destroy.

------------------------------------------------------------------------

This plan was saved to: /dev/uat_out.txt

To perform exactly these actions, run the following command to apply:

    terraform apply "/dev/uat_out.txt"

module.db.module.db_instance.aws_db_instance.this: Modifying... (ID: dev-ew1-mu-db-rds)
  enabled_cloudwatch_logs_exports.1: "error" => "slowquery"
  enabled_cloudwatch_logs_exports.2: "slowquery" => "error"

Error: Error applying plan:

1 error(s) occurred:

* module.db.module.db_instance.aws_db_instance.this: 1 error(s) occurred:
* aws_db_instance.this: Error modifying DB Instance dev-ew1-mu-db-rds: InvalidParameterCombination: No modifications were requested
	status code: 400, request id: d80dcacc-33f0-49ba-95c2-2796d5c09ff9

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

On subsequent runs it shouldn't detect any changes.

Actual Behavior

If I re-run the plan - it keeps saying that there is an update required.
See the plan output - it just tries to change order.

Steps to Reproduce

run terraform apply on a RDS instance with enabled_cloudwatch_logs_exports enabled and then try to re-run the plan agin.

Important Factoids

It looks like the ordering in enabled_cloudwatch_logs_exports is important.
If I set it like this it works fine.

enabled_cloudwatch_logs_exports = ["audit", "error", "slowquery"]

Note: The documentation doesn't mention that the list should be alphabetically ordered to work properly.

@bflad bflad added the service/rds Issues and PRs that pertain to the rds service. label Dec 11, 2018
@aeschright aeschright added the needs-triage Waiting for first response or review from a maintainer. label Jun 24, 2019
@aeschright aeschright added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Nov 20, 2019
@bflad bflad self-assigned this Sep 30, 2020
bflad added a commit that referenced this issue Sep 30, 2020
…s_exports arguments

Reference: #6799

Changes:

```
* resource/aws_db_instance: Prevent ordering differences with `enabled_cloudwatch_logs_exports` argument
* resource/aws_rds_cluster: Prevent ordering differences with `enabled_cloudwatch_logs_exports` argument
```

Output from acceptance testing:

```
--- PASS: TestAccAWSDBInstance_EnabledCloudwatchLogsExports_Postgresql (552.53s)
--- PASS: TestAccAWSDBInstance_EnabledCloudwatchLogsExports_MSSQL (742.59s)
--- PASS: TestAccAWSDBInstance_EnabledCloudwatchLogsExports_Oracle (805.86s)
--- PASS: TestAccAWSDBInstance_EnabledCloudwatchLogsExports_MySQL (828.42s)

--- PASS: TestAccAWSRDSCluster_EnabledCloudwatchLogsExports_Postgresql (133.14s)
--- PASS: TestAccAWSRDSCluster_EnabledCloudwatchLogsExports_MySQL (243.49s)
```
@bflad bflad added this to the v3.9.0 milestone Sep 30, 2020
bflad added a commit that referenced this issue Sep 30, 2020
…s_exports arguments (#15404)

* service/rds: Prevent ordering differences with enabled_cloudwatch_logs_exports arguments

Reference: #6799

Changes:

```
* resource/aws_db_instance: Prevent ordering differences with `enabled_cloudwatch_logs_exports` argument
* resource/aws_rds_cluster: Prevent ordering differences with `enabled_cloudwatch_logs_exports` argument
```

Output from acceptance testing:

```
--- PASS: TestAccAWSDBInstance_EnabledCloudwatchLogsExports_Postgresql (552.53s)
--- PASS: TestAccAWSDBInstance_EnabledCloudwatchLogsExports_MSSQL (742.59s)
--- PASS: TestAccAWSDBInstance_EnabledCloudwatchLogsExports_Oracle (805.86s)
--- PASS: TestAccAWSDBInstance_EnabledCloudwatchLogsExports_MySQL (828.42s)

--- PASS: TestAccAWSRDSCluster_EnabledCloudwatchLogsExports_Postgresql (133.14s)
--- PASS: TestAccAWSRDSCluster_EnabledCloudwatchLogsExports_MySQL (243.49s)
```

* docs/service/rds: List -> Set for enabled_cloudwatch_logs_exports arguments
@bflad
Copy link
Contributor

bflad commented Sep 30, 2020

The fix for this has been merged and will release with version 3.9.0 of the Terraform AWS Provider, likely tomorrow. 👍

@ghost
Copy link

ghost commented Oct 2, 2020

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

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented Oct 31, 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 as resolved and limited conversation to collaborators Oct 31, 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
3 participants