diff --git a/api/v1beta2/network_types.go b/api/v1beta2/network_types.go index e896d75518..fed81e1d86 100644 --- a/api/v1beta2/network_types.go +++ b/api/v1beta2/network_types.go @@ -242,7 +242,7 @@ func (v *VPCSpec) IsIPv6Enabled() bool { // SubnetSpec configures an AWS Subnet. type SubnetSpec struct { // ID defines a unique identifier to reference this resource. - ID string `json:"id,omitempty"` + ID string `json:"id"` // CidrBlock is the CIDR block to be used when the provider creates a managed VPC. CidrBlock string `json:"cidrBlock,omitempty"` @@ -284,6 +284,8 @@ func (s *SubnetSpec) String() string { } // Subnets is a slice of Subnet. +// +listType=map +// +listMapKey=id type Subnets []SubnetSpec // ToMap returns a map from id to subnet. diff --git a/config/crd/bases/controlplane.cluster.x-k8s.io_awsmanagedcontrolplanes.yaml b/config/crd/bases/controlplane.cluster.x-k8s.io_awsmanagedcontrolplanes.yaml index e11bd47d4c..9e26a35298 100644 --- a/config/crd/bases/controlplane.cluster.x-k8s.io_awsmanagedcontrolplanes.yaml +++ b/config/crd/bases/controlplane.cluster.x-k8s.io_awsmanagedcontrolplanes.yaml @@ -446,8 +446,13 @@ spec: description: Tags is a collection of tags describing the resource. type: object + required: + - id type: object type: array + x-kubernetes-list-map-keys: + - id + x-kubernetes-list-type: map vpc: description: VPC configuration. properties: @@ -1719,8 +1724,13 @@ spec: description: Tags is a collection of tags describing the resource. type: object + required: + - id type: object type: array + x-kubernetes-list-map-keys: + - id + x-kubernetes-list-type: map vpc: description: VPC configuration. properties: diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclusters.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclusters.yaml index 4904d18c1e..d451218f3e 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclusters.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclusters.yaml @@ -1153,8 +1153,13 @@ spec: description: Tags is a collection of tags describing the resource. type: object + required: + - id type: object type: array + x-kubernetes-list-map-keys: + - id + x-kubernetes-list-type: map vpc: description: VPC configuration. properties: diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclustertemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclustertemplates.yaml index 4e979dd2e4..e5cb4181d7 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclustertemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsclustertemplates.yaml @@ -757,8 +757,13 @@ spec: description: Tags is a collection of tags describing the resource. type: object + required: + - id type: object type: array + x-kubernetes-list-map-keys: + - id + x-kubernetes-list-type: map vpc: description: VPC configuration. properties: