From f1d034779e42d0b16e1b615df67d4b226b96ce6a Mon Sep 17 00:00:00 2001 From: Jason-Zhang Date: Fri, 18 Oct 2024 16:24:03 +0800 Subject: [PATCH] add and update eip resources (#4) --- .../v1alpha1/zz_generated.conversion_hubs.go | 34 + apis/eip/v1alpha1/zz_generated.deepcopy.go | 3318 +++++++++++++++++ apis/eip/v1alpha1/zz_generated.managed.go | 549 +++ apis/eip/v1alpha1/zz_generated.managedlist.go | 90 + apis/eip/v1alpha1/zz_generated.resolvers.go | 248 ++ apis/eip/v1alpha1/zz_globaleip_terraformed.go | 129 + apis/eip/v1alpha1/zz_globaleip_types.go | 217 ++ .../zz_globaleipassociate_terraformed.go | 129 + .../v1alpha1/zz_globaleipassociate_types.go | 360 ++ .../zz_globalinternetbandwidth_terraformed.go | 129 + .../zz_globalinternetbandwidth_types.go | 224 ++ apis/eip/v1alpha1/zz_groupversion_info.go | 32 + .../v1alpha1/zz_vpcbandwidth_terraformed.go | 129 + apis/eip/v1alpha1/zz_vpcbandwidth_types.go | 271 ++ .../zz_vpcbandwidthassociate_terraformed.go | 129 + .../zz_vpcbandwidthassociate_types.go | 204 + apis/eip/v1alpha1/zz_vpceip_terraformed.go | 129 + apis/eip/v1alpha1/zz_vpceip_types.go | 432 +++ .../zz_vpceipassociate_terraformed.go | 129 + apis/eip/v1alpha1/zz_vpceipassociate_types.go | 159 + .../zz_vpceipv3associate_terraformed.go | 129 + .../v1alpha1/zz_vpceipv3associate_types.go | 158 + .../zz_vpcinternetgateway_terraformed.go | 129 + .../v1alpha1/zz_vpcinternetgateway_types.go | 208 ++ apis/zz_register.go | 2 + config/eip/config.go | 71 + config/external_name.go | 11 + config/provider.go | 2 + .../eip/v1alpha1/globaleip.yaml | 37 + .../eip/v1alpha1/globaleipassociate.yaml | 23 + .../eip/v1alpha1/globalinternetbandwidth.yaml | 20 + .../eip/v1alpha1/vpcbandwidth.yaml | 12 + .../eip/v1alpha1/vpcbandwidthassociate.yaml | 31 + examples-generated/eip/v1alpha1/vpceip.yaml | 17 + .../eip/v1alpha1/vpceipassociate.yaml | 13 + .../eip/v1alpha1/vpceipv3associate.yaml | 15 + .../eip/v1alpha1/vpcinternetgateway.yaml | 15 + .../controller/eip/globaleip/zz_controller.go | 87 + .../eip/globaleipassociate/zz_controller.go | 87 + .../globalinternetbandwidth/zz_controller.go | 87 + .../eip/vpcbandwidth/zz_controller.go | 87 + .../vpcbandwidthassociate/zz_controller.go | 87 + .../controller/eip/vpceip/zz_controller.go | 87 + .../eip/vpceipassociate/zz_controller.go | 87 + .../eip/vpceipv3associate/zz_controller.go | 87 + .../eip/vpcinternetgateway/zz_controller.go | 87 + internal/controller/zz_setup.go | 18 + ...oud.crossplane.io_globaleipassociates.yaml | 775 ++++ ....huaweicloud.crossplane.io_globaleips.yaml | 477 +++ ...rossplane.io_globalinternetbandwidths.yaml | 494 +++ ....crossplane.io_vpcbandwidthassociates.yaml | 708 ++++ ...aweicloud.crossplane.io_vpcbandwidths.yaml | 532 +++ ...icloud.crossplane.io_vpceipassociates.yaml | 412 ++ ...eip.huaweicloud.crossplane.io_vpceips.yaml | 722 ++++ ...loud.crossplane.io_vpceipv3associates.yaml | 541 +++ ...oud.crossplane.io_vpcinternetgateways.yaml | 713 ++++ 56 files changed, 14109 insertions(+) create mode 100755 apis/eip/v1alpha1/zz_generated.conversion_hubs.go create mode 100644 apis/eip/v1alpha1/zz_generated.deepcopy.go create mode 100644 apis/eip/v1alpha1/zz_generated.managed.go create mode 100644 apis/eip/v1alpha1/zz_generated.managedlist.go create mode 100644 apis/eip/v1alpha1/zz_generated.resolvers.go create mode 100755 apis/eip/v1alpha1/zz_globaleip_terraformed.go create mode 100755 apis/eip/v1alpha1/zz_globaleip_types.go create mode 100755 apis/eip/v1alpha1/zz_globaleipassociate_terraformed.go create mode 100755 apis/eip/v1alpha1/zz_globaleipassociate_types.go create mode 100755 apis/eip/v1alpha1/zz_globalinternetbandwidth_terraformed.go create mode 100755 apis/eip/v1alpha1/zz_globalinternetbandwidth_types.go create mode 100755 apis/eip/v1alpha1/zz_groupversion_info.go create mode 100755 apis/eip/v1alpha1/zz_vpcbandwidth_terraformed.go create mode 100755 apis/eip/v1alpha1/zz_vpcbandwidth_types.go create mode 100755 apis/eip/v1alpha1/zz_vpcbandwidthassociate_terraformed.go create mode 100755 apis/eip/v1alpha1/zz_vpcbandwidthassociate_types.go create mode 100755 apis/eip/v1alpha1/zz_vpceip_terraformed.go create mode 100755 apis/eip/v1alpha1/zz_vpceip_types.go create mode 100755 apis/eip/v1alpha1/zz_vpceipassociate_terraformed.go create mode 100755 apis/eip/v1alpha1/zz_vpceipassociate_types.go create mode 100755 apis/eip/v1alpha1/zz_vpceipv3associate_terraformed.go create mode 100755 apis/eip/v1alpha1/zz_vpceipv3associate_types.go create mode 100755 apis/eip/v1alpha1/zz_vpcinternetgateway_terraformed.go create mode 100755 apis/eip/v1alpha1/zz_vpcinternetgateway_types.go create mode 100644 config/eip/config.go create mode 100644 examples-generated/eip/v1alpha1/globaleip.yaml create mode 100644 examples-generated/eip/v1alpha1/globaleipassociate.yaml create mode 100644 examples-generated/eip/v1alpha1/globalinternetbandwidth.yaml create mode 100644 examples-generated/eip/v1alpha1/vpcbandwidth.yaml create mode 100644 examples-generated/eip/v1alpha1/vpcbandwidthassociate.yaml create mode 100644 examples-generated/eip/v1alpha1/vpceip.yaml create mode 100644 examples-generated/eip/v1alpha1/vpceipassociate.yaml create mode 100644 examples-generated/eip/v1alpha1/vpceipv3associate.yaml create mode 100644 examples-generated/eip/v1alpha1/vpcinternetgateway.yaml create mode 100755 internal/controller/eip/globaleip/zz_controller.go create mode 100755 internal/controller/eip/globaleipassociate/zz_controller.go create mode 100755 internal/controller/eip/globalinternetbandwidth/zz_controller.go create mode 100755 internal/controller/eip/vpcbandwidth/zz_controller.go create mode 100755 internal/controller/eip/vpcbandwidthassociate/zz_controller.go create mode 100755 internal/controller/eip/vpceip/zz_controller.go create mode 100755 internal/controller/eip/vpceipassociate/zz_controller.go create mode 100755 internal/controller/eip/vpceipv3associate/zz_controller.go create mode 100755 internal/controller/eip/vpcinternetgateway/zz_controller.go create mode 100644 package/crds/eip.huaweicloud.crossplane.io_globaleipassociates.yaml create mode 100644 package/crds/eip.huaweicloud.crossplane.io_globaleips.yaml create mode 100644 package/crds/eip.huaweicloud.crossplane.io_globalinternetbandwidths.yaml create mode 100644 package/crds/eip.huaweicloud.crossplane.io_vpcbandwidthassociates.yaml create mode 100644 package/crds/eip.huaweicloud.crossplane.io_vpcbandwidths.yaml create mode 100644 package/crds/eip.huaweicloud.crossplane.io_vpceipassociates.yaml create mode 100644 package/crds/eip.huaweicloud.crossplane.io_vpceips.yaml create mode 100644 package/crds/eip.huaweicloud.crossplane.io_vpceipv3associates.yaml create mode 100644 package/crds/eip.huaweicloud.crossplane.io_vpcinternetgateways.yaml diff --git a/apis/eip/v1alpha1/zz_generated.conversion_hubs.go b/apis/eip/v1alpha1/zz_generated.conversion_hubs.go new file mode 100755 index 00000000..46e042df --- /dev/null +++ b/apis/eip/v1alpha1/zz_generated.conversion_hubs.go @@ -0,0 +1,34 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +// Hub marks this type as a conversion hub. +func (tr *GlobalEip) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *GlobalEipAssociate) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *GlobalInternetBandwidth) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *VpcBandwidth) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *VpcBandwidthAssociate) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *VpcEip) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *VpcEipAssociate) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *VpcEipV3Associate) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *VpcInternetGateway) Hub() {} diff --git a/apis/eip/v1alpha1/zz_generated.deepcopy.go b/apis/eip/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 00000000..9e9cbcfb --- /dev/null +++ b/apis/eip/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,3318 @@ +//go:build !ignore_autogenerated + +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by controller-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "github.com/crossplane/crossplane-runtime/apis/common/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AssociateInstanceInitParameters) DeepCopyInto(out *AssociateInstanceInitParameters) { + *out = *in + if in.InstanceID != nil { + in, out := &in.InstanceID, &out.InstanceID + *out = new(string) + **out = **in + } + if in.InstanceType != nil { + in, out := &in.InstanceType, &out.InstanceType + *out = new(string) + **out = **in + } + if in.ProjectID != nil { + in, out := &in.ProjectID, &out.ProjectID + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } + if in.ServiceID != nil { + in, out := &in.ServiceID, &out.ServiceID + *out = new(string) + **out = **in + } + if in.ServiceType != nil { + in, out := &in.ServiceType, &out.ServiceType + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AssociateInstanceInitParameters. +func (in *AssociateInstanceInitParameters) DeepCopy() *AssociateInstanceInitParameters { + if in == nil { + return nil + } + out := new(AssociateInstanceInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AssociateInstanceObservation) DeepCopyInto(out *AssociateInstanceObservation) { + *out = *in + if in.InstanceID != nil { + in, out := &in.InstanceID, &out.InstanceID + *out = new(string) + **out = **in + } + if in.InstanceType != nil { + in, out := &in.InstanceType, &out.InstanceType + *out = new(string) + **out = **in + } + if in.ProjectID != nil { + in, out := &in.ProjectID, &out.ProjectID + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } + if in.ServiceID != nil { + in, out := &in.ServiceID, &out.ServiceID + *out = new(string) + **out = **in + } + if in.ServiceType != nil { + in, out := &in.ServiceType, &out.ServiceType + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AssociateInstanceObservation. +func (in *AssociateInstanceObservation) DeepCopy() *AssociateInstanceObservation { + if in == nil { + return nil + } + out := new(AssociateInstanceObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AssociateInstanceParameters) DeepCopyInto(out *AssociateInstanceParameters) { + *out = *in + if in.InstanceID != nil { + in, out := &in.InstanceID, &out.InstanceID + *out = new(string) + **out = **in + } + if in.InstanceType != nil { + in, out := &in.InstanceType, &out.InstanceType + *out = new(string) + **out = **in + } + if in.ProjectID != nil { + in, out := &in.ProjectID, &out.ProjectID + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } + if in.ServiceID != nil { + in, out := &in.ServiceID, &out.ServiceID + *out = new(string) + **out = **in + } + if in.ServiceType != nil { + in, out := &in.ServiceType, &out.ServiceType + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AssociateInstanceParameters. +func (in *AssociateInstanceParameters) DeepCopy() *AssociateInstanceParameters { + if in == nil { + return nil + } + out := new(AssociateInstanceParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BandwidthInitParameters) DeepCopyInto(out *BandwidthInitParameters) { + *out = *in + if in.ChargeMode != nil { + in, out := &in.ChargeMode, &out.ChargeMode + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.ShareType != nil { + in, out := &in.ShareType, &out.ShareType + *out = new(string) + **out = **in + } + if in.Size != nil { + in, out := &in.Size, &out.Size + *out = new(float64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BandwidthInitParameters. +func (in *BandwidthInitParameters) DeepCopy() *BandwidthInitParameters { + if in == nil { + return nil + } + out := new(BandwidthInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BandwidthObservation) DeepCopyInto(out *BandwidthObservation) { + *out = *in + if in.ChargeMode != nil { + in, out := &in.ChargeMode, &out.ChargeMode + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.ShareType != nil { + in, out := &in.ShareType, &out.ShareType + *out = new(string) + **out = **in + } + if in.Size != nil { + in, out := &in.Size, &out.Size + *out = new(float64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BandwidthObservation. +func (in *BandwidthObservation) DeepCopy() *BandwidthObservation { + if in == nil { + return nil + } + out := new(BandwidthObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BandwidthParameters) DeepCopyInto(out *BandwidthParameters) { + *out = *in + if in.ChargeMode != nil { + in, out := &in.ChargeMode, &out.ChargeMode + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.ShareType != nil { + in, out := &in.ShareType, &out.ShareType + *out = new(string) + **out = **in + } + if in.Size != nil { + in, out := &in.Size, &out.Size + *out = new(float64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BandwidthParameters. +func (in *BandwidthParameters) DeepCopy() *BandwidthParameters { + if in == nil { + return nil + } + out := new(BandwidthParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GcBandwidthInitParameters) DeepCopyInto(out *GcBandwidthInitParameters) { + *out = *in + if in.ChargeMode != nil { + in, out := &in.ChargeMode, &out.ChargeMode + *out = new(string) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.EnterpriseProjectID != nil { + in, out := &in.EnterpriseProjectID, &out.EnterpriseProjectID + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Size != nil { + in, out := &in.Size, &out.Size + *out = new(float64) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GcBandwidthInitParameters. +func (in *GcBandwidthInitParameters) DeepCopy() *GcBandwidthInitParameters { + if in == nil { + return nil + } + out := new(GcBandwidthInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GcBandwidthObservation) DeepCopyInto(out *GcBandwidthObservation) { + *out = *in + if in.ChargeMode != nil { + in, out := &in.ChargeMode, &out.ChargeMode + *out = new(string) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.EnterpriseProjectID != nil { + in, out := &in.EnterpriseProjectID, &out.EnterpriseProjectID + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Size != nil { + in, out := &in.Size, &out.Size + *out = new(float64) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GcBandwidthObservation. +func (in *GcBandwidthObservation) DeepCopy() *GcBandwidthObservation { + if in == nil { + return nil + } + out := new(GcBandwidthObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GcBandwidthParameters) DeepCopyInto(out *GcBandwidthParameters) { + *out = *in + if in.ChargeMode != nil { + in, out := &in.ChargeMode, &out.ChargeMode + *out = new(string) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.EnterpriseProjectID != nil { + in, out := &in.EnterpriseProjectID, &out.EnterpriseProjectID + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Size != nil { + in, out := &in.Size, &out.Size + *out = new(float64) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GcBandwidthParameters. +func (in *GcBandwidthParameters) DeepCopy() *GcBandwidthParameters { + if in == nil { + return nil + } + out := new(GcBandwidthParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalEip) DeepCopyInto(out *GlobalEip) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalEip. +func (in *GlobalEip) DeepCopy() *GlobalEip { + if in == nil { + return nil + } + out := new(GlobalEip) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *GlobalEip) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalEipAssociate) DeepCopyInto(out *GlobalEipAssociate) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalEipAssociate. +func (in *GlobalEipAssociate) DeepCopy() *GlobalEipAssociate { + if in == nil { + return nil + } + out := new(GlobalEipAssociate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *GlobalEipAssociate) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalEipAssociateInitParameters) DeepCopyInto(out *GlobalEipAssociateInitParameters) { + *out = *in + if in.AssociateInstance != nil { + in, out := &in.AssociateInstance, &out.AssociateInstance + *out = make([]AssociateInstanceInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.GcBandwidth != nil { + in, out := &in.GcBandwidth, &out.GcBandwidth + *out = make([]GcBandwidthInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.GlobalEIPID != nil { + in, out := &in.GlobalEIPID, &out.GlobalEIPID + *out = new(string) + **out = **in + } + if in.GlobalEIPIDRef != nil { + in, out := &in.GlobalEIPIDRef, &out.GlobalEIPIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.GlobalEIPIDSelector != nil { + in, out := &in.GlobalEIPIDSelector, &out.GlobalEIPIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.IsReserveGcb != nil { + in, out := &in.IsReserveGcb, &out.IsReserveGcb + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalEipAssociateInitParameters. +func (in *GlobalEipAssociateInitParameters) DeepCopy() *GlobalEipAssociateInitParameters { + if in == nil { + return nil + } + out := new(GlobalEipAssociateInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalEipAssociateList) DeepCopyInto(out *GlobalEipAssociateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]GlobalEipAssociate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalEipAssociateList. +func (in *GlobalEipAssociateList) DeepCopy() *GlobalEipAssociateList { + if in == nil { + return nil + } + out := new(GlobalEipAssociateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *GlobalEipAssociateList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalEipAssociateObservation) DeepCopyInto(out *GlobalEipAssociateObservation) { + *out = *in + if in.AssociateInstance != nil { + in, out := &in.AssociateInstance, &out.AssociateInstance + *out = make([]AssociateInstanceObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.GcBandwidth != nil { + in, out := &in.GcBandwidth, &out.GcBandwidth + *out = make([]GcBandwidthObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.GlobalEIPID != nil { + in, out := &in.GlobalEIPID, &out.GlobalEIPID + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.IsReserveGcb != nil { + in, out := &in.IsReserveGcb, &out.IsReserveGcb + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalEipAssociateObservation. +func (in *GlobalEipAssociateObservation) DeepCopy() *GlobalEipAssociateObservation { + if in == nil { + return nil + } + out := new(GlobalEipAssociateObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalEipAssociateParameters) DeepCopyInto(out *GlobalEipAssociateParameters) { + *out = *in + if in.AssociateInstance != nil { + in, out := &in.AssociateInstance, &out.AssociateInstance + *out = make([]AssociateInstanceParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.GcBandwidth != nil { + in, out := &in.GcBandwidth, &out.GcBandwidth + *out = make([]GcBandwidthParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.GlobalEIPID != nil { + in, out := &in.GlobalEIPID, &out.GlobalEIPID + *out = new(string) + **out = **in + } + if in.GlobalEIPIDRef != nil { + in, out := &in.GlobalEIPIDRef, &out.GlobalEIPIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.GlobalEIPIDSelector != nil { + in, out := &in.GlobalEIPIDSelector, &out.GlobalEIPIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.IsReserveGcb != nil { + in, out := &in.IsReserveGcb, &out.IsReserveGcb + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalEipAssociateParameters. +func (in *GlobalEipAssociateParameters) DeepCopy() *GlobalEipAssociateParameters { + if in == nil { + return nil + } + out := new(GlobalEipAssociateParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalEipAssociateSpec) DeepCopyInto(out *GlobalEipAssociateSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalEipAssociateSpec. +func (in *GlobalEipAssociateSpec) DeepCopy() *GlobalEipAssociateSpec { + if in == nil { + return nil + } + out := new(GlobalEipAssociateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalEipAssociateStatus) DeepCopyInto(out *GlobalEipAssociateStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalEipAssociateStatus. +func (in *GlobalEipAssociateStatus) DeepCopy() *GlobalEipAssociateStatus { + if in == nil { + return nil + } + out := new(GlobalEipAssociateStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalEipInitParameters) DeepCopyInto(out *GlobalEipInitParameters) { + *out = *in + if in.AccessSite != nil { + in, out := &in.AccessSite, &out.AccessSite + *out = new(string) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.EnterpriseProjectID != nil { + in, out := &in.EnterpriseProjectID, &out.EnterpriseProjectID + *out = new(string) + **out = **in + } + if in.GeipPoolName != nil { + in, out := &in.GeipPoolName, &out.GeipPoolName + *out = new(string) + **out = **in + } + if in.InternetBandwidthID != nil { + in, out := &in.InternetBandwidthID, &out.InternetBandwidthID + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalEipInitParameters. +func (in *GlobalEipInitParameters) DeepCopy() *GlobalEipInitParameters { + if in == nil { + return nil + } + out := new(GlobalEipInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalEipList) DeepCopyInto(out *GlobalEipList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]GlobalEip, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalEipList. +func (in *GlobalEipList) DeepCopy() *GlobalEipList { + if in == nil { + return nil + } + out := new(GlobalEipList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *GlobalEipList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalEipObservation) DeepCopyInto(out *GlobalEipObservation) { + *out = *in + if in.AccessSite != nil { + in, out := &in.AccessSite, &out.AccessSite + *out = new(string) + **out = **in + } + if in.AssociateInstanceID != nil { + in, out := &in.AssociateInstanceID, &out.AssociateInstanceID + *out = new(string) + **out = **in + } + if in.AssociateInstanceRegion != nil { + in, out := &in.AssociateInstanceRegion, &out.AssociateInstanceRegion + *out = new(string) + **out = **in + } + if in.AssociateInstanceType != nil { + in, out := &in.AssociateInstanceType, &out.AssociateInstanceType + *out = new(string) + **out = **in + } + if in.CreatedAt != nil { + in, out := &in.CreatedAt, &out.CreatedAt + *out = new(string) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.EnterpriseProjectID != nil { + in, out := &in.EnterpriseProjectID, &out.EnterpriseProjectID + *out = new(string) + **out = **in + } + if in.Frozen != nil { + in, out := &in.Frozen, &out.Frozen + *out = new(bool) + **out = **in + } + if in.FrozenInfo != nil { + in, out := &in.FrozenInfo, &out.FrozenInfo + *out = new(string) + **out = **in + } + if in.GeipPoolName != nil { + in, out := &in.GeipPoolName, &out.GeipPoolName + *out = new(string) + **out = **in + } + if in.GlobalConnectionBandwidthID != nil { + in, out := &in.GlobalConnectionBandwidthID, &out.GlobalConnectionBandwidthID + *out = new(string) + **out = **in + } + if in.GlobalConnectionBandwidthType != nil { + in, out := &in.GlobalConnectionBandwidthType, &out.GlobalConnectionBandwidthType + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.IPAddress != nil { + in, out := &in.IPAddress, &out.IPAddress + *out = new(string) + **out = **in + } + if in.IPVersion != nil { + in, out := &in.IPVersion, &out.IPVersion + *out = new(float64) + **out = **in + } + if in.InternetBandwidthID != nil { + in, out := &in.InternetBandwidthID, &out.InternetBandwidthID + *out = new(string) + **out = **in + } + if in.Isp != nil { + in, out := &in.Isp, &out.Isp + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Polluted != nil { + in, out := &in.Polluted, &out.Polluted + *out = new(bool) + **out = **in + } + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.UpdatedAt != nil { + in, out := &in.UpdatedAt, &out.UpdatedAt + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalEipObservation. +func (in *GlobalEipObservation) DeepCopy() *GlobalEipObservation { + if in == nil { + return nil + } + out := new(GlobalEipObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalEipParameters) DeepCopyInto(out *GlobalEipParameters) { + *out = *in + if in.AccessSite != nil { + in, out := &in.AccessSite, &out.AccessSite + *out = new(string) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.EnterpriseProjectID != nil { + in, out := &in.EnterpriseProjectID, &out.EnterpriseProjectID + *out = new(string) + **out = **in + } + if in.GeipPoolName != nil { + in, out := &in.GeipPoolName, &out.GeipPoolName + *out = new(string) + **out = **in + } + if in.InternetBandwidthID != nil { + in, out := &in.InternetBandwidthID, &out.InternetBandwidthID + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalEipParameters. +func (in *GlobalEipParameters) DeepCopy() *GlobalEipParameters { + if in == nil { + return nil + } + out := new(GlobalEipParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalEipSpec) DeepCopyInto(out *GlobalEipSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalEipSpec. +func (in *GlobalEipSpec) DeepCopy() *GlobalEipSpec { + if in == nil { + return nil + } + out := new(GlobalEipSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalEipStatus) DeepCopyInto(out *GlobalEipStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalEipStatus. +func (in *GlobalEipStatus) DeepCopy() *GlobalEipStatus { + if in == nil { + return nil + } + out := new(GlobalEipStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalInternetBandwidth) DeepCopyInto(out *GlobalInternetBandwidth) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalInternetBandwidth. +func (in *GlobalInternetBandwidth) DeepCopy() *GlobalInternetBandwidth { + if in == nil { + return nil + } + out := new(GlobalInternetBandwidth) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *GlobalInternetBandwidth) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalInternetBandwidthInitParameters) DeepCopyInto(out *GlobalInternetBandwidthInitParameters) { + *out = *in + if in.AccessSite != nil { + in, out := &in.AccessSite, &out.AccessSite + *out = new(string) + **out = **in + } + if in.ChargeMode != nil { + in, out := &in.ChargeMode, &out.ChargeMode + *out = new(string) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.EnterpriseProjectID != nil { + in, out := &in.EnterpriseProjectID, &out.EnterpriseProjectID + *out = new(string) + **out = **in + } + if in.IngressSize != nil { + in, out := &in.IngressSize, &out.IngressSize + *out = new(float64) + **out = **in + } + if in.Isp != nil { + in, out := &in.Isp, &out.Isp + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Size != nil { + in, out := &in.Size, &out.Size + *out = new(float64) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalInternetBandwidthInitParameters. +func (in *GlobalInternetBandwidthInitParameters) DeepCopy() *GlobalInternetBandwidthInitParameters { + if in == nil { + return nil + } + out := new(GlobalInternetBandwidthInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalInternetBandwidthList) DeepCopyInto(out *GlobalInternetBandwidthList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]GlobalInternetBandwidth, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalInternetBandwidthList. +func (in *GlobalInternetBandwidthList) DeepCopy() *GlobalInternetBandwidthList { + if in == nil { + return nil + } + out := new(GlobalInternetBandwidthList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *GlobalInternetBandwidthList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalInternetBandwidthObservation) DeepCopyInto(out *GlobalInternetBandwidthObservation) { + *out = *in + if in.AccessSite != nil { + in, out := &in.AccessSite, &out.AccessSite + *out = new(string) + **out = **in + } + if in.ChargeMode != nil { + in, out := &in.ChargeMode, &out.ChargeMode + *out = new(string) + **out = **in + } + if in.CreatedAt != nil { + in, out := &in.CreatedAt, &out.CreatedAt + *out = new(string) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.EnterpriseProjectID != nil { + in, out := &in.EnterpriseProjectID, &out.EnterpriseProjectID + *out = new(string) + **out = **in + } + if in.FrozenInfo != nil { + in, out := &in.FrozenInfo, &out.FrozenInfo + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.IngressSize != nil { + in, out := &in.IngressSize, &out.IngressSize + *out = new(float64) + **out = **in + } + if in.Isp != nil { + in, out := &in.Isp, &out.Isp + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Ratio95Peak != nil { + in, out := &in.Ratio95Peak, &out.Ratio95Peak + *out = new(float64) + **out = **in + } + if in.Size != nil { + in, out := &in.Size, &out.Size + *out = new(float64) + **out = **in + } + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } + if in.UpdatedAt != nil { + in, out := &in.UpdatedAt, &out.UpdatedAt + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalInternetBandwidthObservation. +func (in *GlobalInternetBandwidthObservation) DeepCopy() *GlobalInternetBandwidthObservation { + if in == nil { + return nil + } + out := new(GlobalInternetBandwidthObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalInternetBandwidthParameters) DeepCopyInto(out *GlobalInternetBandwidthParameters) { + *out = *in + if in.AccessSite != nil { + in, out := &in.AccessSite, &out.AccessSite + *out = new(string) + **out = **in + } + if in.ChargeMode != nil { + in, out := &in.ChargeMode, &out.ChargeMode + *out = new(string) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.EnterpriseProjectID != nil { + in, out := &in.EnterpriseProjectID, &out.EnterpriseProjectID + *out = new(string) + **out = **in + } + if in.IngressSize != nil { + in, out := &in.IngressSize, &out.IngressSize + *out = new(float64) + **out = **in + } + if in.Isp != nil { + in, out := &in.Isp, &out.Isp + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Size != nil { + in, out := &in.Size, &out.Size + *out = new(float64) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalInternetBandwidthParameters. +func (in *GlobalInternetBandwidthParameters) DeepCopy() *GlobalInternetBandwidthParameters { + if in == nil { + return nil + } + out := new(GlobalInternetBandwidthParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalInternetBandwidthSpec) DeepCopyInto(out *GlobalInternetBandwidthSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalInternetBandwidthSpec. +func (in *GlobalInternetBandwidthSpec) DeepCopy() *GlobalInternetBandwidthSpec { + if in == nil { + return nil + } + out := new(GlobalInternetBandwidthSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalInternetBandwidthStatus) DeepCopyInto(out *GlobalInternetBandwidthStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalInternetBandwidthStatus. +func (in *GlobalInternetBandwidthStatus) DeepCopy() *GlobalInternetBandwidthStatus { + if in == nil { + return nil + } + out := new(GlobalInternetBandwidthStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PublicipInitParameters) DeepCopyInto(out *PublicipInitParameters) { + *out = *in + if in.IPAddress != nil { + in, out := &in.IPAddress, &out.IPAddress + *out = new(string) + **out = **in + } + if in.IPVersion != nil { + in, out := &in.IPVersion, &out.IPVersion + *out = new(float64) + **out = **in + } + if in.PortID != nil { + in, out := &in.PortID, &out.PortID + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PublicipInitParameters. +func (in *PublicipInitParameters) DeepCopy() *PublicipInitParameters { + if in == nil { + return nil + } + out := new(PublicipInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PublicipObservation) DeepCopyInto(out *PublicipObservation) { + *out = *in + if in.IPAddress != nil { + in, out := &in.IPAddress, &out.IPAddress + *out = new(string) + **out = **in + } + if in.IPVersion != nil { + in, out := &in.IPVersion, &out.IPVersion + *out = new(float64) + **out = **in + } + if in.PortID != nil { + in, out := &in.PortID, &out.PortID + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PublicipObservation. +func (in *PublicipObservation) DeepCopy() *PublicipObservation { + if in == nil { + return nil + } + out := new(PublicipObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PublicipParameters) DeepCopyInto(out *PublicipParameters) { + *out = *in + if in.IPAddress != nil { + in, out := &in.IPAddress, &out.IPAddress + *out = new(string) + **out = **in + } + if in.IPVersion != nil { + in, out := &in.IPVersion, &out.IPVersion + *out = new(float64) + **out = **in + } + if in.PortID != nil { + in, out := &in.PortID, &out.PortID + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PublicipParameters. +func (in *PublicipParameters) DeepCopy() *PublicipParameters { + if in == nil { + return nil + } + out := new(PublicipParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PublicipsInitParameters) DeepCopyInto(out *PublicipsInitParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PublicipsInitParameters. +func (in *PublicipsInitParameters) DeepCopy() *PublicipsInitParameters { + if in == nil { + return nil + } + out := new(PublicipsInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PublicipsObservation) DeepCopyInto(out *PublicipsObservation) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.IPAddress != nil { + in, out := &in.IPAddress, &out.IPAddress + *out = new(string) + **out = **in + } + if in.IPVersion != nil { + in, out := &in.IPVersion, &out.IPVersion + *out = new(float64) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PublicipsObservation. +func (in *PublicipsObservation) DeepCopy() *PublicipsObservation { + if in == nil { + return nil + } + out := new(PublicipsObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PublicipsParameters) DeepCopyInto(out *PublicipsParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PublicipsParameters. +func (in *PublicipsParameters) DeepCopy() *PublicipsParameters { + if in == nil { + return nil + } + out := new(PublicipsParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcBandwidth) DeepCopyInto(out *VpcBandwidth) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcBandwidth. +func (in *VpcBandwidth) DeepCopy() *VpcBandwidth { + if in == nil { + return nil + } + out := new(VpcBandwidth) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VpcBandwidth) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcBandwidthAssociate) DeepCopyInto(out *VpcBandwidthAssociate) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcBandwidthAssociate. +func (in *VpcBandwidthAssociate) DeepCopy() *VpcBandwidthAssociate { + if in == nil { + return nil + } + out := new(VpcBandwidthAssociate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VpcBandwidthAssociate) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcBandwidthAssociateInitParameters) DeepCopyInto(out *VpcBandwidthAssociateInitParameters) { + *out = *in + if in.BandwidthChargeMode != nil { + in, out := &in.BandwidthChargeMode, &out.BandwidthChargeMode + *out = new(string) + **out = **in + } + if in.BandwidthID != nil { + in, out := &in.BandwidthID, &out.BandwidthID + *out = new(string) + **out = **in + } + if in.BandwidthIDRef != nil { + in, out := &in.BandwidthIDRef, &out.BandwidthIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.BandwidthIDSelector != nil { + in, out := &in.BandwidthIDSelector, &out.BandwidthIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.BandwidthSize != nil { + in, out := &in.BandwidthSize, &out.BandwidthSize + *out = new(float64) + **out = **in + } + if in.EIPID != nil { + in, out := &in.EIPID, &out.EIPID + *out = new(string) + **out = **in + } + if in.EIPIDRef != nil { + in, out := &in.EIPIDRef, &out.EIPIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.EIPIDSelector != nil { + in, out := &in.EIPIDSelector, &out.EIPIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcBandwidthAssociateInitParameters. +func (in *VpcBandwidthAssociateInitParameters) DeepCopy() *VpcBandwidthAssociateInitParameters { + if in == nil { + return nil + } + out := new(VpcBandwidthAssociateInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcBandwidthAssociateList) DeepCopyInto(out *VpcBandwidthAssociateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VpcBandwidthAssociate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcBandwidthAssociateList. +func (in *VpcBandwidthAssociateList) DeepCopy() *VpcBandwidthAssociateList { + if in == nil { + return nil + } + out := new(VpcBandwidthAssociateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VpcBandwidthAssociateList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcBandwidthAssociateObservation) DeepCopyInto(out *VpcBandwidthAssociateObservation) { + *out = *in + if in.BandwidthChargeMode != nil { + in, out := &in.BandwidthChargeMode, &out.BandwidthChargeMode + *out = new(string) + **out = **in + } + if in.BandwidthID != nil { + in, out := &in.BandwidthID, &out.BandwidthID + *out = new(string) + **out = **in + } + if in.BandwidthName != nil { + in, out := &in.BandwidthName, &out.BandwidthName + *out = new(string) + **out = **in + } + if in.BandwidthSize != nil { + in, out := &in.BandwidthSize, &out.BandwidthSize + *out = new(float64) + **out = **in + } + if in.EIPID != nil { + in, out := &in.EIPID, &out.EIPID + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.PublicIP != nil { + in, out := &in.PublicIP, &out.PublicIP + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcBandwidthAssociateObservation. +func (in *VpcBandwidthAssociateObservation) DeepCopy() *VpcBandwidthAssociateObservation { + if in == nil { + return nil + } + out := new(VpcBandwidthAssociateObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcBandwidthAssociateParameters) DeepCopyInto(out *VpcBandwidthAssociateParameters) { + *out = *in + if in.BandwidthChargeMode != nil { + in, out := &in.BandwidthChargeMode, &out.BandwidthChargeMode + *out = new(string) + **out = **in + } + if in.BandwidthID != nil { + in, out := &in.BandwidthID, &out.BandwidthID + *out = new(string) + **out = **in + } + if in.BandwidthIDRef != nil { + in, out := &in.BandwidthIDRef, &out.BandwidthIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.BandwidthIDSelector != nil { + in, out := &in.BandwidthIDSelector, &out.BandwidthIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.BandwidthSize != nil { + in, out := &in.BandwidthSize, &out.BandwidthSize + *out = new(float64) + **out = **in + } + if in.EIPID != nil { + in, out := &in.EIPID, &out.EIPID + *out = new(string) + **out = **in + } + if in.EIPIDRef != nil { + in, out := &in.EIPIDRef, &out.EIPIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.EIPIDSelector != nil { + in, out := &in.EIPIDSelector, &out.EIPIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcBandwidthAssociateParameters. +func (in *VpcBandwidthAssociateParameters) DeepCopy() *VpcBandwidthAssociateParameters { + if in == nil { + return nil + } + out := new(VpcBandwidthAssociateParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcBandwidthAssociateSpec) DeepCopyInto(out *VpcBandwidthAssociateSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcBandwidthAssociateSpec. +func (in *VpcBandwidthAssociateSpec) DeepCopy() *VpcBandwidthAssociateSpec { + if in == nil { + return nil + } + out := new(VpcBandwidthAssociateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcBandwidthAssociateStatus) DeepCopyInto(out *VpcBandwidthAssociateStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcBandwidthAssociateStatus. +func (in *VpcBandwidthAssociateStatus) DeepCopy() *VpcBandwidthAssociateStatus { + if in == nil { + return nil + } + out := new(VpcBandwidthAssociateStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcBandwidthInitParameters) DeepCopyInto(out *VpcBandwidthInitParameters) { + *out = *in + if in.AutoRenew != nil { + in, out := &in.AutoRenew, &out.AutoRenew + *out = new(string) + **out = **in + } + if in.BandwidthType != nil { + in, out := &in.BandwidthType, &out.BandwidthType + *out = new(string) + **out = **in + } + if in.ChargeMode != nil { + in, out := &in.ChargeMode, &out.ChargeMode + *out = new(string) + **out = **in + } + if in.ChargingMode != nil { + in, out := &in.ChargingMode, &out.ChargingMode + *out = new(string) + **out = **in + } + if in.EnterpriseProjectID != nil { + in, out := &in.EnterpriseProjectID, &out.EnterpriseProjectID + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Period != nil { + in, out := &in.Period, &out.Period + *out = new(float64) + **out = **in + } + if in.PeriodUnit != nil { + in, out := &in.PeriodUnit, &out.PeriodUnit + *out = new(string) + **out = **in + } + if in.PublicBorderGroup != nil { + in, out := &in.PublicBorderGroup, &out.PublicBorderGroup + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } + if in.Size != nil { + in, out := &in.Size, &out.Size + *out = new(float64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcBandwidthInitParameters. +func (in *VpcBandwidthInitParameters) DeepCopy() *VpcBandwidthInitParameters { + if in == nil { + return nil + } + out := new(VpcBandwidthInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcBandwidthList) DeepCopyInto(out *VpcBandwidthList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VpcBandwidth, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcBandwidthList. +func (in *VpcBandwidthList) DeepCopy() *VpcBandwidthList { + if in == nil { + return nil + } + out := new(VpcBandwidthList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VpcBandwidthList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcBandwidthObservation) DeepCopyInto(out *VpcBandwidthObservation) { + *out = *in + if in.AutoRenew != nil { + in, out := &in.AutoRenew, &out.AutoRenew + *out = new(string) + **out = **in + } + if in.BandwidthType != nil { + in, out := &in.BandwidthType, &out.BandwidthType + *out = new(string) + **out = **in + } + if in.ChargeMode != nil { + in, out := &in.ChargeMode, &out.ChargeMode + *out = new(string) + **out = **in + } + if in.ChargingMode != nil { + in, out := &in.ChargingMode, &out.ChargingMode + *out = new(string) + **out = **in + } + if in.CreatedAt != nil { + in, out := &in.CreatedAt, &out.CreatedAt + *out = new(string) + **out = **in + } + if in.EnterpriseProjectID != nil { + in, out := &in.EnterpriseProjectID, &out.EnterpriseProjectID + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Period != nil { + in, out := &in.Period, &out.Period + *out = new(float64) + **out = **in + } + if in.PeriodUnit != nil { + in, out := &in.PeriodUnit, &out.PeriodUnit + *out = new(string) + **out = **in + } + if in.PublicBorderGroup != nil { + in, out := &in.PublicBorderGroup, &out.PublicBorderGroup + *out = new(string) + **out = **in + } + if in.Publicips != nil { + in, out := &in.Publicips, &out.Publicips + *out = make([]PublicipsObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } + if in.ShareType != nil { + in, out := &in.ShareType, &out.ShareType + *out = new(string) + **out = **in + } + if in.Size != nil { + in, out := &in.Size, &out.Size + *out = new(float64) + **out = **in + } + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(string) + **out = **in + } + if in.UpdatedAt != nil { + in, out := &in.UpdatedAt, &out.UpdatedAt + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcBandwidthObservation. +func (in *VpcBandwidthObservation) DeepCopy() *VpcBandwidthObservation { + if in == nil { + return nil + } + out := new(VpcBandwidthObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcBandwidthParameters) DeepCopyInto(out *VpcBandwidthParameters) { + *out = *in + if in.AutoRenew != nil { + in, out := &in.AutoRenew, &out.AutoRenew + *out = new(string) + **out = **in + } + if in.BandwidthType != nil { + in, out := &in.BandwidthType, &out.BandwidthType + *out = new(string) + **out = **in + } + if in.ChargeMode != nil { + in, out := &in.ChargeMode, &out.ChargeMode + *out = new(string) + **out = **in + } + if in.ChargingMode != nil { + in, out := &in.ChargingMode, &out.ChargingMode + *out = new(string) + **out = **in + } + if in.EnterpriseProjectID != nil { + in, out := &in.EnterpriseProjectID, &out.EnterpriseProjectID + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Period != nil { + in, out := &in.Period, &out.Period + *out = new(float64) + **out = **in + } + if in.PeriodUnit != nil { + in, out := &in.PeriodUnit, &out.PeriodUnit + *out = new(string) + **out = **in + } + if in.PublicBorderGroup != nil { + in, out := &in.PublicBorderGroup, &out.PublicBorderGroup + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } + if in.Size != nil { + in, out := &in.Size, &out.Size + *out = new(float64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcBandwidthParameters. +func (in *VpcBandwidthParameters) DeepCopy() *VpcBandwidthParameters { + if in == nil { + return nil + } + out := new(VpcBandwidthParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcBandwidthSpec) DeepCopyInto(out *VpcBandwidthSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcBandwidthSpec. +func (in *VpcBandwidthSpec) DeepCopy() *VpcBandwidthSpec { + if in == nil { + return nil + } + out := new(VpcBandwidthSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcBandwidthStatus) DeepCopyInto(out *VpcBandwidthStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcBandwidthStatus. +func (in *VpcBandwidthStatus) DeepCopy() *VpcBandwidthStatus { + if in == nil { + return nil + } + out := new(VpcBandwidthStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcEip) DeepCopyInto(out *VpcEip) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcEip. +func (in *VpcEip) DeepCopy() *VpcEip { + if in == nil { + return nil + } + out := new(VpcEip) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VpcEip) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcEipAssociate) DeepCopyInto(out *VpcEipAssociate) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcEipAssociate. +func (in *VpcEipAssociate) DeepCopy() *VpcEipAssociate { + if in == nil { + return nil + } + out := new(VpcEipAssociate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VpcEipAssociate) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcEipAssociateInitParameters) DeepCopyInto(out *VpcEipAssociateInitParameters) { + *out = *in + if in.FixedIP != nil { + in, out := &in.FixedIP, &out.FixedIP + *out = new(string) + **out = **in + } + if in.NetworkID != nil { + in, out := &in.NetworkID, &out.NetworkID + *out = new(string) + **out = **in + } + if in.PortID != nil { + in, out := &in.PortID, &out.PortID + *out = new(string) + **out = **in + } + if in.PublicIP != nil { + in, out := &in.PublicIP, &out.PublicIP + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcEipAssociateInitParameters. +func (in *VpcEipAssociateInitParameters) DeepCopy() *VpcEipAssociateInitParameters { + if in == nil { + return nil + } + out := new(VpcEipAssociateInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcEipAssociateList) DeepCopyInto(out *VpcEipAssociateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VpcEipAssociate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcEipAssociateList. +func (in *VpcEipAssociateList) DeepCopy() *VpcEipAssociateList { + if in == nil { + return nil + } + out := new(VpcEipAssociateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VpcEipAssociateList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcEipAssociateObservation) DeepCopyInto(out *VpcEipAssociateObservation) { + *out = *in + if in.FixedIP != nil { + in, out := &in.FixedIP, &out.FixedIP + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.MacAddress != nil { + in, out := &in.MacAddress, &out.MacAddress + *out = new(string) + **out = **in + } + if in.NetworkID != nil { + in, out := &in.NetworkID, &out.NetworkID + *out = new(string) + **out = **in + } + if in.PortID != nil { + in, out := &in.PortID, &out.PortID + *out = new(string) + **out = **in + } + if in.PublicIP != nil { + in, out := &in.PublicIP, &out.PublicIP + *out = new(string) + **out = **in + } + if in.PublicIPv6 != nil { + in, out := &in.PublicIPv6, &out.PublicIPv6 + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcEipAssociateObservation. +func (in *VpcEipAssociateObservation) DeepCopy() *VpcEipAssociateObservation { + if in == nil { + return nil + } + out := new(VpcEipAssociateObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcEipAssociateParameters) DeepCopyInto(out *VpcEipAssociateParameters) { + *out = *in + if in.FixedIP != nil { + in, out := &in.FixedIP, &out.FixedIP + *out = new(string) + **out = **in + } + if in.NetworkID != nil { + in, out := &in.NetworkID, &out.NetworkID + *out = new(string) + **out = **in + } + if in.PortID != nil { + in, out := &in.PortID, &out.PortID + *out = new(string) + **out = **in + } + if in.PublicIP != nil { + in, out := &in.PublicIP, &out.PublicIP + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcEipAssociateParameters. +func (in *VpcEipAssociateParameters) DeepCopy() *VpcEipAssociateParameters { + if in == nil { + return nil + } + out := new(VpcEipAssociateParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcEipAssociateSpec) DeepCopyInto(out *VpcEipAssociateSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcEipAssociateSpec. +func (in *VpcEipAssociateSpec) DeepCopy() *VpcEipAssociateSpec { + if in == nil { + return nil + } + out := new(VpcEipAssociateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcEipAssociateStatus) DeepCopyInto(out *VpcEipAssociateStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcEipAssociateStatus. +func (in *VpcEipAssociateStatus) DeepCopy() *VpcEipAssociateStatus { + if in == nil { + return nil + } + out := new(VpcEipAssociateStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcEipInitParameters) DeepCopyInto(out *VpcEipInitParameters) { + *out = *in + if in.AutoPay != nil { + in, out := &in.AutoPay, &out.AutoPay + *out = new(string) + **out = **in + } + if in.AutoRenew != nil { + in, out := &in.AutoRenew, &out.AutoRenew + *out = new(string) + **out = **in + } + if in.Bandwidth != nil { + in, out := &in.Bandwidth, &out.Bandwidth + *out = make([]BandwidthInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ChargingMode != nil { + in, out := &in.ChargingMode, &out.ChargingMode + *out = new(string) + **out = **in + } + if in.EnterpriseProjectID != nil { + in, out := &in.EnterpriseProjectID, &out.EnterpriseProjectID + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Period != nil { + in, out := &in.Period, &out.Period + *out = new(float64) + **out = **in + } + if in.PeriodUnit != nil { + in, out := &in.PeriodUnit, &out.PeriodUnit + *out = new(string) + **out = **in + } + if in.Publicip != nil { + in, out := &in.Publicip, &out.Publicip + *out = make([]PublicipInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcEipInitParameters. +func (in *VpcEipInitParameters) DeepCopy() *VpcEipInitParameters { + if in == nil { + return nil + } + out := new(VpcEipInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcEipList) DeepCopyInto(out *VpcEipList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VpcEip, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcEipList. +func (in *VpcEipList) DeepCopy() *VpcEipList { + if in == nil { + return nil + } + out := new(VpcEipList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VpcEipList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcEipObservation) DeepCopyInto(out *VpcEipObservation) { + *out = *in + if in.Address != nil { + in, out := &in.Address, &out.Address + *out = new(string) + **out = **in + } + if in.AssociateID != nil { + in, out := &in.AssociateID, &out.AssociateID + *out = new(string) + **out = **in + } + if in.AssociateType != nil { + in, out := &in.AssociateType, &out.AssociateType + *out = new(string) + **out = **in + } + if in.AutoPay != nil { + in, out := &in.AutoPay, &out.AutoPay + *out = new(string) + **out = **in + } + if in.AutoRenew != nil { + in, out := &in.AutoRenew, &out.AutoRenew + *out = new(string) + **out = **in + } + if in.Bandwidth != nil { + in, out := &in.Bandwidth, &out.Bandwidth + *out = make([]BandwidthObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ChargingMode != nil { + in, out := &in.ChargingMode, &out.ChargingMode + *out = new(string) + **out = **in + } + if in.CreatedAt != nil { + in, out := &in.CreatedAt, &out.CreatedAt + *out = new(string) + **out = **in + } + if in.EnterpriseProjectID != nil { + in, out := &in.EnterpriseProjectID, &out.EnterpriseProjectID + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.IPv6Address != nil { + in, out := &in.IPv6Address, &out.IPv6Address + *out = new(string) + **out = **in + } + if in.InstanceID != nil { + in, out := &in.InstanceID, &out.InstanceID + *out = new(string) + **out = **in + } + if in.InstanceType != nil { + in, out := &in.InstanceType, &out.InstanceType + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Period != nil { + in, out := &in.Period, &out.Period + *out = new(float64) + **out = **in + } + if in.PeriodUnit != nil { + in, out := &in.PeriodUnit, &out.PeriodUnit + *out = new(string) + **out = **in + } + if in.PortID != nil { + in, out := &in.PortID, &out.PortID + *out = new(string) + **out = **in + } + if in.PrivateIP != nil { + in, out := &in.PrivateIP, &out.PrivateIP + *out = new(string) + **out = **in + } + if in.Publicip != nil { + in, out := &in.Publicip, &out.Publicip + *out = make([]PublicipObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.UpdatedAt != nil { + in, out := &in.UpdatedAt, &out.UpdatedAt + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcEipObservation. +func (in *VpcEipObservation) DeepCopy() *VpcEipObservation { + if in == nil { + return nil + } + out := new(VpcEipObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcEipParameters) DeepCopyInto(out *VpcEipParameters) { + *out = *in + if in.AutoPay != nil { + in, out := &in.AutoPay, &out.AutoPay + *out = new(string) + **out = **in + } + if in.AutoRenew != nil { + in, out := &in.AutoRenew, &out.AutoRenew + *out = new(string) + **out = **in + } + if in.Bandwidth != nil { + in, out := &in.Bandwidth, &out.Bandwidth + *out = make([]BandwidthParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ChargingMode != nil { + in, out := &in.ChargingMode, &out.ChargingMode + *out = new(string) + **out = **in + } + if in.EnterpriseProjectID != nil { + in, out := &in.EnterpriseProjectID, &out.EnterpriseProjectID + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Period != nil { + in, out := &in.Period, &out.Period + *out = new(float64) + **out = **in + } + if in.PeriodUnit != nil { + in, out := &in.PeriodUnit, &out.PeriodUnit + *out = new(string) + **out = **in + } + if in.Publicip != nil { + in, out := &in.Publicip, &out.Publicip + *out = make([]PublicipParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcEipParameters. +func (in *VpcEipParameters) DeepCopy() *VpcEipParameters { + if in == nil { + return nil + } + out := new(VpcEipParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcEipSpec) DeepCopyInto(out *VpcEipSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcEipSpec. +func (in *VpcEipSpec) DeepCopy() *VpcEipSpec { + if in == nil { + return nil + } + out := new(VpcEipSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcEipStatus) DeepCopyInto(out *VpcEipStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcEipStatus. +func (in *VpcEipStatus) DeepCopy() *VpcEipStatus { + if in == nil { + return nil + } + out := new(VpcEipStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcEipV3Associate) DeepCopyInto(out *VpcEipV3Associate) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcEipV3Associate. +func (in *VpcEipV3Associate) DeepCopy() *VpcEipV3Associate { + if in == nil { + return nil + } + out := new(VpcEipV3Associate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VpcEipV3Associate) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcEipV3AssociateInitParameters) DeepCopyInto(out *VpcEipV3AssociateInitParameters) { + *out = *in + if in.AssociateInstanceID != nil { + in, out := &in.AssociateInstanceID, &out.AssociateInstanceID + *out = new(string) + **out = **in + } + if in.AssociateInstanceType != nil { + in, out := &in.AssociateInstanceType, &out.AssociateInstanceType + *out = new(string) + **out = **in + } + if in.PublicipID != nil { + in, out := &in.PublicipID, &out.PublicipID + *out = new(string) + **out = **in + } + if in.PublicipIDRef != nil { + in, out := &in.PublicipIDRef, &out.PublicipIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.PublicipIDSelector != nil { + in, out := &in.PublicipIDSelector, &out.PublicipIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcEipV3AssociateInitParameters. +func (in *VpcEipV3AssociateInitParameters) DeepCopy() *VpcEipV3AssociateInitParameters { + if in == nil { + return nil + } + out := new(VpcEipV3AssociateInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcEipV3AssociateList) DeepCopyInto(out *VpcEipV3AssociateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VpcEipV3Associate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcEipV3AssociateList. +func (in *VpcEipV3AssociateList) DeepCopy() *VpcEipV3AssociateList { + if in == nil { + return nil + } + out := new(VpcEipV3AssociateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VpcEipV3AssociateList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcEipV3AssociateObservation) DeepCopyInto(out *VpcEipV3AssociateObservation) { + *out = *in + if in.AssociateInstanceID != nil { + in, out := &in.AssociateInstanceID, &out.AssociateInstanceID + *out = new(string) + **out = **in + } + if in.AssociateInstanceType != nil { + in, out := &in.AssociateInstanceType, &out.AssociateInstanceType + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.PublicipID != nil { + in, out := &in.PublicipID, &out.PublicipID + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcEipV3AssociateObservation. +func (in *VpcEipV3AssociateObservation) DeepCopy() *VpcEipV3AssociateObservation { + if in == nil { + return nil + } + out := new(VpcEipV3AssociateObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcEipV3AssociateParameters) DeepCopyInto(out *VpcEipV3AssociateParameters) { + *out = *in + if in.AssociateInstanceID != nil { + in, out := &in.AssociateInstanceID, &out.AssociateInstanceID + *out = new(string) + **out = **in + } + if in.AssociateInstanceType != nil { + in, out := &in.AssociateInstanceType, &out.AssociateInstanceType + *out = new(string) + **out = **in + } + if in.PublicipID != nil { + in, out := &in.PublicipID, &out.PublicipID + *out = new(string) + **out = **in + } + if in.PublicipIDRef != nil { + in, out := &in.PublicipIDRef, &out.PublicipIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.PublicipIDSelector != nil { + in, out := &in.PublicipIDSelector, &out.PublicipIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcEipV3AssociateParameters. +func (in *VpcEipV3AssociateParameters) DeepCopy() *VpcEipV3AssociateParameters { + if in == nil { + return nil + } + out := new(VpcEipV3AssociateParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcEipV3AssociateSpec) DeepCopyInto(out *VpcEipV3AssociateSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcEipV3AssociateSpec. +func (in *VpcEipV3AssociateSpec) DeepCopy() *VpcEipV3AssociateSpec { + if in == nil { + return nil + } + out := new(VpcEipV3AssociateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcEipV3AssociateStatus) DeepCopyInto(out *VpcEipV3AssociateStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcEipV3AssociateStatus. +func (in *VpcEipV3AssociateStatus) DeepCopy() *VpcEipV3AssociateStatus { + if in == nil { + return nil + } + out := new(VpcEipV3AssociateStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcInternetGateway) DeepCopyInto(out *VpcInternetGateway) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcInternetGateway. +func (in *VpcInternetGateway) DeepCopy() *VpcInternetGateway { + if in == nil { + return nil + } + out := new(VpcInternetGateway) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VpcInternetGateway) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcInternetGatewayInitParameters) DeepCopyInto(out *VpcInternetGatewayInitParameters) { + *out = *in + if in.AddRoute != nil { + in, out := &in.AddRoute, &out.AddRoute + *out = new(bool) + **out = **in + } + if in.EnableIPv6 != nil { + in, out := &in.EnableIPv6, &out.EnableIPv6 + *out = new(bool) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } + if in.SubnetID != nil { + in, out := &in.SubnetID, &out.SubnetID + *out = new(string) + **out = **in + } + if in.SubnetIDRef != nil { + in, out := &in.SubnetIDRef, &out.SubnetIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.SubnetIDSelector != nil { + in, out := &in.SubnetIDSelector, &out.SubnetIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.VPCID != nil { + in, out := &in.VPCID, &out.VPCID + *out = new(string) + **out = **in + } + if in.VPCIDRef != nil { + in, out := &in.VPCIDRef, &out.VPCIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.VPCIDSelector != nil { + in, out := &in.VPCIDSelector, &out.VPCIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcInternetGatewayInitParameters. +func (in *VpcInternetGatewayInitParameters) DeepCopy() *VpcInternetGatewayInitParameters { + if in == nil { + return nil + } + out := new(VpcInternetGatewayInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcInternetGatewayList) DeepCopyInto(out *VpcInternetGatewayList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VpcInternetGateway, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcInternetGatewayList. +func (in *VpcInternetGatewayList) DeepCopy() *VpcInternetGatewayList { + if in == nil { + return nil + } + out := new(VpcInternetGatewayList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VpcInternetGatewayList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcInternetGatewayObservation) DeepCopyInto(out *VpcInternetGatewayObservation) { + *out = *in + if in.AddRoute != nil { + in, out := &in.AddRoute, &out.AddRoute + *out = new(bool) + **out = **in + } + if in.CreatedAt != nil { + in, out := &in.CreatedAt, &out.CreatedAt + *out = new(string) + **out = **in + } + if in.EnableIPv6 != nil { + in, out := &in.EnableIPv6, &out.EnableIPv6 + *out = new(bool) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } + if in.SubnetID != nil { + in, out := &in.SubnetID, &out.SubnetID + *out = new(string) + **out = **in + } + if in.UpdatedAt != nil { + in, out := &in.UpdatedAt, &out.UpdatedAt + *out = new(string) + **out = **in + } + if in.VPCID != nil { + in, out := &in.VPCID, &out.VPCID + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcInternetGatewayObservation. +func (in *VpcInternetGatewayObservation) DeepCopy() *VpcInternetGatewayObservation { + if in == nil { + return nil + } + out := new(VpcInternetGatewayObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcInternetGatewayParameters) DeepCopyInto(out *VpcInternetGatewayParameters) { + *out = *in + if in.AddRoute != nil { + in, out := &in.AddRoute, &out.AddRoute + *out = new(bool) + **out = **in + } + if in.EnableIPv6 != nil { + in, out := &in.EnableIPv6, &out.EnableIPv6 + *out = new(bool) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } + if in.SubnetID != nil { + in, out := &in.SubnetID, &out.SubnetID + *out = new(string) + **out = **in + } + if in.SubnetIDRef != nil { + in, out := &in.SubnetIDRef, &out.SubnetIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.SubnetIDSelector != nil { + in, out := &in.SubnetIDSelector, &out.SubnetIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.VPCID != nil { + in, out := &in.VPCID, &out.VPCID + *out = new(string) + **out = **in + } + if in.VPCIDRef != nil { + in, out := &in.VPCIDRef, &out.VPCIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.VPCIDSelector != nil { + in, out := &in.VPCIDSelector, &out.VPCIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcInternetGatewayParameters. +func (in *VpcInternetGatewayParameters) DeepCopy() *VpcInternetGatewayParameters { + if in == nil { + return nil + } + out := new(VpcInternetGatewayParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcInternetGatewaySpec) DeepCopyInto(out *VpcInternetGatewaySpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcInternetGatewaySpec. +func (in *VpcInternetGatewaySpec) DeepCopy() *VpcInternetGatewaySpec { + if in == nil { + return nil + } + out := new(VpcInternetGatewaySpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VpcInternetGatewayStatus) DeepCopyInto(out *VpcInternetGatewayStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VpcInternetGatewayStatus. +func (in *VpcInternetGatewayStatus) DeepCopy() *VpcInternetGatewayStatus { + if in == nil { + return nil + } + out := new(VpcInternetGatewayStatus) + in.DeepCopyInto(out) + return out +} diff --git a/apis/eip/v1alpha1/zz_generated.managed.go b/apis/eip/v1alpha1/zz_generated.managed.go new file mode 100644 index 00000000..79250a05 --- /dev/null +++ b/apis/eip/v1alpha1/zz_generated.managed.go @@ -0,0 +1,549 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by angryjet. DO NOT EDIT. + +package v1alpha1 + +import xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + +// GetCondition of this GlobalEip. +func (mg *GlobalEip) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this GlobalEip. +func (mg *GlobalEip) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicies of this GlobalEip. +func (mg *GlobalEip) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + +// GetProviderConfigReference of this GlobalEip. +func (mg *GlobalEip) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +// GetPublishConnectionDetailsTo of this GlobalEip. +func (mg *GlobalEip) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this GlobalEip. +func (mg *GlobalEip) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this GlobalEip. +func (mg *GlobalEip) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this GlobalEip. +func (mg *GlobalEip) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicies of this GlobalEip. +func (mg *GlobalEip) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + +// SetProviderConfigReference of this GlobalEip. +func (mg *GlobalEip) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +// SetPublishConnectionDetailsTo of this GlobalEip. +func (mg *GlobalEip) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this GlobalEip. +func (mg *GlobalEip) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} + +// GetCondition of this GlobalEipAssociate. +func (mg *GlobalEipAssociate) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this GlobalEipAssociate. +func (mg *GlobalEipAssociate) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicies of this GlobalEipAssociate. +func (mg *GlobalEipAssociate) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + +// GetProviderConfigReference of this GlobalEipAssociate. +func (mg *GlobalEipAssociate) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +// GetPublishConnectionDetailsTo of this GlobalEipAssociate. +func (mg *GlobalEipAssociate) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this GlobalEipAssociate. +func (mg *GlobalEipAssociate) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this GlobalEipAssociate. +func (mg *GlobalEipAssociate) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this GlobalEipAssociate. +func (mg *GlobalEipAssociate) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicies of this GlobalEipAssociate. +func (mg *GlobalEipAssociate) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + +// SetProviderConfigReference of this GlobalEipAssociate. +func (mg *GlobalEipAssociate) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +// SetPublishConnectionDetailsTo of this GlobalEipAssociate. +func (mg *GlobalEipAssociate) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this GlobalEipAssociate. +func (mg *GlobalEipAssociate) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} + +// GetCondition of this GlobalInternetBandwidth. +func (mg *GlobalInternetBandwidth) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this GlobalInternetBandwidth. +func (mg *GlobalInternetBandwidth) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicies of this GlobalInternetBandwidth. +func (mg *GlobalInternetBandwidth) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + +// GetProviderConfigReference of this GlobalInternetBandwidth. +func (mg *GlobalInternetBandwidth) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +// GetPublishConnectionDetailsTo of this GlobalInternetBandwidth. +func (mg *GlobalInternetBandwidth) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this GlobalInternetBandwidth. +func (mg *GlobalInternetBandwidth) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this GlobalInternetBandwidth. +func (mg *GlobalInternetBandwidth) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this GlobalInternetBandwidth. +func (mg *GlobalInternetBandwidth) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicies of this GlobalInternetBandwidth. +func (mg *GlobalInternetBandwidth) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + +// SetProviderConfigReference of this GlobalInternetBandwidth. +func (mg *GlobalInternetBandwidth) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +// SetPublishConnectionDetailsTo of this GlobalInternetBandwidth. +func (mg *GlobalInternetBandwidth) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this GlobalInternetBandwidth. +func (mg *GlobalInternetBandwidth) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} + +// GetCondition of this VpcBandwidth. +func (mg *VpcBandwidth) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this VpcBandwidth. +func (mg *VpcBandwidth) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicies of this VpcBandwidth. +func (mg *VpcBandwidth) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + +// GetProviderConfigReference of this VpcBandwidth. +func (mg *VpcBandwidth) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +// GetPublishConnectionDetailsTo of this VpcBandwidth. +func (mg *VpcBandwidth) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this VpcBandwidth. +func (mg *VpcBandwidth) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this VpcBandwidth. +func (mg *VpcBandwidth) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this VpcBandwidth. +func (mg *VpcBandwidth) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicies of this VpcBandwidth. +func (mg *VpcBandwidth) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + +// SetProviderConfigReference of this VpcBandwidth. +func (mg *VpcBandwidth) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +// SetPublishConnectionDetailsTo of this VpcBandwidth. +func (mg *VpcBandwidth) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this VpcBandwidth. +func (mg *VpcBandwidth) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} + +// GetCondition of this VpcBandwidthAssociate. +func (mg *VpcBandwidthAssociate) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this VpcBandwidthAssociate. +func (mg *VpcBandwidthAssociate) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicies of this VpcBandwidthAssociate. +func (mg *VpcBandwidthAssociate) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + +// GetProviderConfigReference of this VpcBandwidthAssociate. +func (mg *VpcBandwidthAssociate) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +// GetPublishConnectionDetailsTo of this VpcBandwidthAssociate. +func (mg *VpcBandwidthAssociate) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this VpcBandwidthAssociate. +func (mg *VpcBandwidthAssociate) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this VpcBandwidthAssociate. +func (mg *VpcBandwidthAssociate) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this VpcBandwidthAssociate. +func (mg *VpcBandwidthAssociate) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicies of this VpcBandwidthAssociate. +func (mg *VpcBandwidthAssociate) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + +// SetProviderConfigReference of this VpcBandwidthAssociate. +func (mg *VpcBandwidthAssociate) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +// SetPublishConnectionDetailsTo of this VpcBandwidthAssociate. +func (mg *VpcBandwidthAssociate) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this VpcBandwidthAssociate. +func (mg *VpcBandwidthAssociate) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} + +// GetCondition of this VpcEip. +func (mg *VpcEip) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this VpcEip. +func (mg *VpcEip) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicies of this VpcEip. +func (mg *VpcEip) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + +// GetProviderConfigReference of this VpcEip. +func (mg *VpcEip) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +// GetPublishConnectionDetailsTo of this VpcEip. +func (mg *VpcEip) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this VpcEip. +func (mg *VpcEip) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this VpcEip. +func (mg *VpcEip) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this VpcEip. +func (mg *VpcEip) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicies of this VpcEip. +func (mg *VpcEip) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + +// SetProviderConfigReference of this VpcEip. +func (mg *VpcEip) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +// SetPublishConnectionDetailsTo of this VpcEip. +func (mg *VpcEip) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this VpcEip. +func (mg *VpcEip) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} + +// GetCondition of this VpcEipAssociate. +func (mg *VpcEipAssociate) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this VpcEipAssociate. +func (mg *VpcEipAssociate) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicies of this VpcEipAssociate. +func (mg *VpcEipAssociate) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + +// GetProviderConfigReference of this VpcEipAssociate. +func (mg *VpcEipAssociate) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +// GetPublishConnectionDetailsTo of this VpcEipAssociate. +func (mg *VpcEipAssociate) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this VpcEipAssociate. +func (mg *VpcEipAssociate) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this VpcEipAssociate. +func (mg *VpcEipAssociate) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this VpcEipAssociate. +func (mg *VpcEipAssociate) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicies of this VpcEipAssociate. +func (mg *VpcEipAssociate) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + +// SetProviderConfigReference of this VpcEipAssociate. +func (mg *VpcEipAssociate) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +// SetPublishConnectionDetailsTo of this VpcEipAssociate. +func (mg *VpcEipAssociate) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this VpcEipAssociate. +func (mg *VpcEipAssociate) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} + +// GetCondition of this VpcEipV3Associate. +func (mg *VpcEipV3Associate) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this VpcEipV3Associate. +func (mg *VpcEipV3Associate) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicies of this VpcEipV3Associate. +func (mg *VpcEipV3Associate) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + +// GetProviderConfigReference of this VpcEipV3Associate. +func (mg *VpcEipV3Associate) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +// GetPublishConnectionDetailsTo of this VpcEipV3Associate. +func (mg *VpcEipV3Associate) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this VpcEipV3Associate. +func (mg *VpcEipV3Associate) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this VpcEipV3Associate. +func (mg *VpcEipV3Associate) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this VpcEipV3Associate. +func (mg *VpcEipV3Associate) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicies of this VpcEipV3Associate. +func (mg *VpcEipV3Associate) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + +// SetProviderConfigReference of this VpcEipV3Associate. +func (mg *VpcEipV3Associate) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +// SetPublishConnectionDetailsTo of this VpcEipV3Associate. +func (mg *VpcEipV3Associate) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this VpcEipV3Associate. +func (mg *VpcEipV3Associate) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} + +// GetCondition of this VpcInternetGateway. +func (mg *VpcInternetGateway) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this VpcInternetGateway. +func (mg *VpcInternetGateway) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicies of this VpcInternetGateway. +func (mg *VpcInternetGateway) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + +// GetProviderConfigReference of this VpcInternetGateway. +func (mg *VpcInternetGateway) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +// GetPublishConnectionDetailsTo of this VpcInternetGateway. +func (mg *VpcInternetGateway) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this VpcInternetGateway. +func (mg *VpcInternetGateway) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this VpcInternetGateway. +func (mg *VpcInternetGateway) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this VpcInternetGateway. +func (mg *VpcInternetGateway) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicies of this VpcInternetGateway. +func (mg *VpcInternetGateway) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + +// SetProviderConfigReference of this VpcInternetGateway. +func (mg *VpcInternetGateway) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +// SetPublishConnectionDetailsTo of this VpcInternetGateway. +func (mg *VpcInternetGateway) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this VpcInternetGateway. +func (mg *VpcInternetGateway) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} diff --git a/apis/eip/v1alpha1/zz_generated.managedlist.go b/apis/eip/v1alpha1/zz_generated.managedlist.go new file mode 100644 index 00000000..ff5e37c4 --- /dev/null +++ b/apis/eip/v1alpha1/zz_generated.managedlist.go @@ -0,0 +1,90 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by angryjet. DO NOT EDIT. + +package v1alpha1 + +import resource "github.com/crossplane/crossplane-runtime/pkg/resource" + +// GetItems of this GlobalEipAssociateList. +func (l *GlobalEipAssociateList) GetItems() []resource.Managed { + items := make([]resource.Managed, len(l.Items)) + for i := range l.Items { + items[i] = &l.Items[i] + } + return items +} + +// GetItems of this GlobalEipList. +func (l *GlobalEipList) GetItems() []resource.Managed { + items := make([]resource.Managed, len(l.Items)) + for i := range l.Items { + items[i] = &l.Items[i] + } + return items +} + +// GetItems of this GlobalInternetBandwidthList. +func (l *GlobalInternetBandwidthList) GetItems() []resource.Managed { + items := make([]resource.Managed, len(l.Items)) + for i := range l.Items { + items[i] = &l.Items[i] + } + return items +} + +// GetItems of this VpcBandwidthAssociateList. +func (l *VpcBandwidthAssociateList) GetItems() []resource.Managed { + items := make([]resource.Managed, len(l.Items)) + for i := range l.Items { + items[i] = &l.Items[i] + } + return items +} + +// GetItems of this VpcBandwidthList. +func (l *VpcBandwidthList) GetItems() []resource.Managed { + items := make([]resource.Managed, len(l.Items)) + for i := range l.Items { + items[i] = &l.Items[i] + } + return items +} + +// GetItems of this VpcEipAssociateList. +func (l *VpcEipAssociateList) GetItems() []resource.Managed { + items := make([]resource.Managed, len(l.Items)) + for i := range l.Items { + items[i] = &l.Items[i] + } + return items +} + +// GetItems of this VpcEipList. +func (l *VpcEipList) GetItems() []resource.Managed { + items := make([]resource.Managed, len(l.Items)) + for i := range l.Items { + items[i] = &l.Items[i] + } + return items +} + +// GetItems of this VpcEipV3AssociateList. +func (l *VpcEipV3AssociateList) GetItems() []resource.Managed { + items := make([]resource.Managed, len(l.Items)) + for i := range l.Items { + items[i] = &l.Items[i] + } + return items +} + +// GetItems of this VpcInternetGatewayList. +func (l *VpcInternetGatewayList) GetItems() []resource.Managed { + items := make([]resource.Managed, len(l.Items)) + for i := range l.Items { + items[i] = &l.Items[i] + } + return items +} diff --git a/apis/eip/v1alpha1/zz_generated.resolvers.go b/apis/eip/v1alpha1/zz_generated.resolvers.go new file mode 100644 index 00000000..0badb7cf --- /dev/null +++ b/apis/eip/v1alpha1/zz_generated.resolvers.go @@ -0,0 +1,248 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by angryjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + reference "github.com/crossplane/crossplane-runtime/pkg/reference" + resource "github.com/crossplane/upjet/pkg/resource" + v1alpha1 "github.com/huaweicloud/provider-huaweicloud/apis/vpc/v1alpha1" + errors "github.com/pkg/errors" + client "sigs.k8s.io/controller-runtime/pkg/client" +) + +// ResolveReferences of this GlobalEipAssociate. +func (mg *GlobalEipAssociate) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.GlobalEIPID), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.ForProvider.GlobalEIPIDRef, + Selector: mg.Spec.ForProvider.GlobalEIPIDSelector, + To: reference.To{ + List: &GlobalEipList{}, + Managed: &GlobalEip{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.GlobalEIPID") + } + mg.Spec.ForProvider.GlobalEIPID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.GlobalEIPIDRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.GlobalEIPID), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.InitProvider.GlobalEIPIDRef, + Selector: mg.Spec.InitProvider.GlobalEIPIDSelector, + To: reference.To{ + List: &GlobalEipList{}, + Managed: &GlobalEip{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.GlobalEIPID") + } + mg.Spec.InitProvider.GlobalEIPID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.GlobalEIPIDRef = rsp.ResolvedReference + + return nil +} + +// ResolveReferences of this VpcBandwidthAssociate. +func (mg *VpcBandwidthAssociate) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.BandwidthID), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.ForProvider.BandwidthIDRef, + Selector: mg.Spec.ForProvider.BandwidthIDSelector, + To: reference.To{ + List: &VpcBandwidthList{}, + Managed: &VpcBandwidth{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.BandwidthID") + } + mg.Spec.ForProvider.BandwidthID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.BandwidthIDRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.EIPID), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.ForProvider.EIPIDRef, + Selector: mg.Spec.ForProvider.EIPIDSelector, + To: reference.To{ + List: &VpcEipList{}, + Managed: &VpcEip{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.EIPID") + } + mg.Spec.ForProvider.EIPID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.EIPIDRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.BandwidthID), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.InitProvider.BandwidthIDRef, + Selector: mg.Spec.InitProvider.BandwidthIDSelector, + To: reference.To{ + List: &VpcBandwidthList{}, + Managed: &VpcBandwidth{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.BandwidthID") + } + mg.Spec.InitProvider.BandwidthID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.BandwidthIDRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.EIPID), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.InitProvider.EIPIDRef, + Selector: mg.Spec.InitProvider.EIPIDSelector, + To: reference.To{ + List: &VpcEipList{}, + Managed: &VpcEip{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.EIPID") + } + mg.Spec.InitProvider.EIPID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.EIPIDRef = rsp.ResolvedReference + + return nil +} + +// ResolveReferences of this VpcEipV3Associate. +func (mg *VpcEipV3Associate) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.PublicipID), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.ForProvider.PublicipIDRef, + Selector: mg.Spec.ForProvider.PublicipIDSelector, + To: reference.To{ + List: &VpcEipList{}, + Managed: &VpcEip{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.PublicipID") + } + mg.Spec.ForProvider.PublicipID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.PublicipIDRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.PublicipID), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.InitProvider.PublicipIDRef, + Selector: mg.Spec.InitProvider.PublicipIDSelector, + To: reference.To{ + List: &VpcEipList{}, + Managed: &VpcEip{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.PublicipID") + } + mg.Spec.InitProvider.PublicipID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.PublicipIDRef = rsp.ResolvedReference + + return nil +} + +// ResolveReferences of this VpcInternetGateway. +func (mg *VpcInternetGateway) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.SubnetID), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.ForProvider.SubnetIDRef, + Selector: mg.Spec.ForProvider.SubnetIDSelector, + To: reference.To{ + List: &v1alpha1.SubnetList{}, + Managed: &v1alpha1.Subnet{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.SubnetID") + } + mg.Spec.ForProvider.SubnetID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.SubnetIDRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.VPCID), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.ForProvider.VPCIDRef, + Selector: mg.Spec.ForProvider.VPCIDSelector, + To: reference.To{ + List: &v1alpha1.VPCList{}, + Managed: &v1alpha1.VPC{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.VPCID") + } + mg.Spec.ForProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.VPCIDRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.SubnetID), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.InitProvider.SubnetIDRef, + Selector: mg.Spec.InitProvider.SubnetIDSelector, + To: reference.To{ + List: &v1alpha1.SubnetList{}, + Managed: &v1alpha1.Subnet{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.SubnetID") + } + mg.Spec.InitProvider.SubnetID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.SubnetIDRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.VPCID), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.InitProvider.VPCIDRef, + Selector: mg.Spec.InitProvider.VPCIDSelector, + To: reference.To{ + List: &v1alpha1.VPCList{}, + Managed: &v1alpha1.VPC{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.VPCID") + } + mg.Spec.InitProvider.VPCID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.VPCIDRef = rsp.ResolvedReference + + return nil +} diff --git a/apis/eip/v1alpha1/zz_globaleip_terraformed.go b/apis/eip/v1alpha1/zz_globaleip_terraformed.go new file mode 100755 index 00000000..2acf1d23 --- /dev/null +++ b/apis/eip/v1alpha1/zz_globaleip_terraformed.go @@ -0,0 +1,129 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this GlobalEip +func (mg *GlobalEip) GetTerraformResourceType() string { + return "huaweicloud_global_eip" +} + +// GetConnectionDetailsMapping for this GlobalEip +func (tr *GlobalEip) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this GlobalEip +func (tr *GlobalEip) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this GlobalEip +func (tr *GlobalEip) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this GlobalEip +func (tr *GlobalEip) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this GlobalEip +func (tr *GlobalEip) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this GlobalEip +func (tr *GlobalEip) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this GlobalEip +func (tr *GlobalEip) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this GlobalEip +func (tr *GlobalEip) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this GlobalEip using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *GlobalEip) LateInitialize(attrs []byte) (bool, error) { + params := &GlobalEipParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *GlobalEip) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/eip/v1alpha1/zz_globaleip_types.go b/apis/eip/v1alpha1/zz_globaleip_types.go new file mode 100755 index 00000000..3ef0d691 --- /dev/null +++ b/apis/eip/v1alpha1/zz_globaleip_types.go @@ -0,0 +1,217 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + + v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" +) + +type GlobalEipInitParameters struct { + + // Specifies the access site name. + // Changing this creates a new resource. + AccessSite *string `json:"accessSite,omitempty" tf:"access_site,omitempty"` + + // Specifies the description of the global EIP. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Specifies the enterprise project id to which the global EIP + // belongs. Changing this creates a new resource. + EnterpriseProjectID *string `json:"enterpriseProjectId,omitempty" tf:"enterprise_project_id,omitempty"` + + // Specifies the global EIP pool name. + // Changing this creates a new resource. + GeipPoolName *string `json:"geipPoolName,omitempty" tf:"geip_pool_name,omitempty"` + + // Specifies the internet bandwidth id which the global EIP use. + // Changing this creates a new resource. + InternetBandwidthID *string `json:"internetBandwidthId,omitempty" tf:"internet_bandwidth_id,omitempty"` + + // Specifies the name of the global EIP. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Specifies the tags of the global EIP. + // +mapType=granular + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +} + +type GlobalEipObservation struct { + + // Specifies the access site name. + // Changing this creates a new resource. + AccessSite *string `json:"accessSite,omitempty" tf:"access_site,omitempty"` + + // The ID of the associate instance. + AssociateInstanceID *string `json:"associateInstanceId,omitempty" tf:"associate_instance_id,omitempty"` + + // The region of the associate instance. + AssociateInstanceRegion *string `json:"associateInstanceRegion,omitempty" tf:"associate_instance_region,omitempty"` + + // The type of the associate instance. + AssociateInstanceType *string `json:"associateInstanceType,omitempty" tf:"associate_instance_type,omitempty"` + + // The create time of the global EIP. + CreatedAt *string `json:"createdAt,omitempty" tf:"created_at,omitempty"` + + // Specifies the description of the global EIP. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Specifies the enterprise project id to which the global EIP + // belongs. Changing this creates a new resource. + EnterpriseProjectID *string `json:"enterpriseProjectId,omitempty" tf:"enterprise_project_id,omitempty"` + + // The global EIP is frozen or not. + Frozen *bool `json:"frozen,omitempty" tf:"frozen,omitempty"` + + // The frozen info of the global EIP. + FrozenInfo *string `json:"frozenInfo,omitempty" tf:"frozen_info,omitempty"` + + // Specifies the global EIP pool name. + // Changing this creates a new resource. + GeipPoolName *string `json:"geipPoolName,omitempty" tf:"geip_pool_name,omitempty"` + + // The ID of the global connection bandwidth. + GlobalConnectionBandwidthID *string `json:"globalConnectionBandwidthId,omitempty" tf:"global_connection_bandwidth_id,omitempty"` + + // The type of the global connection bandwidth. + GlobalConnectionBandwidthType *string `json:"globalConnectionBandwidthType,omitempty" tf:"global_connection_bandwidth_type,omitempty"` + + // The resource ID. + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // The ip address of the global EIP. + IPAddress *string `json:"ipAddress,omitempty" tf:"ip_address,omitempty"` + + // The ip version of the global EIP. + IPVersion *float64 `json:"ipVersion,omitempty" tf:"ip_version,omitempty"` + + // Specifies the internet bandwidth id which the global EIP use. + // Changing this creates a new resource. + InternetBandwidthID *string `json:"internetBandwidthId,omitempty" tf:"internet_bandwidth_id,omitempty"` + + // The the internet service provider of the global EIP. + Isp *string `json:"isp,omitempty" tf:"isp,omitempty"` + + // Specifies the name of the global EIP. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // The global EIP is polluted or not. + Polluted *bool `json:"polluted,omitempty" tf:"polluted,omitempty"` + + // The status of the global EIP. + Status *string `json:"status,omitempty" tf:"status,omitempty"` + + // Specifies the tags of the global EIP. + // +mapType=granular + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // The update time of the global EIP. + UpdatedAt *string `json:"updatedAt,omitempty" tf:"updated_at,omitempty"` +} + +type GlobalEipParameters struct { + + // Specifies the access site name. + // Changing this creates a new resource. + // +kubebuilder:validation:Optional + AccessSite *string `json:"accessSite,omitempty" tf:"access_site,omitempty"` + + // Specifies the description of the global EIP. + // +kubebuilder:validation:Optional + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Specifies the enterprise project id to which the global EIP + // belongs. Changing this creates a new resource. + // +kubebuilder:validation:Optional + EnterpriseProjectID *string `json:"enterpriseProjectId,omitempty" tf:"enterprise_project_id,omitempty"` + + // Specifies the global EIP pool name. + // Changing this creates a new resource. + // +kubebuilder:validation:Optional + GeipPoolName *string `json:"geipPoolName,omitempty" tf:"geip_pool_name,omitempty"` + + // Specifies the internet bandwidth id which the global EIP use. + // Changing this creates a new resource. + // +kubebuilder:validation:Optional + InternetBandwidthID *string `json:"internetBandwidthId,omitempty" tf:"internet_bandwidth_id,omitempty"` + + // Specifies the name of the global EIP. + // +kubebuilder:validation:Optional + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Specifies the tags of the global EIP. + // +kubebuilder:validation:Optional + // +mapType=granular + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +} + +// GlobalEipSpec defines the desired state of GlobalEip +type GlobalEipSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider GlobalEipParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider GlobalEipInitParameters `json:"initProvider,omitempty"` +} + +// GlobalEipStatus defines the observed state of GlobalEip. +type GlobalEipStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider GlobalEipObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion + +// GlobalEip is the Schema for the GlobalEips API. "" +// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" +// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,huaweicloud} +type GlobalEip struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.accessSite) || (has(self.initProvider) && has(self.initProvider.accessSite))",message="spec.forProvider.accessSite is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.geipPoolName) || (has(self.initProvider) && has(self.initProvider.geipPoolName))",message="spec.forProvider.geipPoolName is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.internetBandwidthId) || (has(self.initProvider) && has(self.initProvider.internetBandwidthId))",message="spec.forProvider.internetBandwidthId is a required parameter" + Spec GlobalEipSpec `json:"spec"` + Status GlobalEipStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// GlobalEipList contains a list of GlobalEips +type GlobalEipList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []GlobalEip `json:"items"` +} + +// Repository type metadata. +var ( + GlobalEip_Kind = "GlobalEip" + GlobalEip_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: GlobalEip_Kind}.String() + GlobalEip_KindAPIVersion = GlobalEip_Kind + "." + CRDGroupVersion.String() + GlobalEip_GroupVersionKind = CRDGroupVersion.WithKind(GlobalEip_Kind) +) + +func init() { + SchemeBuilder.Register(&GlobalEip{}, &GlobalEipList{}) +} diff --git a/apis/eip/v1alpha1/zz_globaleipassociate_terraformed.go b/apis/eip/v1alpha1/zz_globaleipassociate_terraformed.go new file mode 100755 index 00000000..0742ee45 --- /dev/null +++ b/apis/eip/v1alpha1/zz_globaleipassociate_terraformed.go @@ -0,0 +1,129 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this GlobalEipAssociate +func (mg *GlobalEipAssociate) GetTerraformResourceType() string { + return "huaweicloud_global_eip_associate" +} + +// GetConnectionDetailsMapping for this GlobalEipAssociate +func (tr *GlobalEipAssociate) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this GlobalEipAssociate +func (tr *GlobalEipAssociate) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this GlobalEipAssociate +func (tr *GlobalEipAssociate) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this GlobalEipAssociate +func (tr *GlobalEipAssociate) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this GlobalEipAssociate +func (tr *GlobalEipAssociate) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this GlobalEipAssociate +func (tr *GlobalEipAssociate) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this GlobalEipAssociate +func (tr *GlobalEipAssociate) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this GlobalEipAssociate +func (tr *GlobalEipAssociate) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this GlobalEipAssociate using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *GlobalEipAssociate) LateInitialize(attrs []byte) (bool, error) { + params := &GlobalEipAssociateParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *GlobalEipAssociate) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/eip/v1alpha1/zz_globaleipassociate_types.go b/apis/eip/v1alpha1/zz_globaleipassociate_types.go new file mode 100755 index 00000000..38a24728 --- /dev/null +++ b/apis/eip/v1alpha1/zz_globaleipassociate_types.go @@ -0,0 +1,360 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + + v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" +) + +type AssociateInstanceInitParameters struct { + + // Specifies the instance ID. + // Changing this creates a new resource. + InstanceID *string `json:"instanceId,omitempty" tf:"instance_id,omitempty"` + + // Specifies the instance type. Valid values are ECS, PORT, + // NATGW and ELB. If value is ECS or PORT, make sure the VPC associating with an internet gateway. + // Changing this creates a new resource. + InstanceType *string `json:"instanceType,omitempty" tf:"instance_type,omitempty"` + + // Specifies the project ID of the region. + // Changing this creates a new resource. + ProjectID *string `json:"projectId,omitempty" tf:"project_id,omitempty"` + + // Specifies the region of the instance. + // Changing this creates a new resource. + Region *string `json:"region,omitempty" tf:"region,omitempty"` + + // Specifies the service ID. + // Changing this creates a new resource. + ServiceID *string `json:"serviceId,omitempty" tf:"service_id,omitempty"` + + // Specifies the service type. + // Changing this creates a new resource. + ServiceType *string `json:"serviceType,omitempty" tf:"service_type,omitempty"` +} + +type AssociateInstanceObservation struct { + + // Specifies the instance ID. + // Changing this creates a new resource. + InstanceID *string `json:"instanceId,omitempty" tf:"instance_id,omitempty"` + + // Specifies the instance type. Valid values are ECS, PORT, + // NATGW and ELB. If value is ECS or PORT, make sure the VPC associating with an internet gateway. + // Changing this creates a new resource. + InstanceType *string `json:"instanceType,omitempty" tf:"instance_type,omitempty"` + + // Specifies the project ID of the region. + // Changing this creates a new resource. + ProjectID *string `json:"projectId,omitempty" tf:"project_id,omitempty"` + + // Specifies the region of the instance. + // Changing this creates a new resource. + Region *string `json:"region,omitempty" tf:"region,omitempty"` + + // Specifies the service ID. + // Changing this creates a new resource. + ServiceID *string `json:"serviceId,omitempty" tf:"service_id,omitempty"` + + // Specifies the service type. + // Changing this creates a new resource. + ServiceType *string `json:"serviceType,omitempty" tf:"service_type,omitempty"` +} + +type AssociateInstanceParameters struct { + + // Specifies the instance ID. + // Changing this creates a new resource. + // +kubebuilder:validation:Optional + InstanceID *string `json:"instanceId" tf:"instance_id,omitempty"` + + // Specifies the instance type. Valid values are ECS, PORT, + // NATGW and ELB. If value is ECS or PORT, make sure the VPC associating with an internet gateway. + // Changing this creates a new resource. + // +kubebuilder:validation:Optional + InstanceType *string `json:"instanceType" tf:"instance_type,omitempty"` + + // Specifies the project ID of the region. + // Changing this creates a new resource. + // +kubebuilder:validation:Optional + ProjectID *string `json:"projectId" tf:"project_id,omitempty"` + + // Specifies the region of the instance. + // Changing this creates a new resource. + // +kubebuilder:validation:Optional + Region *string `json:"region" tf:"region,omitempty"` + + // Specifies the service ID. + // Changing this creates a new resource. + // +kubebuilder:validation:Optional + ServiceID *string `json:"serviceId,omitempty" tf:"service_id,omitempty"` + + // Specifies the service type. + // Changing this creates a new resource. + // +kubebuilder:validation:Optional + ServiceType *string `json:"serviceType,omitempty" tf:"service_type,omitempty"` +} + +type GcBandwidthInitParameters struct { + + // Specifies the GCB charge mode. When gc_bandwidth.id is empty, it is + // Required for creating a new GCB. + ChargeMode *string `json:"chargeMode,omitempty" tf:"charge_mode,omitempty"` + + // Specifies the description of GCB. + // Changing this creates a new resource. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Specifies the enterprise project ID of GCB. + // Changing this creates a new resource. + EnterpriseProjectID *string `json:"enterpriseProjectId,omitempty" tf:"enterprise_project_id,omitempty"` + + // Specifies the GCB ID which is existing. + // Changing this creates a new resource. + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // Specifies the GCB name. When gc_bandwidth.id is empty, it is Required for + // creating a new GCB. Changing this creates a new resource. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Specifies the GCB size. When gc_bandwidth.id is empty, it is Required for + // creating a new GCB. If gc_bandwidth.charge_mode is 95, the range is 100-300 Mbit/s, otherwise, the range is + // 2-300 Mbit/s. Changing this creates a new resource. + Size *float64 `json:"size,omitempty" tf:"size,omitempty"` + + // Specifies the tags of GCB. + // Changing this creates a new resource. + // +mapType=granular + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +} + +type GcBandwidthObservation struct { + + // Specifies the GCB charge mode. When gc_bandwidth.id is empty, it is + // Required for creating a new GCB. + ChargeMode *string `json:"chargeMode,omitempty" tf:"charge_mode,omitempty"` + + // Specifies the description of GCB. + // Changing this creates a new resource. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Specifies the enterprise project ID of GCB. + // Changing this creates a new resource. + EnterpriseProjectID *string `json:"enterpriseProjectId,omitempty" tf:"enterprise_project_id,omitempty"` + + // Specifies the GCB ID which is existing. + // Changing this creates a new resource. + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // Specifies the GCB name. When gc_bandwidth.id is empty, it is Required for + // creating a new GCB. Changing this creates a new resource. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Specifies the GCB size. When gc_bandwidth.id is empty, it is Required for + // creating a new GCB. If gc_bandwidth.charge_mode is 95, the range is 100-300 Mbit/s, otherwise, the range is + // 2-300 Mbit/s. Changing this creates a new resource. + Size *float64 `json:"size,omitempty" tf:"size,omitempty"` + + // Specifies the tags of GCB. + // Changing this creates a new resource. + // +mapType=granular + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +} + +type GcBandwidthParameters struct { + + // Specifies the GCB charge mode. When gc_bandwidth.id is empty, it is + // Required for creating a new GCB. + // +kubebuilder:validation:Optional + ChargeMode *string `json:"chargeMode,omitempty" tf:"charge_mode,omitempty"` + + // Specifies the description of GCB. + // Changing this creates a new resource. + // +kubebuilder:validation:Optional + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Specifies the enterprise project ID of GCB. + // Changing this creates a new resource. + // +kubebuilder:validation:Optional + EnterpriseProjectID *string `json:"enterpriseProjectId,omitempty" tf:"enterprise_project_id,omitempty"` + + // Specifies the GCB ID which is existing. + // Changing this creates a new resource. + // +kubebuilder:validation:Optional + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // Specifies the GCB name. When gc_bandwidth.id is empty, it is Required for + // creating a new GCB. Changing this creates a new resource. + // +kubebuilder:validation:Optional + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Specifies the GCB size. When gc_bandwidth.id is empty, it is Required for + // creating a new GCB. If gc_bandwidth.charge_mode is 95, the range is 100-300 Mbit/s, otherwise, the range is + // 2-300 Mbit/s. Changing this creates a new resource. + // +kubebuilder:validation:Optional + Size *float64 `json:"size,omitempty" tf:"size,omitempty"` + + // Specifies the tags of GCB. + // Changing this creates a new resource. + // +kubebuilder:validation:Optional + // +mapType=granular + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +} + +type GlobalEipAssociateInitParameters struct { + + // Specifies the information of instance which the GEIP associates to. + // Changing this creates a new resource. + // The associate_instance structure is documented below. + AssociateInstance []AssociateInstanceInitParameters `json:"associateInstance,omitempty" tf:"associate_instance,omitempty"` + + // Specifies the information of GCB which the GEIP associates to. + // Changing this creates a new resource. + // The gc_bandwidth structure is documented below. + GcBandwidth []GcBandwidthInitParameters `json:"gcBandwidth,omitempty" tf:"gc_bandwidth,omitempty"` + + // Specifies the global EIP ID. + // Changing this creates a new resource. + // +crossplane:generate:reference:type=github.com/huaweicloud/provider-huaweicloud/apis/eip/v1alpha1.GlobalEip + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() + GlobalEIPID *string `json:"globalEipId,omitempty" tf:"global_eip_id,omitempty"` + + // Reference to a GlobalEip in eip to populate globalEipId. + // +kubebuilder:validation:Optional + GlobalEIPIDRef *v1.Reference `json:"globalEipIdRef,omitempty" tf:"-"` + + // Selector for a GlobalEip in eip to populate globalEipId. + // +kubebuilder:validation:Optional + GlobalEIPIDSelector *v1.Selector `json:"globalEipIdSelector,omitempty" tf:"-"` + + // Specifies whether to reserve the GCB when the GEIP disassociates to the instance. + IsReserveGcb *bool `json:"isReserveGcb,omitempty" tf:"is_reserve_gcb,omitempty"` +} + +type GlobalEipAssociateObservation struct { + + // Specifies the information of instance which the GEIP associates to. + // Changing this creates a new resource. + // The associate_instance structure is documented below. + AssociateInstance []AssociateInstanceObservation `json:"associateInstance,omitempty" tf:"associate_instance,omitempty"` + + // Specifies the information of GCB which the GEIP associates to. + // Changing this creates a new resource. + // The gc_bandwidth structure is documented below. + GcBandwidth []GcBandwidthObservation `json:"gcBandwidth,omitempty" tf:"gc_bandwidth,omitempty"` + + // Specifies the global EIP ID. + // Changing this creates a new resource. + GlobalEIPID *string `json:"globalEipId,omitempty" tf:"global_eip_id,omitempty"` + + // The resource ID. Same with the global EIP ID. + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // Specifies whether to reserve the GCB when the GEIP disassociates to the instance. + IsReserveGcb *bool `json:"isReserveGcb,omitempty" tf:"is_reserve_gcb,omitempty"` +} + +type GlobalEipAssociateParameters struct { + + // Specifies the information of instance which the GEIP associates to. + // Changing this creates a new resource. + // The associate_instance structure is documented below. + // +kubebuilder:validation:Optional + AssociateInstance []AssociateInstanceParameters `json:"associateInstance,omitempty" tf:"associate_instance,omitempty"` + + // Specifies the information of GCB which the GEIP associates to. + // Changing this creates a new resource. + // The gc_bandwidth structure is documented below. + // +kubebuilder:validation:Optional + GcBandwidth []GcBandwidthParameters `json:"gcBandwidth,omitempty" tf:"gc_bandwidth,omitempty"` + + // Specifies the global EIP ID. + // Changing this creates a new resource. + // +crossplane:generate:reference:type=github.com/huaweicloud/provider-huaweicloud/apis/eip/v1alpha1.GlobalEip + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() + // +kubebuilder:validation:Optional + GlobalEIPID *string `json:"globalEipId,omitempty" tf:"global_eip_id,omitempty"` + + // Reference to a GlobalEip in eip to populate globalEipId. + // +kubebuilder:validation:Optional + GlobalEIPIDRef *v1.Reference `json:"globalEipIdRef,omitempty" tf:"-"` + + // Selector for a GlobalEip in eip to populate globalEipId. + // +kubebuilder:validation:Optional + GlobalEIPIDSelector *v1.Selector `json:"globalEipIdSelector,omitempty" tf:"-"` + + // Specifies whether to reserve the GCB when the GEIP disassociates to the instance. + // +kubebuilder:validation:Optional + IsReserveGcb *bool `json:"isReserveGcb,omitempty" tf:"is_reserve_gcb,omitempty"` +} + +// GlobalEipAssociateSpec defines the desired state of GlobalEipAssociate +type GlobalEipAssociateSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider GlobalEipAssociateParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider GlobalEipAssociateInitParameters `json:"initProvider,omitempty"` +} + +// GlobalEipAssociateStatus defines the observed state of GlobalEipAssociate. +type GlobalEipAssociateStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider GlobalEipAssociateObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion + +// GlobalEipAssociate is the Schema for the GlobalEipAssociates API. "" +// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" +// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,huaweicloud} +type GlobalEipAssociate struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.associateInstance) || (has(self.initProvider) && has(self.initProvider.associateInstance))",message="spec.forProvider.associateInstance is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.isReserveGcb) || (has(self.initProvider) && has(self.initProvider.isReserveGcb))",message="spec.forProvider.isReserveGcb is a required parameter" + Spec GlobalEipAssociateSpec `json:"spec"` + Status GlobalEipAssociateStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// GlobalEipAssociateList contains a list of GlobalEipAssociates +type GlobalEipAssociateList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []GlobalEipAssociate `json:"items"` +} + +// Repository type metadata. +var ( + GlobalEipAssociate_Kind = "GlobalEipAssociate" + GlobalEipAssociate_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: GlobalEipAssociate_Kind}.String() + GlobalEipAssociate_KindAPIVersion = GlobalEipAssociate_Kind + "." + CRDGroupVersion.String() + GlobalEipAssociate_GroupVersionKind = CRDGroupVersion.WithKind(GlobalEipAssociate_Kind) +) + +func init() { + SchemeBuilder.Register(&GlobalEipAssociate{}, &GlobalEipAssociateList{}) +} diff --git a/apis/eip/v1alpha1/zz_globalinternetbandwidth_terraformed.go b/apis/eip/v1alpha1/zz_globalinternetbandwidth_terraformed.go new file mode 100755 index 00000000..1673cda0 --- /dev/null +++ b/apis/eip/v1alpha1/zz_globalinternetbandwidth_terraformed.go @@ -0,0 +1,129 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this GlobalInternetBandwidth +func (mg *GlobalInternetBandwidth) GetTerraformResourceType() string { + return "huaweicloud_global_internet_bandwidth" +} + +// GetConnectionDetailsMapping for this GlobalInternetBandwidth +func (tr *GlobalInternetBandwidth) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this GlobalInternetBandwidth +func (tr *GlobalInternetBandwidth) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this GlobalInternetBandwidth +func (tr *GlobalInternetBandwidth) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this GlobalInternetBandwidth +func (tr *GlobalInternetBandwidth) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this GlobalInternetBandwidth +func (tr *GlobalInternetBandwidth) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this GlobalInternetBandwidth +func (tr *GlobalInternetBandwidth) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this GlobalInternetBandwidth +func (tr *GlobalInternetBandwidth) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this GlobalInternetBandwidth +func (tr *GlobalInternetBandwidth) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this GlobalInternetBandwidth using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *GlobalInternetBandwidth) LateInitialize(attrs []byte) (bool, error) { + params := &GlobalInternetBandwidthParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *GlobalInternetBandwidth) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/eip/v1alpha1/zz_globalinternetbandwidth_types.go b/apis/eip/v1alpha1/zz_globalinternetbandwidth_types.go new file mode 100755 index 00000000..5065f004 --- /dev/null +++ b/apis/eip/v1alpha1/zz_globalinternetbandwidth_types.go @@ -0,0 +1,224 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + + v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" +) + +type GlobalInternetBandwidthInitParameters struct { + + // Specifies the access site name. + // Changing this creates a new resource. + AccessSite *string `json:"accessSite,omitempty" tf:"access_site,omitempty"` + + // Specifies the charge mode, for example, 95peak_guar. + ChargeMode *string `json:"chargeMode,omitempty" tf:"charge_mode,omitempty"` + + // Specifies the description of the global internet bandwidth. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Specifies the enterprise project id to which the global + // internet bandwidth belongs. Changing this creates a new resource. + EnterpriseProjectID *string `json:"enterpriseProjectId,omitempty" tf:"enterprise_project_id,omitempty"` + + // Specifies the ingress size of the global internet bandwidth. + // It's not used for charge mode 95peak_guar. + IngressSize *float64 `json:"ingressSize,omitempty" tf:"ingress_size,omitempty"` + + // Specifies the internet service provider of the global internet bandwidth. + // Changing this creates a new resource. + Isp *string `json:"isp,omitempty" tf:"isp,omitempty"` + + // Specifies the name of the global internet bandwidth. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Specifies the size of the global internet bandwidth. + // The value ranges from 300 Mbit/s to 5000 Mbit/s in normal. + Size *float64 `json:"size,omitempty" tf:"size,omitempty"` + + // Specifies the tags of the global internet bandwidth. + // +mapType=granular + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // Specifies the type of the global internet bandwidth. + Type *string `json:"type,omitempty" tf:"type,omitempty"` +} + +type GlobalInternetBandwidthObservation struct { + + // Specifies the access site name. + // Changing this creates a new resource. + AccessSite *string `json:"accessSite,omitempty" tf:"access_site,omitempty"` + + // Specifies the charge mode, for example, 95peak_guar. + ChargeMode *string `json:"chargeMode,omitempty" tf:"charge_mode,omitempty"` + + // The create time of the global internet bandwidth. + CreatedAt *string `json:"createdAt,omitempty" tf:"created_at,omitempty"` + + // Specifies the description of the global internet bandwidth. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Specifies the enterprise project id to which the global + // internet bandwidth belongs. Changing this creates a new resource. + EnterpriseProjectID *string `json:"enterpriseProjectId,omitempty" tf:"enterprise_project_id,omitempty"` + + // The frozen info of the global internet bandwidth. + FrozenInfo *string `json:"frozenInfo,omitempty" tf:"frozen_info,omitempty"` + + // The resource ID. + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // Specifies the ingress size of the global internet bandwidth. + // It's not used for charge mode 95peak_guar. + IngressSize *float64 `json:"ingressSize,omitempty" tf:"ingress_size,omitempty"` + + // Specifies the internet service provider of the global internet bandwidth. + // Changing this creates a new resource. + Isp *string `json:"isp,omitempty" tf:"isp,omitempty"` + + // Specifies the name of the global internet bandwidth. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // The enhanced 95% guaranteed rate of the global internet bandwidth. + Ratio95Peak *float64 `json:"ratio95Peak,omitempty" tf:"ratio_95peak,omitempty"` + + // Specifies the size of the global internet bandwidth. + // The value ranges from 300 Mbit/s to 5000 Mbit/s in normal. + Size *float64 `json:"size,omitempty" tf:"size,omitempty"` + + // The status of the global internet bandwidth. + Status *string `json:"status,omitempty" tf:"status,omitempty"` + + // Specifies the tags of the global internet bandwidth. + // +mapType=granular + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // Specifies the type of the global internet bandwidth. + Type *string `json:"type,omitempty" tf:"type,omitempty"` + + // The update time of the global internet bandwidth. + UpdatedAt *string `json:"updatedAt,omitempty" tf:"updated_at,omitempty"` +} + +type GlobalInternetBandwidthParameters struct { + + // Specifies the access site name. + // Changing this creates a new resource. + // +kubebuilder:validation:Optional + AccessSite *string `json:"accessSite,omitempty" tf:"access_site,omitempty"` + + // Specifies the charge mode, for example, 95peak_guar. + // +kubebuilder:validation:Optional + ChargeMode *string `json:"chargeMode,omitempty" tf:"charge_mode,omitempty"` + + // Specifies the description of the global internet bandwidth. + // +kubebuilder:validation:Optional + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Specifies the enterprise project id to which the global + // internet bandwidth belongs. Changing this creates a new resource. + // +kubebuilder:validation:Optional + EnterpriseProjectID *string `json:"enterpriseProjectId,omitempty" tf:"enterprise_project_id,omitempty"` + + // Specifies the ingress size of the global internet bandwidth. + // It's not used for charge mode 95peak_guar. + // +kubebuilder:validation:Optional + IngressSize *float64 `json:"ingressSize,omitempty" tf:"ingress_size,omitempty"` + + // Specifies the internet service provider of the global internet bandwidth. + // Changing this creates a new resource. + // +kubebuilder:validation:Optional + Isp *string `json:"isp,omitempty" tf:"isp,omitempty"` + + // Specifies the name of the global internet bandwidth. + // +kubebuilder:validation:Optional + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Specifies the size of the global internet bandwidth. + // The value ranges from 300 Mbit/s to 5000 Mbit/s in normal. + // +kubebuilder:validation:Optional + Size *float64 `json:"size,omitempty" tf:"size,omitempty"` + + // Specifies the tags of the global internet bandwidth. + // +kubebuilder:validation:Optional + // +mapType=granular + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // Specifies the type of the global internet bandwidth. + // +kubebuilder:validation:Optional + Type *string `json:"type,omitempty" tf:"type,omitempty"` +} + +// GlobalInternetBandwidthSpec defines the desired state of GlobalInternetBandwidth +type GlobalInternetBandwidthSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider GlobalInternetBandwidthParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider GlobalInternetBandwidthInitParameters `json:"initProvider,omitempty"` +} + +// GlobalInternetBandwidthStatus defines the observed state of GlobalInternetBandwidth. +type GlobalInternetBandwidthStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider GlobalInternetBandwidthObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion + +// GlobalInternetBandwidth is the Schema for the GlobalInternetBandwidths API. "" +// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" +// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,huaweicloud} +type GlobalInternetBandwidth struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.accessSite) || (has(self.initProvider) && has(self.initProvider.accessSite))",message="spec.forProvider.accessSite is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.chargeMode) || (has(self.initProvider) && has(self.initProvider.chargeMode))",message="spec.forProvider.chargeMode is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.isp) || (has(self.initProvider) && has(self.initProvider.isp))",message="spec.forProvider.isp is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.size) || (has(self.initProvider) && has(self.initProvider.size))",message="spec.forProvider.size is a required parameter" + Spec GlobalInternetBandwidthSpec `json:"spec"` + Status GlobalInternetBandwidthStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// GlobalInternetBandwidthList contains a list of GlobalInternetBandwidths +type GlobalInternetBandwidthList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []GlobalInternetBandwidth `json:"items"` +} + +// Repository type metadata. +var ( + GlobalInternetBandwidth_Kind = "GlobalInternetBandwidth" + GlobalInternetBandwidth_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: GlobalInternetBandwidth_Kind}.String() + GlobalInternetBandwidth_KindAPIVersion = GlobalInternetBandwidth_Kind + "." + CRDGroupVersion.String() + GlobalInternetBandwidth_GroupVersionKind = CRDGroupVersion.WithKind(GlobalInternetBandwidth_Kind) +) + +func init() { + SchemeBuilder.Register(&GlobalInternetBandwidth{}, &GlobalInternetBandwidthList{}) +} diff --git a/apis/eip/v1alpha1/zz_groupversion_info.go b/apis/eip/v1alpha1/zz_groupversion_info.go new file mode 100755 index 00000000..17ff9d33 --- /dev/null +++ b/apis/eip/v1alpha1/zz_groupversion_info.go @@ -0,0 +1,32 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +// +kubebuilder:object:generate=true +// +groupName=eip.huaweicloud.crossplane.io +// +versionName=v1alpha1 +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +// Package type metadata. +const ( + CRDGroup = "eip.huaweicloud.crossplane.io" + CRDVersion = "v1alpha1" +) + +var ( + // CRDGroupVersion is the API Group Version used to register the objects + CRDGroupVersion = schema.GroupVersion{Group: CRDGroup, Version: CRDVersion} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: CRDGroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/apis/eip/v1alpha1/zz_vpcbandwidth_terraformed.go b/apis/eip/v1alpha1/zz_vpcbandwidth_terraformed.go new file mode 100755 index 00000000..2122a720 --- /dev/null +++ b/apis/eip/v1alpha1/zz_vpcbandwidth_terraformed.go @@ -0,0 +1,129 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this VpcBandwidth +func (mg *VpcBandwidth) GetTerraformResourceType() string { + return "huaweicloud_vpc_bandwidth" +} + +// GetConnectionDetailsMapping for this VpcBandwidth +func (tr *VpcBandwidth) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this VpcBandwidth +func (tr *VpcBandwidth) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this VpcBandwidth +func (tr *VpcBandwidth) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this VpcBandwidth +func (tr *VpcBandwidth) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this VpcBandwidth +func (tr *VpcBandwidth) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this VpcBandwidth +func (tr *VpcBandwidth) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this VpcBandwidth +func (tr *VpcBandwidth) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this VpcBandwidth +func (tr *VpcBandwidth) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this VpcBandwidth using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *VpcBandwidth) LateInitialize(attrs []byte) (bool, error) { + params := &VpcBandwidthParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *VpcBandwidth) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/eip/v1alpha1/zz_vpcbandwidth_types.go b/apis/eip/v1alpha1/zz_vpcbandwidth_types.go new file mode 100755 index 00000000..d59058f0 --- /dev/null +++ b/apis/eip/v1alpha1/zz_vpcbandwidth_types.go @@ -0,0 +1,271 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + + v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" +) + +type PublicipsInitParameters struct { +} + +type PublicipsObservation struct { + + // ID of the Shared Bandwidth. + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // The IPv4 or IPv6 address. + IPAddress *string `json:"ipAddress,omitempty" tf:"ip_address,omitempty"` + + // The IP version, either 4 or 6. + IPVersion *float64 `json:"ipVersion,omitempty" tf:"ip_version,omitempty"` + + // The EIP type. Possible values are 5_bgp (dynamic BGP) and 5_sbgp (static BGP). + Type *string `json:"type,omitempty" tf:"type,omitempty"` +} + +type PublicipsParameters struct { +} + +type VpcBandwidthInitParameters struct { + + // Specifies whether auto renew is enabled. + // Valid values are true and false. Defaults to false. + AutoRenew *string `json:"autoRenew,omitempty" tf:"auto_renew,omitempty"` + + // Specifies the bandwidth type. + // Valid values are share and edgeshare. Default is share. + BandwidthType *string `json:"bandwidthType,omitempty" tf:"bandwidth_type,omitempty"` + + // Specifies whether the billing is based on bandwidth or + // 95th percentile bandwidth (enhanced). Possible values can be bandwidth and 95peak_plus. + // The default value is bandwidth, and 95peak_plus is only valid for v4 and v5 Customer. + ChargeMode *string `json:"chargeMode,omitempty" tf:"charge_mode,omitempty"` + + // Specifies the charging mode of the Shared Bandwidth. + // The valid values are prePaid and postPaid, defaults to postPaid. + ChargingMode *string `json:"chargingMode,omitempty" tf:"charging_mode,omitempty"` + + // Specifies the enterprise project id of the Shared Bandwidth. + // Changing this creates a new bandwidth. + EnterpriseProjectID *string `json:"enterpriseProjectId,omitempty" tf:"enterprise_project_id,omitempty"` + + // Specifies the bandwidth name. The value is a string of 1 to 64 characters that + // can contain letters, digits, underscores (_), hyphens (-), and periods (.). + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Specifies the charging period of the Shared Bandwidth. + Period *float64 `json:"period,omitempty" tf:"period,omitempty"` + + // Specifies the charging period unit of the Shared Bandwidth. + // Valid values are month and year. This parameter is mandatory if charging_mode is set to prePaid. + PeriodUnit *string `json:"periodUnit,omitempty" tf:"period_unit,omitempty"` + + // Specifies the site is center of border. + // Valid values are center and the name of the border site. Default is center. + PublicBorderGroup *string `json:"publicBorderGroup,omitempty" tf:"public_border_group,omitempty"` + + // Specifies the region in which to create the Shared Bandwidth. + // If omitted, the provider-level region will be used. Changing this creates a new bandwidth. + Region *string `json:"region,omitempty" tf:"region,omitempty"` + + // Specifies the size of the Shared Bandwidth. + // If charge_mode is bandwidth, the value ranges from 5 Mbit/s to 2000 Mbit/s. + // If charge_mode is 95peak_plus, the value ranges from 300 Mbit/s to 2000 Mbit/s. + Size *float64 `json:"size,omitempty" tf:"size,omitempty"` +} + +type VpcBandwidthObservation struct { + + // Specifies whether auto renew is enabled. + // Valid values are true and false. Defaults to false. + AutoRenew *string `json:"autoRenew,omitempty" tf:"auto_renew,omitempty"` + + // Specifies the bandwidth type. + // Valid values are share and edgeshare. Default is share. + BandwidthType *string `json:"bandwidthType,omitempty" tf:"bandwidth_type,omitempty"` + + // Specifies whether the billing is based on bandwidth or + // 95th percentile bandwidth (enhanced). Possible values can be bandwidth and 95peak_plus. + // The default value is bandwidth, and 95peak_plus is only valid for v4 and v5 Customer. + ChargeMode *string `json:"chargeMode,omitempty" tf:"charge_mode,omitempty"` + + // Specifies the charging mode of the Shared Bandwidth. + // The valid values are prePaid and postPaid, defaults to postPaid. + ChargingMode *string `json:"chargingMode,omitempty" tf:"charging_mode,omitempty"` + + // Indicates the bandwidth create time. + CreatedAt *string `json:"createdAt,omitempty" tf:"created_at,omitempty"` + + // Specifies the enterprise project id of the Shared Bandwidth. + // Changing this creates a new bandwidth. + EnterpriseProjectID *string `json:"enterpriseProjectId,omitempty" tf:"enterprise_project_id,omitempty"` + + // ID of the Shared Bandwidth. + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // Specifies the bandwidth name. The value is a string of 1 to 64 characters that + // can contain letters, digits, underscores (_), hyphens (-), and periods (.). + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Specifies the charging period of the Shared Bandwidth. + Period *float64 `json:"period,omitempty" tf:"period,omitempty"` + + // Specifies the charging period unit of the Shared Bandwidth. + // Valid values are month and year. This parameter is mandatory if charging_mode is set to prePaid. + PeriodUnit *string `json:"periodUnit,omitempty" tf:"period_unit,omitempty"` + + // Specifies the site is center of border. + // Valid values are center and the name of the border site. Default is center. + PublicBorderGroup *string `json:"publicBorderGroup,omitempty" tf:"public_border_group,omitempty"` + + // An array of EIPs that use the bandwidth. The object includes the following: + Publicips []PublicipsObservation `json:"publicips,omitempty" tf:"publicips,omitempty"` + + // Specifies the region in which to create the Shared Bandwidth. + // If omitted, the provider-level region will be used. Changing this creates a new bandwidth. + Region *string `json:"region,omitempty" tf:"region,omitempty"` + + // Indicates whether the bandwidth is shared or dedicated. + ShareType *string `json:"shareType,omitempty" tf:"share_type,omitempty"` + + // Specifies the size of the Shared Bandwidth. + // If charge_mode is bandwidth, the value ranges from 5 Mbit/s to 2000 Mbit/s. + // If charge_mode is 95peak_plus, the value ranges from 300 Mbit/s to 2000 Mbit/s. + Size *float64 `json:"size,omitempty" tf:"size,omitempty"` + + // Indicates the bandwidth status. + Status *string `json:"status,omitempty" tf:"status,omitempty"` + + // Indicates the bandwidth update time. + UpdatedAt *string `json:"updatedAt,omitempty" tf:"updated_at,omitempty"` +} + +type VpcBandwidthParameters struct { + + // Specifies whether auto renew is enabled. + // Valid values are true and false. Defaults to false. + // +kubebuilder:validation:Optional + AutoRenew *string `json:"autoRenew,omitempty" tf:"auto_renew,omitempty"` + + // Specifies the bandwidth type. + // Valid values are share and edgeshare. Default is share. + // +kubebuilder:validation:Optional + BandwidthType *string `json:"bandwidthType,omitempty" tf:"bandwidth_type,omitempty"` + + // Specifies whether the billing is based on bandwidth or + // 95th percentile bandwidth (enhanced). Possible values can be bandwidth and 95peak_plus. + // The default value is bandwidth, and 95peak_plus is only valid for v4 and v5 Customer. + // +kubebuilder:validation:Optional + ChargeMode *string `json:"chargeMode,omitempty" tf:"charge_mode,omitempty"` + + // Specifies the charging mode of the Shared Bandwidth. + // The valid values are prePaid and postPaid, defaults to postPaid. + // +kubebuilder:validation:Optional + ChargingMode *string `json:"chargingMode,omitempty" tf:"charging_mode,omitempty"` + + // Specifies the enterprise project id of the Shared Bandwidth. + // Changing this creates a new bandwidth. + // +kubebuilder:validation:Optional + EnterpriseProjectID *string `json:"enterpriseProjectId,omitempty" tf:"enterprise_project_id,omitempty"` + + // Specifies the bandwidth name. The value is a string of 1 to 64 characters that + // can contain letters, digits, underscores (_), hyphens (-), and periods (.). + // +kubebuilder:validation:Optional + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Specifies the charging period of the Shared Bandwidth. + // +kubebuilder:validation:Optional + Period *float64 `json:"period,omitempty" tf:"period,omitempty"` + + // Specifies the charging period unit of the Shared Bandwidth. + // Valid values are month and year. This parameter is mandatory if charging_mode is set to prePaid. + // +kubebuilder:validation:Optional + PeriodUnit *string `json:"periodUnit,omitempty" tf:"period_unit,omitempty"` + + // Specifies the site is center of border. + // Valid values are center and the name of the border site. Default is center. + // +kubebuilder:validation:Optional + PublicBorderGroup *string `json:"publicBorderGroup,omitempty" tf:"public_border_group,omitempty"` + + // Specifies the region in which to create the Shared Bandwidth. + // If omitted, the provider-level region will be used. Changing this creates a new bandwidth. + // +kubebuilder:validation:Optional + Region *string `json:"region,omitempty" tf:"region,omitempty"` + + // Specifies the size of the Shared Bandwidth. + // If charge_mode is bandwidth, the value ranges from 5 Mbit/s to 2000 Mbit/s. + // If charge_mode is 95peak_plus, the value ranges from 300 Mbit/s to 2000 Mbit/s. + // +kubebuilder:validation:Optional + Size *float64 `json:"size,omitempty" tf:"size,omitempty"` +} + +// VpcBandwidthSpec defines the desired state of VpcBandwidth +type VpcBandwidthSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider VpcBandwidthParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider VpcBandwidthInitParameters `json:"initProvider,omitempty"` +} + +// VpcBandwidthStatus defines the observed state of VpcBandwidth. +type VpcBandwidthStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider VpcBandwidthObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion + +// VpcBandwidth is the Schema for the VpcBandwidths API. "" +// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" +// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,huaweicloud} +type VpcBandwidth struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.size) || (has(self.initProvider) && has(self.initProvider.size))",message="spec.forProvider.size is a required parameter" + Spec VpcBandwidthSpec `json:"spec"` + Status VpcBandwidthStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// VpcBandwidthList contains a list of VpcBandwidths +type VpcBandwidthList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VpcBandwidth `json:"items"` +} + +// Repository type metadata. +var ( + VpcBandwidth_Kind = "VpcBandwidth" + VpcBandwidth_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: VpcBandwidth_Kind}.String() + VpcBandwidth_KindAPIVersion = VpcBandwidth_Kind + "." + CRDGroupVersion.String() + VpcBandwidth_GroupVersionKind = CRDGroupVersion.WithKind(VpcBandwidth_Kind) +) + +func init() { + SchemeBuilder.Register(&VpcBandwidth{}, &VpcBandwidthList{}) +} diff --git a/apis/eip/v1alpha1/zz_vpcbandwidthassociate_terraformed.go b/apis/eip/v1alpha1/zz_vpcbandwidthassociate_terraformed.go new file mode 100755 index 00000000..f09d1cda --- /dev/null +++ b/apis/eip/v1alpha1/zz_vpcbandwidthassociate_terraformed.go @@ -0,0 +1,129 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this VpcBandwidthAssociate +func (mg *VpcBandwidthAssociate) GetTerraformResourceType() string { + return "huaweicloud_vpc_bandwidth_associate" +} + +// GetConnectionDetailsMapping for this VpcBandwidthAssociate +func (tr *VpcBandwidthAssociate) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this VpcBandwidthAssociate +func (tr *VpcBandwidthAssociate) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this VpcBandwidthAssociate +func (tr *VpcBandwidthAssociate) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this VpcBandwidthAssociate +func (tr *VpcBandwidthAssociate) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this VpcBandwidthAssociate +func (tr *VpcBandwidthAssociate) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this VpcBandwidthAssociate +func (tr *VpcBandwidthAssociate) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this VpcBandwidthAssociate +func (tr *VpcBandwidthAssociate) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this VpcBandwidthAssociate +func (tr *VpcBandwidthAssociate) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this VpcBandwidthAssociate using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *VpcBandwidthAssociate) LateInitialize(attrs []byte) (bool, error) { + params := &VpcBandwidthAssociateParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *VpcBandwidthAssociate) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/eip/v1alpha1/zz_vpcbandwidthassociate_types.go b/apis/eip/v1alpha1/zz_vpcbandwidthassociate_types.go new file mode 100755 index 00000000..8f2e09b8 --- /dev/null +++ b/apis/eip/v1alpha1/zz_vpcbandwidthassociate_types.go @@ -0,0 +1,204 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + + v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" +) + +type VpcBandwidthAssociateInitParameters struct { + + // Specifies the billing mode of the dedicated bandwidth used by the EIP that + // has been removed from a shared bandwidth. The value can be bandwidth or traffic. If not specified, the dedicated + // bandwidth will be billed by bandwidth. + // The charge mode after removal bandwidth. + BandwidthChargeMode *string `json:"bandwidthChargeMode,omitempty" tf:"bandwidth_charge_mode,omitempty"` + + // Specifies the shared bandwidth ID to associate. + // Changing this creates a new resource. + // +crossplane:generate:reference:type=github.com/huaweicloud/provider-huaweicloud/apis/eip/v1alpha1.VpcBandwidth + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() + BandwidthID *string `json:"bandwidthId,omitempty" tf:"bandwidth_id,omitempty"` + + // Reference to a VpcBandwidth in eip to populate bandwidthId. + // +kubebuilder:validation:Optional + BandwidthIDRef *v1.Reference `json:"bandwidthIdRef,omitempty" tf:"-"` + + // Selector for a VpcBandwidth in eip to populate bandwidthId. + // +kubebuilder:validation:Optional + BandwidthIDSelector *v1.Selector `json:"bandwidthIdSelector,omitempty" tf:"-"` + + // Specifies the size (Mbit/s) of the dedicated bandwidth used by the EIP that + // has been removed from a shared bandwidth. The default bandwidth size is 5 Mbit/s. + // The size (Mbits/s) after removal bandwidth. + BandwidthSize *float64 `json:"bandwidthSize,omitempty" tf:"bandwidth_size,omitempty"` + + // Specifies the ID of the EIP that uses the bandwidth. + // +crossplane:generate:reference:type=github.com/huaweicloud/provider-huaweicloud/apis/eip/v1alpha1.VpcEip + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() + EIPID *string `json:"eipId,omitempty" tf:"eip_id,omitempty"` + + // Reference to a VpcEip in eip to populate eipId. + // +kubebuilder:validation:Optional + EIPIDRef *v1.Reference `json:"eipIdRef,omitempty" tf:"-"` + + // Selector for a VpcEip in eip to populate eipId. + // +kubebuilder:validation:Optional + EIPIDSelector *v1.Selector `json:"eipIdSelector,omitempty" tf:"-"` + + // Specifies the region in which to associate the bandwidth. If omitted, + // the provider-level region will be used. Changing this creates a new resource. + Region *string `json:"region,omitempty" tf:"region,omitempty"` +} + +type VpcBandwidthAssociateObservation struct { + + // Specifies the billing mode of the dedicated bandwidth used by the EIP that + // has been removed from a shared bandwidth. The value can be bandwidth or traffic. If not specified, the dedicated + // bandwidth will be billed by bandwidth. + // The charge mode after removal bandwidth. + BandwidthChargeMode *string `json:"bandwidthChargeMode,omitempty" tf:"bandwidth_charge_mode,omitempty"` + + // Specifies the shared bandwidth ID to associate. + // Changing this creates a new resource. + BandwidthID *string `json:"bandwidthId,omitempty" tf:"bandwidth_id,omitempty"` + + // The shared bandwidth name. + BandwidthName *string `json:"bandwidthName,omitempty" tf:"bandwidth_name,omitempty"` + + // Specifies the size (Mbit/s) of the dedicated bandwidth used by the EIP that + // has been removed from a shared bandwidth. The default bandwidth size is 5 Mbit/s. + // The size (Mbits/s) after removal bandwidth. + BandwidthSize *float64 `json:"bandwidthSize,omitempty" tf:"bandwidth_size,omitempty"` + + // Specifies the ID of the EIP that uses the bandwidth. + EIPID *string `json:"eipId,omitempty" tf:"eip_id,omitempty"` + + // The resource ID in format of /. + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // The EIP address. + PublicIP *string `json:"publicIp,omitempty" tf:"public_ip,omitempty"` + + // Specifies the region in which to associate the bandwidth. If omitted, + // the provider-level region will be used. Changing this creates a new resource. + Region *string `json:"region,omitempty" tf:"region,omitempty"` +} + +type VpcBandwidthAssociateParameters struct { + + // Specifies the billing mode of the dedicated bandwidth used by the EIP that + // has been removed from a shared bandwidth. The value can be bandwidth or traffic. If not specified, the dedicated + // bandwidth will be billed by bandwidth. + // The charge mode after removal bandwidth. + // +kubebuilder:validation:Optional + BandwidthChargeMode *string `json:"bandwidthChargeMode,omitempty" tf:"bandwidth_charge_mode,omitempty"` + + // Specifies the shared bandwidth ID to associate. + // Changing this creates a new resource. + // +crossplane:generate:reference:type=github.com/huaweicloud/provider-huaweicloud/apis/eip/v1alpha1.VpcBandwidth + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() + // +kubebuilder:validation:Optional + BandwidthID *string `json:"bandwidthId,omitempty" tf:"bandwidth_id,omitempty"` + + // Reference to a VpcBandwidth in eip to populate bandwidthId. + // +kubebuilder:validation:Optional + BandwidthIDRef *v1.Reference `json:"bandwidthIdRef,omitempty" tf:"-"` + + // Selector for a VpcBandwidth in eip to populate bandwidthId. + // +kubebuilder:validation:Optional + BandwidthIDSelector *v1.Selector `json:"bandwidthIdSelector,omitempty" tf:"-"` + + // Specifies the size (Mbit/s) of the dedicated bandwidth used by the EIP that + // has been removed from a shared bandwidth. The default bandwidth size is 5 Mbit/s. + // The size (Mbits/s) after removal bandwidth. + // +kubebuilder:validation:Optional + BandwidthSize *float64 `json:"bandwidthSize,omitempty" tf:"bandwidth_size,omitempty"` + + // Specifies the ID of the EIP that uses the bandwidth. + // +crossplane:generate:reference:type=github.com/huaweicloud/provider-huaweicloud/apis/eip/v1alpha1.VpcEip + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() + // +kubebuilder:validation:Optional + EIPID *string `json:"eipId,omitempty" tf:"eip_id,omitempty"` + + // Reference to a VpcEip in eip to populate eipId. + // +kubebuilder:validation:Optional + EIPIDRef *v1.Reference `json:"eipIdRef,omitempty" tf:"-"` + + // Selector for a VpcEip in eip to populate eipId. + // +kubebuilder:validation:Optional + EIPIDSelector *v1.Selector `json:"eipIdSelector,omitempty" tf:"-"` + + // Specifies the region in which to associate the bandwidth. If omitted, + // the provider-level region will be used. Changing this creates a new resource. + // +kubebuilder:validation:Optional + Region *string `json:"region,omitempty" tf:"region,omitempty"` +} + +// VpcBandwidthAssociateSpec defines the desired state of VpcBandwidthAssociate +type VpcBandwidthAssociateSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider VpcBandwidthAssociateParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider VpcBandwidthAssociateInitParameters `json:"initProvider,omitempty"` +} + +// VpcBandwidthAssociateStatus defines the observed state of VpcBandwidthAssociate. +type VpcBandwidthAssociateStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider VpcBandwidthAssociateObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion + +// VpcBandwidthAssociate is the Schema for the VpcBandwidthAssociates API. "" +// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" +// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,huaweicloud} +type VpcBandwidthAssociate struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec VpcBandwidthAssociateSpec `json:"spec"` + Status VpcBandwidthAssociateStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// VpcBandwidthAssociateList contains a list of VpcBandwidthAssociates +type VpcBandwidthAssociateList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VpcBandwidthAssociate `json:"items"` +} + +// Repository type metadata. +var ( + VpcBandwidthAssociate_Kind = "VpcBandwidthAssociate" + VpcBandwidthAssociate_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: VpcBandwidthAssociate_Kind}.String() + VpcBandwidthAssociate_KindAPIVersion = VpcBandwidthAssociate_Kind + "." + CRDGroupVersion.String() + VpcBandwidthAssociate_GroupVersionKind = CRDGroupVersion.WithKind(VpcBandwidthAssociate_Kind) +) + +func init() { + SchemeBuilder.Register(&VpcBandwidthAssociate{}, &VpcBandwidthAssociateList{}) +} diff --git a/apis/eip/v1alpha1/zz_vpceip_terraformed.go b/apis/eip/v1alpha1/zz_vpceip_terraformed.go new file mode 100755 index 00000000..08c9ed80 --- /dev/null +++ b/apis/eip/v1alpha1/zz_vpceip_terraformed.go @@ -0,0 +1,129 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this VpcEip +func (mg *VpcEip) GetTerraformResourceType() string { + return "huaweicloud_vpc_eip" +} + +// GetConnectionDetailsMapping for this VpcEip +func (tr *VpcEip) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this VpcEip +func (tr *VpcEip) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this VpcEip +func (tr *VpcEip) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this VpcEip +func (tr *VpcEip) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this VpcEip +func (tr *VpcEip) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this VpcEip +func (tr *VpcEip) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this VpcEip +func (tr *VpcEip) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this VpcEip +func (tr *VpcEip) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this VpcEip using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *VpcEip) LateInitialize(attrs []byte) (bool, error) { + params := &VpcEipParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *VpcEip) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/eip/v1alpha1/zz_vpceip_types.go b/apis/eip/v1alpha1/zz_vpceip_types.go new file mode 100755 index 00000000..71209811 --- /dev/null +++ b/apis/eip/v1alpha1/zz_vpceip_types.go @@ -0,0 +1,432 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + + v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" +) + +type BandwidthInitParameters struct { + + // Specifies whether the bandwidth is billed by traffic or by bandwidth + // size. The value can be traffic or bandwidth. If the charging_mode is prePaid, only bandwidth is valid. + // Whether the bandwidth is billed by traffic or by bandwidth size. + ChargeMode *string `json:"chargeMode,omitempty" tf:"charge_mode,omitempty"` + + // The shared bandwidth ID. + // This parameter is mandatory when share_type is set to WHOLE. Changing this will create a new resource. + // The shared bandwidth ID. + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // Specifies the bandwidth name. + // The name can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). + // This parameter is mandatory when share_type is set to PER. + // The dedicated bandwidth name. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Specifies whether the bandwidth is dedicated or shared. + // Changing this will create a new resource. Possible values are as follows: + // Whether the bandwidth is dedicated or shared. + ShareType *string `json:"shareType,omitempty" tf:"share_type,omitempty"` + + // The bandwidth size. + // The value ranges from 1 to 300 Mbit/s. This parameter is mandatory when share_type is set to PER. + // The dedicated bandwidth size. + Size *float64 `json:"size,omitempty" tf:"size,omitempty"` +} + +type BandwidthObservation struct { + + // Specifies whether the bandwidth is billed by traffic or by bandwidth + // size. The value can be traffic or bandwidth. If the charging_mode is prePaid, only bandwidth is valid. + // Whether the bandwidth is billed by traffic or by bandwidth size. + ChargeMode *string `json:"chargeMode,omitempty" tf:"charge_mode,omitempty"` + + // The shared bandwidth ID. + // This parameter is mandatory when share_type is set to WHOLE. Changing this will create a new resource. + // The shared bandwidth ID. + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // Specifies the bandwidth name. + // The name can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). + // This parameter is mandatory when share_type is set to PER. + // The dedicated bandwidth name. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Specifies whether the bandwidth is dedicated or shared. + // Changing this will create a new resource. Possible values are as follows: + // Whether the bandwidth is dedicated or shared. + ShareType *string `json:"shareType,omitempty" tf:"share_type,omitempty"` + + // The bandwidth size. + // The value ranges from 1 to 300 Mbit/s. This parameter is mandatory when share_type is set to PER. + // The dedicated bandwidth size. + Size *float64 `json:"size,omitempty" tf:"size,omitempty"` +} + +type BandwidthParameters struct { + + // Specifies whether the bandwidth is billed by traffic or by bandwidth + // size. The value can be traffic or bandwidth. If the charging_mode is prePaid, only bandwidth is valid. + // Whether the bandwidth is billed by traffic or by bandwidth size. + // +kubebuilder:validation:Optional + ChargeMode *string `json:"chargeMode,omitempty" tf:"charge_mode,omitempty"` + + // The shared bandwidth ID. + // This parameter is mandatory when share_type is set to WHOLE. Changing this will create a new resource. + // The shared bandwidth ID. + // +kubebuilder:validation:Optional + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // Specifies the bandwidth name. + // The name can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). + // This parameter is mandatory when share_type is set to PER. + // The dedicated bandwidth name. + // +kubebuilder:validation:Optional + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Specifies whether the bandwidth is dedicated or shared. + // Changing this will create a new resource. Possible values are as follows: + // Whether the bandwidth is dedicated or shared. + // +kubebuilder:validation:Optional + ShareType *string `json:"shareType" tf:"share_type,omitempty"` + + // The bandwidth size. + // The value ranges from 1 to 300 Mbit/s. This parameter is mandatory when share_type is set to PER. + // The dedicated bandwidth size. + // +kubebuilder:validation:Optional + Size *float64 `json:"size,omitempty" tf:"size,omitempty"` +} + +type PublicipInitParameters struct { + + // Specifies the EIP address to be assigned. + // The value must be a valid IPv4 address in the available IP address range. + // The system automatically assigns an EIP if you do not specify it. Changing this will create a new resource. + // The EIP address to be assigned. + IPAddress *string `json:"ipAddress,omitempty" tf:"ip_address,omitempty"` + + // Specifies the IP version, either 4 (default) or 6. + // The IP version. + IPVersion *float64 `json:"ipVersion,omitempty" tf:"ip_version,omitempty"` + + // The port ID which the EIP associated with. + // schema: Deprecated + PortID *string `json:"portId,omitempty" tf:"port_id,omitempty"` + + // Specifies the EIP type. Possible values are 5_bgp (dynamic BGP) + // and 5_sbgp (static BGP), the default value is 5_bgp. Changing this will create a new resource. + // The EIP type. + Type *string `json:"type,omitempty" tf:"type,omitempty"` +} + +type PublicipObservation struct { + + // Specifies the EIP address to be assigned. + // The value must be a valid IPv4 address in the available IP address range. + // The system automatically assigns an EIP if you do not specify it. Changing this will create a new resource. + // The EIP address to be assigned. + IPAddress *string `json:"ipAddress,omitempty" tf:"ip_address,omitempty"` + + // Specifies the IP version, either 4 (default) or 6. + // The IP version. + IPVersion *float64 `json:"ipVersion,omitempty" tf:"ip_version,omitempty"` + + // The port ID which the EIP associated with. + // schema: Deprecated + PortID *string `json:"portId,omitempty" tf:"port_id,omitempty"` + + // Specifies the EIP type. Possible values are 5_bgp (dynamic BGP) + // and 5_sbgp (static BGP), the default value is 5_bgp. Changing this will create a new resource. + // The EIP type. + Type *string `json:"type,omitempty" tf:"type,omitempty"` +} + +type PublicipParameters struct { + + // Specifies the EIP address to be assigned. + // The value must be a valid IPv4 address in the available IP address range. + // The system automatically assigns an EIP if you do not specify it. Changing this will create a new resource. + // The EIP address to be assigned. + // +kubebuilder:validation:Optional + IPAddress *string `json:"ipAddress,omitempty" tf:"ip_address,omitempty"` + + // Specifies the IP version, either 4 (default) or 6. + // The IP version. + // +kubebuilder:validation:Optional + IPVersion *float64 `json:"ipVersion,omitempty" tf:"ip_version,omitempty"` + + // The port ID which the EIP associated with. + // schema: Deprecated + // +kubebuilder:validation:Optional + PortID *string `json:"portId,omitempty" tf:"port_id,omitempty"` + + // Specifies the EIP type. Possible values are 5_bgp (dynamic BGP) + // and 5_sbgp (static BGP), the default value is 5_bgp. Changing this will create a new resource. + // The EIP type. + // +kubebuilder:validation:Optional + Type *string `json:"type,omitempty" tf:"type,omitempty"` +} + +type VpcEipInitParameters struct { + AutoPay *string `json:"autoPay,omitempty" tf:"auto_pay,omitempty"` + + // Specifies whether auto renew is enabled. + // Valid values are true and false. Defaults to false. + AutoRenew *string `json:"autoRenew,omitempty" tf:"auto_renew,omitempty"` + + // Specifies the bandwidth configuration. + // The object structure is documented below. + // The bandwidth configuration. + Bandwidth []BandwidthInitParameters `json:"bandwidth,omitempty" tf:"bandwidth,omitempty"` + + // Specifies the charging mode of the EIP. + // The valid values are prePaid and postPaid, defaults to postPaid. + ChargingMode *string `json:"chargingMode,omitempty" tf:"charging_mode,omitempty"` + + // Specifies the enterprise project ID to which the EIP belongs. + // The enterprise project ID to which the EIP belongs. + EnterpriseProjectID *string `json:"enterpriseProjectId,omitempty" tf:"enterprise_project_id,omitempty"` + + // Specifies the name of the EIP. + // The name can contain 1 to 64 characters, including English letters, Chinese characters, digits, underscores (_), + // hyphens (-), and periods (.). + // The name of the EIP. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Specifies the charging period of the EIP. + Period *float64 `json:"period,omitempty" tf:"period,omitempty"` + + // Specifies the charging period unit of the EIP. + // Valid values are month and year. This parameter is mandatory if charging_mode is set to prePaid. + PeriodUnit *string `json:"periodUnit,omitempty" tf:"period_unit,omitempty"` + + // Specifies the EIP configuration. + // The object structure is documented below. + // The EIP configuration. + Publicip []PublicipInitParameters `json:"publicip,omitempty" tf:"publicip,omitempty"` + + // Specifies the region in which to create the EIP resource. + // If omitted, the provider-level region will be used. Changing this will create a new resource. + // The region in which to create the EIP resource. + Region *string `json:"region,omitempty" tf:"region,omitempty"` + + // Specifies the key/value pairs to associate with the EIP. + // +mapType=granular + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +} + +type VpcEipObservation struct { + + // The IPv4 address of the EIP. + Address *string `json:"address,omitempty" tf:"address,omitempty"` + + // The associate id of EIP. + AssociateID *string `json:"associateId,omitempty" tf:"associate_id,omitempty"` + + // The associate type of EIP. Values are PORT, NATGW, ELB, ELBV1 and VPN. + AssociateType *string `json:"associateType,omitempty" tf:"associate_type,omitempty"` + + AutoPay *string `json:"autoPay,omitempty" tf:"auto_pay,omitempty"` + + // Specifies whether auto renew is enabled. + // Valid values are true and false. Defaults to false. + AutoRenew *string `json:"autoRenew,omitempty" tf:"auto_renew,omitempty"` + + // Specifies the bandwidth configuration. + // The object structure is documented below. + // The bandwidth configuration. + Bandwidth []BandwidthObservation `json:"bandwidth,omitempty" tf:"bandwidth,omitempty"` + + // Specifies the charging mode of the EIP. + // The valid values are prePaid and postPaid, defaults to postPaid. + ChargingMode *string `json:"chargingMode,omitempty" tf:"charging_mode,omitempty"` + + // The create time of EIP. + CreatedAt *string `json:"createdAt,omitempty" tf:"created_at,omitempty"` + + // Specifies the enterprise project ID to which the EIP belongs. + // The enterprise project ID to which the EIP belongs. + EnterpriseProjectID *string `json:"enterpriseProjectId,omitempty" tf:"enterprise_project_id,omitempty"` + + // The resource ID in UUID format. + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // The IPv6 address of the EIP. + IPv6Address *string `json:"ipv6Address,omitempty" tf:"ipv6_address,omitempty"` + + // The instance id to which the port belongs. Return when associate_type is PORT. + InstanceID *string `json:"instanceId,omitempty" tf:"instance_id,omitempty"` + + // The instance type to which the port belongs. Return when associate_type is PORT. + InstanceType *string `json:"instanceType,omitempty" tf:"instance_type,omitempty"` + + // Specifies the name of the EIP. + // The name can contain 1 to 64 characters, including English letters, Chinese characters, digits, underscores (_), + // hyphens (-), and periods (.). + // The name of the EIP. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Specifies the charging period of the EIP. + Period *float64 `json:"period,omitempty" tf:"period,omitempty"` + + // Specifies the charging period unit of the EIP. + // Valid values are month and year. This parameter is mandatory if charging_mode is set to prePaid. + PeriodUnit *string `json:"periodUnit,omitempty" tf:"period_unit,omitempty"` + + // The port ID which the EIP associated with. + PortID *string `json:"portId,omitempty" tf:"port_id,omitempty"` + + // The private IP address bound to the EIP. + PrivateIP *string `json:"privateIp,omitempty" tf:"private_ip,omitempty"` + + // Specifies the EIP configuration. + // The object structure is documented below. + // The EIP configuration. + Publicip []PublicipObservation `json:"publicip,omitempty" tf:"publicip,omitempty"` + + // Specifies the region in which to create the EIP resource. + // If omitted, the provider-level region will be used. Changing this will create a new resource. + // The region in which to create the EIP resource. + Region *string `json:"region,omitempty" tf:"region,omitempty"` + + // The status of EIP. + Status *string `json:"status,omitempty" tf:"status,omitempty"` + + // Specifies the key/value pairs to associate with the EIP. + // +mapType=granular + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + + // The update time of EIP. + UpdatedAt *string `json:"updatedAt,omitempty" tf:"updated_at,omitempty"` +} + +type VpcEipParameters struct { + + // +kubebuilder:validation:Optional + AutoPay *string `json:"autoPay,omitempty" tf:"auto_pay,omitempty"` + + // Specifies whether auto renew is enabled. + // Valid values are true and false. Defaults to false. + // +kubebuilder:validation:Optional + AutoRenew *string `json:"autoRenew,omitempty" tf:"auto_renew,omitempty"` + + // Specifies the bandwidth configuration. + // The object structure is documented below. + // The bandwidth configuration. + // +kubebuilder:validation:Optional + Bandwidth []BandwidthParameters `json:"bandwidth,omitempty" tf:"bandwidth,omitempty"` + + // Specifies the charging mode of the EIP. + // The valid values are prePaid and postPaid, defaults to postPaid. + // +kubebuilder:validation:Optional + ChargingMode *string `json:"chargingMode,omitempty" tf:"charging_mode,omitempty"` + + // Specifies the enterprise project ID to which the EIP belongs. + // The enterprise project ID to which the EIP belongs. + // +kubebuilder:validation:Optional + EnterpriseProjectID *string `json:"enterpriseProjectId,omitempty" tf:"enterprise_project_id,omitempty"` + + // Specifies the name of the EIP. + // The name can contain 1 to 64 characters, including English letters, Chinese characters, digits, underscores (_), + // hyphens (-), and periods (.). + // The name of the EIP. + // +kubebuilder:validation:Optional + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Specifies the charging period of the EIP. + // +kubebuilder:validation:Optional + Period *float64 `json:"period,omitempty" tf:"period,omitempty"` + + // Specifies the charging period unit of the EIP. + // Valid values are month and year. This parameter is mandatory if charging_mode is set to prePaid. + // +kubebuilder:validation:Optional + PeriodUnit *string `json:"periodUnit,omitempty" tf:"period_unit,omitempty"` + + // Specifies the EIP configuration. + // The object structure is documented below. + // The EIP configuration. + // +kubebuilder:validation:Optional + Publicip []PublicipParameters `json:"publicip,omitempty" tf:"publicip,omitempty"` + + // Specifies the region in which to create the EIP resource. + // If omitted, the provider-level region will be used. Changing this will create a new resource. + // The region in which to create the EIP resource. + // +kubebuilder:validation:Optional + Region *string `json:"region,omitempty" tf:"region,omitempty"` + + // Specifies the key/value pairs to associate with the EIP. + // +kubebuilder:validation:Optional + // +mapType=granular + Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +} + +// VpcEipSpec defines the desired state of VpcEip +type VpcEipSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider VpcEipParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider VpcEipInitParameters `json:"initProvider,omitempty"` +} + +// VpcEipStatus defines the observed state of VpcEip. +type VpcEipStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider VpcEipObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion + +// VpcEip is the Schema for the VpcEips API. "" +// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" +// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,huaweicloud} +type VpcEip struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.bandwidth) || (has(self.initProvider) && has(self.initProvider.bandwidth))",message="spec.forProvider.bandwidth is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.publicip) || (has(self.initProvider) && has(self.initProvider.publicip))",message="spec.forProvider.publicip is a required parameter" + Spec VpcEipSpec `json:"spec"` + Status VpcEipStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// VpcEipList contains a list of VpcEips +type VpcEipList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VpcEip `json:"items"` +} + +// Repository type metadata. +var ( + VpcEip_Kind = "VpcEip" + VpcEip_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: VpcEip_Kind}.String() + VpcEip_KindAPIVersion = VpcEip_Kind + "." + CRDGroupVersion.String() + VpcEip_GroupVersionKind = CRDGroupVersion.WithKind(VpcEip_Kind) +) + +func init() { + SchemeBuilder.Register(&VpcEip{}, &VpcEipList{}) +} diff --git a/apis/eip/v1alpha1/zz_vpceipassociate_terraformed.go b/apis/eip/v1alpha1/zz_vpceipassociate_terraformed.go new file mode 100755 index 00000000..69fe0729 --- /dev/null +++ b/apis/eip/v1alpha1/zz_vpceipassociate_terraformed.go @@ -0,0 +1,129 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this VpcEipAssociate +func (mg *VpcEipAssociate) GetTerraformResourceType() string { + return "huaweicloud_vpc_eip_associate" +} + +// GetConnectionDetailsMapping for this VpcEipAssociate +func (tr *VpcEipAssociate) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this VpcEipAssociate +func (tr *VpcEipAssociate) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this VpcEipAssociate +func (tr *VpcEipAssociate) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this VpcEipAssociate +func (tr *VpcEipAssociate) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this VpcEipAssociate +func (tr *VpcEipAssociate) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this VpcEipAssociate +func (tr *VpcEipAssociate) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this VpcEipAssociate +func (tr *VpcEipAssociate) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this VpcEipAssociate +func (tr *VpcEipAssociate) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this VpcEipAssociate using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *VpcEipAssociate) LateInitialize(attrs []byte) (bool, error) { + params := &VpcEipAssociateParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *VpcEipAssociate) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/eip/v1alpha1/zz_vpceipassociate_types.go b/apis/eip/v1alpha1/zz_vpceipassociate_types.go new file mode 100755 index 00000000..f5257eb1 --- /dev/null +++ b/apis/eip/v1alpha1/zz_vpceipassociate_types.go @@ -0,0 +1,159 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + + v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" +) + +type VpcEipAssociateInitParameters struct { + + // Specifies a private IP address to associate with the EIP. + // Changing this creates a new resource. + FixedIP *string `json:"fixedIp,omitempty" tf:"fixed_ip,omitempty"` + + // Specifies the ID of the network to which the fixed_ip belongs. + // It is mandatory when fixed_ip is set. Changing this creates a new resource. + NetworkID *string `json:"networkId,omitempty" tf:"network_id,omitempty"` + + // Specifies an existing port ID to associate with the EIP. + // This parameter and fixed_ip are alternative. Changing this creates a new resource. + PortID *string `json:"portId,omitempty" tf:"port_id,omitempty"` + + // Specifies the EIP address to associate. Changing this creates a new resource. + PublicIP *string `json:"publicIp,omitempty" tf:"public_ip,omitempty"` + + // Specifies the region in which to associate the EIP. If omitted, the provider-level + // region will be used. Changing this creates a new resource. + Region *string `json:"region,omitempty" tf:"region,omitempty"` +} + +type VpcEipAssociateObservation struct { + + // Specifies a private IP address to associate with the EIP. + // Changing this creates a new resource. + FixedIP *string `json:"fixedIp,omitempty" tf:"fixed_ip,omitempty"` + + // The resource ID in UUID format. + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // The MAC address of the private IP. + MacAddress *string `json:"macAddress,omitempty" tf:"mac_address,omitempty"` + + // Specifies the ID of the network to which the fixed_ip belongs. + // It is mandatory when fixed_ip is set. Changing this creates a new resource. + NetworkID *string `json:"networkId,omitempty" tf:"network_id,omitempty"` + + // Specifies an existing port ID to associate with the EIP. + // This parameter and fixed_ip are alternative. Changing this creates a new resource. + PortID *string `json:"portId,omitempty" tf:"port_id,omitempty"` + + // Specifies the EIP address to associate. Changing this creates a new resource. + PublicIP *string `json:"publicIp,omitempty" tf:"public_ip,omitempty"` + + // The IPv6 address of the private IP. + PublicIPv6 *string `json:"publicIpv6,omitempty" tf:"public_ipv6,omitempty"` + + // Specifies the region in which to associate the EIP. If omitted, the provider-level + // region will be used. Changing this creates a new resource. + Region *string `json:"region,omitempty" tf:"region,omitempty"` + + // The status of EIP, should be BOUND. + Status *string `json:"status,omitempty" tf:"status,omitempty"` +} + +type VpcEipAssociateParameters struct { + + // Specifies a private IP address to associate with the EIP. + // Changing this creates a new resource. + // +kubebuilder:validation:Optional + FixedIP *string `json:"fixedIp,omitempty" tf:"fixed_ip,omitempty"` + + // Specifies the ID of the network to which the fixed_ip belongs. + // It is mandatory when fixed_ip is set. Changing this creates a new resource. + // +kubebuilder:validation:Optional + NetworkID *string `json:"networkId,omitempty" tf:"network_id,omitempty"` + + // Specifies an existing port ID to associate with the EIP. + // This parameter and fixed_ip are alternative. Changing this creates a new resource. + // +kubebuilder:validation:Optional + PortID *string `json:"portId,omitempty" tf:"port_id,omitempty"` + + // Specifies the EIP address to associate. Changing this creates a new resource. + // +kubebuilder:validation:Optional + PublicIP *string `json:"publicIp,omitempty" tf:"public_ip,omitempty"` + + // Specifies the region in which to associate the EIP. If omitted, the provider-level + // region will be used. Changing this creates a new resource. + // +kubebuilder:validation:Optional + Region *string `json:"region,omitempty" tf:"region,omitempty"` +} + +// VpcEipAssociateSpec defines the desired state of VpcEipAssociate +type VpcEipAssociateSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider VpcEipAssociateParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider VpcEipAssociateInitParameters `json:"initProvider,omitempty"` +} + +// VpcEipAssociateStatus defines the observed state of VpcEipAssociate. +type VpcEipAssociateStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider VpcEipAssociateObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion + +// VpcEipAssociate is the Schema for the VpcEipAssociates API. "" +// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" +// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,huaweicloud} +type VpcEipAssociate struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.publicIp) || (has(self.initProvider) && has(self.initProvider.publicIp))",message="spec.forProvider.publicIp is a required parameter" + Spec VpcEipAssociateSpec `json:"spec"` + Status VpcEipAssociateStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// VpcEipAssociateList contains a list of VpcEipAssociates +type VpcEipAssociateList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VpcEipAssociate `json:"items"` +} + +// Repository type metadata. +var ( + VpcEipAssociate_Kind = "VpcEipAssociate" + VpcEipAssociate_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: VpcEipAssociate_Kind}.String() + VpcEipAssociate_KindAPIVersion = VpcEipAssociate_Kind + "." + CRDGroupVersion.String() + VpcEipAssociate_GroupVersionKind = CRDGroupVersion.WithKind(VpcEipAssociate_Kind) +) + +func init() { + SchemeBuilder.Register(&VpcEipAssociate{}, &VpcEipAssociateList{}) +} diff --git a/apis/eip/v1alpha1/zz_vpceipv3associate_terraformed.go b/apis/eip/v1alpha1/zz_vpceipv3associate_terraformed.go new file mode 100755 index 00000000..591af535 --- /dev/null +++ b/apis/eip/v1alpha1/zz_vpceipv3associate_terraformed.go @@ -0,0 +1,129 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this VpcEipV3Associate +func (mg *VpcEipV3Associate) GetTerraformResourceType() string { + return "huaweicloud_vpc_eipv3_associate" +} + +// GetConnectionDetailsMapping for this VpcEipV3Associate +func (tr *VpcEipV3Associate) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this VpcEipV3Associate +func (tr *VpcEipV3Associate) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this VpcEipV3Associate +func (tr *VpcEipV3Associate) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this VpcEipV3Associate +func (tr *VpcEipV3Associate) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this VpcEipV3Associate +func (tr *VpcEipV3Associate) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this VpcEipV3Associate +func (tr *VpcEipV3Associate) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this VpcEipV3Associate +func (tr *VpcEipV3Associate) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this VpcEipV3Associate +func (tr *VpcEipV3Associate) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this VpcEipV3Associate using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *VpcEipV3Associate) LateInitialize(attrs []byte) (bool, error) { + params := &VpcEipV3AssociateParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *VpcEipV3Associate) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/eip/v1alpha1/zz_vpceipv3associate_types.go b/apis/eip/v1alpha1/zz_vpceipv3associate_types.go new file mode 100755 index 00000000..6dffe23e --- /dev/null +++ b/apis/eip/v1alpha1/zz_vpceipv3associate_types.go @@ -0,0 +1,158 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + + v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" +) + +type VpcEipV3AssociateInitParameters struct { + + // Specifies the ID of the instance that the port belongs to. + // Changing this creates a new resource. + AssociateInstanceID *string `json:"associateInstanceId,omitempty" tf:"associate_instance_id,omitempty"` + + // Specifies the type of the instance that the port belongs to. + // Value options: PORT, NATGW, VPN and ELB. Changing this creates a new resource. + AssociateInstanceType *string `json:"associateInstanceType,omitempty" tf:"associate_instance_type,omitempty"` + + // Specifies the ID of a EIP. Changing this creates a new resource. + // +crossplane:generate:reference:type=github.com/huaweicloud/provider-huaweicloud/apis/eip/v1alpha1.VpcEip + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() + PublicipID *string `json:"publicipId,omitempty" tf:"publicip_id,omitempty"` + + // Reference to a VpcEip in eip to populate publicipId. + // +kubebuilder:validation:Optional + PublicipIDRef *v1.Reference `json:"publicipIdRef,omitempty" tf:"-"` + + // Selector for a VpcEip in eip to populate publicipId. + // +kubebuilder:validation:Optional + PublicipIDSelector *v1.Selector `json:"publicipIdSelector,omitempty" tf:"-"` + + // Specifies the region in which to create the VPC EIP associate resource. If + // omitted, the provider-level region will be used. Changing this creates a new resource. + Region *string `json:"region,omitempty" tf:"region,omitempty"` +} + +type VpcEipV3AssociateObservation struct { + + // Specifies the ID of the instance that the port belongs to. + // Changing this creates a new resource. + AssociateInstanceID *string `json:"associateInstanceId,omitempty" tf:"associate_instance_id,omitempty"` + + // Specifies the type of the instance that the port belongs to. + // Value options: PORT, NATGW, VPN and ELB. Changing this creates a new resource. + AssociateInstanceType *string `json:"associateInstanceType,omitempty" tf:"associate_instance_type,omitempty"` + + // The resource ID. The value is the publicip_id. + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // Specifies the ID of a EIP. Changing this creates a new resource. + PublicipID *string `json:"publicipId,omitempty" tf:"publicip_id,omitempty"` + + // Specifies the region in which to create the VPC EIP associate resource. If + // omitted, the provider-level region will be used. Changing this creates a new resource. + Region *string `json:"region,omitempty" tf:"region,omitempty"` +} + +type VpcEipV3AssociateParameters struct { + + // Specifies the ID of the instance that the port belongs to. + // Changing this creates a new resource. + // +kubebuilder:validation:Optional + AssociateInstanceID *string `json:"associateInstanceId,omitempty" tf:"associate_instance_id,omitempty"` + + // Specifies the type of the instance that the port belongs to. + // Value options: PORT, NATGW, VPN and ELB. Changing this creates a new resource. + // +kubebuilder:validation:Optional + AssociateInstanceType *string `json:"associateInstanceType,omitempty" tf:"associate_instance_type,omitempty"` + + // Specifies the ID of a EIP. Changing this creates a new resource. + // +crossplane:generate:reference:type=github.com/huaweicloud/provider-huaweicloud/apis/eip/v1alpha1.VpcEip + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() + // +kubebuilder:validation:Optional + PublicipID *string `json:"publicipId,omitempty" tf:"publicip_id,omitempty"` + + // Reference to a VpcEip in eip to populate publicipId. + // +kubebuilder:validation:Optional + PublicipIDRef *v1.Reference `json:"publicipIdRef,omitempty" tf:"-"` + + // Selector for a VpcEip in eip to populate publicipId. + // +kubebuilder:validation:Optional + PublicipIDSelector *v1.Selector `json:"publicipIdSelector,omitempty" tf:"-"` + + // Specifies the region in which to create the VPC EIP associate resource. If + // omitted, the provider-level region will be used. Changing this creates a new resource. + // +kubebuilder:validation:Optional + Region *string `json:"region,omitempty" tf:"region,omitempty"` +} + +// VpcEipV3AssociateSpec defines the desired state of VpcEipV3Associate +type VpcEipV3AssociateSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider VpcEipV3AssociateParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider VpcEipV3AssociateInitParameters `json:"initProvider,omitempty"` +} + +// VpcEipV3AssociateStatus defines the observed state of VpcEipV3Associate. +type VpcEipV3AssociateStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider VpcEipV3AssociateObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion + +// VpcEipV3Associate is the Schema for the VpcEipV3Associates API. Manages a VPC EIP associates with an instance resource within HuaweiCloud. +// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" +// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,huaweicloud} +type VpcEipV3Associate struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.associateInstanceId) || (has(self.initProvider) && has(self.initProvider.associateInstanceId))",message="spec.forProvider.associateInstanceId is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.associateInstanceType) || (has(self.initProvider) && has(self.initProvider.associateInstanceType))",message="spec.forProvider.associateInstanceType is a required parameter" + Spec VpcEipV3AssociateSpec `json:"spec"` + Status VpcEipV3AssociateStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// VpcEipV3AssociateList contains a list of VpcEipV3Associates +type VpcEipV3AssociateList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VpcEipV3Associate `json:"items"` +} + +// Repository type metadata. +var ( + VpcEipV3Associate_Kind = "VpcEipV3Associate" + VpcEipV3Associate_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: VpcEipV3Associate_Kind}.String() + VpcEipV3Associate_KindAPIVersion = VpcEipV3Associate_Kind + "." + CRDGroupVersion.String() + VpcEipV3Associate_GroupVersionKind = CRDGroupVersion.WithKind(VpcEipV3Associate_Kind) +) + +func init() { + SchemeBuilder.Register(&VpcEipV3Associate{}, &VpcEipV3AssociateList{}) +} diff --git a/apis/eip/v1alpha1/zz_vpcinternetgateway_terraformed.go b/apis/eip/v1alpha1/zz_vpcinternetgateway_terraformed.go new file mode 100755 index 00000000..501bcac3 --- /dev/null +++ b/apis/eip/v1alpha1/zz_vpcinternetgateway_terraformed.go @@ -0,0 +1,129 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this VpcInternetGateway +func (mg *VpcInternetGateway) GetTerraformResourceType() string { + return "huaweicloud_vpc_internet_gateway" +} + +// GetConnectionDetailsMapping for this VpcInternetGateway +func (tr *VpcInternetGateway) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this VpcInternetGateway +func (tr *VpcInternetGateway) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this VpcInternetGateway +func (tr *VpcInternetGateway) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this VpcInternetGateway +func (tr *VpcInternetGateway) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this VpcInternetGateway +func (tr *VpcInternetGateway) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this VpcInternetGateway +func (tr *VpcInternetGateway) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this VpcInternetGateway +func (tr *VpcInternetGateway) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this VpcInternetGateway +func (tr *VpcInternetGateway) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this VpcInternetGateway using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *VpcInternetGateway) LateInitialize(attrs []byte) (bool, error) { + params := &VpcInternetGatewayParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *VpcInternetGateway) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/eip/v1alpha1/zz_vpcinternetgateway_types.go b/apis/eip/v1alpha1/zz_vpcinternetgateway_types.go new file mode 100755 index 00000000..8ff401a5 --- /dev/null +++ b/apis/eip/v1alpha1/zz_vpcinternetgateway_types.go @@ -0,0 +1,208 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + + v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" +) + +type VpcInternetGatewayInitParameters struct { + + // Specifies whether to add a default route pointing to the IGW in the default + // route table of the VPC with the destination address 0.0.0.0/0. Changing this creates a new resource. + AddRoute *bool `json:"addRoute,omitempty" tf:"add_route,omitempty"` + + // Specifies whether to enable IPv6. It's not allow change true to false. Make sure the + // subnet is enable IPv6 before setting to true. + EnableIPv6 *bool `json:"enableIpv6,omitempty" tf:"enable_ipv6,omitempty"` + + // Specifies the IGW name. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Specifies the region in which to create the IGW. + // If omitted, the provider-level region will be used. Changing this will create a new resource. + Region *string `json:"region,omitempty" tf:"region,omitempty"` + + // Specifies the subnet ID which the IGW associated with. + // Changing this creates a new resource. + // +crossplane:generate:reference:type=github.com/huaweicloud/provider-huaweicloud/apis/vpc/v1alpha1.Subnet + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() + SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` + + // Reference to a Subnet in vpc to populate subnetId. + // +kubebuilder:validation:Optional + SubnetIDRef *v1.Reference `json:"subnetIdRef,omitempty" tf:"-"` + + // Selector for a Subnet in vpc to populate subnetId. + // +kubebuilder:validation:Optional + SubnetIDSelector *v1.Selector `json:"subnetIdSelector,omitempty" tf:"-"` + + // Specifies the VPC ID which the IGW associated with. A VPC can only associate + // with one IGW. Changing this creates a new resource. + // +crossplane:generate:reference:type=github.com/huaweicloud/provider-huaweicloud/apis/vpc/v1alpha1.VPC + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() + VPCID *string `json:"vpcId,omitempty" tf:"vpc_id,omitempty"` + + // Reference to a VPC in vpc to populate vpcId. + // +kubebuilder:validation:Optional + VPCIDRef *v1.Reference `json:"vpcIdRef,omitempty" tf:"-"` + + // Selector for a VPC in vpc to populate vpcId. + // +kubebuilder:validation:Optional + VPCIDSelector *v1.Selector `json:"vpcIdSelector,omitempty" tf:"-"` +} + +type VpcInternetGatewayObservation struct { + + // Specifies whether to add a default route pointing to the IGW in the default + // route table of the VPC with the destination address 0.0.0.0/0. Changing this creates a new resource. + AddRoute *bool `json:"addRoute,omitempty" tf:"add_route,omitempty"` + + // The create time of the IGW. + CreatedAt *string `json:"createdAt,omitempty" tf:"created_at,omitempty"` + + // Specifies whether to enable IPv6. It's not allow change true to false. Make sure the + // subnet is enable IPv6 before setting to true. + EnableIPv6 *bool `json:"enableIpv6,omitempty" tf:"enable_ipv6,omitempty"` + + // The resource ID. + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // Specifies the IGW name. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Specifies the region in which to create the IGW. + // If omitted, the provider-level region will be used. Changing this will create a new resource. + Region *string `json:"region,omitempty" tf:"region,omitempty"` + + // Specifies the subnet ID which the IGW associated with. + // Changing this creates a new resource. + SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` + + // The update time of the IGW. + UpdatedAt *string `json:"updatedAt,omitempty" tf:"updated_at,omitempty"` + + // Specifies the VPC ID which the IGW associated with. A VPC can only associate + // with one IGW. Changing this creates a new resource. + VPCID *string `json:"vpcId,omitempty" tf:"vpc_id,omitempty"` +} + +type VpcInternetGatewayParameters struct { + + // Specifies whether to add a default route pointing to the IGW in the default + // route table of the VPC with the destination address 0.0.0.0/0. Changing this creates a new resource. + // +kubebuilder:validation:Optional + AddRoute *bool `json:"addRoute,omitempty" tf:"add_route,omitempty"` + + // Specifies whether to enable IPv6. It's not allow change true to false. Make sure the + // subnet is enable IPv6 before setting to true. + // +kubebuilder:validation:Optional + EnableIPv6 *bool `json:"enableIpv6,omitempty" tf:"enable_ipv6,omitempty"` + + // Specifies the IGW name. + // +kubebuilder:validation:Optional + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Specifies the region in which to create the IGW. + // If omitted, the provider-level region will be used. Changing this will create a new resource. + // +kubebuilder:validation:Optional + Region *string `json:"region,omitempty" tf:"region,omitempty"` + + // Specifies the subnet ID which the IGW associated with. + // Changing this creates a new resource. + // +crossplane:generate:reference:type=github.com/huaweicloud/provider-huaweicloud/apis/vpc/v1alpha1.Subnet + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() + // +kubebuilder:validation:Optional + SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` + + // Reference to a Subnet in vpc to populate subnetId. + // +kubebuilder:validation:Optional + SubnetIDRef *v1.Reference `json:"subnetIdRef,omitempty" tf:"-"` + + // Selector for a Subnet in vpc to populate subnetId. + // +kubebuilder:validation:Optional + SubnetIDSelector *v1.Selector `json:"subnetIdSelector,omitempty" tf:"-"` + + // Specifies the VPC ID which the IGW associated with. A VPC can only associate + // with one IGW. Changing this creates a new resource. + // +crossplane:generate:reference:type=github.com/huaweicloud/provider-huaweicloud/apis/vpc/v1alpha1.VPC + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() + // +kubebuilder:validation:Optional + VPCID *string `json:"vpcId,omitempty" tf:"vpc_id,omitempty"` + + // Reference to a VPC in vpc to populate vpcId. + // +kubebuilder:validation:Optional + VPCIDRef *v1.Reference `json:"vpcIdRef,omitempty" tf:"-"` + + // Selector for a VPC in vpc to populate vpcId. + // +kubebuilder:validation:Optional + VPCIDSelector *v1.Selector `json:"vpcIdSelector,omitempty" tf:"-"` +} + +// VpcInternetGatewaySpec defines the desired state of VpcInternetGateway +type VpcInternetGatewaySpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider VpcInternetGatewayParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider VpcInternetGatewayInitParameters `json:"initProvider,omitempty"` +} + +// VpcInternetGatewayStatus defines the observed state of VpcInternetGateway. +type VpcInternetGatewayStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider VpcInternetGatewayObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion + +// VpcInternetGateway is the Schema for the VpcInternetGateways API. "" +// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" +// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,huaweicloud} +type VpcInternetGateway struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec VpcInternetGatewaySpec `json:"spec"` + Status VpcInternetGatewayStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// VpcInternetGatewayList contains a list of VpcInternetGateways +type VpcInternetGatewayList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VpcInternetGateway `json:"items"` +} + +// Repository type metadata. +var ( + VpcInternetGateway_Kind = "VpcInternetGateway" + VpcInternetGateway_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: VpcInternetGateway_Kind}.String() + VpcInternetGateway_KindAPIVersion = VpcInternetGateway_Kind + "." + CRDGroupVersion.String() + VpcInternetGateway_GroupVersionKind = CRDGroupVersion.WithKind(VpcInternetGateway_Kind) +) + +func init() { + SchemeBuilder.Register(&VpcInternetGateway{}, &VpcInternetGatewayList{}) +} diff --git a/apis/zz_register.go b/apis/zz_register.go index f64c187c..a626b49d 100755 --- a/apis/zz_register.go +++ b/apis/zz_register.go @@ -11,6 +11,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" v1alpha1 "github.com/huaweicloud/provider-huaweicloud/apis/cce/v1alpha1" + v1alpha1eip "github.com/huaweicloud/provider-huaweicloud/apis/eip/v1alpha1" v1alpha1iam "github.com/huaweicloud/provider-huaweicloud/apis/iam/v1alpha1" v1alpha1obs "github.com/huaweicloud/provider-huaweicloud/apis/obs/v1alpha1" v1alpha1apis "github.com/huaweicloud/provider-huaweicloud/apis/v1alpha1" @@ -22,6 +23,7 @@ func init() { // Register the types with the Scheme so the components can map objects to GroupVersionKinds and back AddToSchemes = append(AddToSchemes, v1alpha1.SchemeBuilder.AddToScheme, + v1alpha1eip.SchemeBuilder.AddToScheme, v1alpha1iam.SchemeBuilder.AddToScheme, v1alpha1obs.SchemeBuilder.AddToScheme, v1alpha1apis.SchemeBuilder.AddToScheme, diff --git a/config/eip/config.go b/config/eip/config.go new file mode 100644 index 00000000..2efe7e68 --- /dev/null +++ b/config/eip/config.go @@ -0,0 +1,71 @@ +package eip + +import ( + "github.com/crossplane/upjet/pkg/config" +) + +const shortGroupEip = "eip" + +// Configure configures individual resources by adding custom ResourceConfigurators. +func Configure(p *config.Provider) { + p.AddResourceConfigurator("huaweicloud_global_eip", func(r *config.Resource) { + r.ShortGroup = shortGroupEip + r.Kind = "GlobalEip" + }) + p.AddResourceConfigurator("huaweicloud_global_eip_associate", func(r *config.Resource) { + r.ShortGroup = shortGroupEip + r.Kind = "GlobalEipAssociate" + r.References["global_eip_id"] = config.Reference{ + TerraformName: "huaweicloud_global_eip", + Extractor: `github.com/crossplane/upjet/pkg/resource.ExtractResourceID()`, + } + }) + p.AddResourceConfigurator("huaweicloud_global_internet_bandwidth", func(r *config.Resource) { + r.ShortGroup = shortGroupEip + r.Kind = "GlobalInternetBandwidth" + }) + p.AddResourceConfigurator("huaweicloud_vpc_bandwidth", func(r *config.Resource) { + r.ShortGroup = shortGroupEip + r.Kind = "VpcBandwidth" + }) + p.AddResourceConfigurator("huaweicloud_vpc_bandwidth_associate", func(r *config.Resource) { + r.ShortGroup = shortGroupEip + r.Kind = "VpcBandwidthAssociate" + r.References["bandwidth_id"] = config.Reference{ + TerraformName: "huaweicloud_vpc_bandwidth", + Extractor: `github.com/crossplane/upjet/pkg/resource.ExtractResourceID()`, + } + r.References["eip_id"] = config.Reference{ + TerraformName: "huaweicloud_vpc_eip", + Extractor: `github.com/crossplane/upjet/pkg/resource.ExtractResourceID()`, + } + }) + p.AddResourceConfigurator("huaweicloud_vpc_eip", func(r *config.Resource) { + r.ShortGroup = shortGroupEip + r.Kind = "VpcEip" + }) + p.AddResourceConfigurator("huaweicloud_vpc_eip_associate", func(r *config.Resource) { + r.ShortGroup = shortGroupEip + r.Kind = "VpcEipAssociate" + }) + p.AddResourceConfigurator("huaweicloud_vpc_eipv3_associate", func(r *config.Resource) { + r.ShortGroup = shortGroupEip + r.Kind = "VpcEipV3Associate" + r.References["publicip_id"] = config.Reference{ + TerraformName: "huaweicloud_vpc_eip", + Extractor: `github.com/crossplane/upjet/pkg/resource.ExtractResourceID()`, + } + }) + p.AddResourceConfigurator("huaweicloud_vpc_internet_gateway", func(r *config.Resource) { + r.ShortGroup = shortGroupEip + r.Kind = "VpcInternetGateway" + r.References["vpc_id"] = config.Reference{ + TerraformName: "huaweicloud_vpc", + Extractor: `github.com/crossplane/upjet/pkg/resource.ExtractResourceID()`, + } + r.References["subnet_id"] = config.Reference{ + TerraformName: "huaweicloud_vpc_subnet", + Extractor: `github.com/crossplane/upjet/pkg/resource.ExtractResourceID()`, + } + }) +} diff --git a/config/external_name.go b/config/external_name.go index 5b3ee0ee..7eb701ab 100644 --- a/config/external_name.go +++ b/config/external_name.go @@ -14,6 +14,17 @@ var ExternalNameConfigs = map[string]config.ExternalName{ "huaweicloud_cce_cluster": config.IdentifierFromProvider, "huaweicloud_cce_node": config.IdentifierFromProvider, + // eip + "huaweicloud_global_eip": config.IdentifierFromProvider, + "huaweicloud_global_eip_associate": config.IdentifierFromProvider, + "huaweicloud_global_internet_bandwidth": config.IdentifierFromProvider, + "huaweicloud_vpc_bandwidth": config.IdentifierFromProvider, + "huaweicloud_vpc_bandwidth_associate": config.IdentifierFromProvider, + "huaweicloud_vpc_eip": config.IdentifierFromProvider, + "huaweicloud_vpc_eip_associate": config.IdentifierFromProvider, + "huaweicloud_vpc_eipv3_associate": config.IdentifierFromProvider, + "huaweicloud_vpc_internet_gateway": config.IdentifierFromProvider, + // iam "huaweicloud_identity_access_key": config.IdentifierFromProvider, "huaweicloud_identity_acl": config.IdentifierFromProvider, diff --git a/config/provider.go b/config/provider.go index 04a71475..37c7ae87 100644 --- a/config/provider.go +++ b/config/provider.go @@ -9,6 +9,7 @@ import ( _ "embed" "github.com/huaweicloud/provider-huaweicloud/config/cce" + "github.com/huaweicloud/provider-huaweicloud/config/eip" "github.com/huaweicloud/provider-huaweicloud/config/iam" "github.com/huaweicloud/provider-huaweicloud/config/obs" @@ -44,6 +45,7 @@ func GetProvider() *ujconfig.Provider { iam.Configure, obs.Configure, vpc.Configure, + eip.Configure, } { configure(pc) } diff --git a/examples-generated/eip/v1alpha1/globaleip.yaml b/examples-generated/eip/v1alpha1/globaleip.yaml new file mode 100644 index 00000000..46435a36 --- /dev/null +++ b/examples-generated/eip/v1alpha1/globaleip.yaml @@ -0,0 +1,37 @@ +apiVersion: eip.huaweicloud.crossplane.io/v1alpha1 +kind: GlobalEip +metadata: + annotations: + meta.upbound.io/example-id: eip/v1alpha1/globaleip + labels: + testing.upbound.io/example-name: test + name: test +spec: + forProvider: + accessSite: ${data.huaweicloud_global_eip_pools.all.geip_pools[0].access_site} + enterpriseProjectId: ${var.enterprise_project_id} + geipPoolName: ${data.huaweicloud_global_eip_pools.all.geip_pools[0].name} + internetBandwidthId: ${huaweicloud_global_internet_bandwidth.test.id} + name: ${var.eip_name} + tags: + foo: bar + +--- + +apiVersion: eip.huaweicloud.crossplane.io/v1alpha1 +kind: GlobalInternetBandwidth +metadata: + annotations: + meta.upbound.io/example-id: eip/v1alpha1/globaleip + labels: + testing.upbound.io/example-name: test + name: test +spec: + forProvider: + accessSite: ${data.huaweicloud_global_eip_pools.all.geip_pools[0].access_site} + chargeMode: 95peak_guar + enterpriseProjectId: ${var.enterprise_project_id} + isp: ${data.huaweicloud_global_eip_pools.all.geip_pools[0].isp} + name: ${var.bandwidth_name} + size: 300 + type: ${data.huaweicloud_global_eip_pools.all.geip_pools[0].allowed_bandwidth_types[0].type} diff --git a/examples-generated/eip/v1alpha1/globaleipassociate.yaml b/examples-generated/eip/v1alpha1/globaleipassociate.yaml new file mode 100644 index 00000000..1603663f --- /dev/null +++ b/examples-generated/eip/v1alpha1/globaleipassociate.yaml @@ -0,0 +1,23 @@ +apiVersion: eip.huaweicloud.crossplane.io/v1alpha1 +kind: GlobalEipAssociate +metadata: + annotations: + meta.upbound.io/example-id: eip/v1alpha1/globaleipassociate + labels: + testing.upbound.io/example-name: test + name: test +spec: + forProvider: + associateInstance: + - instanceId: ${var.compute_instance_id} + instanceType: ECS + projectId: ${var.project_id} + region: ${var.region} + gcBandwidth: + - chargeMode: bwd + name: ${var.gc_bandwidth_name} + size: 5 + globalEipIdSelector: + matchLabels: + testing.upbound.io/example-name: example + isReserveGcb: false diff --git a/examples-generated/eip/v1alpha1/globalinternetbandwidth.yaml b/examples-generated/eip/v1alpha1/globalinternetbandwidth.yaml new file mode 100644 index 00000000..6baae0fb --- /dev/null +++ b/examples-generated/eip/v1alpha1/globalinternetbandwidth.yaml @@ -0,0 +1,20 @@ +apiVersion: eip.huaweicloud.crossplane.io/v1alpha1 +kind: GlobalInternetBandwidth +metadata: + annotations: + meta.upbound.io/example-id: eip/v1alpha1/globalinternetbandwidth + labels: + testing.upbound.io/example-name: test + name: test +spec: + forProvider: + accessSite: ${data.huaweicloud_global_eip_pools.all.geip_pools[0].access_site} + chargeMode: 95peak_guar + enterpriseProjectId: ${var.enterprise_project_id} + isp: ${data.huaweicloud_global_eip_pools.all.geip_pools[0].isp} + name: ${var.bandwidth_name} + size: 300 + tags: + foo: bar + key: value + type: ${data.huaweicloud_global_eip_pools.all.geip_pools[0].allowed_bandwidth_types[0].type} diff --git a/examples-generated/eip/v1alpha1/vpcbandwidth.yaml b/examples-generated/eip/v1alpha1/vpcbandwidth.yaml new file mode 100644 index 00000000..0a9801cb --- /dev/null +++ b/examples-generated/eip/v1alpha1/vpcbandwidth.yaml @@ -0,0 +1,12 @@ +apiVersion: eip.huaweicloud.crossplane.io/v1alpha1 +kind: VpcBandwidth +metadata: + annotations: + meta.upbound.io/example-id: eip/v1alpha1/vpcbandwidth + labels: + testing.upbound.io/example-name: bandwidth_1 + name: bandwidth-1 +spec: + forProvider: + name: bandwidth_1 + size: 5 diff --git a/examples-generated/eip/v1alpha1/vpcbandwidthassociate.yaml b/examples-generated/eip/v1alpha1/vpcbandwidthassociate.yaml new file mode 100644 index 00000000..a09b9879 --- /dev/null +++ b/examples-generated/eip/v1alpha1/vpcbandwidthassociate.yaml @@ -0,0 +1,31 @@ +apiVersion: eip.huaweicloud.crossplane.io/v1alpha1 +kind: VpcBandwidthAssociate +metadata: + annotations: + meta.upbound.io/example-id: eip/v1alpha1/vpcbandwidthassociate + labels: + testing.upbound.io/example-name: test + name: test +spec: + forProvider: + bandwidthIdSelector: + matchLabels: + testing.upbound.io/example-name: test + eipIdSelector: + matchLabels: + testing.upbound.io/example-name: example + +--- + +apiVersion: eip.huaweicloud.crossplane.io/v1alpha1 +kind: VpcBandwidth +metadata: + annotations: + meta.upbound.io/example-id: eip/v1alpha1/vpcbandwidthassociate + labels: + testing.upbound.io/example-name: test + name: test +spec: + forProvider: + name: bandwidth_1 + size: 100 diff --git a/examples-generated/eip/v1alpha1/vpceip.yaml b/examples-generated/eip/v1alpha1/vpceip.yaml new file mode 100644 index 00000000..ae13fb2b --- /dev/null +++ b/examples-generated/eip/v1alpha1/vpceip.yaml @@ -0,0 +1,17 @@ +apiVersion: eip.huaweicloud.crossplane.io/v1alpha1 +kind: VpcEip +metadata: + annotations: + meta.upbound.io/example-id: eip/v1alpha1/vpceip + labels: + testing.upbound.io/example-name: dedicated + name: dedicated +spec: + forProvider: + bandwidth: + - chargeMode: traffic + name: ${var.bandwidth_name} + shareType: PER + size: 10 + publicip: + - type: 5_bgp diff --git a/examples-generated/eip/v1alpha1/vpceipassociate.yaml b/examples-generated/eip/v1alpha1/vpceipassociate.yaml new file mode 100644 index 00000000..3f9c6a4a --- /dev/null +++ b/examples-generated/eip/v1alpha1/vpceipassociate.yaml @@ -0,0 +1,13 @@ +apiVersion: eip.huaweicloud.crossplane.io/v1alpha1 +kind: VpcEipAssociate +metadata: + annotations: + meta.upbound.io/example-id: eip/v1alpha1/vpceipassociate + labels: + testing.upbound.io/example-name: associated + name: associated +spec: + forProvider: + fixedIp: 192.168.0.100 + networkId: ${var.network_id} + publicIp: ${var.public_address} diff --git a/examples-generated/eip/v1alpha1/vpceipv3associate.yaml b/examples-generated/eip/v1alpha1/vpceipv3associate.yaml new file mode 100644 index 00000000..5b080295 --- /dev/null +++ b/examples-generated/eip/v1alpha1/vpceipv3associate.yaml @@ -0,0 +1,15 @@ +apiVersion: eip.huaweicloud.crossplane.io/v1alpha1 +kind: VpcEipV3Associate +metadata: + annotations: + meta.upbound.io/example-id: eip/v1alpha1/vpceipv3associate + labels: + testing.upbound.io/example-name: test + name: test +spec: + forProvider: + associateInstanceId: ${var.elb_id} + associateInstanceType: ELB + publicipIdSelector: + matchLabels: + testing.upbound.io/example-name: example diff --git a/examples-generated/eip/v1alpha1/vpcinternetgateway.yaml b/examples-generated/eip/v1alpha1/vpcinternetgateway.yaml new file mode 100644 index 00000000..7af39545 --- /dev/null +++ b/examples-generated/eip/v1alpha1/vpcinternetgateway.yaml @@ -0,0 +1,15 @@ +apiVersion: eip.huaweicloud.crossplane.io/v1alpha1 +kind: VpcInternetGateway +metadata: + annotations: + meta.upbound.io/example-id: eip/v1alpha1/vpcinternetgateway + labels: + testing.upbound.io/example-name: test + name: test +spec: + forProvider: + addRoute: true + name: ${var.igw_name} + vpcIdSelector: + matchLabels: + testing.upbound.io/example-name: example diff --git a/internal/controller/eip/globaleip/zz_controller.go b/internal/controller/eip/globaleip/zz_controller.go new file mode 100755 index 00000000..756cbf1b --- /dev/null +++ b/internal/controller/eip/globaleip/zz_controller.go @@ -0,0 +1,87 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package globaleip + +import ( + "time" + + "github.com/crossplane/crossplane-runtime/pkg/connection" + "github.com/crossplane/crossplane-runtime/pkg/event" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" + xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" + ctrl "sigs.k8s.io/controller-runtime" + + v1alpha1 "github.com/huaweicloud/provider-huaweicloud/apis/eip/v1alpha1" + features "github.com/huaweicloud/provider-huaweicloud/internal/features" +) + +// Setup adds a controller that reconciles GlobalEip managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1alpha1.GlobalEip_GroupVersionKind.String()) + var initializers managed.InitializerChain + cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} + if o.SecretStoreConfigGVK != nil { + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) + } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.GlobalEip_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.GlobalEip_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["huaweicloud_global_eip"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), + tjcontroller.WithCallbackProvider(ac), + )), + managed.WithLogger(o.Logger.WithValues("controller", name)), + managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithTimeout(3 * time.Minute), + managed.WithInitializers(initializers), + managed.WithConnectionPublishers(cps...), + managed.WithPollInterval(o.PollInterval), + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } + + // register webhooks for the kind v1alpha1.GlobalEip + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.GlobalEip{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.GlobalEip") + } + } + + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.GlobalEipList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.GlobalEipList") + } + } + + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.GlobalEip_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.GlobalEip{}, eventHandler). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/eip/globaleipassociate/zz_controller.go b/internal/controller/eip/globaleipassociate/zz_controller.go new file mode 100755 index 00000000..fd7cd1a3 --- /dev/null +++ b/internal/controller/eip/globaleipassociate/zz_controller.go @@ -0,0 +1,87 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package globaleipassociate + +import ( + "time" + + "github.com/crossplane/crossplane-runtime/pkg/connection" + "github.com/crossplane/crossplane-runtime/pkg/event" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" + xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" + ctrl "sigs.k8s.io/controller-runtime" + + v1alpha1 "github.com/huaweicloud/provider-huaweicloud/apis/eip/v1alpha1" + features "github.com/huaweicloud/provider-huaweicloud/internal/features" +) + +// Setup adds a controller that reconciles GlobalEipAssociate managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1alpha1.GlobalEipAssociate_GroupVersionKind.String()) + var initializers managed.InitializerChain + cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} + if o.SecretStoreConfigGVK != nil { + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) + } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.GlobalEipAssociate_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.GlobalEipAssociate_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["huaweicloud_global_eip_associate"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), + tjcontroller.WithCallbackProvider(ac), + )), + managed.WithLogger(o.Logger.WithValues("controller", name)), + managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithTimeout(3 * time.Minute), + managed.WithInitializers(initializers), + managed.WithConnectionPublishers(cps...), + managed.WithPollInterval(o.PollInterval), + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } + + // register webhooks for the kind v1alpha1.GlobalEipAssociate + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.GlobalEipAssociate{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.GlobalEipAssociate") + } + } + + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.GlobalEipAssociateList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.GlobalEipAssociateList") + } + } + + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.GlobalEipAssociate_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.GlobalEipAssociate{}, eventHandler). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/eip/globalinternetbandwidth/zz_controller.go b/internal/controller/eip/globalinternetbandwidth/zz_controller.go new file mode 100755 index 00000000..41999bc2 --- /dev/null +++ b/internal/controller/eip/globalinternetbandwidth/zz_controller.go @@ -0,0 +1,87 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package globalinternetbandwidth + +import ( + "time" + + "github.com/crossplane/crossplane-runtime/pkg/connection" + "github.com/crossplane/crossplane-runtime/pkg/event" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" + xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" + ctrl "sigs.k8s.io/controller-runtime" + + v1alpha1 "github.com/huaweicloud/provider-huaweicloud/apis/eip/v1alpha1" + features "github.com/huaweicloud/provider-huaweicloud/internal/features" +) + +// Setup adds a controller that reconciles GlobalInternetBandwidth managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1alpha1.GlobalInternetBandwidth_GroupVersionKind.String()) + var initializers managed.InitializerChain + cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} + if o.SecretStoreConfigGVK != nil { + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) + } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.GlobalInternetBandwidth_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.GlobalInternetBandwidth_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["huaweicloud_global_internet_bandwidth"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), + tjcontroller.WithCallbackProvider(ac), + )), + managed.WithLogger(o.Logger.WithValues("controller", name)), + managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithTimeout(3 * time.Minute), + managed.WithInitializers(initializers), + managed.WithConnectionPublishers(cps...), + managed.WithPollInterval(o.PollInterval), + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } + + // register webhooks for the kind v1alpha1.GlobalInternetBandwidth + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.GlobalInternetBandwidth{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.GlobalInternetBandwidth") + } + } + + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.GlobalInternetBandwidthList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.GlobalInternetBandwidthList") + } + } + + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.GlobalInternetBandwidth_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.GlobalInternetBandwidth{}, eventHandler). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/eip/vpcbandwidth/zz_controller.go b/internal/controller/eip/vpcbandwidth/zz_controller.go new file mode 100755 index 00000000..d54bc4f2 --- /dev/null +++ b/internal/controller/eip/vpcbandwidth/zz_controller.go @@ -0,0 +1,87 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package vpcbandwidth + +import ( + "time" + + "github.com/crossplane/crossplane-runtime/pkg/connection" + "github.com/crossplane/crossplane-runtime/pkg/event" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" + xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" + ctrl "sigs.k8s.io/controller-runtime" + + v1alpha1 "github.com/huaweicloud/provider-huaweicloud/apis/eip/v1alpha1" + features "github.com/huaweicloud/provider-huaweicloud/internal/features" +) + +// Setup adds a controller that reconciles VpcBandwidth managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1alpha1.VpcBandwidth_GroupVersionKind.String()) + var initializers managed.InitializerChain + cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} + if o.SecretStoreConfigGVK != nil { + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) + } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.VpcBandwidth_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.VpcBandwidth_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["huaweicloud_vpc_bandwidth"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), + tjcontroller.WithCallbackProvider(ac), + )), + managed.WithLogger(o.Logger.WithValues("controller", name)), + managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithTimeout(3 * time.Minute), + managed.WithInitializers(initializers), + managed.WithConnectionPublishers(cps...), + managed.WithPollInterval(o.PollInterval), + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } + + // register webhooks for the kind v1alpha1.VpcBandwidth + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.VpcBandwidth{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.VpcBandwidth") + } + } + + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.VpcBandwidthList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.VpcBandwidthList") + } + } + + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.VpcBandwidth_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.VpcBandwidth{}, eventHandler). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/eip/vpcbandwidthassociate/zz_controller.go b/internal/controller/eip/vpcbandwidthassociate/zz_controller.go new file mode 100755 index 00000000..8a5c038f --- /dev/null +++ b/internal/controller/eip/vpcbandwidthassociate/zz_controller.go @@ -0,0 +1,87 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package vpcbandwidthassociate + +import ( + "time" + + "github.com/crossplane/crossplane-runtime/pkg/connection" + "github.com/crossplane/crossplane-runtime/pkg/event" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" + xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" + ctrl "sigs.k8s.io/controller-runtime" + + v1alpha1 "github.com/huaweicloud/provider-huaweicloud/apis/eip/v1alpha1" + features "github.com/huaweicloud/provider-huaweicloud/internal/features" +) + +// Setup adds a controller that reconciles VpcBandwidthAssociate managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1alpha1.VpcBandwidthAssociate_GroupVersionKind.String()) + var initializers managed.InitializerChain + cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} + if o.SecretStoreConfigGVK != nil { + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) + } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.VpcBandwidthAssociate_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.VpcBandwidthAssociate_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["huaweicloud_vpc_bandwidth_associate"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), + tjcontroller.WithCallbackProvider(ac), + )), + managed.WithLogger(o.Logger.WithValues("controller", name)), + managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithTimeout(3 * time.Minute), + managed.WithInitializers(initializers), + managed.WithConnectionPublishers(cps...), + managed.WithPollInterval(o.PollInterval), + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } + + // register webhooks for the kind v1alpha1.VpcBandwidthAssociate + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.VpcBandwidthAssociate{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.VpcBandwidthAssociate") + } + } + + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.VpcBandwidthAssociateList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.VpcBandwidthAssociateList") + } + } + + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.VpcBandwidthAssociate_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.VpcBandwidthAssociate{}, eventHandler). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/eip/vpceip/zz_controller.go b/internal/controller/eip/vpceip/zz_controller.go new file mode 100755 index 00000000..eea1308d --- /dev/null +++ b/internal/controller/eip/vpceip/zz_controller.go @@ -0,0 +1,87 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package vpceip + +import ( + "time" + + "github.com/crossplane/crossplane-runtime/pkg/connection" + "github.com/crossplane/crossplane-runtime/pkg/event" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" + xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" + ctrl "sigs.k8s.io/controller-runtime" + + v1alpha1 "github.com/huaweicloud/provider-huaweicloud/apis/eip/v1alpha1" + features "github.com/huaweicloud/provider-huaweicloud/internal/features" +) + +// Setup adds a controller that reconciles VpcEip managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1alpha1.VpcEip_GroupVersionKind.String()) + var initializers managed.InitializerChain + cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} + if o.SecretStoreConfigGVK != nil { + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) + } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.VpcEip_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.VpcEip_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["huaweicloud_vpc_eip"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), + tjcontroller.WithCallbackProvider(ac), + )), + managed.WithLogger(o.Logger.WithValues("controller", name)), + managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithTimeout(3 * time.Minute), + managed.WithInitializers(initializers), + managed.WithConnectionPublishers(cps...), + managed.WithPollInterval(o.PollInterval), + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } + + // register webhooks for the kind v1alpha1.VpcEip + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.VpcEip{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.VpcEip") + } + } + + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.VpcEipList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.VpcEipList") + } + } + + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.VpcEip_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.VpcEip{}, eventHandler). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/eip/vpceipassociate/zz_controller.go b/internal/controller/eip/vpceipassociate/zz_controller.go new file mode 100755 index 00000000..c9e9b9a4 --- /dev/null +++ b/internal/controller/eip/vpceipassociate/zz_controller.go @@ -0,0 +1,87 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package vpceipassociate + +import ( + "time" + + "github.com/crossplane/crossplane-runtime/pkg/connection" + "github.com/crossplane/crossplane-runtime/pkg/event" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" + xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" + ctrl "sigs.k8s.io/controller-runtime" + + v1alpha1 "github.com/huaweicloud/provider-huaweicloud/apis/eip/v1alpha1" + features "github.com/huaweicloud/provider-huaweicloud/internal/features" +) + +// Setup adds a controller that reconciles VpcEipAssociate managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1alpha1.VpcEipAssociate_GroupVersionKind.String()) + var initializers managed.InitializerChain + cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} + if o.SecretStoreConfigGVK != nil { + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) + } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.VpcEipAssociate_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.VpcEipAssociate_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["huaweicloud_vpc_eip_associate"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), + tjcontroller.WithCallbackProvider(ac), + )), + managed.WithLogger(o.Logger.WithValues("controller", name)), + managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithTimeout(3 * time.Minute), + managed.WithInitializers(initializers), + managed.WithConnectionPublishers(cps...), + managed.WithPollInterval(o.PollInterval), + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } + + // register webhooks for the kind v1alpha1.VpcEipAssociate + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.VpcEipAssociate{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.VpcEipAssociate") + } + } + + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.VpcEipAssociateList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.VpcEipAssociateList") + } + } + + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.VpcEipAssociate_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.VpcEipAssociate{}, eventHandler). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/eip/vpceipv3associate/zz_controller.go b/internal/controller/eip/vpceipv3associate/zz_controller.go new file mode 100755 index 00000000..9647f80a --- /dev/null +++ b/internal/controller/eip/vpceipv3associate/zz_controller.go @@ -0,0 +1,87 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package vpceipv3associate + +import ( + "time" + + "github.com/crossplane/crossplane-runtime/pkg/connection" + "github.com/crossplane/crossplane-runtime/pkg/event" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" + xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" + ctrl "sigs.k8s.io/controller-runtime" + + v1alpha1 "github.com/huaweicloud/provider-huaweicloud/apis/eip/v1alpha1" + features "github.com/huaweicloud/provider-huaweicloud/internal/features" +) + +// Setup adds a controller that reconciles VpcEipV3Associate managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1alpha1.VpcEipV3Associate_GroupVersionKind.String()) + var initializers managed.InitializerChain + cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} + if o.SecretStoreConfigGVK != nil { + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) + } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.VpcEipV3Associate_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.VpcEipV3Associate_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["huaweicloud_vpc_eipv3_associate"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), + tjcontroller.WithCallbackProvider(ac), + )), + managed.WithLogger(o.Logger.WithValues("controller", name)), + managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithTimeout(3 * time.Minute), + managed.WithInitializers(initializers), + managed.WithConnectionPublishers(cps...), + managed.WithPollInterval(o.PollInterval), + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } + + // register webhooks for the kind v1alpha1.VpcEipV3Associate + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.VpcEipV3Associate{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.VpcEipV3Associate") + } + } + + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.VpcEipV3AssociateList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.VpcEipV3AssociateList") + } + } + + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.VpcEipV3Associate_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.VpcEipV3Associate{}, eventHandler). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/eip/vpcinternetgateway/zz_controller.go b/internal/controller/eip/vpcinternetgateway/zz_controller.go new file mode 100755 index 00000000..e8067528 --- /dev/null +++ b/internal/controller/eip/vpcinternetgateway/zz_controller.go @@ -0,0 +1,87 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package vpcinternetgateway + +import ( + "time" + + "github.com/crossplane/crossplane-runtime/pkg/connection" + "github.com/crossplane/crossplane-runtime/pkg/event" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" + xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" + ctrl "sigs.k8s.io/controller-runtime" + + v1alpha1 "github.com/huaweicloud/provider-huaweicloud/apis/eip/v1alpha1" + features "github.com/huaweicloud/provider-huaweicloud/internal/features" +) + +// Setup adds a controller that reconciles VpcInternetGateway managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1alpha1.VpcInternetGateway_GroupVersionKind.String()) + var initializers managed.InitializerChain + cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} + if o.SecretStoreConfigGVK != nil { + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) + } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.VpcInternetGateway_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.VpcInternetGateway_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["huaweicloud_vpc_internet_gateway"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), + tjcontroller.WithCallbackProvider(ac), + )), + managed.WithLogger(o.Logger.WithValues("controller", name)), + managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithTimeout(3 * time.Minute), + managed.WithInitializers(initializers), + managed.WithConnectionPublishers(cps...), + managed.WithPollInterval(o.PollInterval), + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } + + // register webhooks for the kind v1alpha1.VpcInternetGateway + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.VpcInternetGateway{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.VpcInternetGateway") + } + } + + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.VpcInternetGatewayList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.VpcInternetGatewayList") + } + } + + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.VpcInternetGateway_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.VpcInternetGateway{}, eventHandler). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/zz_setup.go b/internal/controller/zz_setup.go index aaf44f9b..eb116c6a 100755 --- a/internal/controller/zz_setup.go +++ b/internal/controller/zz_setup.go @@ -11,6 +11,15 @@ import ( cluster "github.com/huaweicloud/provider-huaweicloud/internal/controller/cce/cluster" node "github.com/huaweicloud/provider-huaweicloud/internal/controller/cce/node" + globaleip "github.com/huaweicloud/provider-huaweicloud/internal/controller/eip/globaleip" + globaleipassociate "github.com/huaweicloud/provider-huaweicloud/internal/controller/eip/globaleipassociate" + globalinternetbandwidth "github.com/huaweicloud/provider-huaweicloud/internal/controller/eip/globalinternetbandwidth" + vpcbandwidth "github.com/huaweicloud/provider-huaweicloud/internal/controller/eip/vpcbandwidth" + vpcbandwidthassociate "github.com/huaweicloud/provider-huaweicloud/internal/controller/eip/vpcbandwidthassociate" + vpceip "github.com/huaweicloud/provider-huaweicloud/internal/controller/eip/vpceip" + vpceipassociate "github.com/huaweicloud/provider-huaweicloud/internal/controller/eip/vpceipassociate" + vpceipv3associate "github.com/huaweicloud/provider-huaweicloud/internal/controller/eip/vpceipv3associate" + vpcinternetgateway "github.com/huaweicloud/provider-huaweicloud/internal/controller/eip/vpcinternetgateway" accesskey "github.com/huaweicloud/provider-huaweicloud/internal/controller/iam/accesskey" acl "github.com/huaweicloud/provider-huaweicloud/internal/controller/iam/acl" agency "github.com/huaweicloud/provider-huaweicloud/internal/controller/iam/agency" @@ -46,6 +55,15 @@ func Setup(mgr ctrl.Manager, o controller.Options) error { for _, setup := range []func(ctrl.Manager, controller.Options) error{ cluster.Setup, node.Setup, + globaleip.Setup, + globaleipassociate.Setup, + globalinternetbandwidth.Setup, + vpcbandwidth.Setup, + vpcbandwidthassociate.Setup, + vpceip.Setup, + vpceipassociate.Setup, + vpceipv3associate.Setup, + vpcinternetgateway.Setup, accesskey.Setup, acl.Setup, agency.Setup, diff --git a/package/crds/eip.huaweicloud.crossplane.io_globaleipassociates.yaml b/package/crds/eip.huaweicloud.crossplane.io_globaleipassociates.yaml new file mode 100644 index 00000000..4466e5c7 --- /dev/null +++ b/package/crds/eip.huaweicloud.crossplane.io_globaleipassociates.yaml @@ -0,0 +1,775 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.14.0 + name: globaleipassociates.eip.huaweicloud.crossplane.io +spec: + group: eip.huaweicloud.crossplane.io + names: + categories: + - crossplane + - managed + - huaweicloud + kind: GlobalEipAssociate + listKind: GlobalEipAssociateList + plural: globaleipassociates + singular: globaleipassociate + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Synced')].status + name: SYNCED + type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .metadata.annotations.crossplane\.io/external-name + name: EXTERNAL-NAME + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: GlobalEipAssociate is the Schema for the GlobalEipAssociates + API. "" + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: GlobalEipAssociateSpec defines the desired state of GlobalEipAssociate + properties: + deletionPolicy: + default: Delete + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + enum: + - Orphan + - Delete + type: string + forProvider: + properties: + associateInstance: + description: |- + Specifies the information of instance which the GEIP associates to. + Changing this creates a new resource. + The associate_instance structure is documented below. + items: + properties: + instanceId: + description: |- + Specifies the instance ID. + Changing this creates a new resource. + type: string + instanceType: + description: |- + Specifies the instance type. Valid values are ECS, PORT, + NATGW and ELB. If value is ECS or PORT, make sure the VPC associating with an internet gateway. + Changing this creates a new resource. + type: string + projectId: + description: |- + Specifies the project ID of the region. + Changing this creates a new resource. + type: string + region: + description: |- + Specifies the region of the instance. + Changing this creates a new resource. + type: string + serviceId: + description: |- + Specifies the service ID. + Changing this creates a new resource. + type: string + serviceType: + description: |- + Specifies the service type. + Changing this creates a new resource. + type: string + type: object + type: array + gcBandwidth: + description: |- + Specifies the information of GCB which the GEIP associates to. + Changing this creates a new resource. + The gc_bandwidth structure is documented below. + items: + properties: + chargeMode: + description: |- + Specifies the GCB charge mode. When gc_bandwidth.id is empty, it is + Required for creating a new GCB. + type: string + description: + description: |- + Specifies the description of GCB. + Changing this creates a new resource. + type: string + enterpriseProjectId: + description: |- + Specifies the enterprise project ID of GCB. + Changing this creates a new resource. + type: string + id: + description: |- + Specifies the GCB ID which is existing. + Changing this creates a new resource. + type: string + name: + description: |- + Specifies the GCB name. When gc_bandwidth.id is empty, it is Required for + creating a new GCB. Changing this creates a new resource. + type: string + size: + description: |- + Specifies the GCB size. When gc_bandwidth.id is empty, it is Required for + creating a new GCB. If gc_bandwidth.charge_mode is 95, the range is 100-300 Mbit/s, otherwise, the range is + 2-300 Mbit/s. Changing this creates a new resource. + type: number + tags: + additionalProperties: + type: string + description: |- + Specifies the tags of GCB. + Changing this creates a new resource. + type: object + x-kubernetes-map-type: granular + type: object + type: array + globalEipId: + description: |- + Specifies the global EIP ID. + Changing this creates a new resource. + type: string + globalEipIdRef: + description: Reference to a GlobalEip in eip to populate globalEipId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + globalEipIdSelector: + description: Selector for a GlobalEip in eip to populate globalEipId. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + isReserveGcb: + description: Specifies whether to reserve the GCB when the GEIP + disassociates to the instance. + type: boolean + type: object + initProvider: + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + properties: + associateInstance: + description: |- + Specifies the information of instance which the GEIP associates to. + Changing this creates a new resource. + The associate_instance structure is documented below. + items: + properties: + instanceId: + description: |- + Specifies the instance ID. + Changing this creates a new resource. + type: string + instanceType: + description: |- + Specifies the instance type. Valid values are ECS, PORT, + NATGW and ELB. If value is ECS or PORT, make sure the VPC associating with an internet gateway. + Changing this creates a new resource. + type: string + projectId: + description: |- + Specifies the project ID of the region. + Changing this creates a new resource. + type: string + region: + description: |- + Specifies the region of the instance. + Changing this creates a new resource. + type: string + serviceId: + description: |- + Specifies the service ID. + Changing this creates a new resource. + type: string + serviceType: + description: |- + Specifies the service type. + Changing this creates a new resource. + type: string + type: object + type: array + gcBandwidth: + description: |- + Specifies the information of GCB which the GEIP associates to. + Changing this creates a new resource. + The gc_bandwidth structure is documented below. + items: + properties: + chargeMode: + description: |- + Specifies the GCB charge mode. When gc_bandwidth.id is empty, it is + Required for creating a new GCB. + type: string + description: + description: |- + Specifies the description of GCB. + Changing this creates a new resource. + type: string + enterpriseProjectId: + description: |- + Specifies the enterprise project ID of GCB. + Changing this creates a new resource. + type: string + id: + description: |- + Specifies the GCB ID which is existing. + Changing this creates a new resource. + type: string + name: + description: |- + Specifies the GCB name. When gc_bandwidth.id is empty, it is Required for + creating a new GCB. Changing this creates a new resource. + type: string + size: + description: |- + Specifies the GCB size. When gc_bandwidth.id is empty, it is Required for + creating a new GCB. If gc_bandwidth.charge_mode is 95, the range is 100-300 Mbit/s, otherwise, the range is + 2-300 Mbit/s. Changing this creates a new resource. + type: number + tags: + additionalProperties: + type: string + description: |- + Specifies the tags of GCB. + Changing this creates a new resource. + type: object + x-kubernetes-map-type: granular + type: object + type: array + globalEipId: + description: |- + Specifies the global EIP ID. + Changing this creates a new resource. + type: string + globalEipIdRef: + description: Reference to a GlobalEip in eip to populate globalEipId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + globalEipIdSelector: + description: Selector for a GlobalEip in eip to populate globalEipId. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + isReserveGcb: + description: Specifies whether to reserve the GCB when the GEIP + disassociates to the instance. + type: boolean + type: object + managementPolicies: + default: + - '*' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + items: + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array + providerConfigRef: + default: + name: default + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + publishConnectionDetailsTo: + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + properties: + configRef: + default: + name: default + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + metadata: + description: Metadata is the metadata for connection secret. + properties: + annotations: + additionalProperties: + type: string + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. + type: object + labels: + additionalProperties: + type: string + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. + type: object + type: + description: |- + Type is the SecretType for the connection secret. + - Only valid for Kubernetes Secret Stores. + type: string + type: object + name: + description: Name is the name of the connection secret. + type: string + required: + - name + type: object + writeConnectionSecretToRef: + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. + properties: + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - name + - namespace + type: object + required: + - forProvider + type: object + x-kubernetes-validations: + - message: spec.forProvider.associateInstance is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.associateInstance) + || (has(self.initProvider) && has(self.initProvider.associateInstance))' + - message: spec.forProvider.isReserveGcb is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.isReserveGcb) + || (has(self.initProvider) && has(self.initProvider.isReserveGcb))' + status: + description: GlobalEipAssociateStatus defines the observed state of GlobalEipAssociate. + properties: + atProvider: + properties: + associateInstance: + description: |- + Specifies the information of instance which the GEIP associates to. + Changing this creates a new resource. + The associate_instance structure is documented below. + items: + properties: + instanceId: + description: |- + Specifies the instance ID. + Changing this creates a new resource. + type: string + instanceType: + description: |- + Specifies the instance type. Valid values are ECS, PORT, + NATGW and ELB. If value is ECS or PORT, make sure the VPC associating with an internet gateway. + Changing this creates a new resource. + type: string + projectId: + description: |- + Specifies the project ID of the region. + Changing this creates a new resource. + type: string + region: + description: |- + Specifies the region of the instance. + Changing this creates a new resource. + type: string + serviceId: + description: |- + Specifies the service ID. + Changing this creates a new resource. + type: string + serviceType: + description: |- + Specifies the service type. + Changing this creates a new resource. + type: string + type: object + type: array + gcBandwidth: + description: |- + Specifies the information of GCB which the GEIP associates to. + Changing this creates a new resource. + The gc_bandwidth structure is documented below. + items: + properties: + chargeMode: + description: |- + Specifies the GCB charge mode. When gc_bandwidth.id is empty, it is + Required for creating a new GCB. + type: string + description: + description: |- + Specifies the description of GCB. + Changing this creates a new resource. + type: string + enterpriseProjectId: + description: |- + Specifies the enterprise project ID of GCB. + Changing this creates a new resource. + type: string + id: + description: |- + Specifies the GCB ID which is existing. + Changing this creates a new resource. + type: string + name: + description: |- + Specifies the GCB name. When gc_bandwidth.id is empty, it is Required for + creating a new GCB. Changing this creates a new resource. + type: string + size: + description: |- + Specifies the GCB size. When gc_bandwidth.id is empty, it is Required for + creating a new GCB. If gc_bandwidth.charge_mode is 95, the range is 100-300 Mbit/s, otherwise, the range is + 2-300 Mbit/s. Changing this creates a new resource. + type: number + tags: + additionalProperties: + type: string + description: |- + Specifies the tags of GCB. + Changing this creates a new resource. + type: object + x-kubernetes-map-type: granular + type: object + type: array + globalEipId: + description: |- + Specifies the global EIP ID. + Changing this creates a new resource. + type: string + id: + description: The resource ID. Same with the global EIP ID. + type: string + isReserveGcb: + description: Specifies whether to reserve the GCB when the GEIP + disassociates to the instance. + type: boolean + type: object + conditions: + description: Conditions of the resource. + items: + description: A Condition that may apply to a resource. + properties: + lastTransitionTime: + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. + format: date-time + type: string + message: + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. + type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer + reason: + description: A Reason for this condition's last transition from + one status to another. + type: string + status: + description: Status of this condition; is it currently True, + False, or Unknown? + type: string + type: + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + type: string + required: + - lastTransitionTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/package/crds/eip.huaweicloud.crossplane.io_globaleips.yaml b/package/crds/eip.huaweicloud.crossplane.io_globaleips.yaml new file mode 100644 index 00000000..f2a25909 --- /dev/null +++ b/package/crds/eip.huaweicloud.crossplane.io_globaleips.yaml @@ -0,0 +1,477 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.14.0 + name: globaleips.eip.huaweicloud.crossplane.io +spec: + group: eip.huaweicloud.crossplane.io + names: + categories: + - crossplane + - managed + - huaweicloud + kind: GlobalEip + listKind: GlobalEipList + plural: globaleips + singular: globaleip + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Synced')].status + name: SYNCED + type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .metadata.annotations.crossplane\.io/external-name + name: EXTERNAL-NAME + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: GlobalEip is the Schema for the GlobalEips API. "" + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: GlobalEipSpec defines the desired state of GlobalEip + properties: + deletionPolicy: + default: Delete + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + enum: + - Orphan + - Delete + type: string + forProvider: + properties: + accessSite: + description: |- + Specifies the access site name. + Changing this creates a new resource. + type: string + description: + description: Specifies the description of the global EIP. + type: string + enterpriseProjectId: + description: |- + Specifies the enterprise project id to which the global EIP + belongs. Changing this creates a new resource. + type: string + geipPoolName: + description: |- + Specifies the global EIP pool name. + Changing this creates a new resource. + type: string + internetBandwidthId: + description: |- + Specifies the internet bandwidth id which the global EIP use. + Changing this creates a new resource. + type: string + name: + description: Specifies the name of the global EIP. + type: string + tags: + additionalProperties: + type: string + description: Specifies the tags of the global EIP. + type: object + x-kubernetes-map-type: granular + type: object + initProvider: + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + properties: + accessSite: + description: |- + Specifies the access site name. + Changing this creates a new resource. + type: string + description: + description: Specifies the description of the global EIP. + type: string + enterpriseProjectId: + description: |- + Specifies the enterprise project id to which the global EIP + belongs. Changing this creates a new resource. + type: string + geipPoolName: + description: |- + Specifies the global EIP pool name. + Changing this creates a new resource. + type: string + internetBandwidthId: + description: |- + Specifies the internet bandwidth id which the global EIP use. + Changing this creates a new resource. + type: string + name: + description: Specifies the name of the global EIP. + type: string + tags: + additionalProperties: + type: string + description: Specifies the tags of the global EIP. + type: object + x-kubernetes-map-type: granular + type: object + managementPolicies: + default: + - '*' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + items: + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array + providerConfigRef: + default: + name: default + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + publishConnectionDetailsTo: + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + properties: + configRef: + default: + name: default + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + metadata: + description: Metadata is the metadata for connection secret. + properties: + annotations: + additionalProperties: + type: string + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. + type: object + labels: + additionalProperties: + type: string + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. + type: object + type: + description: |- + Type is the SecretType for the connection secret. + - Only valid for Kubernetes Secret Stores. + type: string + type: object + name: + description: Name is the name of the connection secret. + type: string + required: + - name + type: object + writeConnectionSecretToRef: + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. + properties: + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - name + - namespace + type: object + required: + - forProvider + type: object + x-kubernetes-validations: + - message: spec.forProvider.accessSite is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.accessSite) + || (has(self.initProvider) && has(self.initProvider.accessSite))' + - message: spec.forProvider.geipPoolName is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.geipPoolName) + || (has(self.initProvider) && has(self.initProvider.geipPoolName))' + - message: spec.forProvider.internetBandwidthId is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.internetBandwidthId) + || (has(self.initProvider) && has(self.initProvider.internetBandwidthId))' + status: + description: GlobalEipStatus defines the observed state of GlobalEip. + properties: + atProvider: + properties: + accessSite: + description: |- + Specifies the access site name. + Changing this creates a new resource. + type: string + associateInstanceId: + description: The ID of the associate instance. + type: string + associateInstanceRegion: + description: The region of the associate instance. + type: string + associateInstanceType: + description: The type of the associate instance. + type: string + createdAt: + description: The create time of the global EIP. + type: string + description: + description: Specifies the description of the global EIP. + type: string + enterpriseProjectId: + description: |- + Specifies the enterprise project id to which the global EIP + belongs. Changing this creates a new resource. + type: string + frozen: + description: The global EIP is frozen or not. + type: boolean + frozenInfo: + description: The frozen info of the global EIP. + type: string + geipPoolName: + description: |- + Specifies the global EIP pool name. + Changing this creates a new resource. + type: string + globalConnectionBandwidthId: + description: The ID of the global connection bandwidth. + type: string + globalConnectionBandwidthType: + description: The type of the global connection bandwidth. + type: string + id: + description: The resource ID. + type: string + internetBandwidthId: + description: |- + Specifies the internet bandwidth id which the global EIP use. + Changing this creates a new resource. + type: string + ipAddress: + description: The ip address of the global EIP. + type: string + ipVersion: + description: The ip version of the global EIP. + type: number + isp: + description: The the internet service provider of the global EIP. + type: string + name: + description: Specifies the name of the global EIP. + type: string + polluted: + description: The global EIP is polluted or not. + type: boolean + status: + description: The status of the global EIP. + type: string + tags: + additionalProperties: + type: string + description: Specifies the tags of the global EIP. + type: object + x-kubernetes-map-type: granular + updatedAt: + description: The update time of the global EIP. + type: string + type: object + conditions: + description: Conditions of the resource. + items: + description: A Condition that may apply to a resource. + properties: + lastTransitionTime: + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. + format: date-time + type: string + message: + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. + type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer + reason: + description: A Reason for this condition's last transition from + one status to another. + type: string + status: + description: Status of this condition; is it currently True, + False, or Unknown? + type: string + type: + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + type: string + required: + - lastTransitionTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/package/crds/eip.huaweicloud.crossplane.io_globalinternetbandwidths.yaml b/package/crds/eip.huaweicloud.crossplane.io_globalinternetbandwidths.yaml new file mode 100644 index 00000000..fb0fde62 --- /dev/null +++ b/package/crds/eip.huaweicloud.crossplane.io_globalinternetbandwidths.yaml @@ -0,0 +1,494 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.14.0 + name: globalinternetbandwidths.eip.huaweicloud.crossplane.io +spec: + group: eip.huaweicloud.crossplane.io + names: + categories: + - crossplane + - managed + - huaweicloud + kind: GlobalInternetBandwidth + listKind: GlobalInternetBandwidthList + plural: globalinternetbandwidths + singular: globalinternetbandwidth + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Synced')].status + name: SYNCED + type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .metadata.annotations.crossplane\.io/external-name + name: EXTERNAL-NAME + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: GlobalInternetBandwidth is the Schema for the GlobalInternetBandwidths + API. "" + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: GlobalInternetBandwidthSpec defines the desired state of + GlobalInternetBandwidth + properties: + deletionPolicy: + default: Delete + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + enum: + - Orphan + - Delete + type: string + forProvider: + properties: + accessSite: + description: |- + Specifies the access site name. + Changing this creates a new resource. + type: string + chargeMode: + description: Specifies the charge mode, for example, 95peak_guar. + type: string + description: + description: Specifies the description of the global internet + bandwidth. + type: string + enterpriseProjectId: + description: |- + Specifies the enterprise project id to which the global + internet bandwidth belongs. Changing this creates a new resource. + type: string + ingressSize: + description: |- + Specifies the ingress size of the global internet bandwidth. + It's not used for charge mode 95peak_guar. + type: number + isp: + description: |- + Specifies the internet service provider of the global internet bandwidth. + Changing this creates a new resource. + type: string + name: + description: Specifies the name of the global internet bandwidth. + type: string + size: + description: |- + Specifies the size of the global internet bandwidth. + The value ranges from 300 Mbit/s to 5000 Mbit/s in normal. + type: number + tags: + additionalProperties: + type: string + description: Specifies the tags of the global internet bandwidth. + type: object + x-kubernetes-map-type: granular + type: + description: Specifies the type of the global internet bandwidth. + type: string + type: object + initProvider: + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + properties: + accessSite: + description: |- + Specifies the access site name. + Changing this creates a new resource. + type: string + chargeMode: + description: Specifies the charge mode, for example, 95peak_guar. + type: string + description: + description: Specifies the description of the global internet + bandwidth. + type: string + enterpriseProjectId: + description: |- + Specifies the enterprise project id to which the global + internet bandwidth belongs. Changing this creates a new resource. + type: string + ingressSize: + description: |- + Specifies the ingress size of the global internet bandwidth. + It's not used for charge mode 95peak_guar. + type: number + isp: + description: |- + Specifies the internet service provider of the global internet bandwidth. + Changing this creates a new resource. + type: string + name: + description: Specifies the name of the global internet bandwidth. + type: string + size: + description: |- + Specifies the size of the global internet bandwidth. + The value ranges from 300 Mbit/s to 5000 Mbit/s in normal. + type: number + tags: + additionalProperties: + type: string + description: Specifies the tags of the global internet bandwidth. + type: object + x-kubernetes-map-type: granular + type: + description: Specifies the type of the global internet bandwidth. + type: string + type: object + managementPolicies: + default: + - '*' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + items: + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array + providerConfigRef: + default: + name: default + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + publishConnectionDetailsTo: + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + properties: + configRef: + default: + name: default + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + metadata: + description: Metadata is the metadata for connection secret. + properties: + annotations: + additionalProperties: + type: string + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. + type: object + labels: + additionalProperties: + type: string + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. + type: object + type: + description: |- + Type is the SecretType for the connection secret. + - Only valid for Kubernetes Secret Stores. + type: string + type: object + name: + description: Name is the name of the connection secret. + type: string + required: + - name + type: object + writeConnectionSecretToRef: + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. + properties: + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - name + - namespace + type: object + required: + - forProvider + type: object + x-kubernetes-validations: + - message: spec.forProvider.accessSite is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.accessSite) + || (has(self.initProvider) && has(self.initProvider.accessSite))' + - message: spec.forProvider.chargeMode is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.chargeMode) + || (has(self.initProvider) && has(self.initProvider.chargeMode))' + - message: spec.forProvider.isp is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.isp) + || (has(self.initProvider) && has(self.initProvider.isp))' + - message: spec.forProvider.size is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.size) + || (has(self.initProvider) && has(self.initProvider.size))' + status: + description: GlobalInternetBandwidthStatus defines the observed state + of GlobalInternetBandwidth. + properties: + atProvider: + properties: + accessSite: + description: |- + Specifies the access site name. + Changing this creates a new resource. + type: string + chargeMode: + description: Specifies the charge mode, for example, 95peak_guar. + type: string + createdAt: + description: The create time of the global internet bandwidth. + type: string + description: + description: Specifies the description of the global internet + bandwidth. + type: string + enterpriseProjectId: + description: |- + Specifies the enterprise project id to which the global + internet bandwidth belongs. Changing this creates a new resource. + type: string + frozenInfo: + description: The frozen info of the global internet bandwidth. + type: string + id: + description: The resource ID. + type: string + ingressSize: + description: |- + Specifies the ingress size of the global internet bandwidth. + It's not used for charge mode 95peak_guar. + type: number + isp: + description: |- + Specifies the internet service provider of the global internet bandwidth. + Changing this creates a new resource. + type: string + name: + description: Specifies the name of the global internet bandwidth. + type: string + ratio95Peak: + description: The enhanced 95% guaranteed rate of the global internet + bandwidth. + type: number + size: + description: |- + Specifies the size of the global internet bandwidth. + The value ranges from 300 Mbit/s to 5000 Mbit/s in normal. + type: number + status: + description: The status of the global internet bandwidth. + type: string + tags: + additionalProperties: + type: string + description: Specifies the tags of the global internet bandwidth. + type: object + x-kubernetes-map-type: granular + type: + description: Specifies the type of the global internet bandwidth. + type: string + updatedAt: + description: The update time of the global internet bandwidth. + type: string + type: object + conditions: + description: Conditions of the resource. + items: + description: A Condition that may apply to a resource. + properties: + lastTransitionTime: + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. + format: date-time + type: string + message: + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. + type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer + reason: + description: A Reason for this condition's last transition from + one status to another. + type: string + status: + description: Status of this condition; is it currently True, + False, or Unknown? + type: string + type: + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + type: string + required: + - lastTransitionTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/package/crds/eip.huaweicloud.crossplane.io_vpcbandwidthassociates.yaml b/package/crds/eip.huaweicloud.crossplane.io_vpcbandwidthassociates.yaml new file mode 100644 index 00000000..b559a9e2 --- /dev/null +++ b/package/crds/eip.huaweicloud.crossplane.io_vpcbandwidthassociates.yaml @@ -0,0 +1,708 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.14.0 + name: vpcbandwidthassociates.eip.huaweicloud.crossplane.io +spec: + group: eip.huaweicloud.crossplane.io + names: + categories: + - crossplane + - managed + - huaweicloud + kind: VpcBandwidthAssociate + listKind: VpcBandwidthAssociateList + plural: vpcbandwidthassociates + singular: vpcbandwidthassociate + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Synced')].status + name: SYNCED + type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .metadata.annotations.crossplane\.io/external-name + name: EXTERNAL-NAME + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: VpcBandwidthAssociate is the Schema for the VpcBandwidthAssociates + API. "" + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: VpcBandwidthAssociateSpec defines the desired state of VpcBandwidthAssociate + properties: + deletionPolicy: + default: Delete + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + enum: + - Orphan + - Delete + type: string + forProvider: + properties: + bandwidthChargeMode: + description: |- + Specifies the billing mode of the dedicated bandwidth used by the EIP that + has been removed from a shared bandwidth. The value can be bandwidth or traffic. If not specified, the dedicated + bandwidth will be billed by bandwidth. + The charge mode after removal bandwidth. + type: string + bandwidthId: + description: |- + Specifies the shared bandwidth ID to associate. + Changing this creates a new resource. + type: string + bandwidthIdRef: + description: Reference to a VpcBandwidth in eip to populate bandwidthId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + bandwidthIdSelector: + description: Selector for a VpcBandwidth in eip to populate bandwidthId. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + bandwidthSize: + description: |- + Specifies the size (Mbit/s) of the dedicated bandwidth used by the EIP that + has been removed from a shared bandwidth. The default bandwidth size is 5 Mbit/s. + The size (Mbits/s) after removal bandwidth. + type: number + eipId: + description: Specifies the ID of the EIP that uses the bandwidth. + type: string + eipIdRef: + description: Reference to a VpcEip in eip to populate eipId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + eipIdSelector: + description: Selector for a VpcEip in eip to populate eipId. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + region: + description: |- + Specifies the region in which to associate the bandwidth. If omitted, + the provider-level region will be used. Changing this creates a new resource. + type: string + type: object + initProvider: + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + properties: + bandwidthChargeMode: + description: |- + Specifies the billing mode of the dedicated bandwidth used by the EIP that + has been removed from a shared bandwidth. The value can be bandwidth or traffic. If not specified, the dedicated + bandwidth will be billed by bandwidth. + The charge mode after removal bandwidth. + type: string + bandwidthId: + description: |- + Specifies the shared bandwidth ID to associate. + Changing this creates a new resource. + type: string + bandwidthIdRef: + description: Reference to a VpcBandwidth in eip to populate bandwidthId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + bandwidthIdSelector: + description: Selector for a VpcBandwidth in eip to populate bandwidthId. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + bandwidthSize: + description: |- + Specifies the size (Mbit/s) of the dedicated bandwidth used by the EIP that + has been removed from a shared bandwidth. The default bandwidth size is 5 Mbit/s. + The size (Mbits/s) after removal bandwidth. + type: number + eipId: + description: Specifies the ID of the EIP that uses the bandwidth. + type: string + eipIdRef: + description: Reference to a VpcEip in eip to populate eipId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + eipIdSelector: + description: Selector for a VpcEip in eip to populate eipId. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + region: + description: |- + Specifies the region in which to associate the bandwidth. If omitted, + the provider-level region will be used. Changing this creates a new resource. + type: string + type: object + managementPolicies: + default: + - '*' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + items: + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array + providerConfigRef: + default: + name: default + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + publishConnectionDetailsTo: + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + properties: + configRef: + default: + name: default + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + metadata: + description: Metadata is the metadata for connection secret. + properties: + annotations: + additionalProperties: + type: string + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. + type: object + labels: + additionalProperties: + type: string + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. + type: object + type: + description: |- + Type is the SecretType for the connection secret. + - Only valid for Kubernetes Secret Stores. + type: string + type: object + name: + description: Name is the name of the connection secret. + type: string + required: + - name + type: object + writeConnectionSecretToRef: + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. + properties: + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - name + - namespace + type: object + required: + - forProvider + type: object + status: + description: VpcBandwidthAssociateStatus defines the observed state of + VpcBandwidthAssociate. + properties: + atProvider: + properties: + bandwidthChargeMode: + description: |- + Specifies the billing mode of the dedicated bandwidth used by the EIP that + has been removed from a shared bandwidth. The value can be bandwidth or traffic. If not specified, the dedicated + bandwidth will be billed by bandwidth. + The charge mode after removal bandwidth. + type: string + bandwidthId: + description: |- + Specifies the shared bandwidth ID to associate. + Changing this creates a new resource. + type: string + bandwidthName: + description: The shared bandwidth name. + type: string + bandwidthSize: + description: |- + Specifies the size (Mbit/s) of the dedicated bandwidth used by the EIP that + has been removed from a shared bandwidth. The default bandwidth size is 5 Mbit/s. + The size (Mbits/s) after removal bandwidth. + type: number + eipId: + description: Specifies the ID of the EIP that uses the bandwidth. + type: string + id: + description: The resource ID in format of /. + type: string + publicIp: + description: The EIP address. + type: string + region: + description: |- + Specifies the region in which to associate the bandwidth. If omitted, + the provider-level region will be used. Changing this creates a new resource. + type: string + type: object + conditions: + description: Conditions of the resource. + items: + description: A Condition that may apply to a resource. + properties: + lastTransitionTime: + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. + format: date-time + type: string + message: + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. + type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer + reason: + description: A Reason for this condition's last transition from + one status to another. + type: string + status: + description: Status of this condition; is it currently True, + False, or Unknown? + type: string + type: + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + type: string + required: + - lastTransitionTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/package/crds/eip.huaweicloud.crossplane.io_vpcbandwidths.yaml b/package/crds/eip.huaweicloud.crossplane.io_vpcbandwidths.yaml new file mode 100644 index 00000000..296b58c8 --- /dev/null +++ b/package/crds/eip.huaweicloud.crossplane.io_vpcbandwidths.yaml @@ -0,0 +1,532 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.14.0 + name: vpcbandwidths.eip.huaweicloud.crossplane.io +spec: + group: eip.huaweicloud.crossplane.io + names: + categories: + - crossplane + - managed + - huaweicloud + kind: VpcBandwidth + listKind: VpcBandwidthList + plural: vpcbandwidths + singular: vpcbandwidth + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Synced')].status + name: SYNCED + type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .metadata.annotations.crossplane\.io/external-name + name: EXTERNAL-NAME + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: VpcBandwidth is the Schema for the VpcBandwidths API. "" + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: VpcBandwidthSpec defines the desired state of VpcBandwidth + properties: + deletionPolicy: + default: Delete + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + enum: + - Orphan + - Delete + type: string + forProvider: + properties: + autoRenew: + description: |- + Specifies whether auto renew is enabled. + Valid values are true and false. Defaults to false. + type: string + bandwidthType: + description: |- + Specifies the bandwidth type. + Valid values are share and edgeshare. Default is share. + type: string + chargeMode: + description: |- + Specifies whether the billing is based on bandwidth or + 95th percentile bandwidth (enhanced). Possible values can be bandwidth and 95peak_plus. + The default value is bandwidth, and 95peak_plus is only valid for v4 and v5 Customer. + type: string + chargingMode: + description: |- + Specifies the charging mode of the Shared Bandwidth. + The valid values are prePaid and postPaid, defaults to postPaid. + type: string + enterpriseProjectId: + description: |- + Specifies the enterprise project id of the Shared Bandwidth. + Changing this creates a new bandwidth. + type: string + name: + description: |- + Specifies the bandwidth name. The value is a string of 1 to 64 characters that + can contain letters, digits, underscores (_), hyphens (-), and periods (.). + type: string + period: + description: Specifies the charging period of the Shared Bandwidth. + type: number + periodUnit: + description: |- + Specifies the charging period unit of the Shared Bandwidth. + Valid values are month and year. This parameter is mandatory if charging_mode is set to prePaid. + type: string + publicBorderGroup: + description: |- + Specifies the site is center of border. + Valid values are center and the name of the border site. Default is center. + type: string + region: + description: |- + Specifies the region in which to create the Shared Bandwidth. + If omitted, the provider-level region will be used. Changing this creates a new bandwidth. + type: string + size: + description: |- + Specifies the size of the Shared Bandwidth. + If charge_mode is bandwidth, the value ranges from 5 Mbit/s to 2000 Mbit/s. + If charge_mode is 95peak_plus, the value ranges from 300 Mbit/s to 2000 Mbit/s. + type: number + type: object + initProvider: + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + properties: + autoRenew: + description: |- + Specifies whether auto renew is enabled. + Valid values are true and false. Defaults to false. + type: string + bandwidthType: + description: |- + Specifies the bandwidth type. + Valid values are share and edgeshare. Default is share. + type: string + chargeMode: + description: |- + Specifies whether the billing is based on bandwidth or + 95th percentile bandwidth (enhanced). Possible values can be bandwidth and 95peak_plus. + The default value is bandwidth, and 95peak_plus is only valid for v4 and v5 Customer. + type: string + chargingMode: + description: |- + Specifies the charging mode of the Shared Bandwidth. + The valid values are prePaid and postPaid, defaults to postPaid. + type: string + enterpriseProjectId: + description: |- + Specifies the enterprise project id of the Shared Bandwidth. + Changing this creates a new bandwidth. + type: string + name: + description: |- + Specifies the bandwidth name. The value is a string of 1 to 64 characters that + can contain letters, digits, underscores (_), hyphens (-), and periods (.). + type: string + period: + description: Specifies the charging period of the Shared Bandwidth. + type: number + periodUnit: + description: |- + Specifies the charging period unit of the Shared Bandwidth. + Valid values are month and year. This parameter is mandatory if charging_mode is set to prePaid. + type: string + publicBorderGroup: + description: |- + Specifies the site is center of border. + Valid values are center and the name of the border site. Default is center. + type: string + region: + description: |- + Specifies the region in which to create the Shared Bandwidth. + If omitted, the provider-level region will be used. Changing this creates a new bandwidth. + type: string + size: + description: |- + Specifies the size of the Shared Bandwidth. + If charge_mode is bandwidth, the value ranges from 5 Mbit/s to 2000 Mbit/s. + If charge_mode is 95peak_plus, the value ranges from 300 Mbit/s to 2000 Mbit/s. + type: number + type: object + managementPolicies: + default: + - '*' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + items: + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array + providerConfigRef: + default: + name: default + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + publishConnectionDetailsTo: + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + properties: + configRef: + default: + name: default + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + metadata: + description: Metadata is the metadata for connection secret. + properties: + annotations: + additionalProperties: + type: string + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. + type: object + labels: + additionalProperties: + type: string + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. + type: object + type: + description: |- + Type is the SecretType for the connection secret. + - Only valid for Kubernetes Secret Stores. + type: string + type: object + name: + description: Name is the name of the connection secret. + type: string + required: + - name + type: object + writeConnectionSecretToRef: + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. + properties: + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - name + - namespace + type: object + required: + - forProvider + type: object + x-kubernetes-validations: + - message: spec.forProvider.name is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.name) + || (has(self.initProvider) && has(self.initProvider.name))' + - message: spec.forProvider.size is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.size) + || (has(self.initProvider) && has(self.initProvider.size))' + status: + description: VpcBandwidthStatus defines the observed state of VpcBandwidth. + properties: + atProvider: + properties: + autoRenew: + description: |- + Specifies whether auto renew is enabled. + Valid values are true and false. Defaults to false. + type: string + bandwidthType: + description: |- + Specifies the bandwidth type. + Valid values are share and edgeshare. Default is share. + type: string + chargeMode: + description: |- + Specifies whether the billing is based on bandwidth or + 95th percentile bandwidth (enhanced). Possible values can be bandwidth and 95peak_plus. + The default value is bandwidth, and 95peak_plus is only valid for v4 and v5 Customer. + type: string + chargingMode: + description: |- + Specifies the charging mode of the Shared Bandwidth. + The valid values are prePaid and postPaid, defaults to postPaid. + type: string + createdAt: + description: Indicates the bandwidth create time. + type: string + enterpriseProjectId: + description: |- + Specifies the enterprise project id of the Shared Bandwidth. + Changing this creates a new bandwidth. + type: string + id: + description: ID of the Shared Bandwidth. + type: string + name: + description: |- + Specifies the bandwidth name. The value is a string of 1 to 64 characters that + can contain letters, digits, underscores (_), hyphens (-), and periods (.). + type: string + period: + description: Specifies the charging period of the Shared Bandwidth. + type: number + periodUnit: + description: |- + Specifies the charging period unit of the Shared Bandwidth. + Valid values are month and year. This parameter is mandatory if charging_mode is set to prePaid. + type: string + publicBorderGroup: + description: |- + Specifies the site is center of border. + Valid values are center and the name of the border site. Default is center. + type: string + publicips: + description: 'An array of EIPs that use the bandwidth. The object + includes the following:' + items: + properties: + id: + description: ID of the Shared Bandwidth. + type: string + ipAddress: + description: The IPv4 or IPv6 address. + type: string + ipVersion: + description: The IP version, either 4 or 6. + type: number + type: + description: The EIP type. Possible values are 5_bgp (dynamic + BGP) and 5_sbgp (static BGP). + type: string + type: object + type: array + region: + description: |- + Specifies the region in which to create the Shared Bandwidth. + If omitted, the provider-level region will be used. Changing this creates a new bandwidth. + type: string + shareType: + description: Indicates whether the bandwidth is shared or dedicated. + type: string + size: + description: |- + Specifies the size of the Shared Bandwidth. + If charge_mode is bandwidth, the value ranges from 5 Mbit/s to 2000 Mbit/s. + If charge_mode is 95peak_plus, the value ranges from 300 Mbit/s to 2000 Mbit/s. + type: number + status: + description: Indicates the bandwidth status. + type: string + updatedAt: + description: Indicates the bandwidth update time. + type: string + type: object + conditions: + description: Conditions of the resource. + items: + description: A Condition that may apply to a resource. + properties: + lastTransitionTime: + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. + format: date-time + type: string + message: + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. + type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer + reason: + description: A Reason for this condition's last transition from + one status to another. + type: string + status: + description: Status of this condition; is it currently True, + False, or Unknown? + type: string + type: + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + type: string + required: + - lastTransitionTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/package/crds/eip.huaweicloud.crossplane.io_vpceipassociates.yaml b/package/crds/eip.huaweicloud.crossplane.io_vpceipassociates.yaml new file mode 100644 index 00000000..90855e48 --- /dev/null +++ b/package/crds/eip.huaweicloud.crossplane.io_vpceipassociates.yaml @@ -0,0 +1,412 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.14.0 + name: vpceipassociates.eip.huaweicloud.crossplane.io +spec: + group: eip.huaweicloud.crossplane.io + names: + categories: + - crossplane + - managed + - huaweicloud + kind: VpcEipAssociate + listKind: VpcEipAssociateList + plural: vpceipassociates + singular: vpceipassociate + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Synced')].status + name: SYNCED + type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .metadata.annotations.crossplane\.io/external-name + name: EXTERNAL-NAME + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: VpcEipAssociate is the Schema for the VpcEipAssociates API. "" + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: VpcEipAssociateSpec defines the desired state of VpcEipAssociate + properties: + deletionPolicy: + default: Delete + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + enum: + - Orphan + - Delete + type: string + forProvider: + properties: + fixedIp: + description: |- + Specifies a private IP address to associate with the EIP. + Changing this creates a new resource. + type: string + networkId: + description: |- + Specifies the ID of the network to which the fixed_ip belongs. + It is mandatory when fixed_ip is set. Changing this creates a new resource. + type: string + portId: + description: |- + Specifies an existing port ID to associate with the EIP. + This parameter and fixed_ip are alternative. Changing this creates a new resource. + type: string + publicIp: + description: Specifies the EIP address to associate. Changing + this creates a new resource. + type: string + region: + description: |- + Specifies the region in which to associate the EIP. If omitted, the provider-level + region will be used. Changing this creates a new resource. + type: string + type: object + initProvider: + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + properties: + fixedIp: + description: |- + Specifies a private IP address to associate with the EIP. + Changing this creates a new resource. + type: string + networkId: + description: |- + Specifies the ID of the network to which the fixed_ip belongs. + It is mandatory when fixed_ip is set. Changing this creates a new resource. + type: string + portId: + description: |- + Specifies an existing port ID to associate with the EIP. + This parameter and fixed_ip are alternative. Changing this creates a new resource. + type: string + publicIp: + description: Specifies the EIP address to associate. Changing + this creates a new resource. + type: string + region: + description: |- + Specifies the region in which to associate the EIP. If omitted, the provider-level + region will be used. Changing this creates a new resource. + type: string + type: object + managementPolicies: + default: + - '*' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + items: + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array + providerConfigRef: + default: + name: default + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + publishConnectionDetailsTo: + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + properties: + configRef: + default: + name: default + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + metadata: + description: Metadata is the metadata for connection secret. + properties: + annotations: + additionalProperties: + type: string + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. + type: object + labels: + additionalProperties: + type: string + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. + type: object + type: + description: |- + Type is the SecretType for the connection secret. + - Only valid for Kubernetes Secret Stores. + type: string + type: object + name: + description: Name is the name of the connection secret. + type: string + required: + - name + type: object + writeConnectionSecretToRef: + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. + properties: + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - name + - namespace + type: object + required: + - forProvider + type: object + x-kubernetes-validations: + - message: spec.forProvider.publicIp is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.publicIp) + || (has(self.initProvider) && has(self.initProvider.publicIp))' + status: + description: VpcEipAssociateStatus defines the observed state of VpcEipAssociate. + properties: + atProvider: + properties: + fixedIp: + description: |- + Specifies a private IP address to associate with the EIP. + Changing this creates a new resource. + type: string + id: + description: The resource ID in UUID format. + type: string + macAddress: + description: The MAC address of the private IP. + type: string + networkId: + description: |- + Specifies the ID of the network to which the fixed_ip belongs. + It is mandatory when fixed_ip is set. Changing this creates a new resource. + type: string + portId: + description: |- + Specifies an existing port ID to associate with the EIP. + This parameter and fixed_ip are alternative. Changing this creates a new resource. + type: string + publicIp: + description: Specifies the EIP address to associate. Changing + this creates a new resource. + type: string + publicIpv6: + description: The IPv6 address of the private IP. + type: string + region: + description: |- + Specifies the region in which to associate the EIP. If omitted, the provider-level + region will be used. Changing this creates a new resource. + type: string + status: + description: The status of EIP, should be BOUND. + type: string + type: object + conditions: + description: Conditions of the resource. + items: + description: A Condition that may apply to a resource. + properties: + lastTransitionTime: + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. + format: date-time + type: string + message: + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. + type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer + reason: + description: A Reason for this condition's last transition from + one status to another. + type: string + status: + description: Status of this condition; is it currently True, + False, or Unknown? + type: string + type: + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + type: string + required: + - lastTransitionTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/package/crds/eip.huaweicloud.crossplane.io_vpceips.yaml b/package/crds/eip.huaweicloud.crossplane.io_vpceips.yaml new file mode 100644 index 00000000..afc964e8 --- /dev/null +++ b/package/crds/eip.huaweicloud.crossplane.io_vpceips.yaml @@ -0,0 +1,722 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.14.0 + name: vpceips.eip.huaweicloud.crossplane.io +spec: + group: eip.huaweicloud.crossplane.io + names: + categories: + - crossplane + - managed + - huaweicloud + kind: VpcEip + listKind: VpcEipList + plural: vpceips + singular: vpceip + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Synced')].status + name: SYNCED + type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .metadata.annotations.crossplane\.io/external-name + name: EXTERNAL-NAME + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: VpcEip is the Schema for the VpcEips API. "" + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: VpcEipSpec defines the desired state of VpcEip + properties: + deletionPolicy: + default: Delete + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + enum: + - Orphan + - Delete + type: string + forProvider: + properties: + autoPay: + type: string + autoRenew: + description: |- + Specifies whether auto renew is enabled. + Valid values are true and false. Defaults to false. + type: string + bandwidth: + description: |- + Specifies the bandwidth configuration. + The object structure is documented below. + The bandwidth configuration. + items: + properties: + chargeMode: + description: |- + Specifies whether the bandwidth is billed by traffic or by bandwidth + size. The value can be traffic or bandwidth. If the charging_mode is prePaid, only bandwidth is valid. + Whether the bandwidth is billed by traffic or by bandwidth size. + type: string + id: + description: |- + The shared bandwidth ID. + This parameter is mandatory when share_type is set to WHOLE. Changing this will create a new resource. + The shared bandwidth ID. + type: string + name: + description: |- + Specifies the bandwidth name. + The name can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). + This parameter is mandatory when share_type is set to PER. + The dedicated bandwidth name. + type: string + shareType: + description: |- + Specifies whether the bandwidth is dedicated or shared. + Changing this will create a new resource. Possible values are as follows: + Whether the bandwidth is dedicated or shared. + type: string + size: + description: |- + The bandwidth size. + The value ranges from 1 to 300 Mbit/s. This parameter is mandatory when share_type is set to PER. + The dedicated bandwidth size. + type: number + type: object + type: array + chargingMode: + description: |- + Specifies the charging mode of the EIP. + The valid values are prePaid and postPaid, defaults to postPaid. + type: string + enterpriseProjectId: + description: |- + Specifies the enterprise project ID to which the EIP belongs. + The enterprise project ID to which the EIP belongs. + type: string + name: + description: |- + Specifies the name of the EIP. + The name can contain 1 to 64 characters, including English letters, Chinese characters, digits, underscores (_), + hyphens (-), and periods (.). + The name of the EIP. + type: string + period: + description: Specifies the charging period of the EIP. + type: number + periodUnit: + description: |- + Specifies the charging period unit of the EIP. + Valid values are month and year. This parameter is mandatory if charging_mode is set to prePaid. + type: string + publicip: + description: |- + Specifies the EIP configuration. + The object structure is documented below. + The EIP configuration. + items: + properties: + ipAddress: + description: |- + Specifies the EIP address to be assigned. + The value must be a valid IPv4 address in the available IP address range. + The system automatically assigns an EIP if you do not specify it. Changing this will create a new resource. + The EIP address to be assigned. + type: string + ipVersion: + description: |- + Specifies the IP version, either 4 (default) or 6. + The IP version. + type: number + portId: + description: |- + The port ID which the EIP associated with. + schema: Deprecated + type: string + type: + description: |- + Specifies the EIP type. Possible values are 5_bgp (dynamic BGP) + and 5_sbgp (static BGP), the default value is 5_bgp. Changing this will create a new resource. + The EIP type. + type: string + type: object + type: array + region: + description: |- + Specifies the region in which to create the EIP resource. + If omitted, the provider-level region will be used. Changing this will create a new resource. + The region in which to create the EIP resource. + type: string + tags: + additionalProperties: + type: string + description: Specifies the key/value pairs to associate with the + EIP. + type: object + x-kubernetes-map-type: granular + type: object + initProvider: + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + properties: + autoPay: + type: string + autoRenew: + description: |- + Specifies whether auto renew is enabled. + Valid values are true and false. Defaults to false. + type: string + bandwidth: + description: |- + Specifies the bandwidth configuration. + The object structure is documented below. + The bandwidth configuration. + items: + properties: + chargeMode: + description: |- + Specifies whether the bandwidth is billed by traffic or by bandwidth + size. The value can be traffic or bandwidth. If the charging_mode is prePaid, only bandwidth is valid. + Whether the bandwidth is billed by traffic or by bandwidth size. + type: string + id: + description: |- + The shared bandwidth ID. + This parameter is mandatory when share_type is set to WHOLE. Changing this will create a new resource. + The shared bandwidth ID. + type: string + name: + description: |- + Specifies the bandwidth name. + The name can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). + This parameter is mandatory when share_type is set to PER. + The dedicated bandwidth name. + type: string + shareType: + description: |- + Specifies whether the bandwidth is dedicated or shared. + Changing this will create a new resource. Possible values are as follows: + Whether the bandwidth is dedicated or shared. + type: string + size: + description: |- + The bandwidth size. + The value ranges from 1 to 300 Mbit/s. This parameter is mandatory when share_type is set to PER. + The dedicated bandwidth size. + type: number + type: object + type: array + chargingMode: + description: |- + Specifies the charging mode of the EIP. + The valid values are prePaid and postPaid, defaults to postPaid. + type: string + enterpriseProjectId: + description: |- + Specifies the enterprise project ID to which the EIP belongs. + The enterprise project ID to which the EIP belongs. + type: string + name: + description: |- + Specifies the name of the EIP. + The name can contain 1 to 64 characters, including English letters, Chinese characters, digits, underscores (_), + hyphens (-), and periods (.). + The name of the EIP. + type: string + period: + description: Specifies the charging period of the EIP. + type: number + periodUnit: + description: |- + Specifies the charging period unit of the EIP. + Valid values are month and year. This parameter is mandatory if charging_mode is set to prePaid. + type: string + publicip: + description: |- + Specifies the EIP configuration. + The object structure is documented below. + The EIP configuration. + items: + properties: + ipAddress: + description: |- + Specifies the EIP address to be assigned. + The value must be a valid IPv4 address in the available IP address range. + The system automatically assigns an EIP if you do not specify it. Changing this will create a new resource. + The EIP address to be assigned. + type: string + ipVersion: + description: |- + Specifies the IP version, either 4 (default) or 6. + The IP version. + type: number + portId: + description: |- + The port ID which the EIP associated with. + schema: Deprecated + type: string + type: + description: |- + Specifies the EIP type. Possible values are 5_bgp (dynamic BGP) + and 5_sbgp (static BGP), the default value is 5_bgp. Changing this will create a new resource. + The EIP type. + type: string + type: object + type: array + region: + description: |- + Specifies the region in which to create the EIP resource. + If omitted, the provider-level region will be used. Changing this will create a new resource. + The region in which to create the EIP resource. + type: string + tags: + additionalProperties: + type: string + description: Specifies the key/value pairs to associate with the + EIP. + type: object + x-kubernetes-map-type: granular + type: object + managementPolicies: + default: + - '*' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + items: + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array + providerConfigRef: + default: + name: default + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + publishConnectionDetailsTo: + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + properties: + configRef: + default: + name: default + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + metadata: + description: Metadata is the metadata for connection secret. + properties: + annotations: + additionalProperties: + type: string + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. + type: object + labels: + additionalProperties: + type: string + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. + type: object + type: + description: |- + Type is the SecretType for the connection secret. + - Only valid for Kubernetes Secret Stores. + type: string + type: object + name: + description: Name is the name of the connection secret. + type: string + required: + - name + type: object + writeConnectionSecretToRef: + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. + properties: + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - name + - namespace + type: object + required: + - forProvider + type: object + x-kubernetes-validations: + - message: spec.forProvider.bandwidth is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.bandwidth) + || (has(self.initProvider) && has(self.initProvider.bandwidth))' + - message: spec.forProvider.publicip is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.publicip) + || (has(self.initProvider) && has(self.initProvider.publicip))' + status: + description: VpcEipStatus defines the observed state of VpcEip. + properties: + atProvider: + properties: + address: + description: The IPv4 address of the EIP. + type: string + associateId: + description: The associate id of EIP. + type: string + associateType: + description: The associate type of EIP. Values are PORT, NATGW, + ELB, ELBV1 and VPN. + type: string + autoPay: + type: string + autoRenew: + description: |- + Specifies whether auto renew is enabled. + Valid values are true and false. Defaults to false. + type: string + bandwidth: + description: |- + Specifies the bandwidth configuration. + The object structure is documented below. + The bandwidth configuration. + items: + properties: + chargeMode: + description: |- + Specifies whether the bandwidth is billed by traffic or by bandwidth + size. The value can be traffic or bandwidth. If the charging_mode is prePaid, only bandwidth is valid. + Whether the bandwidth is billed by traffic or by bandwidth size. + type: string + id: + description: |- + The shared bandwidth ID. + This parameter is mandatory when share_type is set to WHOLE. Changing this will create a new resource. + The shared bandwidth ID. + type: string + name: + description: |- + Specifies the bandwidth name. + The name can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). + This parameter is mandatory when share_type is set to PER. + The dedicated bandwidth name. + type: string + shareType: + description: |- + Specifies whether the bandwidth is dedicated or shared. + Changing this will create a new resource. Possible values are as follows: + Whether the bandwidth is dedicated or shared. + type: string + size: + description: |- + The bandwidth size. + The value ranges from 1 to 300 Mbit/s. This parameter is mandatory when share_type is set to PER. + The dedicated bandwidth size. + type: number + type: object + type: array + chargingMode: + description: |- + Specifies the charging mode of the EIP. + The valid values are prePaid and postPaid, defaults to postPaid. + type: string + createdAt: + description: The create time of EIP. + type: string + enterpriseProjectId: + description: |- + Specifies the enterprise project ID to which the EIP belongs. + The enterprise project ID to which the EIP belongs. + type: string + id: + description: The resource ID in UUID format. + type: string + instanceId: + description: The instance id to which the port belongs. Return + when associate_type is PORT. + type: string + instanceType: + description: The instance type to which the port belongs. Return + when associate_type is PORT. + type: string + ipv6Address: + description: The IPv6 address of the EIP. + type: string + name: + description: |- + Specifies the name of the EIP. + The name can contain 1 to 64 characters, including English letters, Chinese characters, digits, underscores (_), + hyphens (-), and periods (.). + The name of the EIP. + type: string + period: + description: Specifies the charging period of the EIP. + type: number + periodUnit: + description: |- + Specifies the charging period unit of the EIP. + Valid values are month and year. This parameter is mandatory if charging_mode is set to prePaid. + type: string + portId: + description: The port ID which the EIP associated with. + type: string + privateIp: + description: The private IP address bound to the EIP. + type: string + publicip: + description: |- + Specifies the EIP configuration. + The object structure is documented below. + The EIP configuration. + items: + properties: + ipAddress: + description: |- + Specifies the EIP address to be assigned. + The value must be a valid IPv4 address in the available IP address range. + The system automatically assigns an EIP if you do not specify it. Changing this will create a new resource. + The EIP address to be assigned. + type: string + ipVersion: + description: |- + Specifies the IP version, either 4 (default) or 6. + The IP version. + type: number + portId: + description: |- + The port ID which the EIP associated with. + schema: Deprecated + type: string + type: + description: |- + Specifies the EIP type. Possible values are 5_bgp (dynamic BGP) + and 5_sbgp (static BGP), the default value is 5_bgp. Changing this will create a new resource. + The EIP type. + type: string + type: object + type: array + region: + description: |- + Specifies the region in which to create the EIP resource. + If omitted, the provider-level region will be used. Changing this will create a new resource. + The region in which to create the EIP resource. + type: string + status: + description: The status of EIP. + type: string + tags: + additionalProperties: + type: string + description: Specifies the key/value pairs to associate with the + EIP. + type: object + x-kubernetes-map-type: granular + updatedAt: + description: The update time of EIP. + type: string + type: object + conditions: + description: Conditions of the resource. + items: + description: A Condition that may apply to a resource. + properties: + lastTransitionTime: + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. + format: date-time + type: string + message: + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. + type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer + reason: + description: A Reason for this condition's last transition from + one status to another. + type: string + status: + description: Status of this condition; is it currently True, + False, or Unknown? + type: string + type: + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + type: string + required: + - lastTransitionTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/package/crds/eip.huaweicloud.crossplane.io_vpceipv3associates.yaml b/package/crds/eip.huaweicloud.crossplane.io_vpceipv3associates.yaml new file mode 100644 index 00000000..61bdfad3 --- /dev/null +++ b/package/crds/eip.huaweicloud.crossplane.io_vpceipv3associates.yaml @@ -0,0 +1,541 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.14.0 + name: vpceipv3associates.eip.huaweicloud.crossplane.io +spec: + group: eip.huaweicloud.crossplane.io + names: + categories: + - crossplane + - managed + - huaweicloud + kind: VpcEipV3Associate + listKind: VpcEipV3AssociateList + plural: vpceipv3associates + singular: vpceipv3associate + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Synced')].status + name: SYNCED + type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .metadata.annotations.crossplane\.io/external-name + name: EXTERNAL-NAME + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: VpcEipV3Associate is the Schema for the VpcEipV3Associates API. + Manages a VPC EIP associates with an instance resource within HuaweiCloud. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: VpcEipV3AssociateSpec defines the desired state of VpcEipV3Associate + properties: + deletionPolicy: + default: Delete + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + enum: + - Orphan + - Delete + type: string + forProvider: + properties: + associateInstanceId: + description: |- + Specifies the ID of the instance that the port belongs to. + Changing this creates a new resource. + type: string + associateInstanceType: + description: |- + Specifies the type of the instance that the port belongs to. + Value options: PORT, NATGW, VPN and ELB. Changing this creates a new resource. + type: string + publicipId: + description: Specifies the ID of a EIP. Changing this creates + a new resource. + type: string + publicipIdRef: + description: Reference to a VpcEip in eip to populate publicipId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + publicipIdSelector: + description: Selector for a VpcEip in eip to populate publicipId. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + region: + description: |- + Specifies the region in which to create the VPC EIP associate resource. If + omitted, the provider-level region will be used. Changing this creates a new resource. + type: string + type: object + initProvider: + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + properties: + associateInstanceId: + description: |- + Specifies the ID of the instance that the port belongs to. + Changing this creates a new resource. + type: string + associateInstanceType: + description: |- + Specifies the type of the instance that the port belongs to. + Value options: PORT, NATGW, VPN and ELB. Changing this creates a new resource. + type: string + publicipId: + description: Specifies the ID of a EIP. Changing this creates + a new resource. + type: string + publicipIdRef: + description: Reference to a VpcEip in eip to populate publicipId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + publicipIdSelector: + description: Selector for a VpcEip in eip to populate publicipId. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + region: + description: |- + Specifies the region in which to create the VPC EIP associate resource. If + omitted, the provider-level region will be used. Changing this creates a new resource. + type: string + type: object + managementPolicies: + default: + - '*' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + items: + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array + providerConfigRef: + default: + name: default + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + publishConnectionDetailsTo: + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + properties: + configRef: + default: + name: default + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + metadata: + description: Metadata is the metadata for connection secret. + properties: + annotations: + additionalProperties: + type: string + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. + type: object + labels: + additionalProperties: + type: string + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. + type: object + type: + description: |- + Type is the SecretType for the connection secret. + - Only valid for Kubernetes Secret Stores. + type: string + type: object + name: + description: Name is the name of the connection secret. + type: string + required: + - name + type: object + writeConnectionSecretToRef: + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. + properties: + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - name + - namespace + type: object + required: + - forProvider + type: object + x-kubernetes-validations: + - message: spec.forProvider.associateInstanceId is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.associateInstanceId) + || (has(self.initProvider) && has(self.initProvider.associateInstanceId))' + - message: spec.forProvider.associateInstanceType is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.associateInstanceType) + || (has(self.initProvider) && has(self.initProvider.associateInstanceType))' + status: + description: VpcEipV3AssociateStatus defines the observed state of VpcEipV3Associate. + properties: + atProvider: + properties: + associateInstanceId: + description: |- + Specifies the ID of the instance that the port belongs to. + Changing this creates a new resource. + type: string + associateInstanceType: + description: |- + Specifies the type of the instance that the port belongs to. + Value options: PORT, NATGW, VPN and ELB. Changing this creates a new resource. + type: string + id: + description: The resource ID. The value is the publicip_id. + type: string + publicipId: + description: Specifies the ID of a EIP. Changing this creates + a new resource. + type: string + region: + description: |- + Specifies the region in which to create the VPC EIP associate resource. If + omitted, the provider-level region will be used. Changing this creates a new resource. + type: string + type: object + conditions: + description: Conditions of the resource. + items: + description: A Condition that may apply to a resource. + properties: + lastTransitionTime: + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. + format: date-time + type: string + message: + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. + type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer + reason: + description: A Reason for this condition's last transition from + one status to another. + type: string + status: + description: Status of this condition; is it currently True, + False, or Unknown? + type: string + type: + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + type: string + required: + - lastTransitionTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/package/crds/eip.huaweicloud.crossplane.io_vpcinternetgateways.yaml b/package/crds/eip.huaweicloud.crossplane.io_vpcinternetgateways.yaml new file mode 100644 index 00000000..c479ee8e --- /dev/null +++ b/package/crds/eip.huaweicloud.crossplane.io_vpcinternetgateways.yaml @@ -0,0 +1,713 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.14.0 + name: vpcinternetgateways.eip.huaweicloud.crossplane.io +spec: + group: eip.huaweicloud.crossplane.io + names: + categories: + - crossplane + - managed + - huaweicloud + kind: VpcInternetGateway + listKind: VpcInternetGatewayList + plural: vpcinternetgateways + singular: vpcinternetgateway + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Synced')].status + name: SYNCED + type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .metadata.annotations.crossplane\.io/external-name + name: EXTERNAL-NAME + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: VpcInternetGateway is the Schema for the VpcInternetGateways + API. "" + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: VpcInternetGatewaySpec defines the desired state of VpcInternetGateway + properties: + deletionPolicy: + default: Delete + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + enum: + - Orphan + - Delete + type: string + forProvider: + properties: + addRoute: + description: |- + Specifies whether to add a default route pointing to the IGW in the default + route table of the VPC with the destination address 0.0.0.0/0. Changing this creates a new resource. + type: boolean + enableIpv6: + description: |- + Specifies whether to enable IPv6. It's not allow change true to false. Make sure the + subnet is enable IPv6 before setting to true. + type: boolean + name: + description: Specifies the IGW name. + type: string + region: + description: |- + Specifies the region in which to create the IGW. + If omitted, the provider-level region will be used. Changing this will create a new resource. + type: string + subnetId: + description: |- + Specifies the subnet ID which the IGW associated with. + Changing this creates a new resource. + type: string + subnetIdRef: + description: Reference to a Subnet in vpc to populate subnetId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + subnetIdSelector: + description: Selector for a Subnet in vpc to populate subnetId. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + vpcId: + description: |- + Specifies the VPC ID which the IGW associated with. A VPC can only associate + with one IGW. Changing this creates a new resource. + type: string + vpcIdRef: + description: Reference to a VPC in vpc to populate vpcId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + vpcIdSelector: + description: Selector for a VPC in vpc to populate vpcId. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + type: object + initProvider: + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + properties: + addRoute: + description: |- + Specifies whether to add a default route pointing to the IGW in the default + route table of the VPC with the destination address 0.0.0.0/0. Changing this creates a new resource. + type: boolean + enableIpv6: + description: |- + Specifies whether to enable IPv6. It's not allow change true to false. Make sure the + subnet is enable IPv6 before setting to true. + type: boolean + name: + description: Specifies the IGW name. + type: string + region: + description: |- + Specifies the region in which to create the IGW. + If omitted, the provider-level region will be used. Changing this will create a new resource. + type: string + subnetId: + description: |- + Specifies the subnet ID which the IGW associated with. + Changing this creates a new resource. + type: string + subnetIdRef: + description: Reference to a Subnet in vpc to populate subnetId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + subnetIdSelector: + description: Selector for a Subnet in vpc to populate subnetId. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + vpcId: + description: |- + Specifies the VPC ID which the IGW associated with. A VPC can only associate + with one IGW. Changing this creates a new resource. + type: string + vpcIdRef: + description: Reference to a VPC in vpc to populate vpcId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + vpcIdSelector: + description: Selector for a VPC in vpc to populate vpcId. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + type: object + managementPolicies: + default: + - '*' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + items: + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array + providerConfigRef: + default: + name: default + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + publishConnectionDetailsTo: + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + properties: + configRef: + default: + name: default + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + metadata: + description: Metadata is the metadata for connection secret. + properties: + annotations: + additionalProperties: + type: string + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. + type: object + labels: + additionalProperties: + type: string + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. + type: object + type: + description: |- + Type is the SecretType for the connection secret. + - Only valid for Kubernetes Secret Stores. + type: string + type: object + name: + description: Name is the name of the connection secret. + type: string + required: + - name + type: object + writeConnectionSecretToRef: + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. + properties: + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - name + - namespace + type: object + required: + - forProvider + type: object + status: + description: VpcInternetGatewayStatus defines the observed state of VpcInternetGateway. + properties: + atProvider: + properties: + addRoute: + description: |- + Specifies whether to add a default route pointing to the IGW in the default + route table of the VPC with the destination address 0.0.0.0/0. Changing this creates a new resource. + type: boolean + createdAt: + description: The create time of the IGW. + type: string + enableIpv6: + description: |- + Specifies whether to enable IPv6. It's not allow change true to false. Make sure the + subnet is enable IPv6 before setting to true. + type: boolean + id: + description: The resource ID. + type: string + name: + description: Specifies the IGW name. + type: string + region: + description: |- + Specifies the region in which to create the IGW. + If omitted, the provider-level region will be used. Changing this will create a new resource. + type: string + subnetId: + description: |- + Specifies the subnet ID which the IGW associated with. + Changing this creates a new resource. + type: string + updatedAt: + description: The update time of the IGW. + type: string + vpcId: + description: |- + Specifies the VPC ID which the IGW associated with. A VPC can only associate + with one IGW. Changing this creates a new resource. + type: string + type: object + conditions: + description: Conditions of the resource. + items: + description: A Condition that may apply to a resource. + properties: + lastTransitionTime: + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. + format: date-time + type: string + message: + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. + type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer + reason: + description: A Reason for this condition's last transition from + one status to another. + type: string + status: + description: Status of this condition; is it currently True, + False, or Unknown? + type: string + type: + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + type: string + required: + - lastTransitionTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {}