Skip to content

Commit

Permalink
VPC: Create basic types for VPC
Browse files Browse the repository at this point in the history
Create a basic VPC resource type that VPC definitions
will use.
  • Loading branch information
cjschaef committed Apr 3, 2024
1 parent 982287a commit dc4e223
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
14 changes: 14 additions & 0 deletions api/v1beta2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,3 +396,17 @@ type VPCEndpoint struct {
// +optional
LBID *string `json:"loadBalancerIPID,omitempty"`
}

// VPCResource represents a specific VPC resource.
// +kubebuilder:validation:XValidation:rule="has(self.id) || has(self.name)",message="an id or name must be provided"
type VPCResource struct {
// id of the resource.
// +kubebuilder:validation:MinLength=1
// +optional
ID *string `json:"id,omitempty"`

// name of the resource.
// +kubebuilder:validation:MinLength=1
// +optional
Name *string `json:"name,omitempty"`
}
25 changes: 25 additions & 0 deletions api/v1beta2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit dc4e223

Please sign in to comment.