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

opentelekomcloud_rds_parametergroup_v3 doesn't update the parameter groups attached to RDS instance #2169

Open
EugenFo opened this issue May 12, 2023 · 2 comments
Labels
otc-issue Blocked by OTC issues

Comments

@EugenFo
Copy link

EugenFo commented May 12, 2023

Hello again. I've found an issue with the opentelekomcloud_rds_parametergroup_v3 resource. Modifying the values/parameters are only modified in the custom template, but not in the actual parameter group that is used by the RDS instance.

Terraform provider version

Terraform v1.4.6
on linux_amd64
+ provider registry.terraform.io/opentelekomcloud/opentelekomcloud v1.34.3
+ provider registry.terraform.io/terraform-provider-openstack/openstack v1.51.1

Affected Resource(s)

  • opentelekomcloud_rds_parametergroup_v3
  • opentelekomcloud_rds_instance_v3

Terraform Configuration Files

resource "opentelekomcloud_rds_instance_v3" "this" {
  name = "test-rds"
  availability_zone = ["eu-de-01"]
  flavor = "rds.pg.c2.medium"
  security_group_id = module.sg-testing.this_security_group_id
  vpc_id = module.vpc.vpc_id[0]
  subnet_id = module.subnet.id

  db {
    password = "[REDACTED]"
    type = "PostgreSQL"
    version = "14"
    port = "5432"
  }

  volume {
    type = "ULTRAHIGH"
    size = "100"
  }
  param_group_id = opentelekomcloud_rds_parametergroup_v3.this.id
}

resource "opentelekomcloud_rds_parametergroup_v3" "this" {
  name        = "test-rds"

  values = {
    autovacuum_max_workers = "20"
  }

  datastore {
    type    = "PostgreSQL"
    version = "14"
  }
}

Debug Output/Panic Output

No output

Steps to Reproduce

  1. Create the RDS instance and the Parameter group with the example code above
  2. RDS parameter group has autovacuum_max_workers set to 20
  3. change autovacuum_max_workers = "20" to autovacuum_max_workers = "30" or similar and run terraform apply
  4. Modify was successful, but the parameter group attached to the RDS instance has still autovacuum_max_workers = "20"
  5. When you go to the Parameter Templates -> Custom Templates in the RDS overview and choose the created parameter group you will see that the value for autovacuum_max_workers is 30.

Expected Behavior

The parameter group that is attached to the RDS instance should be updated as the custom template did.

Actual Behavior

See Steps to Reproduce.
We need to manually reapply the custom template to the RDS instance to update the modified values.

@anton-sidelnikov
Copy link
Member

@EugenFo Hi, as workaround you can use parameters block inside rds instance resource:

  parameters = {
    max_prepared_transactions = "250"
    max_connections           = "300"
    autovacuum_max_workers    = "30"
  }

Need more time to investigate why parameter group not applied after changes.

@anton-sidelnikov anton-sidelnikov added otc-issue Blocked by OTC issues and removed accepted labels May 19, 2023
@anton-sidelnikov
Copy link
Member

https://jira.tsi-dev.otc-service.com/browse/BM-2138 - currently not possible to reapply configuration template to instance on changes, internal incident created, as workaround please use parameters block in opentelekomcloud_rds_instance_v3 resource, will add example in documentation.

otc-zuul bot pushed a commit that referenced this issue May 22, 2023
[RDS] added test with configuration parameters update

Summary of the Pull Request
PR Checklist

 Refers to: #2169
 Tests added/passed.
 Documentation updated.
 Schema updated.
 Release notes added.

Acceptance Steps Performed
=== RUN   TestAccRdsPostgre13V3ParamsBasic
--- PASS: TestAccRdsPostgre13V3ParamsBasic (542.66s)
PASS

Process finished with the exit code 0

Reviewed-by: Artem Lifshits
@anton-sidelnikov anton-sidelnikov removed their assignment Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
otc-issue Blocked by OTC issues
Projects
None yet
Development

No branches or pull requests

2 participants