-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
google_container_cluster network information keeps being updated on subsequent identical terraform plan #1566
Comments
I'm observing the same behavior. |
I encounter the same error with my config.(similar to the authors config) |
Looks a lot like #988 |
I did further tests and The following configuration also updates network configuration on subsequent resource "google_compute_network" "vpc" {
name = "${var.vpc_name}"
auto_create_subnetworks = false
}
resource "google_compute_subnetwork" "vpc_subnet" {
name = "${var.vpc_subnet_name}"
network = "${google_compute_network.vpc.name}"
ip_cidr_range = "${var.vpc_ip_cidr_range}"
}
resource "google_container_cluster" "primary" {
name = "${var.cluster_name}"
network = "${google_compute_network.vpc.name}"
subnetwork = "${google_compute_subnetwork.vpc_subnet.name}"
node_pool = {
name = "default-pool"
}
lifecycle = {
ignore_changes = ["node_pool"]
}
}
resource "google_container_node_pool" "np" {
name = "second-pool"
cluster = "${google_container_cluster.primary.name}"
node_count = 1
} The following configuration works as expected (no network information is updated): resource "google_compute_network" "vpc" {
name = "${var.vpc_name}"
auto_create_subnetworks = false
}
resource "google_compute_subnetwork" "vpc_subnet" {
name = "${var.vpc_subnet_name}"
network = "${google_compute_network.vpc.name}"
ip_cidr_range = "${var.vpc_ip_cidr_range}"
}
resource "google_container_cluster" "primary" {
name = "${var.cluster_name}"
network = "${google_compute_network.vpc.name}"
subnetwork = "${google_compute_subnetwork.vpc_subnet.name}"
initial_node_count = 1
}
resource "google_container_node_pool" "np" {
name = "second-pool"
cluster = "${google_container_cluster.primary.name}"
node_count = 1
} In the former case, there is a |
Hey all, just wanted to pop in here to say that you've been heard. I've spent a fair bit of time trying to debug #988, which is almost certainly the same root cause, and all I've been able to come up with is that I think it's a bug in Terraform core. I'd still love to keep working on it and trying to find a fix, but it might take a while. Hang tight! |
Bug filed against TF: hashicorp/terraform#18209 |
Closing since upstream bug is fixed in HEAD. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
Everything being the same, subsequent
terraform plan
should show "No changes. Infrastructure is up-to-date."Actual Behavior
Steps to Reproduce
terraform init
terraform apply
terraform plan
Potential Culprit
remove_default_node_pool
seems to be the culprit. Without this parameter, everything works fine.The text was updated successfully, but these errors were encountered: