From 5456d7c5eed1de2e81885ea72798ed79b5baff42 Mon Sep 17 00:00:00 2001 From: MyzaTaras Date: Tue, 17 Jan 2023 11:48:52 +0200 Subject: [PATCH] Moving datacatalog (2) resources to v1beta1 version --- .../v1beta1/zz_generated.deepcopy.go | 605 ++++++++++++++++++ .../v1beta1/zz_generated.managed.go | 132 ++++ .../v1beta1/zz_generated.managedlist.go | 18 + .../v1beta1/zz_generated.resolvers.go | 42 ++ .../v1beta1/zz_generated_terraformed.go | 148 +++++ apis/datacatalog/v1beta1/zz_tag_types.go | 182 ++++++ .../v1beta1/zz_tagtemplate_types.go | 193 ++++++ config/externalname.go | 4 + config/externalnamenottested.go | 4 - examples-generated/datacatalog/tag.yaml | 89 +++ .../datacatalog/tagtemplate.yaml | 34 + examples/datacatalog/tag.yaml | 87 +++ examples/datacatalog/tagtemplate.yaml | 31 + .../datacatalog/tag/zz_controller.go | 63 ++ .../datacatalog/tagtemplate/zz_controller.go | 64 ++ internal/controller/zz_setup.go | 4 + .../crds/datacatalog.gcp.upbound.io_tags.yaml | 525 +++++++++++++++ ...tacatalog.gcp.upbound.io_tagtemplates.yaml | 403 ++++++++++++ 18 files changed, 2624 insertions(+), 4 deletions(-) create mode 100755 apis/datacatalog/v1beta1/zz_tag_types.go create mode 100755 apis/datacatalog/v1beta1/zz_tagtemplate_types.go create mode 100644 examples-generated/datacatalog/tag.yaml create mode 100644 examples-generated/datacatalog/tagtemplate.yaml create mode 100644 examples/datacatalog/tag.yaml create mode 100644 examples/datacatalog/tagtemplate.yaml create mode 100755 internal/controller/datacatalog/tag/zz_controller.go create mode 100755 internal/controller/datacatalog/tagtemplate/zz_controller.go create mode 100644 package/crds/datacatalog.gcp.upbound.io_tags.yaml create mode 100644 package/crds/datacatalog.gcp.upbound.io_tagtemplates.yaml diff --git a/apis/datacatalog/v1beta1/zz_generated.deepcopy.go b/apis/datacatalog/v1beta1/zz_generated.deepcopy.go index 2d78a87f3..e0d0ac762 100644 --- a/apis/datacatalog/v1beta1/zz_generated.deepcopy.go +++ b/apis/datacatalog/v1beta1/zz_generated.deepcopy.go @@ -26,6 +26,41 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AllowedValuesObservation) DeepCopyInto(out *AllowedValuesObservation) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllowedValuesObservation. +func (in *AllowedValuesObservation) DeepCopy() *AllowedValuesObservation { + if in == nil { + return nil + } + out := new(AllowedValuesObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AllowedValuesParameters) DeepCopyInto(out *AllowedValuesParameters) { + *out = *in + if in.DisplayName != nil { + in, out := &in.DisplayName, &out.DisplayName + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllowedValuesParameters. +func (in *AllowedValuesParameters) DeepCopy() *AllowedValuesParameters { + if in == nil { + return nil + } + out := new(AllowedValuesParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *BigqueryDateShardedSpecObservation) DeepCopyInto(out *BigqueryDateShardedSpecObservation) { *out = *in @@ -499,6 +534,113 @@ func (in *EntryStatus) DeepCopy() *EntryStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnumTypeObservation) DeepCopyInto(out *EnumTypeObservation) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnumTypeObservation. +func (in *EnumTypeObservation) DeepCopy() *EnumTypeObservation { + if in == nil { + return nil + } + out := new(EnumTypeObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnumTypeParameters) DeepCopyInto(out *EnumTypeParameters) { + *out = *in + if in.AllowedValues != nil { + in, out := &in.AllowedValues, &out.AllowedValues + *out = make([]AllowedValuesParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnumTypeParameters. +func (in *EnumTypeParameters) DeepCopy() *EnumTypeParameters { + if in == nil { + return nil + } + out := new(EnumTypeParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FieldsObservation) DeepCopyInto(out *FieldsObservation) { + *out = *in + if in.DisplayName != nil { + in, out := &in.DisplayName, &out.DisplayName + *out = new(string) + **out = **in + } + if in.Order != nil { + in, out := &in.Order, &out.Order + *out = new(float64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FieldsObservation. +func (in *FieldsObservation) DeepCopy() *FieldsObservation { + if in == nil { + return nil + } + out := new(FieldsObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FieldsParameters) DeepCopyInto(out *FieldsParameters) { + *out = *in + if in.BoolValue != nil { + in, out := &in.BoolValue, &out.BoolValue + *out = new(bool) + **out = **in + } + if in.DoubleValue != nil { + in, out := &in.DoubleValue, &out.DoubleValue + *out = new(float64) + **out = **in + } + if in.EnumValue != nil { + in, out := &in.EnumValue, &out.EnumValue + *out = new(string) + **out = **in + } + if in.FieldName != nil { + in, out := &in.FieldName, &out.FieldName + *out = new(string) + **out = **in + } + if in.StringValue != nil { + in, out := &in.StringValue, &out.StringValue + *out = new(string) + **out = **in + } + if in.TimestampValue != nil { + in, out := &in.TimestampValue, &out.TimestampValue + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FieldsParameters. +func (in *FieldsParameters) DeepCopy() *FieldsParameters { + if in == nil { + return nil + } + out := new(FieldsParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GcsFilesetSpecObservation) DeepCopyInto(out *GcsFilesetSpecObservation) { *out = *in @@ -622,6 +764,469 @@ func (in *TableSpecParameters) DeepCopy() *TableSpecParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Tag) DeepCopyInto(out *Tag) { + *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 Tag. +func (in *Tag) DeepCopy() *Tag { + if in == nil { + return nil + } + out := new(Tag) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Tag) 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 *TagList) DeepCopyInto(out *TagList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Tag, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagList. +func (in *TagList) DeepCopy() *TagList { + if in == nil { + return nil + } + out := new(TagList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TagList) 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 *TagObservation) DeepCopyInto(out *TagObservation) { + *out = *in + if in.Fields != nil { + in, out := &in.Fields, &out.Fields + *out = make([]FieldsObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.TemplateDisplayname != nil { + in, out := &in.TemplateDisplayname, &out.TemplateDisplayname + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagObservation. +func (in *TagObservation) DeepCopy() *TagObservation { + if in == nil { + return nil + } + out := new(TagObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TagParameters) DeepCopyInto(out *TagParameters) { + *out = *in + if in.Column != nil { + in, out := &in.Column, &out.Column + *out = new(string) + **out = **in + } + if in.Fields != nil { + in, out := &in.Fields, &out.Fields + *out = make([]FieldsParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Parent != nil { + in, out := &in.Parent, &out.Parent + *out = new(string) + **out = **in + } + if in.ParentRef != nil { + in, out := &in.ParentRef, &out.ParentRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.ParentSelector != nil { + in, out := &in.ParentSelector, &out.ParentSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.Template != nil { + in, out := &in.Template, &out.Template + *out = new(string) + **out = **in + } + if in.TemplateRef != nil { + in, out := &in.TemplateRef, &out.TemplateRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.TemplateSelector != nil { + in, out := &in.TemplateSelector, &out.TemplateSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagParameters. +func (in *TagParameters) DeepCopy() *TagParameters { + if in == nil { + return nil + } + out := new(TagParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TagSpec) DeepCopyInto(out *TagSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagSpec. +func (in *TagSpec) DeepCopy() *TagSpec { + if in == nil { + return nil + } + out := new(TagSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TagStatus) DeepCopyInto(out *TagStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagStatus. +func (in *TagStatus) DeepCopy() *TagStatus { + if in == nil { + return nil + } + out := new(TagStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TagTemplate) DeepCopyInto(out *TagTemplate) { + *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 TagTemplate. +func (in *TagTemplate) DeepCopy() *TagTemplate { + if in == nil { + return nil + } + out := new(TagTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TagTemplate) 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 *TagTemplateFieldsObservation) DeepCopyInto(out *TagTemplateFieldsObservation) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagTemplateFieldsObservation. +func (in *TagTemplateFieldsObservation) DeepCopy() *TagTemplateFieldsObservation { + if in == nil { + return nil + } + out := new(TagTemplateFieldsObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TagTemplateFieldsParameters) DeepCopyInto(out *TagTemplateFieldsParameters) { + *out = *in + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.DisplayName != nil { + in, out := &in.DisplayName, &out.DisplayName + *out = new(string) + **out = **in + } + if in.FieldID != nil { + in, out := &in.FieldID, &out.FieldID + *out = new(string) + **out = **in + } + if in.IsRequired != nil { + in, out := &in.IsRequired, &out.IsRequired + *out = new(bool) + **out = **in + } + if in.Order != nil { + in, out := &in.Order, &out.Order + *out = new(float64) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = make([]TypeParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagTemplateFieldsParameters. +func (in *TagTemplateFieldsParameters) DeepCopy() *TagTemplateFieldsParameters { + if in == nil { + return nil + } + out := new(TagTemplateFieldsParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TagTemplateList) DeepCopyInto(out *TagTemplateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TagTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagTemplateList. +func (in *TagTemplateList) DeepCopy() *TagTemplateList { + if in == nil { + return nil + } + out := new(TagTemplateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TagTemplateList) 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 *TagTemplateObservation) DeepCopyInto(out *TagTemplateObservation) { + *out = *in + if in.Fields != nil { + in, out := &in.Fields, &out.Fields + *out = make([]TagTemplateFieldsObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagTemplateObservation. +func (in *TagTemplateObservation) DeepCopy() *TagTemplateObservation { + if in == nil { + return nil + } + out := new(TagTemplateObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TagTemplateParameters) DeepCopyInto(out *TagTemplateParameters) { + *out = *in + if in.DisplayName != nil { + in, out := &in.DisplayName, &out.DisplayName + *out = new(string) + **out = **in + } + if in.Fields != nil { + in, out := &in.Fields, &out.Fields + *out = make([]TagTemplateFieldsParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ForceDelete != nil { + in, out := &in.ForceDelete, &out.ForceDelete + *out = new(bool) + **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 + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagTemplateParameters. +func (in *TagTemplateParameters) DeepCopy() *TagTemplateParameters { + if in == nil { + return nil + } + out := new(TagTemplateParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TagTemplateSpec) DeepCopyInto(out *TagTemplateSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagTemplateSpec. +func (in *TagTemplateSpec) DeepCopy() *TagTemplateSpec { + if in == nil { + return nil + } + out := new(TagTemplateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TagTemplateStatus) DeepCopyInto(out *TagTemplateStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagTemplateStatus. +func (in *TagTemplateStatus) DeepCopy() *TagTemplateStatus { + if in == nil { + return nil + } + out := new(TagTemplateStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TypeObservation) DeepCopyInto(out *TypeObservation) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TypeObservation. +func (in *TypeObservation) DeepCopy() *TypeObservation { + if in == nil { + return nil + } + out := new(TypeObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TypeParameters) DeepCopyInto(out *TypeParameters) { + *out = *in + if in.EnumType != nil { + in, out := &in.EnumType, &out.EnumType + *out = make([]EnumTypeParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.PrimitiveType != nil { + in, out := &in.PrimitiveType, &out.PrimitiveType + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TypeParameters. +func (in *TypeParameters) DeepCopy() *TypeParameters { + if in == nil { + return nil + } + out := new(TypeParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ViewSpecObservation) DeepCopyInto(out *ViewSpecObservation) { *out = *in diff --git a/apis/datacatalog/v1beta1/zz_generated.managed.go b/apis/datacatalog/v1beta1/zz_generated.managed.go index 6c8557140..f4b73bf7a 100644 --- a/apis/datacatalog/v1beta1/zz_generated.managed.go +++ b/apis/datacatalog/v1beta1/zz_generated.managed.go @@ -150,3 +150,135 @@ func (mg *EntryGroup) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDet func (mg *EntryGroup) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { mg.Spec.WriteConnectionSecretToReference = r } + +// GetCondition of this Tag. +func (mg *Tag) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this Tag. +func (mg *Tag) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetProviderConfigReference of this Tag. +func (mg *Tag) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +/* +GetProviderReference of this Tag. +Deprecated: Use GetProviderConfigReference. +*/ +func (mg *Tag) GetProviderReference() *xpv1.Reference { + return mg.Spec.ProviderReference +} + +// GetPublishConnectionDetailsTo of this Tag. +func (mg *Tag) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this Tag. +func (mg *Tag) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this Tag. +func (mg *Tag) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this Tag. +func (mg *Tag) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetProviderConfigReference of this Tag. +func (mg *Tag) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +/* +SetProviderReference of this Tag. +Deprecated: Use SetProviderConfigReference. +*/ +func (mg *Tag) SetProviderReference(r *xpv1.Reference) { + mg.Spec.ProviderReference = r +} + +// SetPublishConnectionDetailsTo of this Tag. +func (mg *Tag) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this Tag. +func (mg *Tag) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} + +// GetCondition of this TagTemplate. +func (mg *TagTemplate) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this TagTemplate. +func (mg *TagTemplate) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetProviderConfigReference of this TagTemplate. +func (mg *TagTemplate) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +/* +GetProviderReference of this TagTemplate. +Deprecated: Use GetProviderConfigReference. +*/ +func (mg *TagTemplate) GetProviderReference() *xpv1.Reference { + return mg.Spec.ProviderReference +} + +// GetPublishConnectionDetailsTo of this TagTemplate. +func (mg *TagTemplate) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this TagTemplate. +func (mg *TagTemplate) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this TagTemplate. +func (mg *TagTemplate) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this TagTemplate. +func (mg *TagTemplate) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetProviderConfigReference of this TagTemplate. +func (mg *TagTemplate) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +/* +SetProviderReference of this TagTemplate. +Deprecated: Use SetProviderConfigReference. +*/ +func (mg *TagTemplate) SetProviderReference(r *xpv1.Reference) { + mg.Spec.ProviderReference = r +} + +// SetPublishConnectionDetailsTo of this TagTemplate. +func (mg *TagTemplate) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this TagTemplate. +func (mg *TagTemplate) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} diff --git a/apis/datacatalog/v1beta1/zz_generated.managedlist.go b/apis/datacatalog/v1beta1/zz_generated.managedlist.go index 50ce425d8..719ea026c 100644 --- a/apis/datacatalog/v1beta1/zz_generated.managedlist.go +++ b/apis/datacatalog/v1beta1/zz_generated.managedlist.go @@ -36,3 +36,21 @@ func (l *EntryList) GetItems() []resource.Managed { } return items } + +// GetItems of this TagList. +func (l *TagList) 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 TagTemplateList. +func (l *TagTemplateList) GetItems() []resource.Managed { + items := make([]resource.Managed, len(l.Items)) + for i := range l.Items { + items[i] = &l.Items[i] + } + return items +} diff --git a/apis/datacatalog/v1beta1/zz_generated.resolvers.go b/apis/datacatalog/v1beta1/zz_generated.resolvers.go index 3cba3ea5a..cfd6ceb75 100644 --- a/apis/datacatalog/v1beta1/zz_generated.resolvers.go +++ b/apis/datacatalog/v1beta1/zz_generated.resolvers.go @@ -50,3 +50,45 @@ func (mg *Entry) ResolveReferences(ctx context.Context, c client.Reader) error { return nil } + +// ResolveReferences of this Tag. +func (mg *Tag) 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.Parent), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.ForProvider.ParentRef, + Selector: mg.Spec.ForProvider.ParentSelector, + To: reference.To{ + List: &EntryList{}, + Managed: &Entry{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.Parent") + } + mg.Spec.ForProvider.Parent = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.ParentRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Template), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.ForProvider.TemplateRef, + Selector: mg.Spec.ForProvider.TemplateSelector, + To: reference.To{ + List: &TagTemplateList{}, + Managed: &TagTemplate{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.Template") + } + mg.Spec.ForProvider.Template = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.TemplateRef = rsp.ResolvedReference + + return nil +} diff --git a/apis/datacatalog/v1beta1/zz_generated_terraformed.go b/apis/datacatalog/v1beta1/zz_generated_terraformed.go index 51ed92040..4609c4cde 100755 --- a/apis/datacatalog/v1beta1/zz_generated_terraformed.go +++ b/apis/datacatalog/v1beta1/zz_generated_terraformed.go @@ -172,3 +172,151 @@ func (tr *EntryGroup) LateInitialize(attrs []byte) (bool, error) { func (tr *EntryGroup) GetTerraformSchemaVersion() int { return 0 } + +// GetTerraformResourceType returns Terraform resource type for this Tag +func (mg *Tag) GetTerraformResourceType() string { + return "google_data_catalog_tag" +} + +// GetConnectionDetailsMapping for this Tag +func (tr *Tag) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this Tag +func (tr *Tag) 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 Tag +func (tr *Tag) 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 Tag +func (tr *Tag) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this Tag +func (tr *Tag) 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 Tag +func (tr *Tag) 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) +} + +// LateInitialize this Tag using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *Tag) LateInitialize(attrs []byte) (bool, error) { + params := &TagParameters{} + 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 *Tag) GetTerraformSchemaVersion() int { + return 0 +} + +// GetTerraformResourceType returns Terraform resource type for this TagTemplate +func (mg *TagTemplate) GetTerraformResourceType() string { + return "google_data_catalog_tag_template" +} + +// GetConnectionDetailsMapping for this TagTemplate +func (tr *TagTemplate) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this TagTemplate +func (tr *TagTemplate) 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 TagTemplate +func (tr *TagTemplate) 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 TagTemplate +func (tr *TagTemplate) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this TagTemplate +func (tr *TagTemplate) 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 TagTemplate +func (tr *TagTemplate) 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) +} + +// LateInitialize this TagTemplate using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *TagTemplate) LateInitialize(attrs []byte) (bool, error) { + params := &TagTemplateParameters{} + 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 *TagTemplate) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/datacatalog/v1beta1/zz_tag_types.go b/apis/datacatalog/v1beta1/zz_tag_types.go new file mode 100755 index 000000000..2e3659609 --- /dev/null +++ b/apis/datacatalog/v1beta1/zz_tag_types.go @@ -0,0 +1,182 @@ +/* +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 FieldsObservation struct { + + // The display name of this field + DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"` + + // The order of this field with respect to other fields in this tag. For example, a higher value can indicate + // a more important field. The value can be negative. Multiple fields can have the same order, and field orders + // within a tag do not have to be sequential. + Order *float64 `json:"order,omitempty" tf:"order,omitempty"` +} + +type FieldsParameters struct { + + // Holds the value for a tag field with boolean type. + // +kubebuilder:validation:Optional + BoolValue *bool `json:"boolValue,omitempty" tf:"bool_value,omitempty"` + + // Holds the value for a tag field with double type. + // +kubebuilder:validation:Optional + DoubleValue *float64 `json:"doubleValue,omitempty" tf:"double_value,omitempty"` + + // Holds the value for a tag field with enum type. This value must be one of the allowed values in the definition of this enum. + // Structure is documented below. + // +kubebuilder:validation:Optional + EnumValue *string `json:"enumValue,omitempty" tf:"enum_value,omitempty"` + + // The identifier for this object. Format specified above. + // +kubebuilder:validation:Required + FieldName *string `json:"fieldName" tf:"field_name,omitempty"` + + // Holds the value for a tag field with string type. + // +kubebuilder:validation:Optional + StringValue *string `json:"stringValue,omitempty" tf:"string_value,omitempty"` + + // Holds the value for a tag field with timestamp type. + // +kubebuilder:validation:Optional + TimestampValue *string `json:"timestampValue,omitempty" tf:"timestamp_value,omitempty"` +} + +type TagObservation struct { + + // This maps the ID of a tag field to the value of and additional information about that field. + // Valid field IDs are defined by the tag's template. A tag must have at least 1 field and at most 500 fields. + // Structure is documented below. + // +kubebuilder:validation:Required + Fields []FieldsObservation `json:"fields,omitempty" tf:"fields,omitempty"` + + // an identifier for the resource with format {{name}} + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // The resource name of the tag in URL format. Example: + // projects/{project_id}/locations/{location}/entrygroups/{entryGroupId}/entries/{entryId}/tags/{tag_id} or + // projects/{project_id}/locations/{location}/entrygroups/{entryGroupId}/tags/{tag_id} + // where tag_id is a system-generated identifier. Note that this Tag may not actually be stored in the location in this name. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // The display name of the tag template. + TemplateDisplayname *string `json:"templateDisplayname,omitempty" tf:"template_displayname,omitempty"` +} + +type TagParameters struct { + + // Resources like Entry can have schemas associated with them. This scope allows users to attach tags to an + // individual column based on that schema. + // For attaching a tag to a nested column, use . to separate the column names. Example: + // outer_column.inner_column + // +kubebuilder:validation:Optional + Column *string `json:"column,omitempty" tf:"column,omitempty"` + + // This maps the ID of a tag field to the value of and additional information about that field. + // Valid field IDs are defined by the tag's template. A tag must have at least 1 field and at most 500 fields. + // Structure is documented below. + // +kubebuilder:validation:Required + Fields []FieldsParameters `json:"fields" tf:"fields,omitempty"` + + // The name of the parent this tag is attached to. This can be the name of an entry or an entry group. If an entry group, the tag will be attached to + // all entries in that group. + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/datacatalog/v1beta1.Entry + // +crossplane:generate:reference:extractor=github.com/upbound/upjet/pkg/resource.ExtractResourceID() + // +kubebuilder:validation:Optional + Parent *string `json:"parent,omitempty" tf:"parent,omitempty"` + + // Reference to a Entry in datacatalog to populate parent. + // +kubebuilder:validation:Optional + ParentRef *v1.Reference `json:"parentRef,omitempty" tf:"-"` + + // Selector for a Entry in datacatalog to populate parent. + // +kubebuilder:validation:Optional + ParentSelector *v1.Selector `json:"parentSelector,omitempty" tf:"-"` + + // The resource name of the tag template that this tag uses. Example: + // projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId} + // This field cannot be modified after creation. + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/datacatalog/v1beta1.TagTemplate + // +crossplane:generate:reference:extractor=github.com/upbound/upjet/pkg/resource.ExtractResourceID() + // +kubebuilder:validation:Optional + Template *string `json:"template,omitempty" tf:"template,omitempty"` + + // Reference to a TagTemplate in datacatalog to populate template. + // +kubebuilder:validation:Optional + TemplateRef *v1.Reference `json:"templateRef,omitempty" tf:"-"` + + // Selector for a TagTemplate in datacatalog to populate template. + // +kubebuilder:validation:Optional + TemplateSelector *v1.Selector `json:"templateSelector,omitempty" tf:"-"` +} + +// TagSpec defines the desired state of Tag +type TagSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider TagParameters `json:"forProvider"` +} + +// TagStatus defines the observed state of Tag. +type TagStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider TagObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true + +// Tag is the Schema for the Tags API. Tags are used to attach custom metadata to Data Catalog resources. +// +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 Tag struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec TagSpec `json:"spec"` + Status TagStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// TagList contains a list of Tags +type TagList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Tag `json:"items"` +} + +// Repository type metadata. +var ( + Tag_Kind = "Tag" + Tag_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: Tag_Kind}.String() + Tag_KindAPIVersion = Tag_Kind + "." + CRDGroupVersion.String() + Tag_GroupVersionKind = CRDGroupVersion.WithKind(Tag_Kind) +) + +func init() { + SchemeBuilder.Register(&Tag{}, &TagList{}) +} diff --git a/apis/datacatalog/v1beta1/zz_tagtemplate_types.go b/apis/datacatalog/v1beta1/zz_tagtemplate_types.go new file mode 100755 index 000000000..dca7e58d3 --- /dev/null +++ b/apis/datacatalog/v1beta1/zz_tagtemplate_types.go @@ -0,0 +1,193 @@ +/* +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 AllowedValuesObservation struct { +} + +type AllowedValuesParameters struct { + + // The display name for this field. + // +kubebuilder:validation:Required + DisplayName *string `json:"displayName" tf:"display_name,omitempty"` +} + +type EnumTypeObservation struct { +} + +type EnumTypeParameters struct { + + // The set of allowed values for this enum. The display names of the + // values must be case-insensitively unique within this set. Currently, + // enum values can only be added to the list of allowed values. Deletion + // and renaming of enum values are not supported. + // Can have up to 500 allowed values. + // Structure is documented below. + // +kubebuilder:validation:Required + AllowedValues []AllowedValuesParameters `json:"allowedValues" tf:"allowed_values,omitempty"` +} + +type TagTemplateFieldsObservation struct { + + // The resource name of the tag template field in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}/fields/{field} + Name *string `json:"name,omitempty" tf:"name,omitempty"` +} + +type TagTemplateFieldsParameters struct { + + // A description for this field. + // +kubebuilder:validation:Optional + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // The display name for this field. + // +kubebuilder:validation:Optional + DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"` + + // The identifier for this object. Format specified above. + // +kubebuilder:validation:Required + FieldID *string `json:"fieldId" tf:"field_id,omitempty"` + + // Whether this is a required field. Defaults to false. + // +kubebuilder:validation:Optional + IsRequired *bool `json:"isRequired,omitempty" tf:"is_required,omitempty"` + + // The order of this field with respect to other fields in this tag template. + // A higher value indicates a more important field. The value can be negative. + // Multiple fields can have the same order, and field orders within a tag do not have to be sequential. + // +kubebuilder:validation:Optional + Order *float64 `json:"order,omitempty" tf:"order,omitempty"` + + // The type of value this tag field can contain. + // Structure is documented below. + // +kubebuilder:validation:Required + Type []TypeParameters `json:"type" tf:"type,omitempty"` +} + +type TagTemplateObservation struct { + + // Set of tag template field IDs and the settings for the field. This set is an exhaustive list of the allowed fields. This set must contain at least one field and at most 500 fields. + // Structure is documented below. + // +kubebuilder:validation:Required + Fields []TagTemplateFieldsObservation `json:"fields,omitempty" tf:"fields,omitempty"` + + // an identifier for the resource with format {{name}} + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // The resource name of the tag template in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId} + Name *string `json:"name,omitempty" tf:"name,omitempty"` +} + +type TagTemplateParameters struct { + + // The display name for this field. + // +kubebuilder:validation:Optional + DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"` + + // Set of tag template field IDs and the settings for the field. This set is an exhaustive list of the allowed fields. This set must contain at least one field and at most 500 fields. + // Structure is documented below. + // +kubebuilder:validation:Required + Fields []TagTemplateFieldsParameters `json:"fields" tf:"fields,omitempty"` + + // This confirms the deletion of any possible tags using this template. Must be set to true in order to delete the tag template. + // +kubebuilder:validation:Optional + ForceDelete *bool `json:"forceDelete,omitempty" tf:"force_delete,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"` + + // Template location region. + // +kubebuilder:validation:Optional + Region *string `json:"region,omitempty" tf:"region,omitempty"` +} + +type TypeObservation struct { +} + +type TypeParameters struct { + + // Represents an enum type. + // Exactly one of primitive_type or enum_type must be set + // Structure is documented below. + // +kubebuilder:validation:Optional + EnumType []EnumTypeParameters `json:"enumType,omitempty" tf:"enum_type,omitempty"` + + // Represents primitive types - string, bool etc. + // Exactly one of primitive_type or enum_type must be set + // Possible values are DOUBLE, STRING, BOOL, and TIMESTAMP. + // +kubebuilder:validation:Optional + PrimitiveType *string `json:"primitiveType,omitempty" tf:"primitive_type,omitempty"` +} + +// TagTemplateSpec defines the desired state of TagTemplate +type TagTemplateSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider TagTemplateParameters `json:"forProvider"` +} + +// TagTemplateStatus defines the observed state of TagTemplate. +type TagTemplateStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider TagTemplateObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true + +// TagTemplate is the Schema for the TagTemplates API. A tag template defines a tag, which can have one or more typed fields. +// +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 TagTemplate struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec TagTemplateSpec `json:"spec"` + Status TagTemplateStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// TagTemplateList contains a list of TagTemplates +type TagTemplateList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []TagTemplate `json:"items"` +} + +// Repository type metadata. +var ( + TagTemplate_Kind = "TagTemplate" + TagTemplate_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: TagTemplate_Kind}.String() + TagTemplate_KindAPIVersion = TagTemplate_Kind + "." + CRDGroupVersion.String() + TagTemplate_GroupVersionKind = CRDGroupVersion.WithKind(TagTemplate_Kind) +) + +func init() { + SchemeBuilder.Register(&TagTemplate{}, &TagTemplateList{}) +} diff --git a/config/externalname.go b/config/externalname.go index 781635f38..ce847822b 100644 --- a/config/externalname.go +++ b/config/externalname.go @@ -295,6 +295,10 @@ var externalNameConfigs = map[string]config.ExternalName{ "google_data_catalog_entry": config.IdentifierFromProvider, // Imported by using the following format: {{name}} "google_data_catalog_entry_group": config.IdentifierFromProvider, + // {{name}}: projects/{project_id}/locations/{location}/entrygroups/{entryGroupId}/tags/{tag_id} where tag_id is a system-generated identifier + "google_data_catalog_tag": config.IdentifierFromProvider, + // {{name}}: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId} + "google_data_catalog_tag_template": config.TemplatedStringAsIdentifier("tag_template_id", "projects/{{ .setup.configuration.project }}/locations/{{ .parameters.region }}/tagTemplates/{{ .external_name }}"), // dialogflow // diff --git a/config/externalnamenottested.go b/config/externalnamenottested.go index 5d58aa961..a31f759b8 100644 --- a/config/externalnamenottested.go +++ b/config/externalnamenottested.go @@ -90,10 +90,6 @@ var ExternalNameNotTestedConfigs = map[string]config.ExternalName{ "google_data_catalog_entry_group_iam_member": config.IdentifierFromProvider, // projects/{{project}}/locations/{{region}}/entryGroups/{{entry_group}} "google_data_catalog_entry_group_iam_policy": config.IdentifierFromProvider, - // {{name}}: projects/{project_id}/locations/{location}/entrygroups/{entryGroupId}/tags/{tag_id} where tag_id is a system-generated identifier - "google_data_catalog_tag": config.IdentifierFromProvider, - // {{name}}: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId} - "google_data_catalog_tag_template": config.TemplatedStringAsIdentifier("tag_template_id", "projects/{{ .setup.configuration.project }}/locations/{{ .parameters.region }}/tagTemplates/{{ .external_name }}"), // projects/{{project}}/locations/{{region}}/tagTemplates/{{tag_template}} roles/viewer "google_data_catalog_tag_template_iam_binding": config.IdentifierFromProvider, // projects/{{project}}/locations/{{region}}/tagTemplates/{{tag_template}} roles/viewer user:jane@example.com diff --git a/examples-generated/datacatalog/tag.yaml b/examples-generated/datacatalog/tag.yaml new file mode 100644 index 000000000..432437c7f --- /dev/null +++ b/examples-generated/datacatalog/tag.yaml @@ -0,0 +1,89 @@ +apiVersion: datacatalog.gcp.upbound.io/v1beta1 +kind: Tag +metadata: + annotations: + meta.upbound.io/example-id: datacatalog/v1beta1/tag + labels: + testing.upbound.io/example-name: basic_tag + name: basic-tag +spec: + forProvider: + fields: + - fieldName: source + stringValue: my-string + parentSelector: + matchLabels: + testing.upbound.io/example-name: entry + templateSelector: + matchLabels: + testing.upbound.io/example-name: tag_template + +--- + +apiVersion: datacatalog.gcp.upbound.io/v1beta1 +kind: Entry +metadata: + annotations: + meta.upbound.io/example-id: datacatalog/v1beta1/tag + labels: + testing.upbound.io/example-name: entry + name: entry +spec: + forProvider: + entryGroupSelector: + matchLabels: + testing.upbound.io/example-name: entry_group + entryId: my_entry + userSpecifiedSystem: SomethingExternal + userSpecifiedType: my_custom_type + +--- + +apiVersion: datacatalog.gcp.upbound.io/v1beta1 +kind: EntryGroup +metadata: + annotations: + meta.upbound.io/example-id: datacatalog/v1beta1/tag + labels: + testing.upbound.io/example-name: entry_group + name: entry-group +spec: + forProvider: + entryGroupId: my_entry_group + +--- + +apiVersion: datacatalog.gcp.upbound.io/v1beta1 +kind: TagTemplate +metadata: + annotations: + meta.upbound.io/example-id: datacatalog/v1beta1/tag + labels: + testing.upbound.io/example-name: tag_template + name: tag-template +spec: + forProvider: + displayName: Demo Tag Template + fields: + - displayName: Source of data asset + fieldId: source + isRequired: true + type: + - primitiveType: STRING + - displayName: Number of rows in the data asset + fieldId: num_rows + type: + - primitiveType: DOUBLE + - displayName: PII type + fieldId: pii_type + type: + - enumType: + - allowedValues: + - displayName: EMAIL + - displayName: SOCIAL SECURITY NUMBER + - displayName: NONE + forceDelete: "false" + region: us-central1 + +--- + diff --git a/examples-generated/datacatalog/tagtemplate.yaml b/examples-generated/datacatalog/tagtemplate.yaml new file mode 100644 index 000000000..049ecad41 --- /dev/null +++ b/examples-generated/datacatalog/tagtemplate.yaml @@ -0,0 +1,34 @@ +apiVersion: datacatalog.gcp.upbound.io/v1beta1 +kind: TagTemplate +metadata: + annotations: + meta.upbound.io/example-id: datacatalog/v1beta1/tagtemplate + labels: + testing.upbound.io/example-name: basic_tag_template + name: basic-tag-template +spec: + forProvider: + displayName: Demo Tag Template + fields: + - displayName: Source of data asset + fieldId: source + isRequired: true + type: + - primitiveType: STRING + - displayName: Number of rows in the data asset + fieldId: num_rows + type: + - primitiveType: DOUBLE + - displayName: PII type + fieldId: pii_type + type: + - enumType: + - allowedValues: + - displayName: EMAIL + - displayName: SOCIAL SECURITY NUMBER + - displayName: NONE + forceDelete: "false" + region: us-central1 + +--- + diff --git a/examples/datacatalog/tag.yaml b/examples/datacatalog/tag.yaml new file mode 100644 index 000000000..6325546a6 --- /dev/null +++ b/examples/datacatalog/tag.yaml @@ -0,0 +1,87 @@ +apiVersion: datacatalog.gcp.upbound.io/v1beta1 +kind: Tag +metadata: + annotations: + meta.upbound.io/example-id: datacatalog/v1beta1/tag + labels: + testing.upbound.io/example-name: basic_tag + name: basic-tag +spec: + forProvider: + fields: + - fieldName: "source" + stringValue: "my-string" + parentSelector: + matchLabels: + testing.upbound.io/example-name: entry + templateSelector: + matchLabels: + testing.upbound.io/example-name: basic_tag_template + +--- + +apiVersion: datacatalog.gcp.upbound.io/v1beta1 +kind: Entry +metadata: + annotations: + meta.upbound.io/example-id: datacatalog/v1beta1/tag + labels: + testing.upbound.io/example-name: entry + name: entry +spec: + forProvider: + entryGroupSelector: + matchLabels: + testing.upbound.io/example-name: entry_group + entryId: my_entry + userSpecifiedSystem: SomethingExternal + userSpecifiedType: my_custom_type + +--- + +apiVersion: datacatalog.gcp.upbound.io/v1beta1 +kind: EntryGroup +metadata: + annotations: + meta.upbound.io/example-id: datacatalog/v1beta1/tag + labels: + testing.upbound.io/example-name: entry_group + name: entry-group +spec: + forProvider: + entryGroupId: my_group + region: us-central1 + +--- + +apiVersion: datacatalog.gcp.upbound.io/v1beta1 +kind: TagTemplate +metadata: + annotations: + meta.upbound.io/example-id: datacatalog/v1beta1/tag + labels: + testing.upbound.io/example-name: basic_tag_template + name: basictagtemplate +spec: + forProvider: + displayName: "Demo Tag Template" + fields: + - displayName: "Source of data asset" + fieldId: "source" + isRequired: true + type: + - primitiveType: "STRING" + - displayName: "Number of rows in the data asset" + fieldId: "num_rows" + type: + - primitiveType: "DOUBLE" + - displayName: "PII type" + fieldId: "pii_type" + type: + - enumType: + - allowedValues: + - displayName: "EMAIL" + - displayName: "SOCIAL SECURITY NUMBER" + - displayName: "NONE" + forceDelete: true + region: us-central1 diff --git a/examples/datacatalog/tagtemplate.yaml b/examples/datacatalog/tagtemplate.yaml new file mode 100644 index 000000000..9ee0578cd --- /dev/null +++ b/examples/datacatalog/tagtemplate.yaml @@ -0,0 +1,31 @@ +apiVersion: datacatalog.gcp.upbound.io/v1beta1 +kind: TagTemplate +metadata: + annotations: + meta.upbound.io/example-id: datacatalog/v1beta1/tagtemplate + labels: + testing.upbound.io/example-name: basic_tag_template + name: basictagtemplate +spec: + forProvider: + displayName: "Demo Tag Template" + fields: + - displayName: "Source of data asset" + fieldId: "source" + isRequired: true + type: + - primitiveType: "STRING" + - displayName: "Number of rows in the data asset" + fieldId: "num_rows" + type: + - primitiveType: "DOUBLE" + - displayName: "PII type" + fieldId: "pii_type" + type: + - enumType: + - allowedValues: + - displayName: "EMAIL" + - displayName: "SOCIAL SECURITY NUMBER" + - displayName: "NONE" + forceDelete: true + region: us-central1 diff --git a/internal/controller/datacatalog/tag/zz_controller.go b/internal/controller/datacatalog/tag/zz_controller.go new file mode 100755 index 000000000..fce60bb56 --- /dev/null +++ b/internal/controller/datacatalog/tag/zz_controller.go @@ -0,0 +1,63 @@ +/* +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 tag + +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/datacatalog/v1beta1" +) + +// Setup adds a controller that reconciles Tag managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1beta1.Tag_GroupVersionKind.String()) + var initializers managed.InitializerChain + cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} + if o.SecretStoreConfigGVK != nil { + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK)) + } + r := managed.NewReconciler(mgr, + xpresource.ManagedKind(v1beta1.Tag_GroupVersionKind), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["google_data_catalog_tag"], + tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1beta1.Tag_GroupVersionKind))), + )), + 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), + ) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + For(&v1beta1.Tag{}). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/datacatalog/tagtemplate/zz_controller.go b/internal/controller/datacatalog/tagtemplate/zz_controller.go new file mode 100755 index 000000000..003e11073 --- /dev/null +++ b/internal/controller/datacatalog/tagtemplate/zz_controller.go @@ -0,0 +1,64 @@ +/* +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 tagtemplate + +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/datacatalog/v1beta1" +) + +// Setup adds a controller that reconciles TagTemplate managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1beta1.TagTemplate_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)) + } + r := managed.NewReconciler(mgr, + xpresource.ManagedKind(v1beta1.TagTemplate_GroupVersionKind), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["google_data_catalog_tag_template"], + tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1beta1.TagTemplate_GroupVersionKind))), + )), + 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), + ) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + For(&v1beta1.TagTemplate{}). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/zz_setup.go b/internal/controller/zz_setup.go index 228cf14cc..6e861683a 100755 --- a/internal/controller/zz_setup.go +++ b/internal/controller/zz_setup.go @@ -153,6 +153,8 @@ import ( nodepoolcontainerazure "github.com/upbound/provider-gcp/internal/controller/containerazure/nodepool" entry "github.com/upbound/provider-gcp/internal/controller/datacatalog/entry" entrygroup "github.com/upbound/provider-gcp/internal/controller/datacatalog/entrygroup" + tag "github.com/upbound/provider-gcp/internal/controller/datacatalog/tag" + tagtemplate "github.com/upbound/provider-gcp/internal/controller/datacatalog/tagtemplate" jobdataflow "github.com/upbound/provider-gcp/internal/controller/dataflow/job" instancedatafusion "github.com/upbound/provider-gcp/internal/controller/datafusion/instance" agent "github.com/upbound/provider-gcp/internal/controller/dialogflowcx/agent" @@ -389,6 +391,8 @@ func Setup(mgr ctrl.Manager, o controller.Options) error { nodepoolcontainerazure.Setup, entry.Setup, entrygroup.Setup, + tag.Setup, + tagtemplate.Setup, jobdataflow.Setup, instancedatafusion.Setup, agent.Setup, diff --git a/package/crds/datacatalog.gcp.upbound.io_tags.yaml b/package/crds/datacatalog.gcp.upbound.io_tags.yaml new file mode 100644 index 000000000..77ea3b800 --- /dev/null +++ b/package/crds/datacatalog.gcp.upbound.io_tags.yaml @@ -0,0 +1,525 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.8.0 + creationTimestamp: null + name: tags.datacatalog.gcp.upbound.io +spec: + group: datacatalog.gcp.upbound.io + names: + categories: + - crossplane + - managed + - gcp + kind: Tag + listKind: TagList + plural: tags + singular: tag + 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: Tag is the Schema for the Tags API. Tags are used to attach custom + metadata to Data Catalog resources. + 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: TagSpec defines the desired state of Tag + 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. + enum: + - Orphan + - Delete + type: string + forProvider: + properties: + column: + description: 'Resources like Entry can have schemas associated + with them. This scope allows users to attach tags to an individual + column based on that schema. For attaching a tag to a nested + column, use . to separate the column names. Example: outer_column.inner_column' + type: string + fields: + description: This maps the ID of a tag field to the value of and + additional information about that field. Valid field IDs are + defined by the tag's template. A tag must have at least 1 field + and at most 500 fields. Structure is documented below. + items: + properties: + boolValue: + description: Holds the value for a tag field with boolean + type. + type: boolean + doubleValue: + description: Holds the value for a tag field with double + type. + type: number + enumValue: + description: Holds the value for a tag field with enum type. + This value must be one of the allowed values in the definition + of this enum. Structure is documented below. + type: string + fieldName: + description: The identifier for this object. Format specified + above. + type: string + stringValue: + description: Holds the value for a tag field with string + type. + type: string + timestampValue: + description: Holds the value for a tag field with timestamp + type. + type: string + required: + - fieldName + type: object + type: array + parent: + description: The name of the parent this tag is attached to. This + can be the name of an entry or an entry group. If an entry group, + the tag will be attached to all entries in that group. + type: string + parentRef: + description: Reference to a Entry in datacatalog to populate parent. + 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 + parentSelector: + description: Selector for a Entry in datacatalog to populate parent. + 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 + template: + description: 'The resource name of the tag template that this + tag uses. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId} + This field cannot be modified after creation.' + type: string + templateRef: + description: Reference to a TagTemplate in datacatalog to populate + template. + 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 + templateSelector: + description: Selector for a TagTemplate in datacatalog to populate + template. + 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 + required: + - fields + type: object + 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 + status: + description: TagStatus defines the observed state of Tag. + properties: + atProvider: + properties: + fields: + description: This maps the ID of a tag field to the value of and + additional information about that field. Valid field IDs are + defined by the tag's template. A tag must have at least 1 field + and at most 500 fields. Structure is documented below. + items: + properties: + displayName: + description: The display name of this field + type: string + order: + description: The order of this field with respect to other + fields in this tag. For example, a higher value can indicate + a more important field. The value can be negative. Multiple + fields can have the same order, and field orders within + a tag do not have to be sequential. + type: number + type: object + type: array + id: + description: an identifier for the resource with format {{name}} + type: string + name: + description: 'The resource name of the tag in URL format. Example: + projects/{project_id}/locations/{location}/entrygroups/{entryGroupId}/entries/{entryId}/tags/{tag_id} + or projects/{project_id}/locations/{location}/entrygroups/{entryGroupId}/tags/{tag_id} + where tag_id is a system-generated identifier. Note that this + Tag may not actually be stored in the location in this name.' + type: string + templateDisplayname: + description: The display name of the tag template. + 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: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/package/crds/datacatalog.gcp.upbound.io_tagtemplates.yaml b/package/crds/datacatalog.gcp.upbound.io_tagtemplates.yaml new file mode 100644 index 000000000..f075fb5f3 --- /dev/null +++ b/package/crds/datacatalog.gcp.upbound.io_tagtemplates.yaml @@ -0,0 +1,403 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.8.0 + creationTimestamp: null + name: tagtemplates.datacatalog.gcp.upbound.io +spec: + group: datacatalog.gcp.upbound.io + names: + categories: + - crossplane + - managed + - gcp + kind: TagTemplate + listKind: TagTemplateList + plural: tagtemplates + singular: tagtemplate + 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: TagTemplate is the Schema for the TagTemplates API. A tag template + defines a tag, which can have one or more typed fields. + 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: TagTemplateSpec defines the desired state of TagTemplate + 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. + enum: + - Orphan + - Delete + type: string + forProvider: + properties: + displayName: + description: The display name for this field. + type: string + fields: + description: Set of tag template field IDs and the settings for + the field. This set is an exhaustive list of the allowed fields. + This set must contain at least one field and at most 500 fields. + Structure is documented below. + items: + properties: + description: + description: A description for this field. + type: string + displayName: + description: The display name for this field. + type: string + fieldId: + description: The identifier for this object. Format specified + above. + type: string + isRequired: + description: Whether this is a required field. Defaults + to false. + type: boolean + order: + description: The order of this field with respect to other + fields in this tag template. A higher value indicates + a more important field. The value can be negative. Multiple + fields can have the same order, and field orders within + a tag do not have to be sequential. + type: number + type: + description: The type of value this tag field can contain. + Structure is documented below. + items: + properties: + enumType: + description: Represents an enum type. Exactly one + of primitive_type or enum_type must be set Structure + is documented below. + items: + properties: + allowedValues: + description: The set of allowed values for this + enum. The display names of the values must + be case-insensitively unique within this set. + Currently, enum values can only be added to + the list of allowed values. Deletion and renaming + of enum values are not supported. Can have + up to 500 allowed values. Structure is documented + below. + items: + properties: + displayName: + description: The display name for this + field. + type: string + required: + - displayName + type: object + type: array + required: + - allowedValues + type: object + type: array + primitiveType: + description: Represents primitive types - string, + bool etc. Exactly one of primitive_type or enum_type + must be set Possible values are DOUBLE, STRING, + BOOL, and TIMESTAMP. + type: string + type: object + type: array + required: + - fieldId + - type + type: object + type: array + forceDelete: + description: This confirms the deletion of any possible tags using + this template. Must be set to true in order to delete the tag + template. + type: boolean + 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: Template location region. + type: string + required: + - fields + type: object + 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 + status: + description: TagTemplateStatus defines the observed state of TagTemplate. + properties: + atProvider: + properties: + fields: + description: Set of tag template field IDs and the settings for + the field. This set is an exhaustive list of the allowed fields. + This set must contain at least one field and at most 500 fields. + Structure is documented below. + items: + properties: + name: + description: 'The resource name of the tag template field + in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}/fields/{field}' + type: string + type: object + type: array + id: + description: an identifier for the resource with format {{name}} + type: string + name: + description: 'The resource name of the tag template in URL format. + Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}' + 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: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: []