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

Cannot "un-set" parameter group values #661

Closed
hashibot opened this issue Jun 13, 2017 · 4 comments · Fixed by #11540
Closed

Cannot "un-set" parameter group values #661

hashibot opened this issue Jun 13, 2017 · 4 comments · Fixed by #11540
Labels
bug Addresses a defect in current functionality. service/rds Issues and PRs that pertain to the rds service.

Comments

@hashibot
Copy link

This issue was originally opened by @chrisrlong as hashicorp/terraform#13321. It was migrated here as part of the provider split. The original body of the issue is below.


Hi there,

Terraform Version

0.7.2 - Terraform v0.9.3-dev (0de008e07d41ad4635e7be7727b88109623f2828+CHANGES)

Affected Resource(s)

aws_db_parameter_group

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

resource "aws_db_parameter_group" "default" {
  name = "${var.name}-db-parameter-group"
  family = "${var.rds_parameter_family}"
  description = "Database parameters for ${var.name}"
  parameter {
    name = "binlog_cache_size"
    value = "1048576"
    apply_method = "pending-reboot"
  }
  parameter {
    name = "binlog_checksum"
    value = "crc32"
    apply_method = "pending-reboot"
  }
  parameter {
    name = "binlog_format"
    value = "MIXED"
    apply_method = "pending-reboot"
  }
...

Expected Behavior

If a parameter has been set and now removed:
parameter.1212351445.name: "general_log" => ""
parameter.1918306725.name: "log_output" => ""
parameter.2107150943.name: "innodb_lru_scan_depth" => ""
parameter.3306308666.name: "log_queries_not_using_indexes" => ""
parameter.245681620.name: "max_allowed_packet" => ""

terraform apply should unset the values and finish normally.

Actual Behavior

terraform finishes normally, however the values are not changed, and the same removals are in the next plan/apply.

(to stop the cycle, I had to login to the AWS console and find the parameters, then check the "reset value" button)

Steps to Reproduce

Set some parameters in the parameter group.
remove some config (exapmles above) and run terraform apply.

References

Could be related to/with

@hashibot hashibot added the bug Addresses a defect in current functionality. label Jun 13, 2017
@longwave
Copy link

longwave commented Jul 5, 2017

Also run into this. I suspect that Terraform is just doing the equivalent of aws rds modify-db-parameter-group here, but for parameters that exist in state but have since been removed, it needs the equivalent of aws rds reset-db-parameter-group --no-reset-all-parameters.

@radeksimko radeksimko added the service/rds Issues and PRs that pertain to the rds service. label Jan 27, 2018
@hegyre
Copy link

hegyre commented Aug 29, 2018

Just ran into the same issue.
Even the AWS console had the issue...

Need to use aws-cli:

aws rds reset-db-parameter-group --db-parameter-group-name <value> --parameters ParameterName="max_allowed_packet",ApplyMethod="immediate"

@robinbowes
Copy link

We're running into this quite a lot at the moment. Any chance of a fix?

@ghost
Copy link

ghost commented Mar 27, 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 unassigned ryndaniels Mar 27, 2020
@ghost ghost locked and limited conversation to collaborators Mar 27, 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
6 participants