diff --git a/.gitignore b/.gitignore index dfdc480b9..79e380f1d 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,8 @@ kubeconfig # ignore IDE folders .vscode/ .idea/ +.devcontainer.json +.devcontainer/ # packages *.xpkg diff --git a/apis/datacatalog/v1beta1/zz_generated.conversion_hubs.go b/apis/datacatalog/v1beta1/zz_generated.conversion_hubs.go index d517f89ca..00b66d007 100755 --- a/apis/datacatalog/v1beta1/zz_generated.conversion_hubs.go +++ b/apis/datacatalog/v1beta1/zz_generated.conversion_hubs.go @@ -9,5 +9,11 @@ package v1beta1 // Hub marks this type as a conversion hub. func (tr *EntryGroup) Hub() {} +// Hub marks this type as a conversion hub. +func (tr *PolicyTag) Hub() {} + // Hub marks this type as a conversion hub. func (tr *Tag) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *Taxonomy) Hub() {} diff --git a/apis/datacatalog/v1beta1/zz_generated.deepcopy.go b/apis/datacatalog/v1beta1/zz_generated.deepcopy.go index 743d149f8..a272af144 100644 --- a/apis/datacatalog/v1beta1/zz_generated.deepcopy.go +++ b/apis/datacatalog/v1beta1/zz_generated.deepcopy.go @@ -1061,6 +1061,266 @@ func (in *GcsFilesetSpecParameters) DeepCopy() *GcsFilesetSpecParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PolicyTag) DeepCopyInto(out *PolicyTag) { + *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 PolicyTag. +func (in *PolicyTag) DeepCopy() *PolicyTag { + if in == nil { + return nil + } + out := new(PolicyTag) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PolicyTag) 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 *PolicyTagInitParameters) DeepCopyInto(out *PolicyTagInitParameters) { + *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.ParentPolicyTag != nil { + in, out := &in.ParentPolicyTag, &out.ParentPolicyTag + *out = new(string) + **out = **in + } + if in.ParentPolicyTagRef != nil { + in, out := &in.ParentPolicyTagRef, &out.ParentPolicyTagRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.ParentPolicyTagSelector != nil { + in, out := &in.ParentPolicyTagSelector, &out.ParentPolicyTagSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.Taxonomy != nil { + in, out := &in.Taxonomy, &out.Taxonomy + *out = new(string) + **out = **in + } + if in.TaxonomyRef != nil { + in, out := &in.TaxonomyRef, &out.TaxonomyRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.TaxonomySelector != nil { + in, out := &in.TaxonomySelector, &out.TaxonomySelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyTagInitParameters. +func (in *PolicyTagInitParameters) DeepCopy() *PolicyTagInitParameters { + if in == nil { + return nil + } + out := new(PolicyTagInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PolicyTagList) DeepCopyInto(out *PolicyTagList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]PolicyTag, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyTagList. +func (in *PolicyTagList) DeepCopy() *PolicyTagList { + if in == nil { + return nil + } + out := new(PolicyTagList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PolicyTagList) 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 *PolicyTagObservation) DeepCopyInto(out *PolicyTagObservation) { + *out = *in + if in.ChildPolicyTags != nil { + in, out := &in.ChildPolicyTags, &out.ChildPolicyTags + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.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.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.ParentPolicyTag != nil { + in, out := &in.ParentPolicyTag, &out.ParentPolicyTag + *out = new(string) + **out = **in + } + if in.Taxonomy != nil { + in, out := &in.Taxonomy, &out.Taxonomy + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyTagObservation. +func (in *PolicyTagObservation) DeepCopy() *PolicyTagObservation { + if in == nil { + return nil + } + out := new(PolicyTagObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PolicyTagParameters) DeepCopyInto(out *PolicyTagParameters) { + *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.ParentPolicyTag != nil { + in, out := &in.ParentPolicyTag, &out.ParentPolicyTag + *out = new(string) + **out = **in + } + if in.ParentPolicyTagRef != nil { + in, out := &in.ParentPolicyTagRef, &out.ParentPolicyTagRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.ParentPolicyTagSelector != nil { + in, out := &in.ParentPolicyTagSelector, &out.ParentPolicyTagSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.Taxonomy != nil { + in, out := &in.Taxonomy, &out.Taxonomy + *out = new(string) + **out = **in + } + if in.TaxonomyRef != nil { + in, out := &in.TaxonomyRef, &out.TaxonomyRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.TaxonomySelector != nil { + in, out := &in.TaxonomySelector, &out.TaxonomySelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyTagParameters. +func (in *PolicyTagParameters) DeepCopy() *PolicyTagParameters { + if in == nil { + return nil + } + out := new(PolicyTagParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PolicyTagSpec) DeepCopyInto(out *PolicyTagSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyTagSpec. +func (in *PolicyTagSpec) DeepCopy() *PolicyTagSpec { + if in == nil { + return nil + } + out := new(PolicyTagSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PolicyTagStatus) DeepCopyInto(out *PolicyTagStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyTagStatus. +func (in *PolicyTagStatus) DeepCopy() *PolicyTagStatus { + if in == nil { + return nil + } + out := new(PolicyTagStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SampleGcsFileSpecsInitParameters) DeepCopyInto(out *SampleGcsFileSpecsInitParameters) { *out = *in @@ -1797,6 +2057,248 @@ func (in *TagTemplateStatus) DeepCopy() *TagTemplateStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Taxonomy) DeepCopyInto(out *Taxonomy) { + *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 Taxonomy. +func (in *Taxonomy) DeepCopy() *Taxonomy { + if in == nil { + return nil + } + out := new(Taxonomy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Taxonomy) 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 *TaxonomyInitParameters) DeepCopyInto(out *TaxonomyInitParameters) { + *out = *in + if in.ActivatedPolicyTypes != nil { + in, out := &in.ActivatedPolicyTypes, &out.ActivatedPolicyTypes + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.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.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 TaxonomyInitParameters. +func (in *TaxonomyInitParameters) DeepCopy() *TaxonomyInitParameters { + if in == nil { + return nil + } + out := new(TaxonomyInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaxonomyList) DeepCopyInto(out *TaxonomyList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Taxonomy, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaxonomyList. +func (in *TaxonomyList) DeepCopy() *TaxonomyList { + if in == nil { + return nil + } + out := new(TaxonomyList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TaxonomyList) 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 *TaxonomyObservation) DeepCopyInto(out *TaxonomyObservation) { + *out = *in + if in.ActivatedPolicyTypes != nil { + in, out := &in.ActivatedPolicyTypes, &out.ActivatedPolicyTypes + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.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.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.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 TaxonomyObservation. +func (in *TaxonomyObservation) DeepCopy() *TaxonomyObservation { + if in == nil { + return nil + } + out := new(TaxonomyObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaxonomyParameters) DeepCopyInto(out *TaxonomyParameters) { + *out = *in + if in.ActivatedPolicyTypes != nil { + in, out := &in.ActivatedPolicyTypes, &out.ActivatedPolicyTypes + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.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.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 TaxonomyParameters. +func (in *TaxonomyParameters) DeepCopy() *TaxonomyParameters { + if in == nil { + return nil + } + out := new(TaxonomyParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaxonomySpec) DeepCopyInto(out *TaxonomySpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaxonomySpec. +func (in *TaxonomySpec) DeepCopy() *TaxonomySpec { + if in == nil { + return nil + } + out := new(TaxonomySpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaxonomyStatus) DeepCopyInto(out *TaxonomyStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaxonomyStatus. +func (in *TaxonomyStatus) DeepCopy() *TaxonomyStatus { + if in == nil { + return nil + } + out := new(TaxonomyStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TypeInitParameters) DeepCopyInto(out *TypeInitParameters) { *out = *in diff --git a/apis/datacatalog/v1beta1/zz_generated.managed.go b/apis/datacatalog/v1beta1/zz_generated.managed.go index ab54cea38..76a8891a6 100644 --- a/apis/datacatalog/v1beta1/zz_generated.managed.go +++ b/apis/datacatalog/v1beta1/zz_generated.managed.go @@ -127,6 +127,66 @@ func (mg *EntryGroup) SetWriteConnectionSecretToReference(r *xpv1.SecretReferenc mg.Spec.WriteConnectionSecretToReference = r } +// GetCondition of this PolicyTag. +func (mg *PolicyTag) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this PolicyTag. +func (mg *PolicyTag) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicies of this PolicyTag. +func (mg *PolicyTag) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + +// GetProviderConfigReference of this PolicyTag. +func (mg *PolicyTag) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +// GetPublishConnectionDetailsTo of this PolicyTag. +func (mg *PolicyTag) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this PolicyTag. +func (mg *PolicyTag) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this PolicyTag. +func (mg *PolicyTag) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this PolicyTag. +func (mg *PolicyTag) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicies of this PolicyTag. +func (mg *PolicyTag) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + +// SetProviderConfigReference of this PolicyTag. +func (mg *PolicyTag) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +// SetPublishConnectionDetailsTo of this PolicyTag. +func (mg *PolicyTag) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this PolicyTag. +func (mg *PolicyTag) 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) @@ -246,3 +306,63 @@ func (mg *TagTemplate) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDe func (mg *TagTemplate) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { mg.Spec.WriteConnectionSecretToReference = r } + +// GetCondition of this Taxonomy. +func (mg *Taxonomy) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this Taxonomy. +func (mg *Taxonomy) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicies of this Taxonomy. +func (mg *Taxonomy) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + +// GetProviderConfigReference of this Taxonomy. +func (mg *Taxonomy) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +// GetPublishConnectionDetailsTo of this Taxonomy. +func (mg *Taxonomy) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this Taxonomy. +func (mg *Taxonomy) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this Taxonomy. +func (mg *Taxonomy) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this Taxonomy. +func (mg *Taxonomy) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicies of this Taxonomy. +func (mg *Taxonomy) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + +// SetProviderConfigReference of this Taxonomy. +func (mg *Taxonomy) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +// SetPublishConnectionDetailsTo of this Taxonomy. +func (mg *Taxonomy) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this Taxonomy. +func (mg *Taxonomy) 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 36aeefe2d..e3ab22b5a 100644 --- a/apis/datacatalog/v1beta1/zz_generated.managedlist.go +++ b/apis/datacatalog/v1beta1/zz_generated.managedlist.go @@ -25,6 +25,15 @@ func (l *EntryList) GetItems() []resource.Managed { return items } +// GetItems of this PolicyTagList. +func (l *PolicyTagList) 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 TagList. func (l *TagList) GetItems() []resource.Managed { items := make([]resource.Managed, len(l.Items)) @@ -42,3 +51,12 @@ func (l *TagTemplateList) GetItems() []resource.Managed { } return items } + +// GetItems of this TaxonomyList. +func (l *TaxonomyList) 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 65ff8a667..7fbee25ec 100644 --- a/apis/datacatalog/v1beta1/zz_generated.resolvers.go +++ b/apis/datacatalog/v1beta1/zz_generated.resolvers.go @@ -68,6 +68,94 @@ func (mg *Entry) ResolveReferences(ctx context.Context, c client.Reader) error { return nil } +// ResolveReferences of this PolicyTag. +func (mg *PolicyTag) ResolveReferences(ctx context.Context, c client.Reader) error { + var m xpresource.Managed + var l xpresource.ManagedList + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + { + m, l, err = apisresolver.GetManagedResource("datacatalog.gcp.upbound.io", "v1beta1", "PolicyTag", "PolicyTagList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.ParentPolicyTag), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.ForProvider.ParentPolicyTagRef, + Selector: mg.Spec.ForProvider.ParentPolicyTagSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.ParentPolicyTag") + } + mg.Spec.ForProvider.ParentPolicyTag = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.ParentPolicyTagRef = rsp.ResolvedReference + { + m, l, err = apisresolver.GetManagedResource("datacatalog.gcp.upbound.io", "v1beta1", "Taxonomy", "TaxonomyList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Taxonomy), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.ForProvider.TaxonomyRef, + Selector: mg.Spec.ForProvider.TaxonomySelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.Taxonomy") + } + mg.Spec.ForProvider.Taxonomy = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.TaxonomyRef = rsp.ResolvedReference + { + m, l, err = apisresolver.GetManagedResource("datacatalog.gcp.upbound.io", "v1beta1", "PolicyTag", "PolicyTagList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.ParentPolicyTag), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.InitProvider.ParentPolicyTagRef, + Selector: mg.Spec.InitProvider.ParentPolicyTagSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.ParentPolicyTag") + } + mg.Spec.InitProvider.ParentPolicyTag = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.ParentPolicyTagRef = rsp.ResolvedReference + { + m, l, err = apisresolver.GetManagedResource("datacatalog.gcp.upbound.io", "v1beta1", "Taxonomy", "TaxonomyList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Taxonomy), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.InitProvider.TaxonomyRef, + Selector: mg.Spec.InitProvider.TaxonomySelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.Taxonomy") + } + mg.Spec.InitProvider.Taxonomy = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.TaxonomyRef = rsp.ResolvedReference + + return nil +} + // ResolveReferences of this Tag. func (mg *Tag) ResolveReferences(ctx context.Context, c client.Reader) error { var m xpresource.Managed diff --git a/apis/datacatalog/v1beta1/zz_policytag_terraformed.go b/apis/datacatalog/v1beta1/zz_policytag_terraformed.go new file mode 100755 index 000000000..43f401a48 --- /dev/null +++ b/apis/datacatalog/v1beta1/zz_policytag_terraformed.go @@ -0,0 +1,129 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package v1beta1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this PolicyTag +func (mg *PolicyTag) GetTerraformResourceType() string { + return "google_data_catalog_policy_tag" +} + +// GetConnectionDetailsMapping for this PolicyTag +func (tr *PolicyTag) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this PolicyTag +func (tr *PolicyTag) 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 PolicyTag +func (tr *PolicyTag) 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 PolicyTag +func (tr *PolicyTag) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this PolicyTag +func (tr *PolicyTag) 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 PolicyTag +func (tr *PolicyTag) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this PolicyTag +func (tr *PolicyTag) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this PolicyTag +func (tr *PolicyTag) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this PolicyTag using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *PolicyTag) LateInitialize(attrs []byte) (bool, error) { + params := &PolicyTagParameters{} + 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 *PolicyTag) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/datacatalog/v1beta1/zz_policytag_types.go b/apis/datacatalog/v1beta1/zz_policytag_types.go new file mode 100755 index 000000000..fadf8659d --- /dev/null +++ b/apis/datacatalog/v1beta1/zz_policytag_types.go @@ -0,0 +1,196 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// 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 PolicyTagInitParameters struct { + + // Description of this policy tag. It must: contain only unicode characters, tabs, + // newlines, carriage returns and page breaks; and be at most 2000 bytes long when + // encoded in UTF-8. If not set, defaults to an empty description. + // If not set, defaults to an empty description. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // User defined name of this policy tag. It must: be unique within the parent + // taxonomy; contain only unicode letters, numbers, underscores, dashes and spaces; + // not start or end with spaces; and be at most 200 bytes long when encoded in UTF-8. + DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"` + + // Resource name of this policy tag's parent policy tag. + // If empty, it means this policy tag is a top level policy tag. + // If not set, defaults to an empty string. + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/datacatalog/v1beta1.PolicyTag + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() + ParentPolicyTag *string `json:"parentPolicyTag,omitempty" tf:"parent_policy_tag,omitempty"` + + // Reference to a PolicyTag in datacatalog to populate parentPolicyTag. + // +kubebuilder:validation:Optional + ParentPolicyTagRef *v1.Reference `json:"parentPolicyTagRef,omitempty" tf:"-"` + + // Selector for a PolicyTag in datacatalog to populate parentPolicyTag. + // +kubebuilder:validation:Optional + ParentPolicyTagSelector *v1.Selector `json:"parentPolicyTagSelector,omitempty" tf:"-"` + + // Taxonomy the policy tag is associated with + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/datacatalog/v1beta1.Taxonomy + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() + Taxonomy *string `json:"taxonomy,omitempty" tf:"taxonomy,omitempty"` + + // Reference to a Taxonomy in datacatalog to populate taxonomy. + // +kubebuilder:validation:Optional + TaxonomyRef *v1.Reference `json:"taxonomyRef,omitempty" tf:"-"` + + // Selector for a Taxonomy in datacatalog to populate taxonomy. + // +kubebuilder:validation:Optional + TaxonomySelector *v1.Selector `json:"taxonomySelector,omitempty" tf:"-"` +} + +type PolicyTagObservation struct { + + // Resource names of child policy tags of this policy tag. + ChildPolicyTags []*string `json:"childPolicyTags,omitempty" tf:"child_policy_tags,omitempty"` + + // Description of this policy tag. It must: contain only unicode characters, tabs, + // newlines, carriage returns and page breaks; and be at most 2000 bytes long when + // encoded in UTF-8. If not set, defaults to an empty description. + // If not set, defaults to an empty description. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // User defined name of this policy tag. It must: be unique within the parent + // taxonomy; contain only unicode letters, numbers, underscores, dashes and spaces; + // not start or end with spaces; and be at most 200 bytes long when encoded in UTF-8. + DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"` + + // an identifier for the resource with format {{name}} + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // Resource name of this policy tag, whose format is: + // "projects/{project}/locations/{region}/taxonomies/{taxonomy}/policyTags/{policytag}" + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // Resource name of this policy tag's parent policy tag. + // If empty, it means this policy tag is a top level policy tag. + // If not set, defaults to an empty string. + ParentPolicyTag *string `json:"parentPolicyTag,omitempty" tf:"parent_policy_tag,omitempty"` + + // Taxonomy the policy tag is associated with + Taxonomy *string `json:"taxonomy,omitempty" tf:"taxonomy,omitempty"` +} + +type PolicyTagParameters struct { + + // Description of this policy tag. It must: contain only unicode characters, tabs, + // newlines, carriage returns and page breaks; and be at most 2000 bytes long when + // encoded in UTF-8. If not set, defaults to an empty description. + // If not set, defaults to an empty description. + // +kubebuilder:validation:Optional + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // User defined name of this policy tag. It must: be unique within the parent + // taxonomy; contain only unicode letters, numbers, underscores, dashes and spaces; + // not start or end with spaces; and be at most 200 bytes long when encoded in UTF-8. + // +kubebuilder:validation:Optional + DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"` + + // Resource name of this policy tag's parent policy tag. + // If empty, it means this policy tag is a top level policy tag. + // If not set, defaults to an empty string. + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/datacatalog/v1beta1.PolicyTag + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() + // +kubebuilder:validation:Optional + ParentPolicyTag *string `json:"parentPolicyTag,omitempty" tf:"parent_policy_tag,omitempty"` + + // Reference to a PolicyTag in datacatalog to populate parentPolicyTag. + // +kubebuilder:validation:Optional + ParentPolicyTagRef *v1.Reference `json:"parentPolicyTagRef,omitempty" tf:"-"` + + // Selector for a PolicyTag in datacatalog to populate parentPolicyTag. + // +kubebuilder:validation:Optional + ParentPolicyTagSelector *v1.Selector `json:"parentPolicyTagSelector,omitempty" tf:"-"` + + // Taxonomy the policy tag is associated with + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/datacatalog/v1beta1.Taxonomy + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() + // +kubebuilder:validation:Optional + Taxonomy *string `json:"taxonomy,omitempty" tf:"taxonomy,omitempty"` + + // Reference to a Taxonomy in datacatalog to populate taxonomy. + // +kubebuilder:validation:Optional + TaxonomyRef *v1.Reference `json:"taxonomyRef,omitempty" tf:"-"` + + // Selector for a Taxonomy in datacatalog to populate taxonomy. + // +kubebuilder:validation:Optional + TaxonomySelector *v1.Selector `json:"taxonomySelector,omitempty" tf:"-"` +} + +// PolicyTagSpec defines the desired state of PolicyTag +type PolicyTagSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider PolicyTagParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider PolicyTagInitParameters `json:"initProvider,omitempty"` +} + +// PolicyTagStatus defines the observed state of PolicyTag. +type PolicyTagStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider PolicyTagObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion + +// PolicyTag is the Schema for the PolicyTags API. Denotes one policy tag in a taxonomy. +// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" +// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,gcp} +type PolicyTag struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.displayName) || (has(self.initProvider) && has(self.initProvider.displayName))",message="spec.forProvider.displayName is a required parameter" + Spec PolicyTagSpec `json:"spec"` + Status PolicyTagStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// PolicyTagList contains a list of PolicyTags +type PolicyTagList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []PolicyTag `json:"items"` +} + +// Repository type metadata. +var ( + PolicyTag_Kind = "PolicyTag" + PolicyTag_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: PolicyTag_Kind}.String() + PolicyTag_KindAPIVersion = PolicyTag_Kind + "." + CRDGroupVersion.String() + PolicyTag_GroupVersionKind = CRDGroupVersion.WithKind(PolicyTag_Kind) +) + +func init() { + SchemeBuilder.Register(&PolicyTag{}, &PolicyTagList{}) +} diff --git a/apis/datacatalog/v1beta1/zz_taxonomy_terraformed.go b/apis/datacatalog/v1beta1/zz_taxonomy_terraformed.go new file mode 100755 index 000000000..4369d9070 --- /dev/null +++ b/apis/datacatalog/v1beta1/zz_taxonomy_terraformed.go @@ -0,0 +1,129 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package v1beta1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this Taxonomy +func (mg *Taxonomy) GetTerraformResourceType() string { + return "google_data_catalog_taxonomy" +} + +// GetConnectionDetailsMapping for this Taxonomy +func (tr *Taxonomy) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this Taxonomy +func (tr *Taxonomy) 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 Taxonomy +func (tr *Taxonomy) 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 Taxonomy +func (tr *Taxonomy) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this Taxonomy +func (tr *Taxonomy) 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 Taxonomy +func (tr *Taxonomy) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this Taxonomy +func (tr *Taxonomy) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Taxonomy +func (tr *Taxonomy) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this Taxonomy using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *Taxonomy) LateInitialize(attrs []byte) (bool, error) { + params := &TaxonomyParameters{} + 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 *Taxonomy) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/datacatalog/v1beta1/zz_taxonomy_types.go b/apis/datacatalog/v1beta1/zz_taxonomy_types.go new file mode 100755 index 000000000..272027a00 --- /dev/null +++ b/apis/datacatalog/v1beta1/zz_taxonomy_types.go @@ -0,0 +1,169 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// 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 TaxonomyInitParameters struct { + + // A list of policy types that are activated for this taxonomy. If not set, + // defaults to an empty list. + // Each value may be one of: POLICY_TYPE_UNSPECIFIED, FINE_GRAINED_ACCESS_CONTROL. + ActivatedPolicyTypes []*string `json:"activatedPolicyTypes,omitempty" tf:"activated_policy_types,omitempty"` + + // Description of this taxonomy. It must: contain only unicode characters, + // tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes + // long when encoded in UTF-8. If not set, defaults to an empty description. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // User defined name of this taxonomy. + // The taxonomy display name must be unique within an organization. + // It must: contain only unicode letters, numbers, underscores, dashes + // and spaces; not start or end with spaces; and be at most 200 bytes + // long when encoded in UTF-8. + DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"` + + // The ID of the project in which the resource belongs. + // If it is not provided, the provider project is used. + Project *string `json:"project,omitempty" tf:"project,omitempty"` + + // Taxonomy location region. + Region *string `json:"region,omitempty" tf:"region,omitempty"` +} + +type TaxonomyObservation struct { + + // A list of policy types that are activated for this taxonomy. If not set, + // defaults to an empty list. + // Each value may be one of: POLICY_TYPE_UNSPECIFIED, FINE_GRAINED_ACCESS_CONTROL. + ActivatedPolicyTypes []*string `json:"activatedPolicyTypes,omitempty" tf:"activated_policy_types,omitempty"` + + // Description of this taxonomy. It must: contain only unicode characters, + // tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes + // long when encoded in UTF-8. If not set, defaults to an empty description. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // User defined name of this taxonomy. + // The taxonomy display name must be unique within an organization. + // It must: contain only unicode letters, numbers, underscores, dashes + // and spaces; not start or end with spaces; and be at most 200 bytes + // long when encoded in UTF-8. + DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"` + + // an identifier for the resource with format {{name}} + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // Resource name of this taxonomy, whose format is: + // "projects/{project}/locations/{region}/taxonomies/{taxonomy}". + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // The ID of the project in which the resource belongs. + // If it is not provided, the provider project is used. + Project *string `json:"project,omitempty" tf:"project,omitempty"` + + // Taxonomy location region. + Region *string `json:"region,omitempty" tf:"region,omitempty"` +} + +type TaxonomyParameters struct { + + // A list of policy types that are activated for this taxonomy. If not set, + // defaults to an empty list. + // Each value may be one of: POLICY_TYPE_UNSPECIFIED, FINE_GRAINED_ACCESS_CONTROL. + // +kubebuilder:validation:Optional + ActivatedPolicyTypes []*string `json:"activatedPolicyTypes,omitempty" tf:"activated_policy_types,omitempty"` + + // Description of this taxonomy. It must: contain only unicode characters, + // tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes + // long when encoded in UTF-8. If not set, defaults to an empty description. + // +kubebuilder:validation:Optional + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // User defined name of this taxonomy. + // The taxonomy display name must be unique within an organization. + // It must: contain only unicode letters, numbers, underscores, dashes + // and spaces; not start or end with spaces; and be at most 200 bytes + // long when encoded in UTF-8. + // +kubebuilder:validation:Optional + DisplayName *string `json:"displayName,omitempty" tf:"display_name,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"` + + // Taxonomy location region. + // +kubebuilder:validation:Optional + Region *string `json:"region,omitempty" tf:"region,omitempty"` +} + +// TaxonomySpec defines the desired state of Taxonomy +type TaxonomySpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider TaxonomyParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider TaxonomyInitParameters `json:"initProvider,omitempty"` +} + +// TaxonomyStatus defines the observed state of Taxonomy. +type TaxonomyStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider TaxonomyObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion + +// Taxonomy is the Schema for the Taxonomys API. A collection of policy tags that classify data along a common axis. +// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" +// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,gcp} +type Taxonomy struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.displayName) || (has(self.initProvider) && has(self.initProvider.displayName))",message="spec.forProvider.displayName is a required parameter" + Spec TaxonomySpec `json:"spec"` + Status TaxonomyStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// TaxonomyList contains a list of Taxonomys +type TaxonomyList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Taxonomy `json:"items"` +} + +// Repository type metadata. +var ( + Taxonomy_Kind = "Taxonomy" + Taxonomy_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: Taxonomy_Kind}.String() + Taxonomy_KindAPIVersion = Taxonomy_Kind + "." + CRDGroupVersion.String() + Taxonomy_GroupVersionKind = CRDGroupVersion.WithKind(Taxonomy_Kind) +) + +func init() { + SchemeBuilder.Register(&Taxonomy{}, &TaxonomyList{}) +} diff --git a/config/externalname.go b/config/externalname.go index 8588db1ec..4afc64ed9 100644 --- a/config/externalname.go +++ b/config/externalname.go @@ -376,6 +376,10 @@ var terraformPluginSDKExternalNameConfigs = map[string]config.ExternalName{ "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 }}"), + // {{name}} projects/{project}/locations/{region}/taxonomies/{taxonomy} + "google_data_catalog_taxonomy": config.IdentifierFromProvider, + // {{name}} projects/{project}/locations/{region}/taxonomies/{taxonomy}/policyTags/{policytag} + "google_data_catalog_policy_tag": config.IdentifierFromProvider, // accesscontextmanager // diff --git a/config/externalnamenottested.go b/config/externalnamenottested.go index 7946016c0..85b23e9c4 100644 --- a/config/externalnamenottested.go +++ b/config/externalnamenottested.go @@ -81,6 +81,18 @@ var ExternalNameNotTestedConfigs = map[string]config.ExternalName{ "google_data_catalog_tag_template_iam_member": config.IdentifierFromProvider, // projects/{{project}}/locations/{{region}}/tagTemplates/{{tag_template}} "google_data_catalog_tag_template_iam_policy": config.IdentifierFromProvider, + // projects/{{project}}/locations/{{region}}/taxonomies/{{taxonomy}} roles/viewer + "google_data_catalog_taxonomy_iam_binding": config.IdentifierFromProvider, + // projects/{{project}}/locations/{{region}}/taxonomies/{{taxonomy}} roles/viewer user:jane@example.com + "google_data_catalog_taxonomy_iam_member": config.IdentifierFromProvider, + // projects/{{project}}/locations/{{region}}/taxonomies/{{taxonomy}}/policyTags/{{policy_tag}} + "google_data_catalog_taxonomy_iam_policy": config.IdentifierFromProvider, + // projects/{{project}}/locations/{{region}}/taxonomies/{{taxonomy}}/policyTags/{{policy_tag}} roles/viewer + "google_data_catalog_policy_tag_iam_binding": config.IdentifierFromProvider, + // projects/{{project}}/locations/{{region}}/taxonomies/{{taxonomy}}/policyTags/{{policy_tag}} roles/viewer user:jane@example.com + "google_data_catalog_policy_tag_iam_member": config.IdentifierFromProvider, + // projects/{{project}}/locations/{{region}}/taxonomies/{{taxonomy}}/policyTags/{{policy_tag}} + "google_data_catalog_policy_tag_iam_policy": config.IdentifierFromProvider, // accessapproval // diff --git a/config/generated.lst b/config/generated.lst index ab82fa7f4..60fd1c510 100644 --- a/config/generated.lst +++ b/config/generated.lst @@ -1 +1 @@ -["google_access_context_manager_access_level","google_access_context_manager_access_level_condition","google_access_context_manager_access_policy","google_access_context_manager_access_policy_iam_member","google_access_context_manager_service_perimeter","google_access_context_manager_service_perimeter_resource","google_active_directory_domain","google_alloydb_backup","google_alloydb_cluster","google_alloydb_instance","google_apigee_addons_config","google_apigee_endpoint_attachment","google_apigee_envgroup","google_apigee_envgroup_attachment","google_apigee_environment","google_apigee_environment_iam_member","google_apigee_instance","google_apigee_instance_attachment","google_apigee_nat_address","google_apigee_organization","google_apigee_sync_authorization","google_app_engine_application","google_app_engine_application_url_dispatch_rules","google_app_engine_firewall_rule","google_app_engine_service_network_settings","google_app_engine_standard_app_version","google_artifact_registry_repository","google_artifact_registry_repository_iam_member","google_beyondcorp_app_connection","google_beyondcorp_app_connector","google_beyondcorp_app_gateway","google_bigquery_analytics_hub_data_exchange","google_bigquery_analytics_hub_data_exchange_iam_member","google_bigquery_analytics_hub_listing","google_bigquery_connection","google_bigquery_data_transfer_config","google_bigquery_dataset","google_bigquery_dataset_access","google_bigquery_dataset_iam_binding","google_bigquery_dataset_iam_member","google_bigquery_dataset_iam_policy","google_bigquery_job","google_bigquery_reservation","google_bigquery_reservation_assignment","google_bigquery_routine","google_bigquery_table","google_bigquery_table_iam_binding","google_bigquery_table_iam_member","google_bigquery_table_iam_policy","google_bigtable_app_profile","google_bigtable_gc_policy","google_bigtable_instance","google_bigtable_instance_iam_binding","google_bigtable_instance_iam_member","google_bigtable_instance_iam_policy","google_bigtable_table","google_bigtable_table_iam_binding","google_bigtable_table_iam_member","google_bigtable_table_iam_policy","google_binary_authorization_attestor","google_binary_authorization_policy","google_certificate_manager_certificate","google_certificate_manager_certificate_map","google_certificate_manager_certificate_map_entry","google_certificate_manager_dns_authorization","google_cloud_ids_endpoint","google_cloud_run_domain_mapping","google_cloud_run_service","google_cloud_run_service_iam_member","google_cloud_run_v2_job","google_cloud_run_v2_service","google_cloud_scheduler_job","google_cloud_tasks_queue","google_cloudbuild_trigger","google_cloudbuild_worker_pool","google_cloudfunctions2_function","google_cloudfunctions_function","google_cloudfunctions_function_iam_member","google_composer_environment","google_compute_address","google_compute_attached_disk","google_compute_autoscaler","google_compute_backend_bucket","google_compute_backend_bucket_signed_url_key","google_compute_backend_service","google_compute_backend_service_signed_url_key","google_compute_disk","google_compute_disk_iam_member","google_compute_disk_resource_policy_attachment","google_compute_external_vpn_gateway","google_compute_firewall","google_compute_firewall_policy","google_compute_firewall_policy_association","google_compute_firewall_policy_rule","google_compute_forwarding_rule","google_compute_global_address","google_compute_global_forwarding_rule","google_compute_global_network_endpoint","google_compute_global_network_endpoint_group","google_compute_ha_vpn_gateway","google_compute_health_check","google_compute_http_health_check","google_compute_https_health_check","google_compute_image","google_compute_image_iam_member","google_compute_instance","google_compute_instance_from_template","google_compute_instance_group","google_compute_instance_group_manager","google_compute_instance_group_named_port","google_compute_instance_iam_member","google_compute_instance_template","google_compute_interconnect_attachment","google_compute_managed_ssl_certificate","google_compute_network","google_compute_network_endpoint","google_compute_network_endpoint_group","google_compute_network_firewall_policy","google_compute_network_firewall_policy_association","google_compute_network_peering","google_compute_network_peering_routes_config","google_compute_node_group","google_compute_node_template","google_compute_packet_mirroring","google_compute_per_instance_config","google_compute_project_default_network_tier","google_compute_project_metadata","google_compute_project_metadata_item","google_compute_region_autoscaler","google_compute_region_backend_service","google_compute_region_disk","google_compute_region_disk_iam_member","google_compute_region_disk_resource_policy_attachment","google_compute_region_health_check","google_compute_region_instance_group_manager","google_compute_region_network_endpoint","google_compute_region_network_endpoint_group","google_compute_region_network_firewall_policy","google_compute_region_network_firewall_policy_association","google_compute_region_per_instance_config","google_compute_region_ssl_certificate","google_compute_region_target_http_proxy","google_compute_region_target_https_proxy","google_compute_region_target_tcp_proxy","google_compute_region_url_map","google_compute_reservation","google_compute_resource_policy","google_compute_route","google_compute_router","google_compute_router_interface","google_compute_router_nat","google_compute_router_peer","google_compute_security_policy","google_compute_service_attachment","google_compute_shared_vpc_host_project","google_compute_shared_vpc_service_project","google_compute_snapshot","google_compute_snapshot_iam_member","google_compute_ssl_certificate","google_compute_ssl_policy","google_compute_subnetwork","google_compute_subnetwork_iam_member","google_compute_target_grpc_proxy","google_compute_target_http_proxy","google_compute_target_https_proxy","google_compute_target_instance","google_compute_target_pool","google_compute_target_ssl_proxy","google_compute_target_tcp_proxy","google_compute_url_map","google_compute_vpn_gateway","google_compute_vpn_tunnel","google_container_analysis_note","google_container_attached_cluster","google_container_aws_cluster","google_container_aws_node_pool","google_container_azure_client","google_container_azure_cluster","google_container_azure_node_pool","google_container_cluster","google_container_node_pool","google_container_registry","google_data_catalog_entry","google_data_catalog_entry_group","google_data_catalog_tag","google_data_catalog_tag_template","google_data_fusion_instance","google_data_loss_prevention_deidentify_template","google_data_loss_prevention_inspect_template","google_data_loss_prevention_job_trigger","google_data_loss_prevention_stored_info_type","google_dataflow_job","google_dataplex_asset","google_dataplex_lake","google_dataplex_zone","google_dataproc_autoscaling_policy","google_dataproc_cluster","google_dataproc_job","google_dataproc_metastore_service","google_dataproc_workflow_template","google_datastore_index","google_datastream_connection_profile","google_datastream_private_connection","google_dialogflow_cx_agent","google_dialogflow_cx_entity_type","google_dialogflow_cx_environment","google_dialogflow_cx_flow","google_dialogflow_cx_intent","google_dialogflow_cx_page","google_dialogflow_cx_version","google_dialogflow_cx_webhook","google_dns_managed_zone","google_dns_managed_zone_iam_member","google_dns_policy","google_dns_record_set","google_document_ai_processor","google_essential_contacts_contact","google_eventarc_channel","google_eventarc_google_channel_config","google_eventarc_trigger","google_filestore_backup","google_filestore_instance","google_filestore_snapshot","google_firebaserules_release","google_firebaserules_ruleset","google_folder","google_folder_iam_member","google_gke_backup_backup_plan","google_gke_hub_membership","google_gke_hub_membership_iam_member","google_healthcare_consent_store","google_healthcare_dataset","google_healthcare_dataset_iam_member","google_iam_workload_identity_pool","google_iam_workload_identity_pool_provider","google_iap_app_engine_service_iam_member","google_iap_app_engine_version_iam_member","google_iap_tunnel_iam_member","google_iap_web_backend_service_iam_member","google_iap_web_iam_member","google_iap_web_type_app_engine_iam_member","google_iap_web_type_compute_iam_member","google_identity_platform_default_supported_idp_config","google_identity_platform_inbound_saml_config","google_identity_platform_oauth_idp_config","google_identity_platform_project_default_config","google_identity_platform_tenant","google_identity_platform_tenant_default_supported_idp_config","google_identity_platform_tenant_inbound_saml_config","google_identity_platform_tenant_oauth_idp_config","google_kms_crypto_key","google_kms_crypto_key_iam_member","google_kms_crypto_key_version","google_kms_key_ring","google_kms_key_ring_iam_member","google_kms_key_ring_import_job","google_kms_secret_ciphertext","google_logging_folder_bucket_config","google_logging_folder_exclusion","google_logging_folder_sink","google_logging_log_view","google_logging_metric","google_logging_project_bucket_config","google_logging_project_exclusion","google_logging_project_sink","google_memcache_instance","google_ml_engine_model","google_monitoring_alert_policy","google_monitoring_custom_service","google_monitoring_dashboard","google_monitoring_group","google_monitoring_metric_descriptor","google_monitoring_notification_channel","google_monitoring_service","google_monitoring_slo","google_monitoring_uptime_check_config","google_network_connectivity_hub","google_network_connectivity_service_connection_policy","google_network_connectivity_spoke","google_network_management_connectivity_test","google_notebooks_environment","google_notebooks_instance","google_notebooks_instance_iam_member","google_notebooks_runtime","google_notebooks_runtime_iam_member","google_org_policy_policy","google_organization_iam_audit_config","google_organization_iam_custom_role","google_organization_iam_member","google_os_config_os_policy_assignment","google_os_config_patch_deployment","google_os_login_ssh_public_key","google_privateca_ca_pool","google_privateca_ca_pool_iam_member","google_privateca_certificate","google_privateca_certificate_authority","google_privateca_certificate_template","google_privateca_certificate_template_iam_member","google_project","google_project_default_service_accounts","google_project_iam_audit_config","google_project_iam_custom_role","google_project_iam_member","google_project_service","google_project_usage_export_bucket","google_pubsub_lite_reservation","google_pubsub_lite_subscription","google_pubsub_lite_topic","google_pubsub_schema","google_pubsub_subscription","google_pubsub_subscription_iam_member","google_pubsub_topic","google_pubsub_topic_iam_member","google_redis_cluster","google_redis_instance","google_secret_manager_secret","google_secret_manager_secret_iam_member","google_secret_manager_secret_version","google_service_account","google_service_account_iam_member","google_service_account_key","google_service_networking_connection","google_service_networking_peered_dns_domain","google_sourcerepo_repository","google_sourcerepo_repository_iam_member","google_spanner_database","google_spanner_database_iam_member","google_spanner_instance","google_spanner_instance_iam_member","google_sql_database","google_sql_database_instance","google_sql_source_representation_instance","google_sql_ssl_cert","google_sql_user","google_storage_bucket","google_storage_bucket_access_control","google_storage_bucket_acl","google_storage_bucket_iam_member","google_storage_bucket_object","google_storage_default_object_access_control","google_storage_default_object_acl","google_storage_hmac_key","google_storage_notification","google_storage_object_access_control","google_storage_object_acl","google_storage_transfer_agent_pool","google_tags_tag_binding","google_tags_tag_key","google_tags_tag_value","google_tpu_node","google_vertex_ai_dataset","google_vertex_ai_featurestore","google_vertex_ai_featurestore_entitytype","google_vertex_ai_tensorboard","google_vpc_access_connector","google_workflows_workflow"] \ No newline at end of file +["google_access_context_manager_access_level","google_access_context_manager_access_level_condition","google_access_context_manager_access_policy","google_access_context_manager_access_policy_iam_member","google_access_context_manager_service_perimeter","google_access_context_manager_service_perimeter_resource","google_active_directory_domain","google_alloydb_backup","google_alloydb_cluster","google_alloydb_instance","google_apigee_addons_config","google_apigee_endpoint_attachment","google_apigee_envgroup","google_apigee_envgroup_attachment","google_apigee_environment","google_apigee_environment_iam_member","google_apigee_instance","google_apigee_instance_attachment","google_apigee_nat_address","google_apigee_organization","google_apigee_sync_authorization","google_app_engine_application","google_app_engine_application_url_dispatch_rules","google_app_engine_firewall_rule","google_app_engine_service_network_settings","google_app_engine_standard_app_version","google_artifact_registry_repository","google_artifact_registry_repository_iam_member","google_beyondcorp_app_connection","google_beyondcorp_app_connector","google_beyondcorp_app_gateway","google_bigquery_analytics_hub_data_exchange","google_bigquery_analytics_hub_data_exchange_iam_member","google_bigquery_analytics_hub_listing","google_bigquery_connection","google_bigquery_data_transfer_config","google_bigquery_dataset","google_bigquery_dataset_access","google_bigquery_dataset_iam_binding","google_bigquery_dataset_iam_member","google_bigquery_dataset_iam_policy","google_bigquery_job","google_bigquery_reservation","google_bigquery_reservation_assignment","google_bigquery_routine","google_bigquery_table","google_bigquery_table_iam_binding","google_bigquery_table_iam_member","google_bigquery_table_iam_policy","google_bigtable_app_profile","google_bigtable_gc_policy","google_bigtable_instance","google_bigtable_instance_iam_binding","google_bigtable_instance_iam_member","google_bigtable_instance_iam_policy","google_bigtable_table","google_bigtable_table_iam_binding","google_bigtable_table_iam_member","google_bigtable_table_iam_policy","google_binary_authorization_attestor","google_binary_authorization_policy","google_certificate_manager_certificate","google_certificate_manager_certificate_map","google_certificate_manager_certificate_map_entry","google_certificate_manager_dns_authorization","google_cloud_ids_endpoint","google_cloud_run_domain_mapping","google_cloud_run_service","google_cloud_run_service_iam_member","google_cloud_run_v2_job","google_cloud_run_v2_service","google_cloud_scheduler_job","google_cloud_tasks_queue","google_cloudbuild_trigger","google_cloudbuild_worker_pool","google_cloudfunctions2_function","google_cloudfunctions_function","google_cloudfunctions_function_iam_member","google_composer_environment","google_compute_address","google_compute_attached_disk","google_compute_autoscaler","google_compute_backend_bucket","google_compute_backend_bucket_signed_url_key","google_compute_backend_service","google_compute_backend_service_signed_url_key","google_compute_disk","google_compute_disk_iam_member","google_compute_disk_resource_policy_attachment","google_compute_external_vpn_gateway","google_compute_firewall","google_compute_firewall_policy","google_compute_firewall_policy_association","google_compute_firewall_policy_rule","google_compute_forwarding_rule","google_compute_global_address","google_compute_global_forwarding_rule","google_compute_global_network_endpoint","google_compute_global_network_endpoint_group","google_compute_ha_vpn_gateway","google_compute_health_check","google_compute_http_health_check","google_compute_https_health_check","google_compute_image","google_compute_image_iam_member","google_compute_instance","google_compute_instance_from_template","google_compute_instance_group","google_compute_instance_group_manager","google_compute_instance_group_named_port","google_compute_instance_iam_member","google_compute_instance_template","google_compute_interconnect_attachment","google_compute_managed_ssl_certificate","google_compute_network","google_compute_network_endpoint","google_compute_network_endpoint_group","google_compute_network_firewall_policy","google_compute_network_firewall_policy_association","google_compute_network_peering","google_compute_network_peering_routes_config","google_compute_node_group","google_compute_node_template","google_compute_packet_mirroring","google_compute_per_instance_config","google_compute_project_default_network_tier","google_compute_project_metadata","google_compute_project_metadata_item","google_compute_region_autoscaler","google_compute_region_backend_service","google_compute_region_disk","google_compute_region_disk_iam_member","google_compute_region_disk_resource_policy_attachment","google_compute_region_health_check","google_compute_region_instance_group_manager","google_compute_region_network_endpoint","google_compute_region_network_endpoint_group","google_compute_region_network_firewall_policy","google_compute_region_network_firewall_policy_association","google_compute_region_per_instance_config","google_compute_region_ssl_certificate","google_compute_region_target_http_proxy","google_compute_region_target_https_proxy","google_compute_region_target_tcp_proxy","google_compute_region_url_map","google_compute_reservation","google_compute_resource_policy","google_compute_route","google_compute_router","google_compute_router_interface","google_compute_router_nat","google_compute_router_peer","google_compute_security_policy","google_compute_service_attachment","google_compute_shared_vpc_host_project","google_compute_shared_vpc_service_project","google_compute_snapshot","google_compute_snapshot_iam_member","google_compute_ssl_certificate","google_compute_ssl_policy","google_compute_subnetwork","google_compute_subnetwork_iam_member","google_compute_target_grpc_proxy","google_compute_target_http_proxy","google_compute_target_https_proxy","google_compute_target_instance","google_compute_target_pool","google_compute_target_ssl_proxy","google_compute_target_tcp_proxy","google_compute_url_map","google_compute_vpn_gateway","google_compute_vpn_tunnel","google_container_analysis_note","google_container_attached_cluster","google_container_aws_cluster","google_container_aws_node_pool","google_container_azure_client","google_container_azure_cluster","google_container_azure_node_pool","google_container_cluster","google_container_node_pool","google_container_registry","google_data_catalog_entry","google_data_catalog_entry_group","google_data_catalog_policy_tag","google_data_catalog_tag","google_data_catalog_tag_template","google_data_catalog_taxonomy","google_data_fusion_instance","google_data_loss_prevention_deidentify_template","google_data_loss_prevention_inspect_template","google_data_loss_prevention_job_trigger","google_data_loss_prevention_stored_info_type","google_dataflow_job","google_dataplex_asset","google_dataplex_lake","google_dataplex_zone","google_dataproc_autoscaling_policy","google_dataproc_cluster","google_dataproc_job","google_dataproc_metastore_service","google_dataproc_workflow_template","google_datastore_index","google_datastream_connection_profile","google_datastream_private_connection","google_dialogflow_cx_agent","google_dialogflow_cx_entity_type","google_dialogflow_cx_environment","google_dialogflow_cx_flow","google_dialogflow_cx_intent","google_dialogflow_cx_page","google_dialogflow_cx_version","google_dialogflow_cx_webhook","google_dns_managed_zone","google_dns_managed_zone_iam_member","google_dns_policy","google_dns_record_set","google_document_ai_processor","google_essential_contacts_contact","google_eventarc_channel","google_eventarc_google_channel_config","google_eventarc_trigger","google_filestore_backup","google_filestore_instance","google_filestore_snapshot","google_firebaserules_release","google_firebaserules_ruleset","google_folder","google_folder_iam_member","google_gke_backup_backup_plan","google_gke_hub_membership","google_gke_hub_membership_iam_member","google_healthcare_consent_store","google_healthcare_dataset","google_healthcare_dataset_iam_member","google_iam_workload_identity_pool","google_iam_workload_identity_pool_provider","google_iap_app_engine_service_iam_member","google_iap_app_engine_version_iam_member","google_iap_tunnel_iam_member","google_iap_web_backend_service_iam_member","google_iap_web_iam_member","google_iap_web_type_app_engine_iam_member","google_iap_web_type_compute_iam_member","google_identity_platform_default_supported_idp_config","google_identity_platform_inbound_saml_config","google_identity_platform_oauth_idp_config","google_identity_platform_project_default_config","google_identity_platform_tenant","google_identity_platform_tenant_default_supported_idp_config","google_identity_platform_tenant_inbound_saml_config","google_identity_platform_tenant_oauth_idp_config","google_kms_crypto_key","google_kms_crypto_key_iam_member","google_kms_crypto_key_version","google_kms_key_ring","google_kms_key_ring_iam_member","google_kms_key_ring_import_job","google_kms_secret_ciphertext","google_logging_folder_bucket_config","google_logging_folder_exclusion","google_logging_folder_sink","google_logging_log_view","google_logging_metric","google_logging_project_bucket_config","google_logging_project_exclusion","google_logging_project_sink","google_memcache_instance","google_ml_engine_model","google_monitoring_alert_policy","google_monitoring_custom_service","google_monitoring_dashboard","google_monitoring_group","google_monitoring_metric_descriptor","google_monitoring_notification_channel","google_monitoring_service","google_monitoring_slo","google_monitoring_uptime_check_config","google_network_connectivity_hub","google_network_connectivity_service_connection_policy","google_network_connectivity_spoke","google_network_management_connectivity_test","google_notebooks_environment","google_notebooks_instance","google_notebooks_instance_iam_member","google_notebooks_runtime","google_notebooks_runtime_iam_member","google_org_policy_policy","google_organization_iam_audit_config","google_organization_iam_custom_role","google_organization_iam_member","google_os_config_os_policy_assignment","google_os_config_patch_deployment","google_os_login_ssh_public_key","google_privateca_ca_pool","google_privateca_ca_pool_iam_member","google_privateca_certificate","google_privateca_certificate_authority","google_privateca_certificate_template","google_privateca_certificate_template_iam_member","google_project","google_project_default_service_accounts","google_project_iam_audit_config","google_project_iam_custom_role","google_project_iam_member","google_project_service","google_project_usage_export_bucket","google_pubsub_lite_reservation","google_pubsub_lite_subscription","google_pubsub_lite_topic","google_pubsub_schema","google_pubsub_subscription","google_pubsub_subscription_iam_member","google_pubsub_topic","google_pubsub_topic_iam_member","google_redis_cluster","google_redis_instance","google_secret_manager_secret","google_secret_manager_secret_iam_member","google_secret_manager_secret_version","google_service_account","google_service_account_iam_member","google_service_account_key","google_service_networking_connection","google_service_networking_peered_dns_domain","google_sourcerepo_repository","google_sourcerepo_repository_iam_member","google_spanner_database","google_spanner_database_iam_member","google_spanner_instance","google_spanner_instance_iam_member","google_sql_database","google_sql_database_instance","google_sql_source_representation_instance","google_sql_ssl_cert","google_sql_user","google_storage_bucket","google_storage_bucket_access_control","google_storage_bucket_acl","google_storage_bucket_iam_member","google_storage_bucket_object","google_storage_default_object_access_control","google_storage_default_object_acl","google_storage_hmac_key","google_storage_notification","google_storage_object_access_control","google_storage_object_acl","google_storage_transfer_agent_pool","google_tags_tag_binding","google_tags_tag_key","google_tags_tag_value","google_tpu_node","google_vertex_ai_dataset","google_vertex_ai_featurestore","google_vertex_ai_featurestore_entitytype","google_vertex_ai_tensorboard","google_vpc_access_connector","google_workflows_workflow"] \ No newline at end of file diff --git a/examples-generated/datacatalog/v1beta1/policytag.yaml b/examples-generated/datacatalog/v1beta1/policytag.yaml new file mode 100644 index 000000000..886b8c19a --- /dev/null +++ b/examples-generated/datacatalog/v1beta1/policytag.yaml @@ -0,0 +1,32 @@ +apiVersion: datacatalog.gcp.upbound.io/v1beta1 +kind: PolicyTag +metadata: + annotations: + meta.upbound.io/example-id: datacatalog/v1beta1/policytag + labels: + testing.upbound.io/example-name: basic_policy_tag + name: basic-policy-tag +spec: + forProvider: + description: A policy tag normally associated with low security items + displayName: Low security + taxonomySelector: + matchLabels: + testing.upbound.io/example-name: my_taxonomy + +--- + +apiVersion: datacatalog.gcp.upbound.io/v1beta1 +kind: Taxonomy +metadata: + annotations: + meta.upbound.io/example-id: datacatalog/v1beta1/policytag + labels: + testing.upbound.io/example-name: my_taxonomy + name: my-taxonomy +spec: + forProvider: + activatedPolicyTypes: + - FINE_GRAINED_ACCESS_CONTROL + description: A collection of policy tags + displayName: taxonomy_display_name diff --git a/examples-generated/datacatalog/v1beta1/taxonomy.yaml b/examples-generated/datacatalog/v1beta1/taxonomy.yaml new file mode 100644 index 000000000..4f971dc96 --- /dev/null +++ b/examples-generated/datacatalog/v1beta1/taxonomy.yaml @@ -0,0 +1,14 @@ +apiVersion: datacatalog.gcp.upbound.io/v1beta1 +kind: Taxonomy +metadata: + annotations: + meta.upbound.io/example-id: datacatalog/v1beta1/taxonomy + labels: + testing.upbound.io/example-name: basic_taxonomy + name: basic-taxonomy +spec: + forProvider: + activatedPolicyTypes: + - FINE_GRAINED_ACCESS_CONTROL + description: A collection of policy tags + displayName: my_taxonomy diff --git a/examples/datacatalog/v1beta1/policytag.yaml b/examples/datacatalog/v1beta1/policytag.yaml new file mode 100644 index 000000000..e5f793a0d --- /dev/null +++ b/examples/datacatalog/v1beta1/policytag.yaml @@ -0,0 +1,33 @@ +apiVersion: datacatalog.gcp.upbound.io/v1beta1 +kind: PolicyTag +metadata: + annotations: + meta.upbound.io/example-id: datacatalog/v1beta1/policytag + labels: + testing.upbound.io/example-name: basic_policy_tag + name: basic-policy-tag +spec: + forProvider: + description: A policy tag normally associated with low security items + displayName: Low security + taxonomySelector: + matchLabels: + testing.upbound.io/example-name: my_taxonomy + +--- + +apiVersion: datacatalog.gcp.upbound.io/v1beta1 +kind: Taxonomy +metadata: + annotations: + meta.upbound.io/example-id: datacatalog/v1beta1/policytag + labels: + testing.upbound.io/example-name: my_taxonomy + name: my-taxonomy +spec: + forProvider: + region: eu + activatedPolicyTypes: + - FINE_GRAINED_ACCESS_CONTROL + description: A collection of policy tags + displayName: taxonomy_display_name diff --git a/examples/datacatalog/v1beta1/taxonomy.yaml b/examples/datacatalog/v1beta1/taxonomy.yaml new file mode 100644 index 000000000..453793a2b --- /dev/null +++ b/examples/datacatalog/v1beta1/taxonomy.yaml @@ -0,0 +1,15 @@ +apiVersion: datacatalog.gcp.upbound.io/v1beta1 +kind: Taxonomy +metadata: + annotations: + meta.upbound.io/example-id: datacatalog/v1beta1/taxonomy + labels: + testing.upbound.io/example-name: basic_taxonomy + name: basic-taxonomy +spec: + forProvider: + region: eu + activatedPolicyTypes: + - FINE_GRAINED_ACCESS_CONTROL + description: A collection of policy tags + displayName: my_taxonomy diff --git a/internal/controller/datacatalog/policytag/zz_controller.go b/internal/controller/datacatalog/policytag/zz_controller.go new file mode 100755 index 000000000..cfa9ed11c --- /dev/null +++ b/internal/controller/datacatalog/policytag/zz_controller.go @@ -0,0 +1,91 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package policytag + +import ( + "time" + + "github.com/crossplane/crossplane-runtime/pkg/connection" + "github.com/crossplane/crossplane-runtime/pkg/event" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" + xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" + "github.com/pkg/errors" + ctrl "sigs.k8s.io/controller-runtime" + + v1beta1 "github.com/upbound/provider-gcp/apis/datacatalog/v1beta1" + features "github.com/upbound/provider-gcp/internal/features" +) + +// Setup adds a controller that reconciles PolicyTag managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1beta1.PolicyTag_GroupVersionKind.String()) + var initializers managed.InitializerChain + cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} + if o.SecretStoreConfigGVK != nil { + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) + } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1beta1.PolicyTag_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1beta1.PolicyTag_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter( + tjcontroller.NewTerraformPluginSDKAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["google_data_catalog_policy_tag"], + tjcontroller.WithTerraformPluginSDKAsyncLogger(o.Logger), + tjcontroller.WithTerraformPluginSDKAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithTerraformPluginSDKAsyncCallbackProvider(ac), + tjcontroller.WithTerraformPluginSDKAsyncMetricRecorder(metrics.NewMetricRecorder(v1beta1.PolicyTag_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithTerraformPluginSDKAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), + managed.WithLogger(o.Logger.WithValues("controller", name)), + managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), + managed.WithFinalizer(tjcontroller.NewOperationTrackerFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithTimeout(3 * time.Minute), + managed.WithInitializers(initializers), + managed.WithConnectionPublishers(cps...), + managed.WithPollInterval(o.PollInterval), + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } + + // register webhooks for the kind v1beta1.PolicyTag + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1beta1.PolicyTag{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1beta1.PolicyTag") + } + } + + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1beta1.PolicyTagList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1beta1.PolicyTagList") + } + } + + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1beta1.PolicyTag_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1beta1.PolicyTag{}, eventHandler). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/datacatalog/taxonomy/zz_controller.go b/internal/controller/datacatalog/taxonomy/zz_controller.go new file mode 100755 index 000000000..6c536cfef --- /dev/null +++ b/internal/controller/datacatalog/taxonomy/zz_controller.go @@ -0,0 +1,91 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by upjet. DO NOT EDIT. + +package taxonomy + +import ( + "time" + + "github.com/crossplane/crossplane-runtime/pkg/connection" + "github.com/crossplane/crossplane-runtime/pkg/event" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" + xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" + "github.com/pkg/errors" + ctrl "sigs.k8s.io/controller-runtime" + + v1beta1 "github.com/upbound/provider-gcp/apis/datacatalog/v1beta1" + features "github.com/upbound/provider-gcp/internal/features" +) + +// Setup adds a controller that reconciles Taxonomy managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1beta1.Taxonomy_GroupVersionKind.String()) + var initializers managed.InitializerChain + cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} + if o.SecretStoreConfigGVK != nil { + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) + } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1beta1.Taxonomy_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1beta1.Taxonomy_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter( + tjcontroller.NewTerraformPluginSDKAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["google_data_catalog_taxonomy"], + tjcontroller.WithTerraformPluginSDKAsyncLogger(o.Logger), + tjcontroller.WithTerraformPluginSDKAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithTerraformPluginSDKAsyncCallbackProvider(ac), + tjcontroller.WithTerraformPluginSDKAsyncMetricRecorder(metrics.NewMetricRecorder(v1beta1.Taxonomy_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithTerraformPluginSDKAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), + managed.WithLogger(o.Logger.WithValues("controller", name)), + managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), + managed.WithFinalizer(tjcontroller.NewOperationTrackerFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithTimeout(3 * time.Minute), + managed.WithInitializers(initializers), + managed.WithConnectionPublishers(cps...), + managed.WithPollInterval(o.PollInterval), + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } + + // register webhooks for the kind v1beta1.Taxonomy + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1beta1.Taxonomy{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1beta1.Taxonomy") + } + } + + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1beta1.TaxonomyList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1beta1.TaxonomyList") + } + } + + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1beta1.Taxonomy_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1beta1.Taxonomy{}, eventHandler). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/zz_datacatalog_setup.go b/internal/controller/zz_datacatalog_setup.go index d2b2784da..a04e35e16 100755 --- a/internal/controller/zz_datacatalog_setup.go +++ b/internal/controller/zz_datacatalog_setup.go @@ -11,8 +11,10 @@ import ( entry "github.com/upbound/provider-gcp/internal/controller/datacatalog/entry" entrygroup "github.com/upbound/provider-gcp/internal/controller/datacatalog/entrygroup" + policytag "github.com/upbound/provider-gcp/internal/controller/datacatalog/policytag" tag "github.com/upbound/provider-gcp/internal/controller/datacatalog/tag" tagtemplate "github.com/upbound/provider-gcp/internal/controller/datacatalog/tagtemplate" + taxonomy "github.com/upbound/provider-gcp/internal/controller/datacatalog/taxonomy" ) // Setup_datacatalog creates all controllers with the supplied logger and adds them to @@ -21,8 +23,10 @@ func Setup_datacatalog(mgr ctrl.Manager, o controller.Options) error { for _, setup := range []func(ctrl.Manager, controller.Options) error{ entry.Setup, entrygroup.Setup, + policytag.Setup, tag.Setup, tagtemplate.Setup, + taxonomy.Setup, } { if err := setup(mgr, o); err != nil { return err diff --git a/internal/controller/zz_monolith_setup.go b/internal/controller/zz_monolith_setup.go index 918c44345..dae5d5a43 100755 --- a/internal/controller/zz_monolith_setup.go +++ b/internal/controller/zz_monolith_setup.go @@ -209,8 +209,10 @@ 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" + policytag "github.com/upbound/provider-gcp/internal/controller/datacatalog/policytag" tag "github.com/upbound/provider-gcp/internal/controller/datacatalog/tag" tagtemplate "github.com/upbound/provider-gcp/internal/controller/datacatalog/tagtemplate" + taxonomy "github.com/upbound/provider-gcp/internal/controller/datacatalog/taxonomy" jobdataflow "github.com/upbound/provider-gcp/internal/controller/dataflow/job" instancedatafusion "github.com/upbound/provider-gcp/internal/controller/datafusion/instance" deidentifytemplate "github.com/upbound/provider-gcp/internal/controller/datalossprevention/deidentifytemplate" @@ -572,8 +574,10 @@ func Setup_monolith(mgr ctrl.Manager, o controller.Options) error { nodepoolcontainerazure.Setup, entry.Setup, entrygroup.Setup, + policytag.Setup, tag.Setup, tagtemplate.Setup, + taxonomy.Setup, jobdataflow.Setup, instancedatafusion.Setup, deidentifytemplate.Setup, diff --git a/package/crds/datacatalog.gcp.upbound.io_policytags.yaml b/package/crds/datacatalog.gcp.upbound.io_policytags.yaml new file mode 100644 index 000000000..9b5d897b0 --- /dev/null +++ b/package/crds/datacatalog.gcp.upbound.io_policytags.yaml @@ -0,0 +1,713 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.14.0 + name: policytags.datacatalog.gcp.upbound.io +spec: + group: datacatalog.gcp.upbound.io + names: + categories: + - crossplane + - managed + - gcp + kind: PolicyTag + listKind: PolicyTagList + plural: policytags + singular: policytag + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Synced')].status + name: SYNCED + type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .metadata.annotations.crossplane\.io/external-name + name: EXTERNAL-NAME + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1beta1 + schema: + openAPIV3Schema: + description: PolicyTag is the Schema for the PolicyTags API. Denotes one policy + tag in a taxonomy. + 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: PolicyTagSpec defines the desired state of PolicyTag + properties: + deletionPolicy: + default: Delete + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + enum: + - Orphan + - Delete + type: string + forProvider: + properties: + description: + description: |- + Description of this policy tag. It must: contain only unicode characters, tabs, + newlines, carriage returns and page breaks; and be at most 2000 bytes long when + encoded in UTF-8. If not set, defaults to an empty description. + If not set, defaults to an empty description. + type: string + displayName: + description: |- + User defined name of this policy tag. It must: be unique within the parent + taxonomy; contain only unicode letters, numbers, underscores, dashes and spaces; + not start or end with spaces; and be at most 200 bytes long when encoded in UTF-8. + type: string + parentPolicyTag: + description: |- + Resource name of this policy tag's parent policy tag. + If empty, it means this policy tag is a top level policy tag. + If not set, defaults to an empty string. + type: string + parentPolicyTagRef: + description: Reference to a PolicyTag in datacatalog to populate + parentPolicyTag. + 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 + parentPolicyTagSelector: + description: Selector for a PolicyTag in datacatalog to populate + parentPolicyTag. + 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 + taxonomy: + description: Taxonomy the policy tag is associated with + type: string + taxonomyRef: + description: Reference to a Taxonomy in datacatalog to populate + taxonomy. + 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 + taxonomySelector: + description: Selector for a Taxonomy in datacatalog to populate + taxonomy. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + type: object + initProvider: + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + properties: + description: + description: |- + Description of this policy tag. It must: contain only unicode characters, tabs, + newlines, carriage returns and page breaks; and be at most 2000 bytes long when + encoded in UTF-8. If not set, defaults to an empty description. + If not set, defaults to an empty description. + type: string + displayName: + description: |- + User defined name of this policy tag. It must: be unique within the parent + taxonomy; contain only unicode letters, numbers, underscores, dashes and spaces; + not start or end with spaces; and be at most 200 bytes long when encoded in UTF-8. + type: string + parentPolicyTag: + description: |- + Resource name of this policy tag's parent policy tag. + If empty, it means this policy tag is a top level policy tag. + If not set, defaults to an empty string. + type: string + parentPolicyTagRef: + description: Reference to a PolicyTag in datacatalog to populate + parentPolicyTag. + 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 + parentPolicyTagSelector: + description: Selector for a PolicyTag in datacatalog to populate + parentPolicyTag. + 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 + taxonomy: + description: Taxonomy the policy tag is associated with + type: string + taxonomyRef: + description: Reference to a Taxonomy in datacatalog to populate + taxonomy. + 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 + taxonomySelector: + description: Selector for a Taxonomy in datacatalog to populate + taxonomy. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + type: object + managementPolicies: + default: + - '*' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + items: + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array + providerConfigRef: + default: + name: default + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + publishConnectionDetailsTo: + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + properties: + configRef: + default: + name: default + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + metadata: + description: Metadata is the metadata for connection secret. + properties: + annotations: + additionalProperties: + type: string + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. + type: object + labels: + additionalProperties: + type: string + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. + type: object + type: + description: |- + Type is the SecretType for the connection secret. + - Only valid for Kubernetes Secret Stores. + type: string + type: object + name: + description: Name is the name of the connection secret. + type: string + required: + - name + type: object + writeConnectionSecretToRef: + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. + properties: + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - name + - namespace + type: object + required: + - forProvider + type: object + x-kubernetes-validations: + - message: spec.forProvider.displayName is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.displayName) + || (has(self.initProvider) && has(self.initProvider.displayName))' + status: + description: PolicyTagStatus defines the observed state of PolicyTag. + properties: + atProvider: + properties: + childPolicyTags: + description: Resource names of child policy tags of this policy + tag. + items: + type: string + type: array + description: + description: |- + Description of this policy tag. It must: contain only unicode characters, tabs, + newlines, carriage returns and page breaks; and be at most 2000 bytes long when + encoded in UTF-8. If not set, defaults to an empty description. + If not set, defaults to an empty description. + type: string + displayName: + description: |- + User defined name of this policy tag. It must: be unique within the parent + taxonomy; contain only unicode letters, numbers, underscores, dashes and spaces; + not start or end with spaces; and be at most 200 bytes long when encoded in UTF-8. + type: string + id: + description: an identifier for the resource with format {{name}} + type: string + name: + description: |- + Resource name of this policy tag, whose format is: + "projects/{project}/locations/{region}/taxonomies/{taxonomy}/policyTags/{policytag}" + type: string + parentPolicyTag: + description: |- + Resource name of this policy tag's parent policy tag. + If empty, it means this policy tag is a top level policy tag. + If not set, defaults to an empty string. + type: string + taxonomy: + description: Taxonomy the policy tag is associated with + type: string + type: object + conditions: + description: Conditions of the resource. + items: + description: A Condition that may apply to a resource. + properties: + lastTransitionTime: + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. + format: date-time + type: string + message: + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. + type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer + reason: + description: A Reason for this condition's last transition from + one status to another. + type: string + status: + description: Status of this condition; is it currently True, + False, or Unknown? + type: string + type: + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + type: string + required: + - lastTransitionTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/package/crds/datacatalog.gcp.upbound.io_taxonomies.yaml b/package/crds/datacatalog.gcp.upbound.io_taxonomies.yaml new file mode 100644 index 000000000..ae6fe2504 --- /dev/null +++ b/package/crds/datacatalog.gcp.upbound.io_taxonomies.yaml @@ -0,0 +1,427 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.14.0 + name: taxonomies.datacatalog.gcp.upbound.io +spec: + group: datacatalog.gcp.upbound.io + names: + categories: + - crossplane + - managed + - gcp + kind: Taxonomy + listKind: TaxonomyList + plural: taxonomies + singular: taxonomy + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Synced')].status + name: SYNCED + type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .metadata.annotations.crossplane\.io/external-name + name: EXTERNAL-NAME + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1beta1 + schema: + openAPIV3Schema: + description: Taxonomy is the Schema for the Taxonomys API. A collection of + policy tags that classify data along a common axis. + 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: TaxonomySpec defines the desired state of Taxonomy + properties: + deletionPolicy: + default: Delete + description: |- + DeletionPolicy specifies what will happen to the underlying external + when this managed resource is deleted - either "Delete" or "Orphan" the + external resource. + This field is planned to be deprecated in favor of the ManagementPolicies + field in a future release. Currently, both could be set independently and + non-default values would be honored if the feature flag is enabled. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + enum: + - Orphan + - Delete + type: string + forProvider: + properties: + activatedPolicyTypes: + description: |- + A list of policy types that are activated for this taxonomy. If not set, + defaults to an empty list. + Each value may be one of: POLICY_TYPE_UNSPECIFIED, FINE_GRAINED_ACCESS_CONTROL. + items: + type: string + type: array + description: + description: |- + Description of this taxonomy. It must: contain only unicode characters, + tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes + long when encoded in UTF-8. If not set, defaults to an empty description. + type: string + displayName: + description: |- + User defined name of this taxonomy. + The taxonomy display name must be unique within an organization. + It must: contain only unicode letters, numbers, underscores, dashes + and spaces; not start or end with spaces; and be at most 200 bytes + long when encoded in UTF-8. + type: string + project: + description: |- + The ID of the project in which the resource belongs. + If it is not provided, the provider project is used. + type: string + region: + description: Taxonomy location region. + type: string + type: object + initProvider: + description: |- + THIS IS A BETA FIELD. It will be honored + unless the Management Policies feature flag is disabled. + InitProvider holds the same fields as ForProvider, with the exception + of Identifier and other resource reference fields. The fields that are + in InitProvider are merged into ForProvider when the resource is created. + The same fields are also added to the terraform ignore_changes hook, to + avoid updating them after creation. This is useful for fields that are + required on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, like an + autoscaler. + properties: + activatedPolicyTypes: + description: |- + A list of policy types that are activated for this taxonomy. If not set, + defaults to an empty list. + Each value may be one of: POLICY_TYPE_UNSPECIFIED, FINE_GRAINED_ACCESS_CONTROL. + items: + type: string + type: array + description: + description: |- + Description of this taxonomy. It must: contain only unicode characters, + tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes + long when encoded in UTF-8. If not set, defaults to an empty description. + type: string + displayName: + description: |- + User defined name of this taxonomy. + The taxonomy display name must be unique within an organization. + It must: contain only unicode letters, numbers, underscores, dashes + and spaces; not start or end with spaces; and be at most 200 bytes + long when encoded in UTF-8. + type: string + project: + description: |- + The ID of the project in which the resource belongs. + If it is not provided, the provider project is used. + type: string + region: + description: Taxonomy location region. + type: string + type: object + managementPolicies: + default: + - '*' + description: |- + THIS IS A BETA FIELD. It is on by default but can be opted out + through a Crossplane feature flag. + ManagementPolicies specify the array of actions Crossplane is allowed to + take on the managed and external resources. + This field is planned to replace the DeletionPolicy field in a future + release. Currently, both could be set independently and non-default + values would be honored if the feature flag is enabled. If both are + custom, the DeletionPolicy field will be ignored. + See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md + items: + description: |- + A ManagementAction represents an action that the Crossplane controllers + can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array + providerConfigRef: + default: + name: default + description: |- + ProviderConfigReference specifies how the provider that will be used to + create, observe, update, and delete this managed resource should be + configured. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + publishConnectionDetailsTo: + description: |- + PublishConnectionDetailsTo specifies the connection secret config which + contains a name, metadata and a reference to secret store config to + which any connection details for this managed resource should be written. + Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + properties: + configRef: + default: + name: default + description: |- + SecretStoreConfigRef specifies which secret store config should be used + for this ConnectionSecret. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + metadata: + description: Metadata is the metadata for connection secret. + properties: + annotations: + additionalProperties: + type: string + description: |- + Annotations are the annotations to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.annotations". + - It is up to Secret Store implementation for others store types. + type: object + labels: + additionalProperties: + type: string + description: |- + Labels are the labels/tags to be added to connection secret. + - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store types. + type: object + type: + description: |- + Type is the SecretType for the connection secret. + - Only valid for Kubernetes Secret Stores. + type: string + type: object + name: + description: Name is the name of the connection secret. + type: string + required: + - name + type: object + writeConnectionSecretToRef: + description: |- + WriteConnectionSecretToReference specifies the namespace and name of a + Secret to which any connection details for this managed resource should + be written. Connection details frequently include the endpoint, username, + and password required to connect to the managed resource. + This field is planned to be replaced in a future release in favor of + PublishConnectionDetailsTo. Currently, both could be set independently + and connection details would be published to both without affecting + each other. + properties: + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - name + - namespace + type: object + required: + - forProvider + type: object + x-kubernetes-validations: + - message: spec.forProvider.displayName is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.displayName) + || (has(self.initProvider) && has(self.initProvider.displayName))' + status: + description: TaxonomyStatus defines the observed state of Taxonomy. + properties: + atProvider: + properties: + activatedPolicyTypes: + description: |- + A list of policy types that are activated for this taxonomy. If not set, + defaults to an empty list. + Each value may be one of: POLICY_TYPE_UNSPECIFIED, FINE_GRAINED_ACCESS_CONTROL. + items: + type: string + type: array + description: + description: |- + Description of this taxonomy. It must: contain only unicode characters, + tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes + long when encoded in UTF-8. If not set, defaults to an empty description. + type: string + displayName: + description: |- + User defined name of this taxonomy. + The taxonomy display name must be unique within an organization. + It must: contain only unicode letters, numbers, underscores, dashes + and spaces; not start or end with spaces; and be at most 200 bytes + long when encoded in UTF-8. + type: string + id: + description: an identifier for the resource with format {{name}} + type: string + name: + description: |- + Resource name of this taxonomy, whose format is: + "projects/{project}/locations/{region}/taxonomies/{taxonomy}". + type: string + project: + description: |- + The ID of the project in which the resource belongs. + If it is not provided, the provider project is used. + type: string + region: + description: Taxonomy location region. + type: string + type: object + conditions: + description: Conditions of the resource. + items: + description: A Condition that may apply to a resource. + properties: + lastTransitionTime: + description: |- + LastTransitionTime is the last time this condition transitioned from one + status to another. + format: date-time + type: string + message: + description: |- + A Message containing details about this condition's last transition from + one status to another, if any. + type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer + reason: + description: A Reason for this condition's last transition from + one status to another. + type: string + status: + description: Status of this condition; is it currently True, + False, or Unknown? + type: string + type: + description: |- + Type of this condition. At most one of each condition type may apply to + a resource at any point in time. + type: string + required: + - lastTransitionTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {}