kubernetes/kops · error
cannot apply changes to IP Address: %v
Error message
cannot apply changes to IP Address: %v
What it means
Returned from Address.RenderGCE when the address already exists (a != nil) and the computed diff is non-empty. The GCE address task only supports create — there is no code path to mutate an existing static IP, so any detected change is rejected.
Source
Thrown at upup/pkg/fi/cloudup/gcetasks/address.go:193
}
if e.Subnetwork != nil {
addr.Subnetwork = e.Subnetwork.URL(t.Cloud.Project(), t.Cloud.Region())
}
if a == nil {
klog.V(2).Infof("Creating Address: %q", addr.Name)
op, err := cloud.Compute().Addresses().Insert(cloud.Project(), cloud.Region(), addr)
if err != nil {
return fmt.Errorf("error creating IP Address: %v", err)
}
if err := cloud.WaitForOp(op); err != nil {
return fmt.Errorf("error waiting for IP Address: %v", err)
}
} else {
return fmt.Errorf("cannot apply changes to IP Address: %v", changes)
}
return nil
}
type terraformAddress struct {
Name *string `cty:"name"`
AddressType *string `cty:"address_type"`
Purpose *string `cty:"purpose"`
Subnetwork *terraformWriter.Literal `cty:"subnetwork"`
}
func (_ *Address) RenderTerraform(t *terraform.TerraformTarget, a, e, changes *Address) error {
tf := &terraformAddress{
Name: e.Name,
AddressType: e.IPAddressType,
Purpose: e.Purpose,
}View on GitHub (pinned to 4c8573c808)
Solutions
- Identify the changed field(s) in the printed diff and adjust the cluster spec to match the existing address
- Delete the address out-of-band (gcloud compute addresses delete) if it must be recreated, then re-run apply
- Check for manual edits or drift on the GCE address that conflict with the spec
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at upup/pkg/fi/cloudup/gcetasks/address.go:193 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/190b324902d5b2f3.
Report an issue: GitHub.