-
Notifications
You must be signed in to change notification settings - Fork 211
Description
Is there an existing issue for this?
- I have searched the existing issues
Provider Version
2.6.0
Terraform Version
1.3.5
Terraform Edition
Terraform Open Source (OSS)
Current Behavior
I've create via terraform an advanced cluster.
I've also created an mongodbatlas_project_ip_access_list resource to add a cidr for ip access list.
The resource has been correctly added, but the "allow anywhere" 0.0.0.0/0 has not been deleted.
This may lead to think that access is properly restricted when it is not.
Moreover if I create a new terraform plan, no drift is detected, as if the allow anywhere rule were not present, but it is.
Finally If manually add new rules via the portal, the plan seems to refresh the state only of my added rule and to ignore other rules.
It is unconvenient to delete manually the allow anywhere rule and if someone add new rules I have no way to fix the drift via terraform if it is not detected correctly.
Am I doing something wrong? Is this intended? In any case it seems a surprising behaviour.
Terraform configuration to reproduce the issue
terraform {
required_version = "~> 1.3.5"
required_providers {
mongodbatlas = {
source = "mongodb/mongodbatlas"
version = ">=2.6.0, <3.0.0"
}
# other providers
}
}
resource "mongodbatlas_advanced_cluster" "cluster" {
project_id = var.project_id
# other configurations
}
resource "mongodbatlas_project_ip_access_list" "ip" {
for_each = var.ip_access_list
project_id = var.project_id
cidr_block = each.value.cidr_block
comment = each.value.comment
}Steps To Reproduce
- create a cluster with a mongodbatlas_project_ip_access_list resource
- manually create new rules through the portal
- run terraform apply again
- the added rules are not deleted, no drift is detected.
Logs
Code of Conduct
- I agree to follow this project's Code of Conduct