{"record":{"id":"89f90090f648ff0d","repo":"kubernetes/kops","slug":"public-ip-address-q-referenced-by-security-rule","errorCode":null,"errorMessage":"public IP address %q referenced by security rule %q does not have an allocated address","messagePattern":"public IP address %q referenced by security rule %q does not have an allocated address","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/azuretasks/networksecuritygroup.go","lineNumber":202,"sourceCode":"\tif a == nil {\n\t\tklog.Infof(\"Creating a new Network Security Group with name: %s\", fi.ValueOf(e.Name))\n\t} else {\n\t\tklog.Infof(\"Updating a Network Security Group with name: %s\", fi.ValueOf(e.Name))\n\t}\n\n\tp := network.SecurityGroup{\n\t\tProperties: &network.SecurityGroupPropertiesFormat{\n\t\t\tSecurityRules: []*network.SecurityRule{},\n\t\t},\n\t\tLocation: to.Ptr(t.Cloud.Region()),\n\t\tName:     to.Ptr(*e.Name),\n\t\tTags:     e.Tags,\n\t}\n\tfor _, nsr := range e.SecurityRules {\n\t\tsourceAddressPrefix := nsr.SourceAddressPrefix\n\t\tif nsr.SourcePublicIPAddress != nil {\n\t\t\tif nsr.SourcePublicIPAddress.IPAddress == nil {\n\t\t\t\treturn fmt.Errorf(\"public IP address %q referenced by security rule %q does not have an allocated address\", fi.ValueOf(nsr.SourcePublicIPAddress.Name), fi.ValueOf(nsr.Name))\n\t\t\t}\n\t\t\tsourceAddressPrefix = nsr.SourcePublicIPAddress.IPAddress\n\t\t}\n\t\tsecurityRule := network.SecurityRule{\n\t\t\tName: nsr.Name,\n\t\t\tProperties: &network.SecurityRulePropertiesFormat{\n\t\t\t\tPriority:                   nsr.Priority,\n\t\t\t\tAccess:                     &nsr.Access,\n\t\t\t\tDirection:                  &nsr.Direction,\n\t\t\t\tProtocol:                   &nsr.Protocol,\n\t\t\t\tSourceAddressPrefix:        sourceAddressPrefix,\n\t\t\t\tSourceAddressPrefixes:      nsr.SourceAddressPrefixes,\n\t\t\t\tSourcePortRange:            nsr.SourcePortRange,\n\t\t\t\tDestinationAddressPrefix:   nsr.DestinationAddressPrefix,\n\t\t\t\tDestinationAddressPrefixes: nsr.DestinationAddressPrefixes,\n\t\t\t\tDestinationPortRange:       nsr.DestinationPortRange,\n\t\t\t},\n\t\t}","sourceCodeStart":184,"sourceCodeEnd":220,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/azuretasks/networksecuritygroup.go#L184-L220","documentation":"Validation guard when rendering an Azure Network Security Group rule that references a source public IP address: the referenced PublicIPAddress object exists but has no allocated IPAddress value yet. Fires when the PIP is still provisioning or failed to allocate, since the rule needs a concrete address prefix.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/azuretasks/networksecuritygroup.go:202 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Wait for the public IP allocation to complete and re-run the operation","Check the public IP resource is not in a failed state","Verify the correct public IP resource is referenced in the security rule spec"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}