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

scaleway_documentdb_private_network_endpoint state issue #2712

Open
D0wn3r opened this issue Aug 21, 2024 · 0 comments
Open

scaleway_documentdb_private_network_endpoint state issue #2712

D0wn3r opened this issue Aug 21, 2024 · 0 comments
Assignees
Labels
bug rdb Managed MySQL and PostgreSQL issues, bugs and feature requests

Comments

@D0wn3r
Copy link

D0wn3r commented Aug 21, 2024

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

Terraform v1.9.4
on linux_amd64
+ provider registry.terraform.io/scaleway/scaleway v2.42.1

Affected Resource(s)

  • scaleway_documentdb_private_network_endpoint
  • scaleway_rdb_instance

Terraform Configuration Files

terraform {
  required_providers {
    scaleway = {
      source = "scaleway/scaleway"
      version = "2.42.1"
    }
  }
  required_version = ">= 1.1.0"
}

provider "scaleway" {
  project_id        = "replaceme"
  zone            = "fr-par-2"
  region          = "fr-par"
  access_key      = "replaceme"
  secret_key      = "replaceme"
}

resource "scaleway_vpc_private_network" "vpc" {
  name = "test"
  ipv4_subnet {
      subnet = "192.168.0.0/24"
    }
}

resource "scaleway_rdb_instance" "postgresql" {
  name           = "test"
  node_type      = "DB-DEV-S"
  engine         = "PostgreSQL-15"
  is_ha_cluster  = false
  user_name      = "test"
  password       = "Th1s_is_my_password"
}

resource "scaleway_documentdb_private_network_endpoint" "main" {
  instance_id    = scaleway_rdb_instance.postgresql.id
  private_network {
    id           = scaleway_vpc_private_network.vpc.id
    ip_net       = "192.168.0.42/30"
  }
  depends_on = [scaleway_rdb_instance.postgresql]
}

Debug Output

The output of terraform after the second apply with no modification:
https://gist.github.com/D0wn3r/fbdfcd31436bc17f525d90f85544f35e

Expected Behavior

The private network should stay in the database if it doesn't have any modification

Actual Behavior

When we apply even touching nothing, the private network is delete
First apply create everything ok
Second apply delete the private network from the database
Third apply will add again the private network to the database
...

Steps to Reproduce

  1. terraform apply
  2. terraform apply
  3. terraform apply
@Laure-di Laure-di added rdb Managed MySQL and PostgreSQL issues, bugs and feature requests bug labels Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug rdb Managed MySQL and PostgreSQL issues, bugs and feature requests
Projects
None yet
Development

No branches or pull requests

3 participants