@@ -232,18 +232,18 @@ const (
232
232
// For example:
233
233
// - any - Any source or destination (0.0.0.0/0)
234
234
// - 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)
236
236
// - sg - A Security Group.
237
- // +kubebuilder:validation:Enum=any;cidr;ip ;sg
237
+ // +kubebuilder:validation:Enum=any;cidr;address ;sg
238
238
type SecurityGroupRuleRemoteType string
239
239
240
240
const (
241
241
// SecurityGroupRuleRemoteTypeAny defines the destination or source for the Rule is anything/anywhere.
242
242
SecurityGroupRuleRemoteTypeAny SecurityGroupRuleRemoteType = SecurityGroupRuleRemoteType ("any" )
243
243
// SecurityGroupRuleRemoteTypeCIDR defines the destination or source for the Rule is a CIDR block.
244
244
SecurityGroupRuleRemoteTypeCIDR SecurityGroupRuleRemoteType = SecurityGroupRuleRemoteType ("cidr" )
245
- // SecurityGroupRuleRemoteTypeIP defines the destination or source for the Rule is an IP address.
246
- SecurityGroupRuleRemoteTypeIP SecurityGroupRuleRemoteType = SecurityGroupRuleRemoteType ("ip " )
245
+ // SecurityGroupRuleRemoteTypeAddress defines the destination or source for the Rule is an address.
246
+ SecurityGroupRuleRemoteTypeAddress SecurityGroupRuleRemoteType = SecurityGroupRuleRemoteType ("address " )
247
247
// SecurityGroupRuleRemoteTypeSG defines the destination or source for the Rule is a VPC Security Group.
248
248
SecurityGroupRuleRemoteTypeSG SecurityGroupRuleRemoteType = SecurityGroupRuleRemoteType ("sg" )
249
249
)
@@ -328,20 +328,20 @@ type SecurityGroupRule struct {
328
328
329
329
// SecurityGroupRuleRemote defines a VPC Security Group Rule's remote details.
330
330
// The type of remote defines the additional remote details where are used for defining the remote.
331
- // +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 SecurityGroupRuleRemoteTypeAny remoteType"
332
- // +kubebuilder:validation:XValidation:rule="self.remoteType == 'cidr' ? (has(self.cidrSubnetName) && !has(self.ip ) && !has(self.securityGroupName)) : true",message="only cidrSubnetName is valid for SecurityGroupRuleRemoteTypeCIDR remoteType"
333
- // +kubebuilder:validation:XValidation:rule="self.remoteType == 'ip ' ? (has(self.ip ) && !has(self.cidrSubnetName) && !has(self.securityGroupName)) : true",message="only ip is valid for SecurityGroupRuleRemoteTypeIP remoteType"
334
- // +kubebuilder:validation:XValidation:rule="self.remoteType == 'sg' ? (has(self.securityGroupName) && !has(self.cidrSubnetName) && !has(self.ip )) : true",message="only securityGroupName is valid for SecurityGroupRuleRemoteTypeSG remoteType"
331
+ // +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 SecurityGroupRuleRemoteTypeAny remoteType"
332
+ // +kubebuilder:validation:XValidation:rule="self.remoteType == 'cidr' ? (has(self.cidrSubnetName) && !has(self.address ) && !has(self.securityGroupName)) : true",message="only cidrSubnetName is valid for SecurityGroupRuleRemoteTypeCIDR remoteType"
333
+ // +kubebuilder:validation:XValidation:rule="self.remoteType == 'address ' ? (has(self.address ) && !has(self.cidrSubnetName) && !has(self.securityGroupName)) : true",message="only address is valid for SecurityGroupRuleRemoteTypeIP remoteType"
334
+ // +kubebuilder:validation:XValidation:rule="self.remoteType == 'sg' ? (has(self.securityGroupName) && !has(self.cidrSubnetName) && !has(self.address )) : true",message="only securityGroupName is valid for SecurityGroupRuleRemoteTypeSG remoteType"
335
335
type SecurityGroupRuleRemote struct {
336
336
// cidrSubnetName is the name of the VPC Subnet to retrieve the CIDR from, to use for the remote's destination/source.
337
337
// Only used when remoteType is SecurityGroupRuleRemoteTypeCIDR.
338
338
// +optional
339
339
CIDRSubnetName * string `json:"cidrSubnetName,omitempty"`
340
340
341
- // ip is the IP to use for the remote's destination/source.
341
+ // address is the address to use for the remote's destination/source.
342
342
// Only used when remoteType is SecurityGroupRuleRemoteTypeIP.
343
343
// +optional
344
- IP * string `json:"ip ,omitempty"`
344
+ Address * string `json:"address ,omitempty"`
345
345
346
346
// remoteType defines the type of filter to define for the remote's destination/source.
347
347
// +required
0 commit comments