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

enabled_cloudwatch_logs_exports is incompatible with PostgreSQL 10.5 export log parameters ("postgresql", "upgrade") in aws_db_instance #6814

Closed
CosterANZ opened this issue Dec 12, 2018 · 4 comments
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/rds Issues and PRs that pertain to the rds service.
Milestone

Comments

@CosterANZ
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

$ terraform -v
Terraform v0.11.10
+ provider.aws v1.51.0

Affected Resource(s)

resource "aws_db_instance" "foo" {
  ...
  #enabled_cloudwatch_logs_exports = ["postgresql", "upgrade"] Disabled until Terraform supports PostgreSQL-log parameters. Currently only supports: alert, audit, error, general, listener, slowquery and trace. 
}

Terraform Configuration Files

resource "aws_db_instance" "foo" {
  engine = "postgres"
  engine_version = "10.5"
  ...
  #enabled_cloudwatch_logs_exports = ["postgresql", "upgrade"] Disabled until Terraform supports PostgreSQL-log parameters. Currently only supports: alert, audit, error, general, listener, slowquery and trace. 
}

Actual Behavior

After enabling 'CloudWatch Logs Export' on a PostgreSQL 10.5 RDS instance created by Terraform via the AWS web console:

Wed Dec 12 15:09:23 GMT+1300 2018 CloudWatch Logs Export enabled for logs [postgresql, upgrade]

Terraform will attempt to remove the parameters: postgresql and upgrade from the instance when enabled_cloudwatch_logs_exports is not present in the Terraform configuration:

  #enabled_cloudwatch_logs_exports = ["postgresql", "upgrade"] Disabled until Terraform supports PostgreSQL-log parameters. Currently only supports: alert, audit, error, general, listener, slowquery and trace. 
$ terraform apply
...
  ~ aws_db_instance.foo
      enabled_cloudwatch_logs_exports.#: "2" => "0"
      enabled_cloudwatch_logs_exports.0: "postgresql" => ""
      enabled_cloudwatch_logs_exports.1: "upgrade" => ""

That is expected, but what about if you want to keep those options enabled? They are not supported within Terraform:

resource "aws_db_instance" "foo" {
  ...
  engine = "postgres"
  engine_version = "10.5"
  enabled_cloudwatch_logs_exports = ["postgresql", "upgrade"] 
}
$ terraform apply
...
Error: aws_db_instance.foo: expected enabled_cloudwatch_logs_exports.0 to be one of [alert audit error general listener slowquery trace], got postgresql

Error: aws_db_instance.foo: expected enabled_cloudwatch_logs_exports.1 to be one of [alert audit error general listener slowquery trace], got upgrade

I'm not sure if this should be a bug report or feature request.

Expected Behavior

postgresql and upgrade should be added as a supported enabled_cloudwatch_logs_exports parameter.

Steps to Reproduce

  1. terraform apply

References

@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. service/rds Issues and PRs that pertain to the rds service. labels Dec 12, 2018
@bflad bflad added this to the v1.52.0 milestone Dec 12, 2018
@tylersmith34
Copy link
Contributor

I opened #6829 to address this

@bflad
Copy link
Contributor

bflad commented Dec 12, 2018

Support for the new postgresql and upgrade values under enabled_cloudwatch_logs_exports has been merged and will release with version 1.52.0 of the AWS provider, likely later today or tomorrow. 👍

@bflad bflad closed this as completed Dec 12, 2018
@bflad
Copy link
Contributor

bflad commented Dec 13, 2018

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

@ghost
Copy link

ghost commented Apr 1, 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 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/rds Issues and PRs that pertain to the rds service.
Projects
None yet
Development

No branches or pull requests

3 participants