diff --git a/apis/compute/v1beta1/zz_generated.deepcopy.go b/apis/compute/v1beta1/zz_generated.deepcopy.go index 818bd6f36..e83d6f8fd 100644 --- a/apis/compute/v1beta1/zz_generated.deepcopy.go +++ b/apis/compute/v1beta1/zz_generated.deepcopy.go @@ -4515,6 +4515,111 @@ func (in *BaseEjectionTimeParameters) DeepCopy() *BaseEjectionTimeParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BfdInitParameters) DeepCopyInto(out *BfdInitParameters) { + *out = *in + if in.MinReceiveInterval != nil { + in, out := &in.MinReceiveInterval, &out.MinReceiveInterval + *out = new(float64) + **out = **in + } + if in.MinTransmitInterval != nil { + in, out := &in.MinTransmitInterval, &out.MinTransmitInterval + *out = new(float64) + **out = **in + } + if in.Multiplier != nil { + in, out := &in.Multiplier, &out.Multiplier + *out = new(float64) + **out = **in + } + if in.SessionInitializationMode != nil { + in, out := &in.SessionInitializationMode, &out.SessionInitializationMode + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BfdInitParameters. +func (in *BfdInitParameters) DeepCopy() *BfdInitParameters { + if in == nil { + return nil + } + out := new(BfdInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BfdObservation) DeepCopyInto(out *BfdObservation) { + *out = *in + if in.MinReceiveInterval != nil { + in, out := &in.MinReceiveInterval, &out.MinReceiveInterval + *out = new(float64) + **out = **in + } + if in.MinTransmitInterval != nil { + in, out := &in.MinTransmitInterval, &out.MinTransmitInterval + *out = new(float64) + **out = **in + } + if in.Multiplier != nil { + in, out := &in.Multiplier, &out.Multiplier + *out = new(float64) + **out = **in + } + if in.SessionInitializationMode != nil { + in, out := &in.SessionInitializationMode, &out.SessionInitializationMode + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BfdObservation. +func (in *BfdObservation) DeepCopy() *BfdObservation { + if in == nil { + return nil + } + out := new(BfdObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BfdParameters) DeepCopyInto(out *BfdParameters) { + *out = *in + if in.MinReceiveInterval != nil { + in, out := &in.MinReceiveInterval, &out.MinReceiveInterval + *out = new(float64) + **out = **in + } + if in.MinTransmitInterval != nil { + in, out := &in.MinTransmitInterval, &out.MinTransmitInterval + *out = new(float64) + **out = **in + } + if in.Multiplier != nil { + in, out := &in.Multiplier, &out.Multiplier + *out = new(float64) + **out = **in + } + if in.SessionInitializationMode != nil { + in, out := &in.SessionInitializationMode, &out.SessionInitializationMode + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BfdParameters. +func (in *BfdParameters) DeepCopy() *BfdParameters { + if in == nil { + return nil + } + out := new(BfdParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *BootDiskInitParameters) DeepCopyInto(out *BootDiskInitParameters) { *out = *in @@ -54787,6 +54892,540 @@ func (in *RouterParameters) DeepCopy() *RouterParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RouterPeer) DeepCopyInto(out *RouterPeer) { + *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 RouterPeer. +func (in *RouterPeer) DeepCopy() *RouterPeer { + if in == nil { + return nil + } + out := new(RouterPeer) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RouterPeer) 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 *RouterPeerAdvertisedIPRangesInitParameters) DeepCopyInto(out *RouterPeerAdvertisedIPRangesInitParameters) { + *out = *in + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Range != nil { + in, out := &in.Range, &out.Range + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouterPeerAdvertisedIPRangesInitParameters. +func (in *RouterPeerAdvertisedIPRangesInitParameters) DeepCopy() *RouterPeerAdvertisedIPRangesInitParameters { + if in == nil { + return nil + } + out := new(RouterPeerAdvertisedIPRangesInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RouterPeerAdvertisedIPRangesObservation) DeepCopyInto(out *RouterPeerAdvertisedIPRangesObservation) { + *out = *in + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Range != nil { + in, out := &in.Range, &out.Range + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouterPeerAdvertisedIPRangesObservation. +func (in *RouterPeerAdvertisedIPRangesObservation) DeepCopy() *RouterPeerAdvertisedIPRangesObservation { + if in == nil { + return nil + } + out := new(RouterPeerAdvertisedIPRangesObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RouterPeerAdvertisedIPRangesParameters) DeepCopyInto(out *RouterPeerAdvertisedIPRangesParameters) { + *out = *in + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Range != nil { + in, out := &in.Range, &out.Range + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouterPeerAdvertisedIPRangesParameters. +func (in *RouterPeerAdvertisedIPRangesParameters) DeepCopy() *RouterPeerAdvertisedIPRangesParameters { + if in == nil { + return nil + } + out := new(RouterPeerAdvertisedIPRangesParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RouterPeerInitParameters) DeepCopyInto(out *RouterPeerInitParameters) { + *out = *in + if in.AdvertiseMode != nil { + in, out := &in.AdvertiseMode, &out.AdvertiseMode + *out = new(string) + **out = **in + } + if in.AdvertisedGroups != nil { + in, out := &in.AdvertisedGroups, &out.AdvertisedGroups + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.AdvertisedIPRanges != nil { + in, out := &in.AdvertisedIPRanges, &out.AdvertisedIPRanges + *out = make([]RouterPeerAdvertisedIPRangesInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.AdvertisedRoutePriority != nil { + in, out := &in.AdvertisedRoutePriority, &out.AdvertisedRoutePriority + *out = new(float64) + **out = **in + } + if in.Bfd != nil { + in, out := &in.Bfd, &out.Bfd + *out = make([]BfdInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Enable != nil { + in, out := &in.Enable, &out.Enable + *out = new(bool) + **out = **in + } + if in.EnableIPv6 != nil { + in, out := &in.EnableIPv6, &out.EnableIPv6 + *out = new(bool) + **out = **in + } + if in.IPAddress != nil { + in, out := &in.IPAddress, &out.IPAddress + *out = new(string) + **out = **in + } + if in.IPv6NexthopAddress != nil { + in, out := &in.IPv6NexthopAddress, &out.IPv6NexthopAddress + *out = new(string) + **out = **in + } + if in.PeerAsn != nil { + in, out := &in.PeerAsn, &out.PeerAsn + *out = new(float64) + **out = **in + } + if in.PeerIPv6NexthopAddress != nil { + in, out := &in.PeerIPv6NexthopAddress, &out.PeerIPv6NexthopAddress + *out = new(string) + **out = **in + } + if in.Project != nil { + in, out := &in.Project, &out.Project + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouterPeerInitParameters. +func (in *RouterPeerInitParameters) DeepCopy() *RouterPeerInitParameters { + if in == nil { + return nil + } + out := new(RouterPeerInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RouterPeerList) DeepCopyInto(out *RouterPeerList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]RouterPeer, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouterPeerList. +func (in *RouterPeerList) DeepCopy() *RouterPeerList { + if in == nil { + return nil + } + out := new(RouterPeerList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RouterPeerList) 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 *RouterPeerObservation) DeepCopyInto(out *RouterPeerObservation) { + *out = *in + if in.AdvertiseMode != nil { + in, out := &in.AdvertiseMode, &out.AdvertiseMode + *out = new(string) + **out = **in + } + if in.AdvertisedGroups != nil { + in, out := &in.AdvertisedGroups, &out.AdvertisedGroups + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.AdvertisedIPRanges != nil { + in, out := &in.AdvertisedIPRanges, &out.AdvertisedIPRanges + *out = make([]RouterPeerAdvertisedIPRangesObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.AdvertisedRoutePriority != nil { + in, out := &in.AdvertisedRoutePriority, &out.AdvertisedRoutePriority + *out = new(float64) + **out = **in + } + if in.Bfd != nil { + in, out := &in.Bfd, &out.Bfd + *out = make([]BfdObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Enable != nil { + in, out := &in.Enable, &out.Enable + *out = new(bool) + **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.IPAddress != nil { + in, out := &in.IPAddress, &out.IPAddress + *out = new(string) + **out = **in + } + if in.IPv6NexthopAddress != nil { + in, out := &in.IPv6NexthopAddress, &out.IPv6NexthopAddress + *out = new(string) + **out = **in + } + if in.Interface != nil { + in, out := &in.Interface, &out.Interface + *out = new(string) + **out = **in + } + if in.ManagementType != nil { + in, out := &in.ManagementType, &out.ManagementType + *out = new(string) + **out = **in + } + if in.PeerAsn != nil { + in, out := &in.PeerAsn, &out.PeerAsn + *out = new(float64) + **out = **in + } + if in.PeerIPAddress != nil { + in, out := &in.PeerIPAddress, &out.PeerIPAddress + *out = new(string) + **out = **in + } + if in.PeerIPv6NexthopAddress != nil { + in, out := &in.PeerIPv6NexthopAddress, &out.PeerIPv6NexthopAddress + *out = new(string) + **out = **in + } + if in.Project != nil { + in, out := &in.Project, &out.Project + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } + if in.Router != nil { + in, out := &in.Router, &out.Router + *out = new(string) + **out = **in + } + if in.RouterApplianceInstance != nil { + in, out := &in.RouterApplianceInstance, &out.RouterApplianceInstance + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouterPeerObservation. +func (in *RouterPeerObservation) DeepCopy() *RouterPeerObservation { + if in == nil { + return nil + } + out := new(RouterPeerObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RouterPeerParameters) DeepCopyInto(out *RouterPeerParameters) { + *out = *in + if in.AdvertiseMode != nil { + in, out := &in.AdvertiseMode, &out.AdvertiseMode + *out = new(string) + **out = **in + } + if in.AdvertisedGroups != nil { + in, out := &in.AdvertisedGroups, &out.AdvertisedGroups + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.AdvertisedIPRanges != nil { + in, out := &in.AdvertisedIPRanges, &out.AdvertisedIPRanges + *out = make([]RouterPeerAdvertisedIPRangesParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.AdvertisedRoutePriority != nil { + in, out := &in.AdvertisedRoutePriority, &out.AdvertisedRoutePriority + *out = new(float64) + **out = **in + } + if in.Bfd != nil { + in, out := &in.Bfd, &out.Bfd + *out = make([]BfdParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Enable != nil { + in, out := &in.Enable, &out.Enable + *out = new(bool) + **out = **in + } + if in.EnableIPv6 != nil { + in, out := &in.EnableIPv6, &out.EnableIPv6 + *out = new(bool) + **out = **in + } + if in.IPAddress != nil { + in, out := &in.IPAddress, &out.IPAddress + *out = new(string) + **out = **in + } + if in.IPv6NexthopAddress != nil { + in, out := &in.IPv6NexthopAddress, &out.IPv6NexthopAddress + *out = new(string) + **out = **in + } + if in.Interface != nil { + in, out := &in.Interface, &out.Interface + *out = new(string) + **out = **in + } + if in.InterfaceRef != nil { + in, out := &in.InterfaceRef, &out.InterfaceRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.InterfaceSelector != nil { + in, out := &in.InterfaceSelector, &out.InterfaceSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.PeerAsn != nil { + in, out := &in.PeerAsn, &out.PeerAsn + *out = new(float64) + **out = **in + } + if in.PeerIPAddress != nil { + in, out := &in.PeerIPAddress, &out.PeerIPAddress + *out = new(string) + **out = **in + } + if in.PeerIPAddressRef != nil { + in, out := &in.PeerIPAddressRef, &out.PeerIPAddressRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.PeerIPAddressSelector != nil { + in, out := &in.PeerIPAddressSelector, &out.PeerIPAddressSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.PeerIPv6NexthopAddress != nil { + in, out := &in.PeerIPv6NexthopAddress, &out.PeerIPv6NexthopAddress + *out = new(string) + **out = **in + } + if in.Project != nil { + in, out := &in.Project, &out.Project + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } + if in.RegionRef != nil { + in, out := &in.RegionRef, &out.RegionRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.RegionSelector != nil { + in, out := &in.RegionSelector, &out.RegionSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.Router != nil { + in, out := &in.Router, &out.Router + *out = new(string) + **out = **in + } + if in.RouterApplianceInstance != nil { + in, out := &in.RouterApplianceInstance, &out.RouterApplianceInstance + *out = new(string) + **out = **in + } + if in.RouterApplianceInstanceRef != nil { + in, out := &in.RouterApplianceInstanceRef, &out.RouterApplianceInstanceRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.RouterApplianceInstanceSelector != nil { + in, out := &in.RouterApplianceInstanceSelector, &out.RouterApplianceInstanceSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.RouterRef != nil { + in, out := &in.RouterRef, &out.RouterRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.RouterSelector != nil { + in, out := &in.RouterSelector, &out.RouterSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouterPeerParameters. +func (in *RouterPeerParameters) DeepCopy() *RouterPeerParameters { + if in == nil { + return nil + } + out := new(RouterPeerParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RouterPeerSpec) DeepCopyInto(out *RouterPeerSpec) { + *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 RouterPeerSpec. +func (in *RouterPeerSpec) DeepCopy() *RouterPeerSpec { + if in == nil { + return nil + } + out := new(RouterPeerSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RouterPeerStatus) DeepCopyInto(out *RouterPeerStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouterPeerStatus. +func (in *RouterPeerStatus) DeepCopy() *RouterPeerStatus { + if in == nil { + return nil + } + out := new(RouterPeerStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RouterSpec) DeepCopyInto(out *RouterSpec) { *out = *in diff --git a/apis/compute/v1beta1/zz_generated.managed.go b/apis/compute/v1beta1/zz_generated.managed.go index 7891b369d..2c2970ada 100644 --- a/apis/compute/v1beta1/zz_generated.managed.go +++ b/apis/compute/v1beta1/zz_generated.managed.go @@ -5339,6 +5339,82 @@ func (mg *RouterNAT) SetWriteConnectionSecretToReference(r *xpv1.SecretReference mg.Spec.WriteConnectionSecretToReference = r } +// GetCondition of this RouterPeer. +func (mg *RouterPeer) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this RouterPeer. +func (mg *RouterPeer) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicies of this RouterPeer. +func (mg *RouterPeer) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + +// GetProviderConfigReference of this RouterPeer. +func (mg *RouterPeer) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +/* +GetProviderReference of this RouterPeer. +Deprecated: Use GetProviderConfigReference. +*/ +func (mg *RouterPeer) GetProviderReference() *xpv1.Reference { + return mg.Spec.ProviderReference +} + +// GetPublishConnectionDetailsTo of this RouterPeer. +func (mg *RouterPeer) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this RouterPeer. +func (mg *RouterPeer) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this RouterPeer. +func (mg *RouterPeer) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this RouterPeer. +func (mg *RouterPeer) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicies of this RouterPeer. +func (mg *RouterPeer) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + +// SetProviderConfigReference of this RouterPeer. +func (mg *RouterPeer) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +/* +SetProviderReference of this RouterPeer. +Deprecated: Use SetProviderConfigReference. +*/ +func (mg *RouterPeer) SetProviderReference(r *xpv1.Reference) { + mg.Spec.ProviderReference = r +} + +// SetPublishConnectionDetailsTo of this RouterPeer. +func (mg *RouterPeer) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this RouterPeer. +func (mg *RouterPeer) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} + // GetCondition of this SSLCertificate. func (mg *SSLCertificate) GetCondition(ct xpv1.ConditionType) xpv1.Condition { return mg.Status.GetCondition(ct) diff --git a/apis/compute/v1beta1/zz_generated.managedlist.go b/apis/compute/v1beta1/zz_generated.managedlist.go index f375f33ef..178858648 100644 --- a/apis/compute/v1beta1/zz_generated.managedlist.go +++ b/apis/compute/v1beta1/zz_generated.managedlist.go @@ -649,6 +649,15 @@ func (l *RouterNATList) GetItems() []resource.Managed { return items } +// GetItems of this RouterPeerList. +func (l *RouterPeerList) 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 SSLCertificateList. func (l *SSLCertificateList) GetItems() []resource.Managed { items := make([]resource.Managed, len(l.Items)) diff --git a/apis/compute/v1beta1/zz_generated.resolvers.go b/apis/compute/v1beta1/zz_generated.resolvers.go index 760f2a83a..e7898af71 100644 --- a/apis/compute/v1beta1/zz_generated.resolvers.go +++ b/apis/compute/v1beta1/zz_generated.resolvers.go @@ -2365,6 +2365,96 @@ func (mg *RouterNAT) ResolveReferences(ctx context.Context, c client.Reader) err return nil } +// ResolveReferences of this RouterPeer. +func (mg *RouterPeer) 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.Interface), + Extract: resource.ExtractParamPath("name", false), + Reference: mg.Spec.ForProvider.InterfaceRef, + Selector: mg.Spec.ForProvider.InterfaceSelector, + To: reference.To{ + List: &RouterInterfaceList{}, + Managed: &RouterInterface{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.Interface") + } + mg.Spec.ForProvider.Interface = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.InterfaceRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.PeerIPAddress), + Extract: resource.ExtractParamPath("address", false), + Reference: mg.Spec.ForProvider.PeerIPAddressRef, + Selector: mg.Spec.ForProvider.PeerIPAddressSelector, + To: reference.To{ + List: &AddressList{}, + Managed: &Address{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.PeerIPAddress") + } + mg.Spec.ForProvider.PeerIPAddress = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.PeerIPAddressRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Region), + Extract: resource.ExtractParamPath("region", false), + Reference: mg.Spec.ForProvider.RegionRef, + Selector: mg.Spec.ForProvider.RegionSelector, + To: reference.To{ + List: &RouterList{}, + Managed: &Router{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.Region") + } + mg.Spec.ForProvider.Region = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.RegionRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Router), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.RouterRef, + Selector: mg.Spec.ForProvider.RouterSelector, + To: reference.To{ + List: &RouterList{}, + Managed: &Router{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.Router") + } + mg.Spec.ForProvider.Router = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.RouterRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.RouterApplianceInstance), + Extract: resource.ExtractParamPath("self_link", true), + Reference: mg.Spec.ForProvider.RouterApplianceInstanceRef, + Selector: mg.Spec.ForProvider.RouterApplianceInstanceSelector, + To: reference.To{ + List: &InstanceList{}, + Managed: &Instance{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.RouterApplianceInstance") + } + mg.Spec.ForProvider.RouterApplianceInstance = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.RouterApplianceInstanceRef = rsp.ResolvedReference + + return nil +} + // ResolveReferences of this ServiceAttachment. func (mg *ServiceAttachment) ResolveReferences(ctx context.Context, c client.Reader) error { r := reference.NewAPIResolver(c, mg) diff --git a/apis/compute/v1beta1/zz_generated_terraformed.go b/apis/compute/v1beta1/zz_generated_terraformed.go index 2d6167026..d2d9cda7f 100755 --- a/apis/compute/v1beta1/zz_generated_terraformed.go +++ b/apis/compute/v1beta1/zz_generated_terraformed.go @@ -5905,6 +5905,90 @@ func (tr *RouterNAT) GetTerraformSchemaVersion() int { return 0 } +// GetTerraformResourceType returns Terraform resource type for this RouterPeer +func (mg *RouterPeer) GetTerraformResourceType() string { + return "google_compute_router_peer" +} + +// GetConnectionDetailsMapping for this RouterPeer +func (tr *RouterPeer) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this RouterPeer +func (tr *RouterPeer) 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 RouterPeer +func (tr *RouterPeer) 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 RouterPeer +func (tr *RouterPeer) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this RouterPeer +func (tr *RouterPeer) 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 RouterPeer +func (tr *RouterPeer) 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 RouterPeer +func (tr *RouterPeer) 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) +} + +// LateInitialize this RouterPeer using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *RouterPeer) LateInitialize(attrs []byte) (bool, error) { + params := &RouterPeerParameters{} + 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 *RouterPeer) GetTerraformSchemaVersion() int { + return 0 +} + // GetTerraformResourceType returns Terraform resource type for this SecurityPolicy func (mg *SecurityPolicy) GetTerraformResourceType() string { return "google_compute_security_policy" diff --git a/apis/compute/v1beta1/zz_routerpeer_types.go b/apis/compute/v1beta1/zz_routerpeer_types.go new file mode 100755 index 000000000..b100f8d0d --- /dev/null +++ b/apis/compute/v1beta1/zz_routerpeer_types.go @@ -0,0 +1,515 @@ +/* +Copyright 2021 The Crossplane Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1beta1 + +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 BfdInitParameters struct { + + // The minimum interval, in milliseconds, between BFD control packets + // received from the peer router. The actual value is negotiated + // between the two routers and is equal to the greater of this value + // and the transmit interval of the other router. If set, this value + // must be between 1000 and 30000. + MinReceiveInterval *float64 `json:"minReceiveInterval,omitempty" tf:"min_receive_interval,omitempty"` + + // The minimum interval, in milliseconds, between BFD control packets + // transmitted to the peer router. The actual value is negotiated + // between the two routers and is equal to the greater of this value + // and the corresponding receive interval of the other router. If set, + // this value must be between 1000 and 30000. + MinTransmitInterval *float64 `json:"minTransmitInterval,omitempty" tf:"min_transmit_interval,omitempty"` + + // The number of consecutive BFD packets that must be missed before + // BFD declares that a peer is unavailable. If set, the value must + // be a value between 5 and 16. + Multiplier *float64 `json:"multiplier,omitempty" tf:"multiplier,omitempty"` + + // The BFD session initialization mode for this BGP peer. + // If set to ACTIVE, the Cloud Router will initiate the BFD session + // for this BGP peer. If set to PASSIVE, the Cloud Router will wait + // for the peer router to initiate the BFD session for this BGP peer. + // If set to DISABLED, BFD is disabled for this BGP peer. + // Possible values are: ACTIVE, DISABLED, PASSIVE. + SessionInitializationMode *string `json:"sessionInitializationMode,omitempty" tf:"session_initialization_mode,omitempty"` +} + +type BfdObservation struct { + + // The minimum interval, in milliseconds, between BFD control packets + // received from the peer router. The actual value is negotiated + // between the two routers and is equal to the greater of this value + // and the transmit interval of the other router. If set, this value + // must be between 1000 and 30000. + MinReceiveInterval *float64 `json:"minReceiveInterval,omitempty" tf:"min_receive_interval,omitempty"` + + // The minimum interval, in milliseconds, between BFD control packets + // transmitted to the peer router. The actual value is negotiated + // between the two routers and is equal to the greater of this value + // and the corresponding receive interval of the other router. If set, + // this value must be between 1000 and 30000. + MinTransmitInterval *float64 `json:"minTransmitInterval,omitempty" tf:"min_transmit_interval,omitempty"` + + // The number of consecutive BFD packets that must be missed before + // BFD declares that a peer is unavailable. If set, the value must + // be a value between 5 and 16. + Multiplier *float64 `json:"multiplier,omitempty" tf:"multiplier,omitempty"` + + // The BFD session initialization mode for this BGP peer. + // If set to ACTIVE, the Cloud Router will initiate the BFD session + // for this BGP peer. If set to PASSIVE, the Cloud Router will wait + // for the peer router to initiate the BFD session for this BGP peer. + // If set to DISABLED, BFD is disabled for this BGP peer. + // Possible values are: ACTIVE, DISABLED, PASSIVE. + SessionInitializationMode *string `json:"sessionInitializationMode,omitempty" tf:"session_initialization_mode,omitempty"` +} + +type BfdParameters struct { + + // The minimum interval, in milliseconds, between BFD control packets + // received from the peer router. The actual value is negotiated + // between the two routers and is equal to the greater of this value + // and the transmit interval of the other router. If set, this value + // must be between 1000 and 30000. + // +kubebuilder:validation:Optional + MinReceiveInterval *float64 `json:"minReceiveInterval,omitempty" tf:"min_receive_interval,omitempty"` + + // The minimum interval, in milliseconds, between BFD control packets + // transmitted to the peer router. The actual value is negotiated + // between the two routers and is equal to the greater of this value + // and the corresponding receive interval of the other router. If set, + // this value must be between 1000 and 30000. + // +kubebuilder:validation:Optional + MinTransmitInterval *float64 `json:"minTransmitInterval,omitempty" tf:"min_transmit_interval,omitempty"` + + // The number of consecutive BFD packets that must be missed before + // BFD declares that a peer is unavailable. If set, the value must + // be a value between 5 and 16. + // +kubebuilder:validation:Optional + Multiplier *float64 `json:"multiplier,omitempty" tf:"multiplier,omitempty"` + + // The BFD session initialization mode for this BGP peer. + // If set to ACTIVE, the Cloud Router will initiate the BFD session + // for this BGP peer. If set to PASSIVE, the Cloud Router will wait + // for the peer router to initiate the BFD session for this BGP peer. + // If set to DISABLED, BFD is disabled for this BGP peer. + // Possible values are: ACTIVE, DISABLED, PASSIVE. + // +kubebuilder:validation:Optional + SessionInitializationMode *string `json:"sessionInitializationMode,omitempty" tf:"session_initialization_mode,omitempty"` +} + +type RouterPeerAdvertisedIPRangesInitParameters struct { + + // User-specified description for the IP range. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // The IP range to advertise. The value must be a + // CIDR-formatted string. + Range *string `json:"range,omitempty" tf:"range,omitempty"` +} + +type RouterPeerAdvertisedIPRangesObservation struct { + + // User-specified description for the IP range. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // The IP range to advertise. The value must be a + // CIDR-formatted string. + Range *string `json:"range,omitempty" tf:"range,omitempty"` +} + +type RouterPeerAdvertisedIPRangesParameters struct { + + // User-specified description for the IP range. + // +kubebuilder:validation:Optional + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // The IP range to advertise. The value must be a + // CIDR-formatted string. + // +kubebuilder:validation:Optional + Range *string `json:"range,omitempty" tf:"range,omitempty"` +} + +type RouterPeerInitParameters struct { + + // User-specified flag to indicate which mode to use for advertisement. + // Valid values of this enum field are: DEFAULT, CUSTOM + // Default value is DEFAULT. + // Possible values are: DEFAULT, CUSTOM. + AdvertiseMode *string `json:"advertiseMode,omitempty" tf:"advertise_mode,omitempty"` + + // User-specified list of prefix groups to advertise in custom + // mode, which can take one of the following options: + AdvertisedGroups []*string `json:"advertisedGroups,omitempty" tf:"advertised_groups,omitempty"` + + // User-specified list of individual IP ranges to advertise in + // custom mode. This field can only be populated if advertiseMode + // is CUSTOM and is advertised to all peers of the router. These IP + // ranges will be advertised in addition to any specified groups. + // Leave this field blank to advertise no custom IP ranges. + // Structure is documented below. + AdvertisedIPRanges []RouterPeerAdvertisedIPRangesInitParameters `json:"advertisedIpRanges,omitempty" tf:"advertised_ip_ranges,omitempty"` + + // The priority of routes advertised to this BGP peer. + // Where there is more than one matching route of maximum + // length, the routes with the lowest priority value win. + AdvertisedRoutePriority *float64 `json:"advertisedRoutePriority,omitempty" tf:"advertised_route_priority,omitempty"` + + // BFD configuration for the BGP peering. + // Structure is documented below. + Bfd []BfdInitParameters `json:"bfd,omitempty" tf:"bfd,omitempty"` + + // The status of the BGP peer connection. If set to false, any active session + // with the peer is terminated and all associated routing information is removed. + // If set to true, the peer connection can be established with routing information. + // The default is true. + Enable *bool `json:"enable,omitempty" tf:"enable,omitempty"` + + // Enable IPv6 traffic over BGP Peer. If not specified, it is disabled by default. + EnableIPv6 *bool `json:"enableIpv6,omitempty" tf:"enable_ipv6,omitempty"` + + // IP address of the interface inside Google Cloud Platform. + // Only IPv4 is supported. + IPAddress *string `json:"ipAddress,omitempty" tf:"ip_address,omitempty"` + + // IPv6 address of the interface inside Google Cloud Platform. + // The address must be in the range 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64. + // If you do not specify the next hop addresses, Google Cloud automatically + // assigns unused addresses from the 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64 range for you. + IPv6NexthopAddress *string `json:"ipv6NexthopAddress,omitempty" tf:"ipv6_nexthop_address,omitempty"` + + // Peer BGP Autonomous System Number (ASN). + // Each BGP interface may use a different value. + PeerAsn *float64 `json:"peerAsn,omitempty" tf:"peer_asn,omitempty"` + + // IPv6 address of the BGP interface outside Google Cloud Platform. + // The address must be in the range 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64. + // If you do not specify the next hop addresses, Google Cloud automatically + // assigns unused addresses from the 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64 range for you. + PeerIPv6NexthopAddress *string `json:"peerIpv6NexthopAddress,omitempty" tf:"peer_ipv6_nexthop_address,omitempty"` + + // The ID of the project in which the resource belongs. + // If it is not provided, the provider project is used. + Project *string `json:"project,omitempty" tf:"project,omitempty"` +} + +type RouterPeerObservation struct { + + // User-specified flag to indicate which mode to use for advertisement. + // Valid values of this enum field are: DEFAULT, CUSTOM + // Default value is DEFAULT. + // Possible values are: DEFAULT, CUSTOM. + AdvertiseMode *string `json:"advertiseMode,omitempty" tf:"advertise_mode,omitempty"` + + // User-specified list of prefix groups to advertise in custom + // mode, which can take one of the following options: + AdvertisedGroups []*string `json:"advertisedGroups,omitempty" tf:"advertised_groups,omitempty"` + + // User-specified list of individual IP ranges to advertise in + // custom mode. This field can only be populated if advertiseMode + // is CUSTOM and is advertised to all peers of the router. These IP + // ranges will be advertised in addition to any specified groups. + // Leave this field blank to advertise no custom IP ranges. + // Structure is documented below. + AdvertisedIPRanges []RouterPeerAdvertisedIPRangesObservation `json:"advertisedIpRanges,omitempty" tf:"advertised_ip_ranges,omitempty"` + + // The priority of routes advertised to this BGP peer. + // Where there is more than one matching route of maximum + // length, the routes with the lowest priority value win. + AdvertisedRoutePriority *float64 `json:"advertisedRoutePriority,omitempty" tf:"advertised_route_priority,omitempty"` + + // BFD configuration for the BGP peering. + // Structure is documented below. + Bfd []BfdObservation `json:"bfd,omitempty" tf:"bfd,omitempty"` + + // The status of the BGP peer connection. If set to false, any active session + // with the peer is terminated and all associated routing information is removed. + // If set to true, the peer connection can be established with routing information. + // The default is true. + Enable *bool `json:"enable,omitempty" tf:"enable,omitempty"` + + // Enable IPv6 traffic over BGP Peer. If not specified, it is disabled by default. + EnableIPv6 *bool `json:"enableIpv6,omitempty" tf:"enable_ipv6,omitempty"` + + // an identifier for the resource with format projects/{{project}}/regions/{{region}}/routers/{{router}}/{{name}} + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // IP address of the interface inside Google Cloud Platform. + // Only IPv4 is supported. + IPAddress *string `json:"ipAddress,omitempty" tf:"ip_address,omitempty"` + + // IPv6 address of the interface inside Google Cloud Platform. + // The address must be in the range 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64. + // If you do not specify the next hop addresses, Google Cloud automatically + // assigns unused addresses from the 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64 range for you. + IPv6NexthopAddress *string `json:"ipv6NexthopAddress,omitempty" tf:"ipv6_nexthop_address,omitempty"` + + // Name of the interface the BGP peer is associated with. + Interface *string `json:"interface,omitempty" tf:"interface,omitempty"` + + // The resource that configures and manages this BGP peer. + ManagementType *string `json:"managementType,omitempty" tf:"management_type,omitempty"` + + // Peer BGP Autonomous System Number (ASN). + // Each BGP interface may use a different value. + PeerAsn *float64 `json:"peerAsn,omitempty" tf:"peer_asn,omitempty"` + + // IP address of the BGP interface outside Google Cloud Platform. + // Only IPv4 is supported. + PeerIPAddress *string `json:"peerIpAddress,omitempty" tf:"peer_ip_address,omitempty"` + + // IPv6 address of the BGP interface outside Google Cloud Platform. + // The address must be in the range 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64. + // If you do not specify the next hop addresses, Google Cloud automatically + // assigns unused addresses from the 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64 range for you. + PeerIPv6NexthopAddress *string `json:"peerIpv6NexthopAddress,omitempty" tf:"peer_ipv6_nexthop_address,omitempty"` + + // The ID of the project in which the resource belongs. + // If it is not provided, the provider project is used. + Project *string `json:"project,omitempty" tf:"project,omitempty"` + + // Region where the router and BgpPeer reside. + // If it is not provided, the provider region is used. + Region *string `json:"region,omitempty" tf:"region,omitempty"` + + // The name of the Cloud Router in which this BgpPeer will be configured. + Router *string `json:"router,omitempty" tf:"router,omitempty"` + + // The URI of the VM instance that is used as third-party router appliances + // such as Next Gen Firewalls, Virtual Routers, or Router Appliances. + // The VM instance must be located in zones contained in the same region as + // this Cloud Router. The VM instance is the peer side of the BGP session. + RouterApplianceInstance *string `json:"routerApplianceInstance,omitempty" tf:"router_appliance_instance,omitempty"` +} + +type RouterPeerParameters struct { + + // User-specified flag to indicate which mode to use for advertisement. + // Valid values of this enum field are: DEFAULT, CUSTOM + // Default value is DEFAULT. + // Possible values are: DEFAULT, CUSTOM. + // +kubebuilder:validation:Optional + AdvertiseMode *string `json:"advertiseMode,omitempty" tf:"advertise_mode,omitempty"` + + // User-specified list of prefix groups to advertise in custom + // mode, which can take one of the following options: + // +kubebuilder:validation:Optional + AdvertisedGroups []*string `json:"advertisedGroups,omitempty" tf:"advertised_groups,omitempty"` + + // User-specified list of individual IP ranges to advertise in + // custom mode. This field can only be populated if advertiseMode + // is CUSTOM and is advertised to all peers of the router. These IP + // ranges will be advertised in addition to any specified groups. + // Leave this field blank to advertise no custom IP ranges. + // Structure is documented below. + // +kubebuilder:validation:Optional + AdvertisedIPRanges []RouterPeerAdvertisedIPRangesParameters `json:"advertisedIpRanges,omitempty" tf:"advertised_ip_ranges,omitempty"` + + // The priority of routes advertised to this BGP peer. + // Where there is more than one matching route of maximum + // length, the routes with the lowest priority value win. + // +kubebuilder:validation:Optional + AdvertisedRoutePriority *float64 `json:"advertisedRoutePriority,omitempty" tf:"advertised_route_priority,omitempty"` + + // BFD configuration for the BGP peering. + // Structure is documented below. + // +kubebuilder:validation:Optional + Bfd []BfdParameters `json:"bfd,omitempty" tf:"bfd,omitempty"` + + // The status of the BGP peer connection. If set to false, any active session + // with the peer is terminated and all associated routing information is removed. + // If set to true, the peer connection can be established with routing information. + // The default is true. + // +kubebuilder:validation:Optional + Enable *bool `json:"enable,omitempty" tf:"enable,omitempty"` + + // Enable IPv6 traffic over BGP Peer. If not specified, it is disabled by default. + // +kubebuilder:validation:Optional + EnableIPv6 *bool `json:"enableIpv6,omitempty" tf:"enable_ipv6,omitempty"` + + // IP address of the interface inside Google Cloud Platform. + // Only IPv4 is supported. + // +kubebuilder:validation:Optional + IPAddress *string `json:"ipAddress,omitempty" tf:"ip_address,omitempty"` + + // IPv6 address of the interface inside Google Cloud Platform. + // The address must be in the range 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64. + // If you do not specify the next hop addresses, Google Cloud automatically + // assigns unused addresses from the 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64 range for you. + // +kubebuilder:validation:Optional + IPv6NexthopAddress *string `json:"ipv6NexthopAddress,omitempty" tf:"ipv6_nexthop_address,omitempty"` + + // Name of the interface the BGP peer is associated with. + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.RouterInterface + // +crossplane:generate:reference:extractor=github.com/upbound/upjet/pkg/resource.ExtractParamPath("name",false) + // +kubebuilder:validation:Optional + Interface *string `json:"interface,omitempty" tf:"interface,omitempty"` + + // Reference to a RouterInterface in compute to populate interface. + // +kubebuilder:validation:Optional + InterfaceRef *v1.Reference `json:"interfaceRef,omitempty" tf:"-"` + + // Selector for a RouterInterface in compute to populate interface. + // +kubebuilder:validation:Optional + InterfaceSelector *v1.Selector `json:"interfaceSelector,omitempty" tf:"-"` + + // Peer BGP Autonomous System Number (ASN). + // Each BGP interface may use a different value. + // +kubebuilder:validation:Optional + PeerAsn *float64 `json:"peerAsn,omitempty" tf:"peer_asn,omitempty"` + + // IP address of the BGP interface outside Google Cloud Platform. + // Only IPv4 is supported. + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.Address + // +crossplane:generate:reference:extractor=github.com/upbound/upjet/pkg/resource.ExtractParamPath("address",false) + // +kubebuilder:validation:Optional + PeerIPAddress *string `json:"peerIpAddress,omitempty" tf:"peer_ip_address,omitempty"` + + // Reference to a Address in compute to populate peerIpAddress. + // +kubebuilder:validation:Optional + PeerIPAddressRef *v1.Reference `json:"peerIpAddressRef,omitempty" tf:"-"` + + // Selector for a Address in compute to populate peerIpAddress. + // +kubebuilder:validation:Optional + PeerIPAddressSelector *v1.Selector `json:"peerIpAddressSelector,omitempty" tf:"-"` + + // IPv6 address of the BGP interface outside Google Cloud Platform. + // The address must be in the range 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64. + // If you do not specify the next hop addresses, Google Cloud automatically + // assigns unused addresses from the 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64 range for you. + // +kubebuilder:validation:Optional + PeerIPv6NexthopAddress *string `json:"peerIpv6NexthopAddress,omitempty" tf:"peer_ipv6_nexthop_address,omitempty"` + + // The ID of the project in which the resource belongs. + // If it is not provided, the provider project is used. + // +kubebuilder:validation:Optional + Project *string `json:"project,omitempty" tf:"project,omitempty"` + + // Region where the router and BgpPeer reside. + // If it is not provided, the provider region is used. + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.Router + // +crossplane:generate:reference:extractor=github.com/upbound/upjet/pkg/resource.ExtractParamPath("region",false) + // +kubebuilder:validation:Optional + Region *string `json:"region,omitempty" tf:"region,omitempty"` + + // Reference to a Router in compute to populate region. + // +kubebuilder:validation:Optional + RegionRef *v1.Reference `json:"regionRef,omitempty" tf:"-"` + + // Selector for a Router in compute to populate region. + // +kubebuilder:validation:Optional + RegionSelector *v1.Selector `json:"regionSelector,omitempty" tf:"-"` + + // The name of the Cloud Router in which this BgpPeer will be configured. + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.Router + // +kubebuilder:validation:Optional + Router *string `json:"router,omitempty" tf:"router,omitempty"` + + // The URI of the VM instance that is used as third-party router appliances + // such as Next Gen Firewalls, Virtual Routers, or Router Appliances. + // The VM instance must be located in zones contained in the same region as + // this Cloud Router. The VM instance is the peer side of the BGP session. + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.Instance + // +crossplane:generate:reference:extractor=github.com/upbound/upjet/pkg/resource.ExtractParamPath("self_link",true) + // +kubebuilder:validation:Optional + RouterApplianceInstance *string `json:"routerApplianceInstance,omitempty" tf:"router_appliance_instance,omitempty"` + + // Reference to a Instance in compute to populate routerApplianceInstance. + // +kubebuilder:validation:Optional + RouterApplianceInstanceRef *v1.Reference `json:"routerApplianceInstanceRef,omitempty" tf:"-"` + + // Selector for a Instance in compute to populate routerApplianceInstance. + // +kubebuilder:validation:Optional + RouterApplianceInstanceSelector *v1.Selector `json:"routerApplianceInstanceSelector,omitempty" tf:"-"` + + // Reference to a Router in compute to populate router. + // +kubebuilder:validation:Optional + RouterRef *v1.Reference `json:"routerRef,omitempty" tf:"-"` + + // Selector for a Router in compute to populate router. + // +kubebuilder:validation:Optional + RouterSelector *v1.Selector `json:"routerSelector,omitempty" tf:"-"` +} + +// RouterPeerSpec defines the desired state of RouterPeer +type RouterPeerSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider RouterPeerParameters `json:"forProvider"` + // THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored + // unless the relevant Crossplane feature flag is enabled, and may be + // changed or removed without notice. + // 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 RouterPeerInitParameters `json:"initProvider,omitempty"` +} + +// RouterPeerStatus defines the observed state of RouterPeer. +type RouterPeerStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider RouterPeerObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true + +// RouterPeer is the Schema for the RouterPeers API. BGP information that must be configured into the routing stack to establish BGP peering. +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].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:subresource:status +// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,gcp} +type RouterPeer 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.peerAsn) || has(self.initProvider.peerAsn)",message="peerAsn is a required parameter" + Spec RouterPeerSpec `json:"spec"` + Status RouterPeerStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// RouterPeerList contains a list of RouterPeers +type RouterPeerList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []RouterPeer `json:"items"` +} + +// Repository type metadata. +var ( + RouterPeer_Kind = "RouterPeer" + RouterPeer_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: RouterPeer_Kind}.String() + RouterPeer_KindAPIVersion = RouterPeer_Kind + "." + CRDGroupVersion.String() + RouterPeer_GroupVersionKind = CRDGroupVersion.WithKind(RouterPeer_Kind) +) + +func init() { + SchemeBuilder.Register(&RouterPeer{}, &RouterPeerList{}) +} diff --git a/config/externalname.go b/config/externalname.go index 8679d9212..f9d070aec 100644 --- a/config/externalname.go +++ b/config/externalname.go @@ -291,6 +291,10 @@ var externalNameConfigs = map[string]config.ExternalName{ "google_compute_ssl_policy": config.TemplatedStringAsIdentifier("name", "projects/{{ .setup.configuration.project }}/global/sslPolicies/{{ .external_name }}"), // Imported by using the following projects/{{project}}/global/snapshots/{{snapshot}} roles/viewer user:jane@example.com "google_compute_snapshot_iam_member": config.IdentifierFromProvider, + // Imported by using the following projects/{{project}}/regions/{{region}}/routers/{{router}}/{{name}} + // "google_compute_router_peer": config.TemplatedStringAsIdentifier("name", "projects/{{ if .parameters.project }}{{ .parameters.project }}{{ else }}{{ .setup.configuration.project }}{{end}}/regions/{{ .parameters.region }}/routers/{{ .parameters.router }}/{{ .external_name }}"), + // Imported by using the following {{router}}/{{name}} + "google_compute_router_peer": config.TemplatedStringAsIdentifier("name", "{{ .parameters.router }}/{{ .external_name }}"), // container // diff --git a/config/generated.lst b/config/generated.lst index 137d2cc9d..f5dd6ab72 100644 --- a/config/generated.lst +++ b/config/generated.lst @@ -1 +1 @@ -["google_access_context_manager_access_level","google_access_context_manager_access_level_condition","google_access_context_manager_access_policy","google_access_context_manager_access_policy_iam_member","google_access_context_manager_service_perimeter","google_access_context_manager_service_perimeter_resource","google_active_directory_domain","google_apigee_envgroup","google_apigee_environment","google_apigee_environment_iam_member","google_apigee_instance","google_apigee_nat_address","google_apigee_organization","google_app_engine_application","google_app_engine_application_url_dispatch_rules","google_app_engine_firewall_rule","google_app_engine_service_network_settings","google_app_engine_standard_app_version","google_artifact_registry_repository","google_artifact_registry_repository_iam_member","google_beyondcorp_app_connection","google_beyondcorp_app_connector","google_beyondcorp_app_gateway","google_bigquery_analytics_hub_data_exchange","google_bigquery_analytics_hub_data_exchange_iam_member","google_bigquery_analytics_hub_listing","google_bigquery_connection","google_bigquery_data_transfer_config","google_bigquery_dataset","google_bigquery_dataset_access","google_bigquery_dataset_iam_binding","google_bigquery_dataset_iam_member","google_bigquery_dataset_iam_policy","google_bigquery_job","google_bigquery_reservation","google_bigquery_reservation_assignment","google_bigquery_routine","google_bigquery_table","google_bigquery_table_iam_binding","google_bigquery_table_iam_member","google_bigquery_table_iam_policy","google_bigtable_app_profile","google_bigtable_gc_policy","google_bigtable_instance","google_bigtable_instance_iam_binding","google_bigtable_instance_iam_member","google_bigtable_instance_iam_policy","google_bigtable_table","google_bigtable_table_iam_binding","google_bigtable_table_iam_member","google_bigtable_table_iam_policy","google_binary_authorization_attestor","google_binary_authorization_policy","google_certificate_manager_certificate","google_certificate_manager_certificate_map","google_certificate_manager_certificate_map_entry","google_certificate_manager_dns_authorization","google_cloud_ids_endpoint","google_cloud_run_domain_mapping","google_cloud_run_service","google_cloud_run_service_iam_member","google_cloud_run_v2_job","google_cloud_run_v2_service","google_cloud_scheduler_job","google_cloud_tasks_queue","google_cloudbuild_trigger","google_cloudbuild_worker_pool","google_cloudfunctions2_function","google_cloudfunctions_function","google_cloudfunctions_function_iam_member","google_cloudiot_device","google_cloudiot_registry","google_composer_environment","google_compute_address","google_compute_attached_disk","google_compute_autoscaler","google_compute_backend_bucket","google_compute_backend_bucket_signed_url_key","google_compute_backend_service","google_compute_backend_service_signed_url_key","google_compute_disk","google_compute_disk_iam_member","google_compute_disk_resource_policy_attachment","google_compute_external_vpn_gateway","google_compute_firewall","google_compute_firewall_policy","google_compute_firewall_policy_association","google_compute_firewall_policy_rule","google_compute_forwarding_rule","google_compute_global_address","google_compute_global_forwarding_rule","google_compute_global_network_endpoint","google_compute_global_network_endpoint_group","google_compute_ha_vpn_gateway","google_compute_health_check","google_compute_http_health_check","google_compute_https_health_check","google_compute_image","google_compute_image_iam_member","google_compute_instance","google_compute_instance_from_template","google_compute_instance_group","google_compute_instance_group_manager","google_compute_instance_group_named_port","google_compute_instance_iam_member","google_compute_instance_template","google_compute_interconnect_attachment","google_compute_managed_ssl_certificate","google_compute_network","google_compute_network_endpoint","google_compute_network_endpoint_group","google_compute_network_firewall_policy","google_compute_network_firewall_policy_association","google_compute_network_peering","google_compute_network_peering_routes_config","google_compute_node_group","google_compute_node_template","google_compute_packet_mirroring","google_compute_per_instance_config","google_compute_project_default_network_tier","google_compute_project_metadata","google_compute_project_metadata_item","google_compute_region_autoscaler","google_compute_region_backend_service","google_compute_region_disk","google_compute_region_disk_iam_member","google_compute_region_disk_resource_policy_attachment","google_compute_region_health_check","google_compute_region_instance_group_manager","google_compute_region_network_endpoint_group","google_compute_region_network_firewall_policy","google_compute_region_network_firewall_policy_association","google_compute_region_per_instance_config","google_compute_region_ssl_certificate","google_compute_region_target_http_proxy","google_compute_region_target_https_proxy","google_compute_region_url_map","google_compute_reservation","google_compute_resource_policy","google_compute_route","google_compute_router","google_compute_router_interface","google_compute_router_nat","google_compute_security_policy","google_compute_service_attachment","google_compute_shared_vpc_host_project","google_compute_shared_vpc_service_project","google_compute_snapshot","google_compute_snapshot_iam_member","google_compute_ssl_certificate","google_compute_ssl_policy","google_compute_subnetwork","google_compute_subnetwork_iam_member","google_compute_target_grpc_proxy","google_compute_target_http_proxy","google_compute_target_https_proxy","google_compute_target_instance","google_compute_target_pool","google_compute_target_ssl_proxy","google_compute_target_tcp_proxy","google_compute_url_map","google_compute_vpn_gateway","google_compute_vpn_tunnel","google_container_analysis_note","google_container_aws_cluster","google_container_aws_node_pool","google_container_azure_client","google_container_azure_cluster","google_container_azure_node_pool","google_container_cluster","google_container_node_pool","google_container_registry","google_data_catalog_entry","google_data_catalog_entry_group","google_data_catalog_tag","google_data_catalog_tag_template","google_data_fusion_instance","google_data_loss_prevention_deidentify_template","google_data_loss_prevention_inspect_template","google_data_loss_prevention_job_trigger","google_data_loss_prevention_stored_info_type","google_dataflow_job","google_dataplex_asset","google_dataplex_lake","google_dataplex_zone","google_dataproc_autoscaling_policy","google_dataproc_cluster","google_dataproc_job","google_dataproc_metastore_service","google_dataproc_workflow_template","google_datastore_index","google_datastream_connection_profile","google_datastream_private_connection","google_dialogflow_cx_agent","google_dialogflow_cx_entity_type","google_dialogflow_cx_environment","google_dialogflow_cx_flow","google_dialogflow_cx_intent","google_dialogflow_cx_page","google_dialogflow_cx_version","google_dialogflow_cx_webhook","google_dns_managed_zone","google_dns_managed_zone_iam_member","google_dns_policy","google_dns_record_set","google_document_ai_processor","google_essential_contacts_contact","google_eventarc_channel","google_eventarc_google_channel_config","google_eventarc_trigger","google_filestore_backup","google_filestore_instance","google_filestore_snapshot","google_firebaserules_release","google_firebaserules_ruleset","google_folder","google_folder_iam_member","google_gke_backup_backup_plan","google_gke_hub_membership","google_gke_hub_membership_iam_member","google_healthcare_consent_store","google_healthcare_dataset","google_healthcare_dataset_iam_member","google_iam_workload_identity_pool","google_iam_workload_identity_pool_provider","google_iap_app_engine_service_iam_member","google_iap_app_engine_version_iam_member","google_iap_tunnel_iam_member","google_iap_web_backend_service_iam_member","google_iap_web_iam_member","google_iap_web_type_app_engine_iam_member","google_iap_web_type_compute_iam_member","google_identity_platform_default_supported_idp_config","google_identity_platform_inbound_saml_config","google_identity_platform_oauth_idp_config","google_identity_platform_project_default_config","google_identity_platform_tenant","google_identity_platform_tenant_default_supported_idp_config","google_identity_platform_tenant_inbound_saml_config","google_identity_platform_tenant_oauth_idp_config","google_kms_crypto_key","google_kms_crypto_key_iam_member","google_kms_crypto_key_version","google_kms_key_ring","google_kms_key_ring_iam_member","google_kms_key_ring_import_job","google_kms_secret_ciphertext","google_logging_log_view","google_logging_metric","google_logging_project_bucket_config","google_logging_project_exclusion","google_logging_project_sink","google_memcache_instance","google_ml_engine_model","google_monitoring_alert_policy","google_monitoring_custom_service","google_monitoring_dashboard","google_monitoring_group","google_monitoring_metric_descriptor","google_monitoring_notification_channel","google_monitoring_service","google_monitoring_slo","google_monitoring_uptime_check_config","google_network_connectivity_hub","google_network_connectivity_spoke","google_network_management_connectivity_test","google_notebooks_environment","google_notebooks_instance","google_notebooks_instance_iam_member","google_notebooks_runtime","google_notebooks_runtime_iam_member","google_organization_iam_audit_config","google_organization_iam_custom_role","google_organization_iam_member","google_os_config_os_policy_assignment","google_os_config_patch_deployment","google_os_login_ssh_public_key","google_privateca_ca_pool","google_privateca_ca_pool_iam_member","google_privateca_certificate","google_privateca_certificate_authority","google_privateca_certificate_template","google_privateca_certificate_template_iam_member","google_project","google_project_default_service_accounts","google_project_iam_audit_config","google_project_iam_custom_role","google_project_iam_member","google_project_service","google_project_usage_export_bucket","google_pubsub_lite_reservation","google_pubsub_lite_subscription","google_pubsub_lite_topic","google_pubsub_schema","google_pubsub_subscription","google_pubsub_subscription_iam_member","google_pubsub_topic","google_pubsub_topic_iam_member","google_redis_instance","google_secret_manager_secret","google_secret_manager_secret_iam_member","google_secret_manager_secret_version","google_service_account","google_service_account_iam_member","google_service_account_key","google_service_networking_connection","google_service_networking_peered_dns_domain","google_sourcerepo_repository","google_sourcerepo_repository_iam_member","google_spanner_database","google_spanner_database_iam_member","google_spanner_instance","google_spanner_instance_iam_member","google_sql_database","google_sql_database_instance","google_sql_source_representation_instance","google_sql_ssl_cert","google_sql_user","google_storage_bucket","google_storage_bucket_access_control","google_storage_bucket_acl","google_storage_bucket_iam_member","google_storage_bucket_object","google_storage_default_object_access_control","google_storage_default_object_acl","google_storage_notification","google_storage_object_access_control","google_storage_object_acl","google_storage_transfer_agent_pool","google_tpu_node","google_vertex_ai_dataset","google_vertex_ai_featurestore","google_vertex_ai_featurestore_entitytype","google_vertex_ai_tensorboard","google_workflows_workflow"] \ No newline at end of file +["google_access_context_manager_access_level","google_access_context_manager_access_level_condition","google_access_context_manager_access_policy","google_access_context_manager_access_policy_iam_member","google_access_context_manager_service_perimeter","google_access_context_manager_service_perimeter_resource","google_active_directory_domain","google_apigee_envgroup","google_apigee_environment","google_apigee_environment_iam_member","google_apigee_instance","google_apigee_nat_address","google_apigee_organization","google_app_engine_application","google_app_engine_application_url_dispatch_rules","google_app_engine_firewall_rule","google_app_engine_service_network_settings","google_app_engine_standard_app_version","google_artifact_registry_repository","google_artifact_registry_repository_iam_member","google_beyondcorp_app_connection","google_beyondcorp_app_connector","google_beyondcorp_app_gateway","google_bigquery_analytics_hub_data_exchange","google_bigquery_analytics_hub_data_exchange_iam_member","google_bigquery_analytics_hub_listing","google_bigquery_connection","google_bigquery_data_transfer_config","google_bigquery_dataset","google_bigquery_dataset_access","google_bigquery_dataset_iam_binding","google_bigquery_dataset_iam_member","google_bigquery_dataset_iam_policy","google_bigquery_job","google_bigquery_reservation","google_bigquery_reservation_assignment","google_bigquery_routine","google_bigquery_table","google_bigquery_table_iam_binding","google_bigquery_table_iam_member","google_bigquery_table_iam_policy","google_bigtable_app_profile","google_bigtable_gc_policy","google_bigtable_instance","google_bigtable_instance_iam_binding","google_bigtable_instance_iam_member","google_bigtable_instance_iam_policy","google_bigtable_table","google_bigtable_table_iam_binding","google_bigtable_table_iam_member","google_bigtable_table_iam_policy","google_binary_authorization_attestor","google_binary_authorization_policy","google_certificate_manager_certificate","google_certificate_manager_certificate_map","google_certificate_manager_certificate_map_entry","google_certificate_manager_dns_authorization","google_cloud_ids_endpoint","google_cloud_run_domain_mapping","google_cloud_run_service","google_cloud_run_service_iam_member","google_cloud_run_v2_job","google_cloud_run_v2_service","google_cloud_scheduler_job","google_cloud_tasks_queue","google_cloudbuild_trigger","google_cloudbuild_worker_pool","google_cloudfunctions2_function","google_cloudfunctions_function","google_cloudfunctions_function_iam_member","google_cloudiot_device","google_cloudiot_registry","google_composer_environment","google_compute_address","google_compute_attached_disk","google_compute_autoscaler","google_compute_backend_bucket","google_compute_backend_bucket_signed_url_key","google_compute_backend_service","google_compute_backend_service_signed_url_key","google_compute_disk","google_compute_disk_iam_member","google_compute_disk_resource_policy_attachment","google_compute_external_vpn_gateway","google_compute_firewall","google_compute_firewall_policy","google_compute_firewall_policy_association","google_compute_firewall_policy_rule","google_compute_forwarding_rule","google_compute_global_address","google_compute_global_forwarding_rule","google_compute_global_network_endpoint","google_compute_global_network_endpoint_group","google_compute_ha_vpn_gateway","google_compute_health_check","google_compute_http_health_check","google_compute_https_health_check","google_compute_image","google_compute_image_iam_member","google_compute_instance","google_compute_instance_from_template","google_compute_instance_group","google_compute_instance_group_manager","google_compute_instance_group_named_port","google_compute_instance_iam_member","google_compute_instance_template","google_compute_interconnect_attachment","google_compute_managed_ssl_certificate","google_compute_network","google_compute_network_endpoint","google_compute_network_endpoint_group","google_compute_network_firewall_policy","google_compute_network_firewall_policy_association","google_compute_network_peering","google_compute_network_peering_routes_config","google_compute_node_group","google_compute_node_template","google_compute_packet_mirroring","google_compute_per_instance_config","google_compute_project_default_network_tier","google_compute_project_metadata","google_compute_project_metadata_item","google_compute_region_autoscaler","google_compute_region_backend_service","google_compute_region_disk","google_compute_region_disk_iam_member","google_compute_region_disk_resource_policy_attachment","google_compute_region_health_check","google_compute_region_instance_group_manager","google_compute_region_network_endpoint_group","google_compute_region_network_firewall_policy","google_compute_region_network_firewall_policy_association","google_compute_region_per_instance_config","google_compute_region_ssl_certificate","google_compute_region_target_http_proxy","google_compute_region_target_https_proxy","google_compute_region_url_map","google_compute_reservation","google_compute_resource_policy","google_compute_route","google_compute_router","google_compute_router_interface","google_compute_router_nat","google_compute_router_peer","google_compute_security_policy","google_compute_service_attachment","google_compute_shared_vpc_host_project","google_compute_shared_vpc_service_project","google_compute_snapshot","google_compute_snapshot_iam_member","google_compute_ssl_certificate","google_compute_ssl_policy","google_compute_subnetwork","google_compute_subnetwork_iam_member","google_compute_target_grpc_proxy","google_compute_target_http_proxy","google_compute_target_https_proxy","google_compute_target_instance","google_compute_target_pool","google_compute_target_ssl_proxy","google_compute_target_tcp_proxy","google_compute_url_map","google_compute_vpn_gateway","google_compute_vpn_tunnel","google_container_analysis_note","google_container_aws_cluster","google_container_aws_node_pool","google_container_azure_client","google_container_azure_cluster","google_container_azure_node_pool","google_container_cluster","google_container_node_pool","google_container_registry","google_data_catalog_entry","google_data_catalog_entry_group","google_data_catalog_tag","google_data_catalog_tag_template","google_data_fusion_instance","google_data_loss_prevention_deidentify_template","google_data_loss_prevention_inspect_template","google_data_loss_prevention_job_trigger","google_data_loss_prevention_stored_info_type","google_dataflow_job","google_dataplex_asset","google_dataplex_lake","google_dataplex_zone","google_dataproc_autoscaling_policy","google_dataproc_cluster","google_dataproc_job","google_dataproc_metastore_service","google_dataproc_workflow_template","google_datastore_index","google_datastream_connection_profile","google_datastream_private_connection","google_dialogflow_cx_agent","google_dialogflow_cx_entity_type","google_dialogflow_cx_environment","google_dialogflow_cx_flow","google_dialogflow_cx_intent","google_dialogflow_cx_page","google_dialogflow_cx_version","google_dialogflow_cx_webhook","google_dns_managed_zone","google_dns_managed_zone_iam_member","google_dns_policy","google_dns_record_set","google_document_ai_processor","google_essential_contacts_contact","google_eventarc_channel","google_eventarc_google_channel_config","google_eventarc_trigger","google_filestore_backup","google_filestore_instance","google_filestore_snapshot","google_firebaserules_release","google_firebaserules_ruleset","google_folder","google_folder_iam_member","google_gke_backup_backup_plan","google_gke_hub_membership","google_gke_hub_membership_iam_member","google_healthcare_consent_store","google_healthcare_dataset","google_healthcare_dataset_iam_member","google_iam_workload_identity_pool","google_iam_workload_identity_pool_provider","google_iap_app_engine_service_iam_member","google_iap_app_engine_version_iam_member","google_iap_tunnel_iam_member","google_iap_web_backend_service_iam_member","google_iap_web_iam_member","google_iap_web_type_app_engine_iam_member","google_iap_web_type_compute_iam_member","google_identity_platform_default_supported_idp_config","google_identity_platform_inbound_saml_config","google_identity_platform_oauth_idp_config","google_identity_platform_project_default_config","google_identity_platform_tenant","google_identity_platform_tenant_default_supported_idp_config","google_identity_platform_tenant_inbound_saml_config","google_identity_platform_tenant_oauth_idp_config","google_kms_crypto_key","google_kms_crypto_key_iam_member","google_kms_crypto_key_version","google_kms_key_ring","google_kms_key_ring_iam_member","google_kms_key_ring_import_job","google_kms_secret_ciphertext","google_logging_log_view","google_logging_metric","google_logging_project_bucket_config","google_logging_project_exclusion","google_logging_project_sink","google_memcache_instance","google_ml_engine_model","google_monitoring_alert_policy","google_monitoring_custom_service","google_monitoring_dashboard","google_monitoring_group","google_monitoring_metric_descriptor","google_monitoring_notification_channel","google_monitoring_service","google_monitoring_slo","google_monitoring_uptime_check_config","google_network_connectivity_hub","google_network_connectivity_spoke","google_network_management_connectivity_test","google_notebooks_environment","google_notebooks_instance","google_notebooks_instance_iam_member","google_notebooks_runtime","google_notebooks_runtime_iam_member","google_organization_iam_audit_config","google_organization_iam_custom_role","google_organization_iam_member","google_os_config_os_policy_assignment","google_os_config_patch_deployment","google_os_login_ssh_public_key","google_privateca_ca_pool","google_privateca_ca_pool_iam_member","google_privateca_certificate","google_privateca_certificate_authority","google_privateca_certificate_template","google_privateca_certificate_template_iam_member","google_project","google_project_default_service_accounts","google_project_iam_audit_config","google_project_iam_custom_role","google_project_iam_member","google_project_service","google_project_usage_export_bucket","google_pubsub_lite_reservation","google_pubsub_lite_subscription","google_pubsub_lite_topic","google_pubsub_schema","google_pubsub_subscription","google_pubsub_subscription_iam_member","google_pubsub_topic","google_pubsub_topic_iam_member","google_redis_instance","google_secret_manager_secret","google_secret_manager_secret_iam_member","google_secret_manager_secret_version","google_service_account","google_service_account_iam_member","google_service_account_key","google_service_networking_connection","google_service_networking_peered_dns_domain","google_sourcerepo_repository","google_sourcerepo_repository_iam_member","google_spanner_database","google_spanner_database_iam_member","google_spanner_instance","google_spanner_instance_iam_member","google_sql_database","google_sql_database_instance","google_sql_source_representation_instance","google_sql_ssl_cert","google_sql_user","google_storage_bucket","google_storage_bucket_access_control","google_storage_bucket_acl","google_storage_bucket_iam_member","google_storage_bucket_object","google_storage_default_object_access_control","google_storage_default_object_acl","google_storage_notification","google_storage_object_access_control","google_storage_object_acl","google_storage_transfer_agent_pool","google_tpu_node","google_vertex_ai_dataset","google_vertex_ai_featurestore","google_vertex_ai_featurestore_entitytype","google_vertex_ai_tensorboard","google_workflows_workflow"] \ No newline at end of file diff --git a/examples-generated/compute/externalvpngateway.yaml b/examples-generated/compute/externalvpngateway.yaml index 0861d072b..301da2bae 100644 --- a/examples-generated/compute/externalvpngateway.yaml +++ b/examples-generated/compute/externalvpngateway.yaml @@ -110,6 +110,60 @@ spec: --- +apiVersion: compute.gcp.upbound.io/v1beta1 +kind: RouterPeer +metadata: + annotations: + meta.upbound.io/example-id: compute/v1beta1/externalvpngateway + labels: + testing.upbound.io/example-name: router1_peer1 + name: router1-peer1 +spec: + forProvider: + advertisedRoutePriority: 100 + interfaceSelector: + matchLabels: + testing.upbound.io/example-name: router1_interface1 + peerAsn: 64515 + peerIpAddressSelector: + matchLabels: + testing.upbound.io/example-name: example + regionSelector: + matchLabels: + testing.upbound.io/example-name: example + routerSelector: + matchLabels: + testing.upbound.io/example-name: router1 + +--- + +apiVersion: compute.gcp.upbound.io/v1beta1 +kind: RouterPeer +metadata: + annotations: + meta.upbound.io/example-id: compute/v1beta1/externalvpngateway + labels: + testing.upbound.io/example-name: router1_peer2 + name: router1-peer2 +spec: + forProvider: + advertisedRoutePriority: 100 + interfaceSelector: + matchLabels: + testing.upbound.io/example-name: router1_interface2 + peerAsn: 64515 + peerIpAddressSelector: + matchLabels: + testing.upbound.io/example-name: example + regionSelector: + matchLabels: + testing.upbound.io/example-name: example + routerSelector: + matchLabels: + testing.upbound.io/example-name: router1 + +--- + apiVersion: compute.gcp.upbound.io/v1beta1 kind: Subnetwork metadata: diff --git a/examples-generated/compute/routerpeer.yaml b/examples-generated/compute/routerpeer.yaml new file mode 100644 index 000000000..12a6375ee --- /dev/null +++ b/examples-generated/compute/routerpeer.yaml @@ -0,0 +1,24 @@ +apiVersion: compute.gcp.upbound.io/v1beta1 +kind: RouterPeer +metadata: + annotations: + meta.upbound.io/example-id: compute/v1beta1/routerpeer + labels: + testing.upbound.io/example-name: peer + name: peer +spec: + forProvider: + advertisedRoutePriority: 100 + interfaceSelector: + matchLabels: + testing.upbound.io/example-name: example + peerAsn: 65513 + peerIpAddressSelector: + matchLabels: + testing.upbound.io/example-name: example + regionSelector: + matchLabels: + testing.upbound.io/example-name: example + routerSelector: + matchLabels: + testing.upbound.io/example-name: example diff --git a/examples/compute/routerpeer.yaml b/examples/compute/routerpeer.yaml new file mode 100644 index 000000000..6b7b728e9 --- /dev/null +++ b/examples/compute/routerpeer.yaml @@ -0,0 +1,74 @@ +apiVersion: compute.gcp.upbound.io/v1beta1 +kind: RouterPeer +metadata: + annotations: + meta.upbound.io/example-id: compute/v1beta1/routerpeer + labels: + testing.upbound.io/example-name: router_peer + name: router-peer +spec: + forProvider: + advertisedRoutePriority: 100 + interfaceSelector: + matchLabels: + testing.upbound.io/example-name: router_peer + peerAsn: 65513 + peerIpAddress: 169.254.1.2 + regionSelector: + matchLabels: + testing.upbound.io/example-name: router_peer + routerSelector: + matchLabels: + testing.upbound.io/example-name: router_peer + +--- + +apiVersion: compute.gcp.upbound.io/v1beta1 +kind: RouterInterface +metadata: + annotations: + meta.upbound.io/example-id: compute/v1beta1/routerpeer + labels: + testing.upbound.io/example-name: router_peer + name: peer-router-interface +spec: + forProvider: + name: peer-router-interface + region: us-central1 + ipRange: 169.254.1.1/30 + routerSelector: + matchLabels: + testing.upbound.io/example-name: router_peer + +--- + +apiVersion: compute.gcp.upbound.io/v1beta1 +kind: Router +metadata: + annotations: + meta.upbound.io/example-id: compute/v1beta1/routerpeer + labels: + testing.upbound.io/example-name: router_peer + name: peer-router +spec: + forProvider: + region: us-central1 + bgp: + - asn: 64514 + networkSelector: + matchLabels: + testing.upbound.io/example-name: router_peer + +--- + +apiVersion: compute.gcp.upbound.io/v1beta1 +kind: Network +metadata: + annotations: + meta.upbound.io/example-id: compute/v1beta1/routerpeer + labels: + testing.upbound.io/example-name: router_peer + name: peer-router-network +spec: + forProvider: + autoCreateSubnetworks: false \ No newline at end of file diff --git a/internal/controller/compute/routerpeer/zz_controller.go b/internal/controller/compute/routerpeer/zz_controller.go new file mode 100755 index 000000000..077a7e916 --- /dev/null +++ b/internal/controller/compute/routerpeer/zz_controller.go @@ -0,0 +1,70 @@ +/* +Copyright 2021 The Crossplane Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package routerpeer + +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" + tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" + + v1beta1 "github.com/upbound/provider-gcp/apis/compute/v1beta1" + features "github.com/upbound/provider-gcp/internal/features" +) + +// Setup adds a controller that reconciles RouterPeer managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1beta1.RouterPeer_GroupVersionKind.String()) + var initializers managed.InitializerChain + initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) + 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))) + } + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1beta1.RouterPeer_GroupVersionKind), tjcontroller.WithEventHandler(o.EventHandler)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["google_compute_router_peer"], tjcontroller.WithLogger(o.Logger), + 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.Features.Enabled(features.EnableAlphaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1beta1.RouterPeer_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1beta1.RouterPeer{}, o.EventHandler). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/zz_compute_setup.go b/internal/controller/zz_compute_setup.go index 5068b15c1..e87d1ca54 100755 --- a/internal/controller/zz_compute_setup.go +++ b/internal/controller/zz_compute_setup.go @@ -79,6 +79,7 @@ import ( router "github.com/upbound/provider-gcp/internal/controller/compute/router" routerinterface "github.com/upbound/provider-gcp/internal/controller/compute/routerinterface" routernat "github.com/upbound/provider-gcp/internal/controller/compute/routernat" + routerpeer "github.com/upbound/provider-gcp/internal/controller/compute/routerpeer" securitypolicy "github.com/upbound/provider-gcp/internal/controller/compute/securitypolicy" serviceattachment "github.com/upbound/provider-gcp/internal/controller/compute/serviceattachment" sharedvpchostproject "github.com/upbound/provider-gcp/internal/controller/compute/sharedvpchostproject" @@ -175,6 +176,7 @@ func Setup_compute(mgr ctrl.Manager, o controller.Options) error { router.Setup, routerinterface.Setup, routernat.Setup, + routerpeer.Setup, securitypolicy.Setup, serviceattachment.Setup, sharedvpchostproject.Setup, diff --git a/internal/controller/zz_monolith_setup.go b/internal/controller/zz_monolith_setup.go index a9aae560e..99939c5d8 100755 --- a/internal/controller/zz_monolith_setup.go +++ b/internal/controller/zz_monolith_setup.go @@ -168,6 +168,7 @@ import ( router "github.com/upbound/provider-gcp/internal/controller/compute/router" routerinterface "github.com/upbound/provider-gcp/internal/controller/compute/routerinterface" routernat "github.com/upbound/provider-gcp/internal/controller/compute/routernat" + routerpeer "github.com/upbound/provider-gcp/internal/controller/compute/routerpeer" securitypolicy "github.com/upbound/provider-gcp/internal/controller/compute/securitypolicy" serviceattachment "github.com/upbound/provider-gcp/internal/controller/compute/serviceattachment" sharedvpchostproject "github.com/upbound/provider-gcp/internal/controller/compute/sharedvpchostproject" @@ -510,6 +511,7 @@ func Setup_monolith(mgr ctrl.Manager, o controller.Options) error { router.Setup, routerinterface.Setup, routernat.Setup, + routerpeer.Setup, securitypolicy.Setup, serviceattachment.Setup, sharedvpchostproject.Setup, diff --git a/package/crds/compute.gcp.upbound.io_routerpeers.yaml b/package/crds/compute.gcp.upbound.io_routerpeers.yaml new file mode 100644 index 000000000..4f1ac4af0 --- /dev/null +++ b/package/crds/compute.gcp.upbound.io_routerpeers.yaml @@ -0,0 +1,1080 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + name: routerpeers.compute.gcp.upbound.io +spec: + group: compute.gcp.upbound.io + names: + categories: + - crossplane + - managed + - gcp + kind: RouterPeer + listKind: RouterPeerList + plural: routerpeers + singular: routerpeer + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .status.conditions[?(@.type=='Synced')].status + name: SYNCED + type: string + - jsonPath: .metadata.annotations.crossplane\.io/external-name + name: EXTERNAL-NAME + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1beta1 + schema: + openAPIV3Schema: + description: RouterPeer is the Schema for the RouterPeers API. BGP information + that must be configured into the routing stack to establish BGP peering. + 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: RouterPeerSpec defines the desired state of RouterPeer + 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: + advertiseMode: + description: 'User-specified flag to indicate which mode to use + for advertisement. Valid values of this enum field are: DEFAULT, + CUSTOM Default value is DEFAULT. Possible values are: DEFAULT, + CUSTOM.' + type: string + advertisedGroups: + description: 'User-specified list of prefix groups to advertise + in custom mode, which can take one of the following options:' + items: + type: string + type: array + advertisedIpRanges: + description: User-specified list of individual IP ranges to advertise + in custom mode. This field can only be populated if advertiseMode + is CUSTOM and is advertised to all peers of the router. These + IP ranges will be advertised in addition to any specified groups. + Leave this field blank to advertise no custom IP ranges. Structure + is documented below. + items: + properties: + description: + description: User-specified description for the IP range. + type: string + range: + description: The IP range to advertise. The value must be + a CIDR-formatted string. + type: string + type: object + type: array + advertisedRoutePriority: + description: The priority of routes advertised to this BGP peer. + Where there is more than one matching route of maximum length, + the routes with the lowest priority value win. + type: number + bfd: + description: BFD configuration for the BGP peering. Structure + is documented below. + items: + properties: + minReceiveInterval: + description: The minimum interval, in milliseconds, between + BFD control packets received from the peer router. The + actual value is negotiated between the two routers and + is equal to the greater of this value and the transmit + interval of the other router. If set, this value must + be between 1000 and 30000. + type: number + minTransmitInterval: + description: The minimum interval, in milliseconds, between + BFD control packets transmitted to the peer router. The + actual value is negotiated between the two routers and + is equal to the greater of this value and the corresponding + receive interval of the other router. If set, this value + must be between 1000 and 30000. + type: number + multiplier: + description: The number of consecutive BFD packets that + must be missed before BFD declares that a peer is unavailable. + If set, the value must be a value between 5 and 16. + type: number + sessionInitializationMode: + description: 'The BFD session initialization mode for this + BGP peer. If set to ACTIVE, the Cloud Router will initiate + the BFD session for this BGP peer. If set to PASSIVE, + the Cloud Router will wait for the peer router to initiate + the BFD session for this BGP peer. If set to DISABLED, + BFD is disabled for this BGP peer. Possible values are: + ACTIVE, DISABLED, PASSIVE.' + type: string + type: object + type: array + enable: + description: The status of the BGP peer connection. If set to + false, any active session with the peer is terminated and all + associated routing information is removed. If set to true, the + peer connection can be established with routing information. + The default is true. + type: boolean + enableIpv6: + description: Enable IPv6 traffic over BGP Peer. If not specified, + it is disabled by default. + type: boolean + interface: + description: Name of the interface the BGP peer is associated + with. + type: string + interfaceRef: + description: Reference to a RouterInterface in compute to populate + interface. + 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 + interfaceSelector: + description: Selector for a RouterInterface in compute to populate + interface. + 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 + ipAddress: + description: IP address of the interface inside Google Cloud Platform. + Only IPv4 is supported. + type: string + ipv6NexthopAddress: + description: IPv6 address of the interface inside Google Cloud + Platform. The address must be in the range 2600:2d00:0:2::/64 + or 2600:2d00:0:3::/64. If you do not specify the next hop addresses, + Google Cloud automatically assigns unused addresses from the + 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64 range for you. + type: string + peerAsn: + description: Peer BGP Autonomous System Number (ASN). Each BGP + interface may use a different value. + type: number + peerIpAddress: + description: IP address of the BGP interface outside Google Cloud + Platform. Only IPv4 is supported. + type: string + peerIpAddressRef: + description: Reference to a Address in compute to populate peerIpAddress. + 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 + peerIpAddressSelector: + description: Selector for a Address in compute to populate peerIpAddress. + 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 + peerIpv6NexthopAddress: + description: IPv6 address of the BGP interface outside Google + Cloud Platform. The address must be in the range 2600:2d00:0:2::/64 + or 2600:2d00:0:3::/64. If you do not specify the next hop addresses, + Google Cloud automatically assigns unused addresses from the + 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64 range for you. + type: string + project: + description: The ID of the project in which the resource belongs. + If it is not provided, the provider project is used. + type: string + region: + description: Region where the router and BgpPeer reside. If it + is not provided, the provider region is used. + type: string + regionRef: + description: Reference to a Router in compute to populate region. + 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 + regionSelector: + description: Selector for a Router in compute to populate region. + 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 + router: + description: The name of the Cloud Router in which this BgpPeer + will be configured. + type: string + routerApplianceInstance: + description: The URI of the VM instance that is used as third-party + router appliances such as Next Gen Firewalls, Virtual Routers, + or Router Appliances. The VM instance must be located in zones + contained in the same region as this Cloud Router. The VM instance + is the peer side of the BGP session. + type: string + routerApplianceInstanceRef: + description: Reference to a Instance in compute to populate routerApplianceInstance. + 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 + routerApplianceInstanceSelector: + description: Selector for a Instance in compute to populate routerApplianceInstance. + 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 + routerRef: + description: Reference to a Router in compute to populate router. + 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 + routerSelector: + description: Selector for a Router in compute to populate router. + 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 AN ALPHA FIELD. Do not use it in production. + It is not honored unless the relevant Crossplane feature flag is + enabled, and may be changed or removed without notice. 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: + advertiseMode: + description: 'User-specified flag to indicate which mode to use + for advertisement. Valid values of this enum field are: DEFAULT, + CUSTOM Default value is DEFAULT. Possible values are: DEFAULT, + CUSTOM.' + type: string + advertisedGroups: + description: 'User-specified list of prefix groups to advertise + in custom mode, which can take one of the following options:' + items: + type: string + type: array + advertisedIpRanges: + description: User-specified list of individual IP ranges to advertise + in custom mode. This field can only be populated if advertiseMode + is CUSTOM and is advertised to all peers of the router. These + IP ranges will be advertised in addition to any specified groups. + Leave this field blank to advertise no custom IP ranges. Structure + is documented below. + items: + properties: + description: + description: User-specified description for the IP range. + type: string + range: + description: The IP range to advertise. The value must be + a CIDR-formatted string. + type: string + type: object + type: array + advertisedRoutePriority: + description: The priority of routes advertised to this BGP peer. + Where there is more than one matching route of maximum length, + the routes with the lowest priority value win. + type: number + bfd: + description: BFD configuration for the BGP peering. Structure + is documented below. + items: + properties: + minReceiveInterval: + description: The minimum interval, in milliseconds, between + BFD control packets received from the peer router. The + actual value is negotiated between the two routers and + is equal to the greater of this value and the transmit + interval of the other router. If set, this value must + be between 1000 and 30000. + type: number + minTransmitInterval: + description: The minimum interval, in milliseconds, between + BFD control packets transmitted to the peer router. The + actual value is negotiated between the two routers and + is equal to the greater of this value and the corresponding + receive interval of the other router. If set, this value + must be between 1000 and 30000. + type: number + multiplier: + description: The number of consecutive BFD packets that + must be missed before BFD declares that a peer is unavailable. + If set, the value must be a value between 5 and 16. + type: number + sessionInitializationMode: + description: 'The BFD session initialization mode for this + BGP peer. If set to ACTIVE, the Cloud Router will initiate + the BFD session for this BGP peer. If set to PASSIVE, + the Cloud Router will wait for the peer router to initiate + the BFD session for this BGP peer. If set to DISABLED, + BFD is disabled for this BGP peer. Possible values are: + ACTIVE, DISABLED, PASSIVE.' + type: string + type: object + type: array + enable: + description: The status of the BGP peer connection. If set to + false, any active session with the peer is terminated and all + associated routing information is removed. If set to true, the + peer connection can be established with routing information. + The default is true. + type: boolean + enableIpv6: + description: Enable IPv6 traffic over BGP Peer. If not specified, + it is disabled by default. + type: boolean + ipAddress: + description: IP address of the interface inside Google Cloud Platform. + Only IPv4 is supported. + type: string + ipv6NexthopAddress: + description: IPv6 address of the interface inside Google Cloud + Platform. The address must be in the range 2600:2d00:0:2::/64 + or 2600:2d00:0:3::/64. If you do not specify the next hop addresses, + Google Cloud automatically assigns unused addresses from the + 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64 range for you. + type: string + peerAsn: + description: Peer BGP Autonomous System Number (ASN). Each BGP + interface may use a different value. + type: number + peerIpv6NexthopAddress: + description: IPv6 address of the BGP interface outside Google + Cloud Platform. The address must be in the range 2600:2d00:0:2::/64 + or 2600:2d00:0:3::/64. If you do not specify the next hop addresses, + Google Cloud automatically assigns unused addresses from the + 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64 range for you. + type: string + project: + description: The ID of the project in which the resource belongs. + If it is not provided, the provider project is used. + type: string + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS AN ALPHA FIELD. Do not use it in production. + It is not honored unless the relevant Crossplane feature flag is + enabled, and may be changed or removed without notice. 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 + providerRef: + description: 'ProviderReference specifies the provider that will be + used to create, observe, update, and delete this managed resource. + Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + 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: peerAsn is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.peerAsn) + || has(self.initProvider.peerAsn)' + status: + description: RouterPeerStatus defines the observed state of RouterPeer. + properties: + atProvider: + properties: + advertiseMode: + description: 'User-specified flag to indicate which mode to use + for advertisement. Valid values of this enum field are: DEFAULT, + CUSTOM Default value is DEFAULT. Possible values are: DEFAULT, + CUSTOM.' + type: string + advertisedGroups: + description: 'User-specified list of prefix groups to advertise + in custom mode, which can take one of the following options:' + items: + type: string + type: array + advertisedIpRanges: + description: User-specified list of individual IP ranges to advertise + in custom mode. This field can only be populated if advertiseMode + is CUSTOM and is advertised to all peers of the router. These + IP ranges will be advertised in addition to any specified groups. + Leave this field blank to advertise no custom IP ranges. Structure + is documented below. + items: + properties: + description: + description: User-specified description for the IP range. + type: string + range: + description: The IP range to advertise. The value must be + a CIDR-formatted string. + type: string + type: object + type: array + advertisedRoutePriority: + description: The priority of routes advertised to this BGP peer. + Where there is more than one matching route of maximum length, + the routes with the lowest priority value win. + type: number + bfd: + description: BFD configuration for the BGP peering. Structure + is documented below. + items: + properties: + minReceiveInterval: + description: The minimum interval, in milliseconds, between + BFD control packets received from the peer router. The + actual value is negotiated between the two routers and + is equal to the greater of this value and the transmit + interval of the other router. If set, this value must + be between 1000 and 30000. + type: number + minTransmitInterval: + description: The minimum interval, in milliseconds, between + BFD control packets transmitted to the peer router. The + actual value is negotiated between the two routers and + is equal to the greater of this value and the corresponding + receive interval of the other router. If set, this value + must be between 1000 and 30000. + type: number + multiplier: + description: The number of consecutive BFD packets that + must be missed before BFD declares that a peer is unavailable. + If set, the value must be a value between 5 and 16. + type: number + sessionInitializationMode: + description: 'The BFD session initialization mode for this + BGP peer. If set to ACTIVE, the Cloud Router will initiate + the BFD session for this BGP peer. If set to PASSIVE, + the Cloud Router will wait for the peer router to initiate + the BFD session for this BGP peer. If set to DISABLED, + BFD is disabled for this BGP peer. Possible values are: + ACTIVE, DISABLED, PASSIVE.' + type: string + type: object + type: array + enable: + description: The status of the BGP peer connection. If set to + false, any active session with the peer is terminated and all + associated routing information is removed. If set to true, the + peer connection can be established with routing information. + The default is true. + type: boolean + enableIpv6: + description: Enable IPv6 traffic over BGP Peer. If not specified, + it is disabled by default. + type: boolean + id: + description: an identifier for the resource with format projects/{{project}}/regions/{{region}}/routers/{{router}}/{{name}} + type: string + interface: + description: Name of the interface the BGP peer is associated + with. + type: string + ipAddress: + description: IP address of the interface inside Google Cloud Platform. + Only IPv4 is supported. + type: string + ipv6NexthopAddress: + description: IPv6 address of the interface inside Google Cloud + Platform. The address must be in the range 2600:2d00:0:2::/64 + or 2600:2d00:0:3::/64. If you do not specify the next hop addresses, + Google Cloud automatically assigns unused addresses from the + 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64 range for you. + type: string + managementType: + description: The resource that configures and manages this BGP + peer. + type: string + peerAsn: + description: Peer BGP Autonomous System Number (ASN). Each BGP + interface may use a different value. + type: number + peerIpAddress: + description: IP address of the BGP interface outside Google Cloud + Platform. Only IPv4 is supported. + type: string + peerIpv6NexthopAddress: + description: IPv6 address of the BGP interface outside Google + Cloud Platform. The address must be in the range 2600:2d00:0:2::/64 + or 2600:2d00:0:3::/64. If you do not specify the next hop addresses, + Google Cloud automatically assigns unused addresses from the + 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64 range for you. + type: string + project: + description: The ID of the project in which the resource belongs. + If it is not provided, the provider project is used. + type: string + region: + description: Region where the router and BgpPeer reside. If it + is not provided, the provider region is used. + type: string + router: + description: The name of the Cloud Router in which this BgpPeer + will be configured. + type: string + routerApplianceInstance: + description: The URI of the VM instance that is used as third-party + router appliances such as Next Gen Firewalls, Virtual Routers, + or Router Appliances. The VM instance must be located in zones + contained in the same region as this Cloud Router. The VM instance + is the peer side of the BGP session. + 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 + 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 + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {}