Hi,
We have created an environment from Terraform with min_node_count set to 2 and max_node_count set to null.
Every time we run that Terraform it results in that Terraform identifies a change because apparently min_node_count is something else than 2.
# google_apigee_environment.main["dev-env"] will be updated in-place
~ resource "google_apigee_environment" "main" {
id = "organizations/[my-org]/environments/dev-env"
name = "dev-env"
# (5 unchanged attributes hidden)
+ node_config {
+ min_node_count = "2"
}
}
and this gives an error because you are not allwed to change it.
Solved! Go to Solution.
Hello @Bomelin ,
Welcome to Google Cloud Community. Did you've maybe tried use "lifecycle" option as per [1]. and min_node_count parameter ?
resource "some_resource" "example" {
// Your resource configuration
lifecycle {
ignore_changes = [
// List of attributes for Terraform to ignore changes to
attribute_name,
]
}
}
[1.] https://developer.hashicorp.com/terraform/language/meta-arguments/lifecycle
cheers,
DamianS