(since the terraform scripts are run in a CI pipeline i do not have a debug output right now. I will try to re-run this scripts locally and will provide a debug output then)
Panic Output
No panic output given.
Expected Behavior
The change in the ip restrictions of the ovh_cloud_project_database.mongodb resource would be succesfully be applied.
Actual Behavior
Produces an error and stops the terraform deployment.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform plan out terraform.plan
+ terraform plan -out terraform-infra.plan
data.ovh_cloud_project.xxx: Reading...
data.ovh_cloud_project.xxx: Read complete after 0s
ovh_cloud_project_network_private.net101: Refreshing state... [id=pn-XXXX_101]
ovh_cloud_project_network_private_subnet.subnet_10: Refreshing state... [id=8bd8f077-b60d-4ae2-80d2-xxxxx]
ovh_cloud_project_kube.xxx: Refreshing state... [id=ae9b4359-96c9-473b-8d5c-xxxx]
ovh_cloud_project_kube_iprestrictions.bitbucket_and_dsvnet_only: Refreshing state... [id=ae9b4359-96c9-473b-8d5c-xxxx]
ovh_cloud_project_kube_nodepool.node_pool: Refreshing state... [id=a4a97be8-79c2-4db8-88e1-xxxx]
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create
~ update in-place
Terraform will perform the following actions:
# ovh_cloud_project_database.mongodb will be created
+ resource "ovh_cloud_project_database" "mongodb" {
+ advanced_configuration = (known after apply)
+ backup_regions = [
+ "SBG",
]
+ backup_time = "01:00:00"
+ created_at = (known after apply)
+ description = "mongodb-test"
+ disk_size = 10
+ disk_type = (known after apply)
+ endpoints = (known after apply)
+ engine = "mongodb"
+ flavor = "db2-2"
+ id = (known after apply)
+ maintenance_time = (known after apply)
+ network_type = (known after apply)
+ plan = "production"
+ service_name = "project-id...."
+ status = (known after apply)
+ version = "6.0"
+ ip_restrictions {
+ description = "internal-test-101-10"
+ ip = "10.28.10.0/24"
+ status = (known after apply)
}
+ nodes {
+ network_id = "701e0994-5a87-4d38-9bd6-xxx"
+ region = "DE"
+ subnet_id = "8bd8f077-b60d-4ae2-80d2-xxx"
}
+ nodes {
+ network_id = "701e0994-5a87-4d38-9bd6-xxx"
+ region = "DE"
+ subnet_id = "8bd8f077-b60d-4ae2-80d2-xxx"
}
+ nodes {
+ network_id = "701e0994-5a87-4d38-9bd6-xxx"
+ region = "DE"
+ subnet_id = "8bd8f077-b60d-4ae2-80d2-xxx"
}
+ timeouts {
+ create = "1h"
+ delete = "1h"
+ update = "1h"
}
}
# ovh_cloud_project_database_mongodb_user.mongodb-user will be created
+ resource "ovh_cloud_project_database_mongodb_user" "mongodb-user" {
+ cluster_id = (known after apply)
+ created_at = (known after apply)
+ id = (known after apply)
+ name = "mongodb_test@admin"
+ password = (sensitive value)
+ roles = [
+ "readWriteAnyDatabase@admin",
]
+ service_name = "project-id...."
+ status = (known after apply)
}
# ovh_cloud_project_kube.xxx will be updated in-place
~ resource "ovh_cloud_project_kube" "xxx" {
id = "ae9b4359-96c9-473b-8d5c-xxx"
name = "test-cluster"
~ nodes_subnet_id = "498edc06-3be9-4232-80d0-xxx" -> "8bd8f077-b60d-4ae2-80d2-xxx"
# (15 unchanged attributes hidden)
# (1 unchanged block hidden)
}
# ovh_cloud_project_network_private.net101 will be updated in-place
~ resource "ovh_cloud_project_network_private" "net101" {
id = "pn-xxx_101"
~ name = "test-28" -> "test-101"
# (7 unchanged attributes hidden)
}
Plan: 2 to add, 2 to change, 0 to destroy.
Changes to Outputs:
~ mongodb_password = (sensitive value)
~ mongodb_uri = "mongodb+srv://<username>:<password>@mongodb-xxx.database.cloud.ovh.net/admin?replicaSet=replicaset&tls=true" -> (known after apply)
─────────────────────────────────────────────────────────────────────────────
Saved the plan to: terraform.plan
To perform exactly these actions, run the following command to apply:
terraform apply "terraform.plan"
terraform apply -auto-approve terraform.plan
+ terraform apply -auto-approve terraform-infra.plan
ovh_cloud_project_network_private.net101: Modifying... [id=pn-XXXX_101]
ovh_cloud_project_network_private.net101: Modifications complete after 5s [id=pn-XXXX_101]
ovh_cloud_project_kube.xxx: Modifying... [id=ae9b4359-96c9-473b-8d5c-xxxx]
ovh_cloud_project_kube.xxx: Modifications complete after 0s [id=ae9b4359-96c9-473b-8d5c-xxxx]
╷
│ Error: Provider produced inconsistent final plan
│
│ When expanding the plan for ovh_cloud_project_database.mongodb to include
│ new values learned so far during apply, provider
│ "[registry.terraform.io/ovh/ovh](http://registry.terraform.io/ovh/ovh)" produced an invalid new value for
│ .ip_restrictions: planned set element
│ cty.ObjectVal(map[string]cty.Value{"description":cty.StringVal("internal-test-101-10"),
│ "ip":cty.StringVal("10.101.10.0/24"), "status":cty.UnknownVal(cty.String)})
│ does not correlate with any element in actual.
│
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.
╵
I then deleted the database resource manually, but the error with the now even missing database resource continues...
Describe the bug
I had connection issues with a private network (database was suddenly unreachable) and reconfigured the subnet of the private network.
But then i ran into this bug and got stuck.
It might be also/additionally an issue with an inconsistency in the OVH Api, since there seem to be some issues with the managed database resources.
Terraform Version
Terraform v1.9.2
OVH Terraform Provider Version
ovh/ovh v0.46.1
Affected Resource(s)
This is not an issue with Terraform core as other providers seem to work just fine, or restarting the plan/apply.
Terraform Configuration Files
(shortenend)
Debug Output
(since the terraform scripts are run in a CI pipeline i do not have a debug output right now. I will try to re-run this scripts locally and will provide a debug output then)
Panic Output
No panic output given.
Expected Behavior
The change in the ip restrictions of the ovh_cloud_project_database.mongodb resource would be succesfully be applied.
Actual Behavior
Produces an error and stops the terraform deployment.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform plan out terraform.plan
terraform apply -auto-approve terraform.plan