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

Bug: read replica service returns incorrect password #248

Open
chayac opened this issue Dec 12, 2024 · 0 comments
Open

Bug: read replica service returns incorrect password #248

chayac opened this issue Dec 12, 2024 · 0 comments

Comments

@chayac
Copy link

chayac commented Dec 12, 2024

When I create a read replica, Terraform returns a password for tsdbadmin but that password is incorrect because the read replica actually uses the primary instance's password.

Example code for repro (using CDKTF):

import { Construct } from "constructs";
import { App, TerraformStack } from "cdktf";
import { TimescaleProvider } from "./.gen/providers/timescale/provider";
import { Service } from "./.gen/providers/timescale/service";

class MyStack extends TerraformStack {
  constructor(scope: Construct, id: string) {
    super(scope, id);

    new TimescaleProvider(this, "timescale", {
      accessKey: "api-key",
      projectId: "project-id",
      secretKey: "api-secret",
    });

    const timescaleService = new Service(this, "timescaledb", {});

    const timescaleReadReplicaService = new Service(
      this,
      "timescaledbReadReplica",
      { readReplicaSource: timescaleService.id }
    );

    console.log(timescaleService.password);
    console.log(timescaleReadReplicaService.password)
  }
}

const app = new App();
new MyStack(app, "test-cdktf");
app.synth();

Expected behavior: timescaleReadReplicaService.password === timescaleService.password

Actual behavior: timescaleReadReplicaService.password is different and authentication fails when using that password to log in to the read replica

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant