{"record":{"id":"e2fb5b672449c591","repo":"kubernetes/kops","slug":"error-modifying-assignipv6addressoncreation-w","errorCode":null,"errorMessage":"error modifying AssignIPv6AddressOnCreation: %w","messagePattern":"error modifying AssignIPv6AddressOnCreation: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/awstasks/subnet.go","lineNumber":308,"sourceCode":"\t\t\t\tIpv6CidrBlock: e.IPv6CIDR,\n\t\t\t\tSubnetId:      e.ID,\n\t\t\t}\n\n\t\t\t_, err := t.Cloud.EC2().AssociateSubnetCidrBlock(ctx, request)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"error associating subnet cidr block: %v\", err)\n\t\t\t}\n\t\t}\n\t}\n\n\tif a == nil || changes.AssignIPv6AddressOnCreation != nil {\n\t\trequest := &ec2.ModifySubnetAttributeInput{\n\t\t\tSubnetId:                    e.ID,\n\t\t\tAssignIpv6AddressOnCreation: &ec2types.AttributeBooleanValue{Value: e.AssignIPv6AddressOnCreation},\n\t\t}\n\t\t_, err := t.Cloud.EC2().ModifySubnetAttribute(ctx, request)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error modifying AssignIPv6AddressOnCreation: %w\", err)\n\t\t}\n\t}\n\n\tif changes.ResourceBasedNaming != nil {\n\t\thostnameType := ec2types.HostnameTypeIpName\n\t\tif *changes.ResourceBasedNaming {\n\t\t\thostnameType = ec2types.HostnameTypeResourceName\n\t\t}\n\t\trequest := &ec2.ModifySubnetAttributeInput{\n\t\t\tSubnetId:                       e.ID,\n\t\t\tPrivateDnsHostnameTypeOnLaunch: hostnameType,\n\t\t}\n\t\t_, err := t.Cloud.EC2().ModifySubnetAttribute(ctx, request)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error modifying hostname type: %w\", err)\n\t\t}\n\n\t\tif fi.ValueOf(e.CIDR) == \"\" {","sourceCodeStart":290,"sourceCodeEnd":326,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/awstasks/subnet.go#L290-L326","documentation":"ModifySubnetAttribute failed while toggling AssignIpv6AddressOnCreation on the subnet; the wrapped error is the AWS EC2 response (permissions or subnet state).","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/awstasks/subnet.go:308 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check ec2:ModifySubnetAttribute permissions","Verify the subnet exists and is in a modifiable state, then retry"],"exampleFix":null,"handlingStrategy":"try-catch","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"}