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
Since the K8s resource must know the ip ranges of the nodes from the network resource, it references the nodes_ip_range computed property from the network resource. When a node is added/removed, this computed value is changed after the network update is complete which appears as inconsistency between the planning and execution to terraform causing it to fail.
To clarify the issue, it's helpful to depict the terraform workflow when applying an update. Terraform has a local state (stored in terraform.state) which is usually linked to remote objects stored on remote site. The read operation reads the remote data and syncs the local state with it. When changing the configuration, and executing terraform apply, the terraform first performs a read operation on the resources and syncs the local state with them. After that it inspects whether the configuration change would actually change the current state, if so it displays this info to the user and applies the update on the resources. If in the middle of the update some resource changes its property, it appears to terraform as inconsistency. This is exactly what happens for this issue, since the nodes_ip_range is not modified during the read (not possible to know the to-be-applied values), and after update the K8s was expecting some value but it gets another one.
Reporting in the plugin
Appears as an error message "Provider produced inconsistent result after apply".
Workaround
execute terraform apply -parallelism=1 again, it should see the up-to-date value and deploy the failing resources.
Fixes
No apparent clean fix. But it looks like it should be too common in other scenarios to go unnoticed.
The text was updated successfully, but these errors were encountered:
Description
Since the K8s resource must know the ip ranges of the nodes from the network resource, it references the
nodes_ip_range
computed property from the network resource. When a node is added/removed, this computed value is changed after the network update is complete which appears as inconsistency between the planning and execution to terraform causing it to fail.To clarify the issue, it's helpful to depict the terraform workflow when applying an update. Terraform has a local state (stored in
terraform.state
) which is usually linked to remote objects stored on remote site. The read operation reads the remote data and syncs the local state with it. When changing the configuration, and executingterraform apply
, the terraform first performs a read operation on the resources and syncs the local state with them. After that it inspects whether the configuration change would actually change the current state, if so it displays this info to the user and applies the update on the resources. If in the middle of the update some resource changes its property, it appears to terraform as inconsistency. This is exactly what happens for this issue, since the nodes_ip_range is not modified during the read (not possible to know the to-be-applied values), and after update the K8s was expecting some value but it gets another one.Reporting in the plugin
Appears as an error message "Provider produced inconsistent result after apply".
Workaround
execute
terraform apply -parallelism=1
again, it should see the up-to-date value and deploy the failing resources.Fixes
No apparent clean fix. But it looks like it should be too common in other scenarios to go unnoticed.
The text was updated successfully, but these errors were encountered: