You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update: removing the network_policy assignment eliminates the diff but it prevents defining it from a variable and more importantly does not update the cluster.
Expected Behavior
After applying configuration 1 to enable network policy, then configuration 2 to disable it, the plan should no longer detect changes.
Actual Behavior
After applying configuration 1 to enable network policy, then configuration 2 to disable it, the plan still detects changes.
Steps to Reproduce
Enable network policy with configuration 1 then disable it with configuration 2 :
# terraform apply
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
~ google_container_cluster.gke_cluster
network_policy.0.provider: "" => "PROVIDER_UNSPECIFIED"
Plan: 0 to add, 1 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
google_container_cluster.gke_cluster: Modifying... (ID: mycluster)
network_policy.0.provider: "" => "PROVIDER_UNSPECIFIED"
google_container_cluster.gke_cluster: Modifications complete after 2s (ID: mycluster)
Apply complete! Resources: 0 added, 1 changed, 0 destroyed.
# terraform plan
[...]
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
~ google_container_cluster.gke_cluster
network_policy.0.provider: "" => "PROVIDER_UNSPECIFIED"
Plan: 0 to add, 1 to change, 0 to destroy.
Important Factoids
At some point, I passed the following to disable network policy on that cluster:
network_policy {
enabled = false
}
This may have resulted in a special state on GKE API side as it returns an empty map for networkPolicy instead of nothing at all:
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 👉 hashibot-feedback@hashicorp.com. Thanks!
ghost
locked and limited conversation to collaborators
Mar 29, 2020
Terraform Version
Same behavior with 1.5.0 and recent master@cc5f77e3:
Affected Resource(s)
Terraform Configuration Files
Notes: replacing
network_policy {}
bynetwork_policy = []
has the same behavior with a slightly different diff:Update: removing the
network_policy
assignment eliminates the diff but it prevents defining it from a variableand more importantly does not update the cluster.Expected Behavior
After applying configuration 1 to enable network policy, then configuration 2 to disable it, the plan should no longer detect changes.
Actual Behavior
After applying configuration 1 to enable network policy, then configuration 2 to disable it, the plan still detects changes.
Steps to Reproduce
Enable network policy with configuration 1 then disable it with configuration 2 :
Important Factoids
At some point, I passed the following to disable network policy on that cluster:
This may have resulted in a special state on GKE API side as it returns an empty map for networkPolicy instead of nothing at all:
My ultimate goal is to be able to pass a variable to modify
network_policy
with:or:
The text was updated successfully, but these errors were encountered: