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

private_network not working in scaleway_rdb_instance when restoring from snapshot #2978

Open
fin-ger opened this issue Mar 12, 2025 · 0 comments

Comments

@fin-ger
Copy link

fin-ger commented Mar 12, 2025

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 other comments that do not add relevant new information or questions, 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

$ tofu version
OpenTofu v1.9.0
on linux_amd64
+ provider registry.opentofu.org/hashicorp/external v2.3.4
+ provider registry.opentofu.org/hashicorp/random v3.6.3
+ provider registry.opentofu.org/loafoe/htpasswd v1.0.4
+ provider registry.opentofu.org/scaleway/scaleway v2.51.0

Affected Resource(s)

  • scaleway_rdb_instance

Terraform Configuration Files

resource "scaleway_rdb_instance" "test_db" {
  name                      = "test-db"
  node_type                 = "db-play2-pico"
  volume_type               = "sbs_15k"
  volume_size_in_gb         = 10
  is_ha_cluster             = false
  disable_backup            = false
  backup_schedule_frequency = 1 # every hour
  backup_schedule_retention = 30
  backup_same_region        = false
  user_name                 = "fancyuser"
  password                  = "verysecurepassword"
  encryption_at_rest        = true
  snapshot_id               = data.external.test_db_snapshots.result.id

  private_network {
    pn_id       = scaleway_vpc_private_network.test_db.id
    enable_ipam = true
  }
}

Expected Behavior

A rdb instance is created from a snapshot and placed within the provided private network.

Actual Behavior

Everything runs without errors and restores the database successfully. There is no error given. However, after apply the database is accessible from the public internet and a public load-balancer is created. Additionally, the rdb instance is not connected to the private network. This erroneous state is not recoverable from within tf (at least none that I know of, none of my attempts to fix it worked - the public endpoint could only be deleted from the webinterface).

Steps to Reproduce

  1. tofu apply

References

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