@@ -232,18 +232,18 @@ const (
232232// For example:
233233// - any - Any source or destination (0.0.0.0/0)
234234// - cidr - A CIDR representing a set of IP's (10.0.0.0/28)
235- // - ip - A specific IP address (192.168.0.1)
235+ // - address - A specific address (192.168.0.1)
236236// - sg - A Security Group.
237- // +kubebuilder:validation:Enum=any;cidr;ip ;sg
237+ // +kubebuilder:validation:Enum=any;cidr;address ;sg
238238type VPCSecurityGroupRuleRemoteType string
239239
240240const (
241241 // VPCSecurityGroupRuleRemoteTypeAny defines the destination or source for the Rule is anything/anywhere.
242242 VPCSecurityGroupRuleRemoteTypeAny VPCSecurityGroupRuleRemoteType = VPCSecurityGroupRuleRemoteType ("any" )
243243 // VPCSecurityGroupRuleRemoteTypeCIDR defines the destination or source for the Rule is a CIDR block.
244244 VPCSecurityGroupRuleRemoteTypeCIDR VPCSecurityGroupRuleRemoteType = VPCSecurityGroupRuleRemoteType ("cidr" )
245- // VPCSecurityGroupRuleRemoteTypeIP defines the destination or source for the Rule is an IP address.
246- VPCSecurityGroupRuleRemoteTypeIP VPCSecurityGroupRuleRemoteType = VPCSecurityGroupRuleRemoteType ("ip " )
245+ // VPCSecurityGroupRuleRemoteTypeAddress defines the destination or source for the Rule is an address.
246+ VPCSecurityGroupRuleRemoteTypeAddress VPCSecurityGroupRuleRemoteType = VPCSecurityGroupRuleRemoteType ("address " )
247247 // VPCSecurityGroupRuleRemoteTypeSG defines the destination or source for the Rule is a VPC Security Group.
248248 VPCSecurityGroupRuleRemoteTypeSG VPCSecurityGroupRuleRemoteType = VPCSecurityGroupRuleRemoteType ("sg" )
249249)
@@ -320,20 +320,20 @@ type VPCSecurityGroupRule struct {
320320
321321// VPCSecurityGroupRuleRemote defines a VPC Security Group Rule's remote details.
322322// The type of remote defines the additional remote details where are used for defining the remote.
323- // +kubebuilder:validation:XValidation:rule="self.remoteType == 'any' ? (!has(self.cidrSubnetName) && !has(self.ip ) && !has(self.securityGroupName)) : true",message="cidrSubnetName, ip , and securityGroupName are not valid for VPCSecurityGroupRuleRemoteTypeAny remoteType"
324- // +kubebuilder:validation:XValidation:rule="self.remoteType == 'cidr' ? (has(self.cidrSubnetName) && !has(self.ip ) && !has(self.securityGroupName)) : true",message="only cidrSubnetName is valid for VPCSecurityGroupRuleRemoteTypeCIDR remoteType"
325- // +kubebuilder:validation:XValidation:rule="self.remoteType == 'ip ' ? (has(self.ip ) && !has(self.cidrSubnetName) && !has(self.securityGroupName)) : true",message="only ip is valid for VPCSecurityGroupRuleRemoteTypeIP remoteType"
326- // +kubebuilder:validation:XValidation:rule="self.remoteType == 'sg' ? (has(self.securityGroupName) && !has(self.cidrSubnetName) && !has(self.ip )) : true",message="only securityGroupName is valid for VPCSecurityGroupRuleRemoteTypeSG remoteType"
323+ // +kubebuilder:validation:XValidation:rule="self.remoteType == 'any' ? (!has(self.cidrSubnetName) && !has(self.address ) && !has(self.securityGroupName)) : true",message="cidrSubnetName, addresss , and securityGroupName are not valid for VPCSecurityGroupRuleRemoteTypeAny remoteType"
324+ // +kubebuilder:validation:XValidation:rule="self.remoteType == 'cidr' ? (has(self.cidrSubnetName) && !has(self.address ) && !has(self.securityGroupName)) : true",message="only cidrSubnetName is valid for VPCSecurityGroupRuleRemoteTypeCIDR remoteType"
325+ // +kubebuilder:validation:XValidation:rule="self.remoteType == 'address ' ? (has(self.address ) && !has(self.cidrSubnetName) && !has(self.securityGroupName)) : true",message="only address is valid for VPCSecurityGroupRuleRemoteTypeIP remoteType"
326+ // +kubebuilder:validation:XValidation:rule="self.remoteType == 'sg' ? (has(self.securityGroupName) && !has(self.cidrSubnetName) && !has(self.address )) : true",message="only securityGroupName is valid for VPCSecurityGroupRuleRemoteTypeSG remoteType"
327327type VPCSecurityGroupRuleRemote struct {
328328 // cidrSubnetName is the name of the VPC Subnet to retrieve the CIDR from, to use for the remote's destination/source.
329329 // Only used when remoteType is VPCSecurityGroupRuleRemoteTypeCIDR.
330330 // +optional
331331 CIDRSubnetName * string `json:"cidrSubnetName,omitempty"`
332332
333- // ip is the IP to use for the remote's destination/source.
334- // Only used when remoteType is VPCSecurityGroupRuleRemoteTypeIP .
333+ // address is the address to use for the remote's destination/source.
334+ // Only used when remoteType is VPCSecurityGroupRuleRemoteTypeAddress .
335335 // +optional
336- IP * string `json:"ip ,omitempty"`
336+ Address * string `json:"address ,omitempty"`
337337
338338 // remoteType defines the type of filter to define for the remote's destination/source.
339339 // +required
0 commit comments