-
Notifications
You must be signed in to change notification settings - Fork 178
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
Cluster resource's provider_instance_size_name
should be optional when using autoscaling
#1299
Comments
Thanks for opening this issue. The ticket INTMDB-916 was created for internal tracking. |
Hi @AaronFriel, For an example, see #1288 (comment). Can you confirm if the ignore works for you here? If so, we can look to improving the docs & examples here to make the |
@colm-quinn understood, I'm being a bit prescriptive here with regard to "ignore-changes". We at Pulumi see this fairly often with users filing bug reports against providers. This report I filed was the second or third in one day in which the workaround is to use Rather than rely on
|
Hi folks, I wanted to add another perspective on this. Relying on ignore_changes makes it hard in scenarios where the cluster definition is inside a module. For example, we declare the cluster and other relevant Atlas resources as part of a module that is re-used across more than one environment but not all MongoDB Atlas clusters are expected to be configured with auto-scaling. Because of this, having an Here is an example definition of what I'm mentioning. Module definition: resource "mongodbatlas_advanced_cluster" "cluster" {
project_id = var.project_id
name = var.name
cluster_type = "REPLICASET"
replication_specs {
region_configs {
electable_specs {
node_count = 3
instance_size = var.auto_scaling ? null : var.instance_size
}
auto_scaling {
disk_gb_enabled = true
compute_enabled = var.auto_scaling
compute_min_instance_size = var.auto_scaling ? var.auto_scaling_min : null
compute_max_instance_size = var.auto_scaling ? var.auto_scaling_max : null
}
provider_name = "AWS"
priority = 7
region_name = "US_EAST_1"
}
}
}
} First environment: module "atlas"{
source = "./atlas"
project_id = "my_project_id"
name = "no_autoscaling"
auto_scaling = false
instance_size = "M10"
} Second environment: module "atlas"{
source = "./atlas"
project_id = "my_project_id"
name = "no_autoscaling"
auto_scaling = true
auto_scaling_min = "M10"
auto_scaling_max = "M80"
} So by using Also based on the documentation this should be supported as the |
Hi just as an update this item is on our roadmap, but still several quarters away. internal tracking ticket CLOUDP-215040 |
Hello Our team is also interested in that feature. |
When autoscaling is enabled, applying configurations which set the
provider_instance_size_name
field reset the autoscaled instance size to the configured value.Users would almost certainly prefer that when
auto_scaling_compute_enabled
is true, they do not need to set this value or the value is ignored (and the configuration in state is returned onRead
) so that plans do not update thecluster
resource.First reported by a Pulumi user here:
The text was updated successfully, but these errors were encountered: