diff --git a/Makefile b/Makefile index 47e11a8..d77e777 100644 --- a/Makefile +++ b/Makefile @@ -242,4 +242,4 @@ crossplane.help: help-special: crossplane.help -.PHONY: crossplane.help help-special \ No newline at end of file +.PHONY: crossplane.help help-special diff --git a/apis/confluent/v1alpha1/zz_generated.deepcopy.go b/apis/confluent/v1alpha1/zz_generated.deepcopy.go index 884f65d..5817f42 100644 --- a/apis/confluent/v1alpha1/zz_generated.deepcopy.go +++ b/apis/confluent/v1alpha1/zz_generated.deepcopy.go @@ -2164,6 +2164,66 @@ func (in *OwnerParameters) DeepCopy() *OwnerParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RegionInitParameters) DeepCopyInto(out *RegionInitParameters) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegionInitParameters. +func (in *RegionInitParameters) DeepCopy() *RegionInitParameters { + if in == nil { + return nil + } + out := new(RegionInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RegionObservation) DeepCopyInto(out *RegionObservation) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegionObservation. +func (in *RegionObservation) DeepCopy() *RegionObservation { + if in == nil { + return nil + } + out := new(RegionObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RegionParameters) DeepCopyInto(out *RegionParameters) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegionParameters. +func (in *RegionParameters) DeepCopy() *RegionParameters { + if in == nil { + return nil + } + out := new(RegionParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RoleBinding) DeepCopyInto(out *RoleBinding) { *out = *in @@ -2353,6 +2413,292 @@ func (in *RoleBindingStatus) DeepCopy() *RoleBindingStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SchemaRegistryCluster) DeepCopyInto(out *SchemaRegistryCluster) { + *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 SchemaRegistryCluster. +func (in *SchemaRegistryCluster) DeepCopy() *SchemaRegistryCluster { + if in == nil { + return nil + } + out := new(SchemaRegistryCluster) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SchemaRegistryCluster) 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 *SchemaRegistryClusterEnvironmentInitParameters) DeepCopyInto(out *SchemaRegistryClusterEnvironmentInitParameters) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchemaRegistryClusterEnvironmentInitParameters. +func (in *SchemaRegistryClusterEnvironmentInitParameters) DeepCopy() *SchemaRegistryClusterEnvironmentInitParameters { + if in == nil { + return nil + } + out := new(SchemaRegistryClusterEnvironmentInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SchemaRegistryClusterEnvironmentObservation) DeepCopyInto(out *SchemaRegistryClusterEnvironmentObservation) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchemaRegistryClusterEnvironmentObservation. +func (in *SchemaRegistryClusterEnvironmentObservation) DeepCopy() *SchemaRegistryClusterEnvironmentObservation { + if in == nil { + return nil + } + out := new(SchemaRegistryClusterEnvironmentObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SchemaRegistryClusterEnvironmentParameters) DeepCopyInto(out *SchemaRegistryClusterEnvironmentParameters) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchemaRegistryClusterEnvironmentParameters. +func (in *SchemaRegistryClusterEnvironmentParameters) DeepCopy() *SchemaRegistryClusterEnvironmentParameters { + if in == nil { + return nil + } + out := new(SchemaRegistryClusterEnvironmentParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SchemaRegistryClusterInitParameters) DeepCopyInto(out *SchemaRegistryClusterInitParameters) { + *out = *in + if in.Environment != nil { + in, out := &in.Environment, &out.Environment + *out = make([]SchemaRegistryClusterEnvironmentInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Package != nil { + in, out := &in.Package, &out.Package + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = make([]RegionInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchemaRegistryClusterInitParameters. +func (in *SchemaRegistryClusterInitParameters) DeepCopy() *SchemaRegistryClusterInitParameters { + if in == nil { + return nil + } + out := new(SchemaRegistryClusterInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SchemaRegistryClusterList) DeepCopyInto(out *SchemaRegistryClusterList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SchemaRegistryCluster, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchemaRegistryClusterList. +func (in *SchemaRegistryClusterList) DeepCopy() *SchemaRegistryClusterList { + if in == nil { + return nil + } + out := new(SchemaRegistryClusterList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SchemaRegistryClusterList) 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 *SchemaRegistryClusterObservation) DeepCopyInto(out *SchemaRegistryClusterObservation) { + *out = *in + if in.APIVersion != nil { + in, out := &in.APIVersion, &out.APIVersion + *out = new(string) + **out = **in + } + if in.DisplayName != nil { + in, out := &in.DisplayName, &out.DisplayName + *out = new(string) + **out = **in + } + if in.Environment != nil { + in, out := &in.Environment, &out.Environment + *out = make([]SchemaRegistryClusterEnvironmentObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Kind != nil { + in, out := &in.Kind, &out.Kind + *out = new(string) + **out = **in + } + if in.Package != nil { + in, out := &in.Package, &out.Package + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = make([]RegionObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ResourceName != nil { + in, out := &in.ResourceName, &out.ResourceName + *out = new(string) + **out = **in + } + if in.RestEndpoint != nil { + in, out := &in.RestEndpoint, &out.RestEndpoint + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchemaRegistryClusterObservation. +func (in *SchemaRegistryClusterObservation) DeepCopy() *SchemaRegistryClusterObservation { + if in == nil { + return nil + } + out := new(SchemaRegistryClusterObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SchemaRegistryClusterParameters) DeepCopyInto(out *SchemaRegistryClusterParameters) { + *out = *in + if in.Environment != nil { + in, out := &in.Environment, &out.Environment + *out = make([]SchemaRegistryClusterEnvironmentParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Package != nil { + in, out := &in.Package, &out.Package + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = make([]RegionParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchemaRegistryClusterParameters. +func (in *SchemaRegistryClusterParameters) DeepCopy() *SchemaRegistryClusterParameters { + if in == nil { + return nil + } + out := new(SchemaRegistryClusterParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SchemaRegistryClusterSpec) DeepCopyInto(out *SchemaRegistryClusterSpec) { + *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 SchemaRegistryClusterSpec. +func (in *SchemaRegistryClusterSpec) DeepCopy() *SchemaRegistryClusterSpec { + if in == nil { + return nil + } + out := new(SchemaRegistryClusterSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SchemaRegistryClusterStatus) DeepCopyInto(out *SchemaRegistryClusterStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchemaRegistryClusterStatus. +func (in *SchemaRegistryClusterStatus) DeepCopy() *SchemaRegistryClusterStatus { + if in == nil { + return nil + } + out := new(SchemaRegistryClusterStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ServiceAccount) DeepCopyInto(out *ServiceAccount) { *out = *in diff --git a/apis/confluent/v1alpha1/zz_generated.managed.go b/apis/confluent/v1alpha1/zz_generated.managed.go index a66a4af..ad5180d 100644 --- a/apis/confluent/v1alpha1/zz_generated.managed.go +++ b/apis/confluent/v1alpha1/zz_generated.managed.go @@ -367,6 +367,66 @@ func (mg *RoleBinding) SetWriteConnectionSecretToReference(r *xpv1.SecretReferen mg.Spec.WriteConnectionSecretToReference = r } +// GetCondition of this SchemaRegistryCluster. +func (mg *SchemaRegistryCluster) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this SchemaRegistryCluster. +func (mg *SchemaRegistryCluster) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicies of this SchemaRegistryCluster. +func (mg *SchemaRegistryCluster) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + +// GetProviderConfigReference of this SchemaRegistryCluster. +func (mg *SchemaRegistryCluster) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +// GetPublishConnectionDetailsTo of this SchemaRegistryCluster. +func (mg *SchemaRegistryCluster) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this SchemaRegistryCluster. +func (mg *SchemaRegistryCluster) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this SchemaRegistryCluster. +func (mg *SchemaRegistryCluster) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this SchemaRegistryCluster. +func (mg *SchemaRegistryCluster) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicies of this SchemaRegistryCluster. +func (mg *SchemaRegistryCluster) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + +// SetProviderConfigReference of this SchemaRegistryCluster. +func (mg *SchemaRegistryCluster) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +// SetPublishConnectionDetailsTo of this SchemaRegistryCluster. +func (mg *SchemaRegistryCluster) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this SchemaRegistryCluster. +func (mg *SchemaRegistryCluster) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} + // GetCondition of this ServiceAccount. func (mg *ServiceAccount) GetCondition(ct xpv1.ConditionType) xpv1.Condition { return mg.Status.GetCondition(ct) diff --git a/apis/confluent/v1alpha1/zz_generated.managedlist.go b/apis/confluent/v1alpha1/zz_generated.managedlist.go index 26e5113..302bc4c 100644 --- a/apis/confluent/v1alpha1/zz_generated.managedlist.go +++ b/apis/confluent/v1alpha1/zz_generated.managedlist.go @@ -61,6 +61,15 @@ func (l *RoleBindingList) GetItems() []resource.Managed { return items } +// GetItems of this SchemaRegistryClusterList. +func (l *SchemaRegistryClusterList) 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 ServiceAccountList. func (l *ServiceAccountList) GetItems() []resource.Managed { items := make([]resource.Managed, len(l.Items)) diff --git a/apis/confluent/v1alpha1/zz_generated_terraformed.go b/apis/confluent/v1alpha1/zz_generated_terraformed.go index 50b4496..825e732 100755 --- a/apis/confluent/v1alpha1/zz_generated_terraformed.go +++ b/apis/confluent/v1alpha1/zz_generated_terraformed.go @@ -522,6 +522,90 @@ func (tr *RoleBinding) GetTerraformSchemaVersion() int { return 0 } +// GetTerraformResourceType returns Terraform resource type for this SchemaRegistryCluster +func (mg *SchemaRegistryCluster) GetTerraformResourceType() string { + return "confluent_schema_registry_cluster" +} + +// GetConnectionDetailsMapping for this SchemaRegistryCluster +func (tr *SchemaRegistryCluster) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this SchemaRegistryCluster +func (tr *SchemaRegistryCluster) 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 SchemaRegistryCluster +func (tr *SchemaRegistryCluster) 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 SchemaRegistryCluster +func (tr *SchemaRegistryCluster) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this SchemaRegistryCluster +func (tr *SchemaRegistryCluster) 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 SchemaRegistryCluster +func (tr *SchemaRegistryCluster) 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 SchemaRegistryCluster +func (tr *SchemaRegistryCluster) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// LateInitialize this SchemaRegistryCluster using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *SchemaRegistryCluster) LateInitialize(attrs []byte) (bool, error) { + params := &SchemaRegistryClusterParameters{} + 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 *SchemaRegistryCluster) GetTerraformSchemaVersion() int { + return 0 +} + // GetTerraformResourceType returns Terraform resource type for this ServiceAccount func (mg *ServiceAccount) GetTerraformResourceType() string { return "confluent_service_account" diff --git a/apis/confluent/v1alpha1/zz_schemaregistrycluster_types.go b/apis/confluent/v1alpha1/zz_schemaregistrycluster_types.go new file mode 100755 index 0000000..bdfea2a --- /dev/null +++ b/apis/confluent/v1alpha1/zz_schemaregistrycluster_types.go @@ -0,0 +1,193 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + + v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" +) + +type RegionInitParameters struct { + + // The ID of the Environment that the Schema Registry cluster belongs to, for example, env-abc123. + // The unique identifier for the Schema Registry Region. + ID *string `json:"id,omitempty" tf:"id,omitempty"` +} + +type RegionObservation struct { + + // The ID of the Environment that the Schema Registry cluster belongs to, for example, env-abc123. + // The unique identifier for the Schema Registry Region. + ID *string `json:"id,omitempty" tf:"id,omitempty"` +} + +type RegionParameters struct { + + // The ID of the Environment that the Schema Registry cluster belongs to, for example, env-abc123. + // The unique identifier for the Schema Registry Region. + // +kubebuilder:validation:Optional + ID *string `json:"id" tf:"id,omitempty"` +} + +type SchemaRegistryClusterEnvironmentInitParameters struct { + + // The ID of the Environment that the Schema Registry cluster belongs to, for example, env-abc123. + // The unique identifier for the environment. + ID *string `json:"id,omitempty" tf:"id,omitempty"` +} + +type SchemaRegistryClusterEnvironmentObservation struct { + + // The ID of the Environment that the Schema Registry cluster belongs to, for example, env-abc123. + // The unique identifier for the environment. + ID *string `json:"id,omitempty" tf:"id,omitempty"` +} + +type SchemaRegistryClusterEnvironmentParameters struct { + + // The ID of the Environment that the Schema Registry cluster belongs to, for example, env-abc123. + // The unique identifier for the environment. + // +kubebuilder:validation:Optional + ID *string `json:"id" tf:"id,omitempty"` +} + +type SchemaRegistryClusterInitParameters struct { + + // supports the following: + // Environment objects represent an isolated namespace for your Confluent resources for organizational purposes. + Environment []SchemaRegistryClusterEnvironmentInitParameters `json:"environment,omitempty" tf:"environment,omitempty"` + + // The type of the billing package. Accepted values are: ESSENTIALS and ADVANCED. + // The billing package. + Package *string `json:"package,omitempty" tf:"package,omitempty"` + + // supports the following: + Region []RegionInitParameters `json:"region,omitempty" tf:"region,omitempty"` +} + +type SchemaRegistryClusterObservation struct { + + // An API Version of the schema version of the Schema Registry cluster, for example, srcm/v2. + // API Version defines the schema version of this representation of a Schema Registry Cluster. + APIVersion *string `json:"apiVersion,omitempty" tf:"api_version,omitempty"` + + // The name of the Schema Registry cluster, for example, Stream Governance Package. + // The name of the Schema Registry Cluster. + DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"` + + // supports the following: + // Environment objects represent an isolated namespace for your Confluent resources for organizational purposes. + Environment []SchemaRegistryClusterEnvironmentObservation `json:"environment,omitempty" tf:"environment,omitempty"` + + // The ID of the Environment that the Schema Registry cluster belongs to, for example, env-abc123. + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // A kind of the Schema Registry cluster, for example, Cluster. + // Kind defines the object Schema Registry Cluster represents. + Kind *string `json:"kind,omitempty" tf:"kind,omitempty"` + + // The type of the billing package. Accepted values are: ESSENTIALS and ADVANCED. + // The billing package. + Package *string `json:"package,omitempty" tf:"package,omitempty"` + + // supports the following: + Region []RegionObservation `json:"region,omitempty" tf:"region,omitempty"` + + // The Confluent Resource Name of the Schema Registry cluster, for example, crn://confluent.cloud/organization=1111aaaa-11aa-11aa-11aa-111111aaaaaa/environment=env-abc123/schema-registry=lsrc-abc123. + // The Confluent Resource Name of the Schema Registry Cluster. + ResourceName *string `json:"resourceName,omitempty" tf:"resource_name,omitempty"` + + // The HTTP endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-west-2.aws.confluent.cloud. + // The API endpoint of the Schema Registry Cluster. + RestEndpoint *string `json:"restEndpoint,omitempty" tf:"rest_endpoint,omitempty"` +} + +type SchemaRegistryClusterParameters struct { + + // supports the following: + // Environment objects represent an isolated namespace for your Confluent resources for organizational purposes. + // +kubebuilder:validation:Optional + Environment []SchemaRegistryClusterEnvironmentParameters `json:"environment,omitempty" tf:"environment,omitempty"` + + // The type of the billing package. Accepted values are: ESSENTIALS and ADVANCED. + // The billing package. + // +kubebuilder:validation:Optional + Package *string `json:"package,omitempty" tf:"package,omitempty"` + + // supports the following: + // +kubebuilder:validation:Optional + Region []RegionParameters `json:"region,omitempty" tf:"region,omitempty"` +} + +// SchemaRegistryClusterSpec defines the desired state of SchemaRegistryCluster +type SchemaRegistryClusterSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider SchemaRegistryClusterParameters `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 SchemaRegistryClusterInitParameters `json:"initProvider,omitempty"` +} + +// SchemaRegistryClusterStatus defines the observed state of SchemaRegistryCluster. +type SchemaRegistryClusterStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider SchemaRegistryClusterObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true + +// SchemaRegistryCluster is the Schema for the SchemaRegistryClusters API. +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" +// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:subresource:status +// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,confluent} +type SchemaRegistryCluster 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.environment) || (has(self.initProvider) && has(self.initProvider.environment))",message="spec.forProvider.environment is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.__package__) || (has(self.initProvider) && has(self.initProvider.__package__))",message="spec.forProvider.package is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region) || (has(self.initProvider) && has(self.initProvider.region))",message="spec.forProvider.region is a required parameter" + Spec SchemaRegistryClusterSpec `json:"spec"` + Status SchemaRegistryClusterStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// SchemaRegistryClusterList contains a list of SchemaRegistryClusters +type SchemaRegistryClusterList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []SchemaRegistryCluster `json:"items"` +} + +// Repository type metadata. +var ( + SchemaRegistryCluster_Kind = "SchemaRegistryCluster" + SchemaRegistryCluster_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: SchemaRegistryCluster_Kind}.String() + SchemaRegistryCluster_KindAPIVersion = SchemaRegistryCluster_Kind + "." + CRDGroupVersion.String() + SchemaRegistryCluster_GroupVersionKind = CRDGroupVersion.WithKind(SchemaRegistryCluster_Kind) +) + +func init() { + SchemeBuilder.Register(&SchemaRegistryCluster{}, &SchemaRegistryClusterList{}) +} diff --git a/config/confluent_schema_registry_cluster/config.go b/config/confluent_schema_registry_cluster/config.go new file mode 100644 index 0000000..29f5771 --- /dev/null +++ b/config/confluent_schema_registry_cluster/config.go @@ -0,0 +1,15 @@ +package confluent_schema_registry_cluster + +import ( + "github.com/crossplane/upjet/pkg/config" +) + +// Configure configures individual resources by adding custom ResourceConfigurators. +func Configure(p *config.Provider) { + p.AddResourceConfigurator("confluent_schema_registry_cluster", func(r *config.Resource) { + // We need to override the default group that upjet generated for + r.ShortGroup = "confluent" + r.UseAsync = true + r.Kind = "SchemaRegistryCluster" + }) +} diff --git a/config/external_name.go b/config/external_name.go index f255f8b..afaf9d1 100644 --- a/config/external_name.go +++ b/config/external_name.go @@ -10,13 +10,14 @@ import "github.com/crossplane/upjet/pkg/config" // provider. var ExternalNameConfigs = map[string]config.ExternalName{ // Import requires using a randomly generated ID from provider: nl-2e21sda - "confluent_environment": config.IdentifierFromProvider, - "confluent_kafka_cluster_config": config.IdentifierFromProvider, - "confluent_kafka_cluster": config.IdentifierFromProvider, - "confluent_service_account": config.IdentifierFromProvider, - "confluent_api_key": config.IdentifierFromProvider, - "confluent_kafka_acl": config.IdentifierFromProvider, - "confluent_role_binding": config.IdentifierFromProvider, + "confluent_environment": config.IdentifierFromProvider, + "confluent_kafka_cluster_config": config.IdentifierFromProvider, + "confluent_kafka_cluster": config.IdentifierFromProvider, + "confluent_service_account": config.IdentifierFromProvider, + "confluent_api_key": config.IdentifierFromProvider, + "confluent_kafka_acl": config.IdentifierFromProvider, + "confluent_role_binding": config.IdentifierFromProvider, + "confluent_schema_registry_cluster": config.IdentifierFromProvider, } // ExternalNameConfigurations applies all external name configs listed in the diff --git a/config/generated.lst b/config/generated.lst index 948d5d9..4be3f40 100644 --- a/config/generated.lst +++ b/config/generated.lst @@ -1 +1 @@ -["confluent_api_key","confluent_environment","confluent_kafka_acl","confluent_kafka_cluster","confluent_kafka_cluster_config","confluent_role_binding","confluent_service_account"] \ No newline at end of file +["confluent_api_key","confluent_environment","confluent_kafka_acl","confluent_kafka_cluster","confluent_kafka_cluster_config","confluent_role_binding","confluent_schema_registry_cluster","confluent_service_account"] \ No newline at end of file diff --git a/config/provider.go b/config/provider.go index ff01939..6499fa1 100644 --- a/config/provider.go +++ b/config/provider.go @@ -16,6 +16,7 @@ import ( confluentkafkacluster "github.com/crossplane-contrib/provider-confluent/config/confluent_kafka_cluster" confluentkafkaclusterconfig "github.com/crossplane-contrib/provider-confluent/config/confluent_kafka_cluster_config" confluentrolebinding "github.com/crossplane-contrib/provider-confluent/config/confluent_role_binding" + confluentschemaregistrycluster "github.com/crossplane-contrib/provider-confluent/config/confluent_schema_registry_cluster" confluentserviceaccount "github.com/crossplane-contrib/provider-confluent/config/confluent_service_account" ) @@ -49,6 +50,7 @@ func GetProvider() *ujconfig.Provider { confluentapikey.Configure, confluentkafkaacl.Configure, confluentrolebinding.Configure, + confluentschemaregistrycluster.Configure, } { configure(pc) } diff --git a/examples-generated/confluent/schemaregistrycluster.yaml b/examples-generated/confluent/schemaregistrycluster.yaml new file mode 100644 index 0000000..edc2972 --- /dev/null +++ b/examples-generated/confluent/schemaregistrycluster.yaml @@ -0,0 +1,29 @@ +apiVersion: confluent.crossplane.io/v1alpha1 +kind: SchemaRegistryCluster +metadata: + annotations: + meta.upbound.io/example-id: confluent/v1alpha1/schemaregistrycluster + labels: + testing.upbound.io/example-name: essentials + name: essentials +spec: + forProvider: + environment: + - id: ${confluent_environment.development.id} + package: ${data.confluent_schema_registry_region.example.package} + region: + - id: ${data.confluent_schema_registry_region.example.id} + +--- + +apiVersion: confluent.crossplane.io/v1alpha1 +kind: Environment +metadata: + annotations: + meta.upbound.io/example-id: confluent/v1alpha1/schemaregistrycluster + labels: + testing.upbound.io/example-name: development + name: development +spec: + forProvider: + displayName: Development diff --git a/internal/controller/confluent/schemaregistrycluster/zz_controller.go b/internal/controller/confluent/schemaregistrycluster/zz_controller.go new file mode 100755 index 0000000..9d4e19e --- /dev/null +++ b/internal/controller/confluent/schemaregistrycluster/zz_controller.go @@ -0,0 +1,66 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package schemaregistrycluster + +import ( + "time" + + "github.com/crossplane/crossplane-runtime/pkg/connection" + "github.com/crossplane/crossplane-runtime/pkg/event" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" + xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" + + v1alpha1 "github.com/crossplane-contrib/provider-confluent/apis/confluent/v1alpha1" + features "github.com/crossplane-contrib/provider-confluent/internal/features" +) + +// Setup adds a controller that reconciles SchemaRegistryCluster managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1alpha1.SchemaRegistryCluster_GroupVersionKind.String()) + var initializers managed.InitializerChain + cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} + if o.SecretStoreConfigGVK != nil { + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) + } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.SchemaRegistryCluster_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.SchemaRegistryCluster_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["confluent_schema_registry_cluster"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), + tjcontroller.WithCallbackProvider(ac), + )), + managed.WithLogger(o.Logger.WithValues("controller", name)), + managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithTimeout(3 * time.Minute), + managed.WithInitializers(initializers), + managed.WithConnectionPublishers(cps...), + managed.WithPollInterval(o.PollInterval), + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.SchemaRegistryCluster_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.SchemaRegistryCluster{}, eventHandler). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/zz_setup.go b/internal/controller/zz_setup.go index 64ca292..8172604 100755 --- a/internal/controller/zz_setup.go +++ b/internal/controller/zz_setup.go @@ -15,6 +15,7 @@ import ( environment "github.com/crossplane-contrib/provider-confluent/internal/controller/confluent/environment" kafkaacl "github.com/crossplane-contrib/provider-confluent/internal/controller/confluent/kafkaacl" rolebinding "github.com/crossplane-contrib/provider-confluent/internal/controller/confluent/rolebinding" + schemaregistrycluster "github.com/crossplane-contrib/provider-confluent/internal/controller/confluent/schemaregistrycluster" serviceaccount "github.com/crossplane-contrib/provider-confluent/internal/controller/confluent/serviceaccount" providerconfig "github.com/crossplane-contrib/provider-confluent/internal/controller/providerconfig" ) @@ -29,6 +30,7 @@ func Setup(mgr ctrl.Manager, o controller.Options) error { environment.Setup, kafkaacl.Setup, rolebinding.Setup, + schemaregistrycluster.Setup, serviceaccount.Setup, providerconfig.Setup, } { diff --git a/package/crds/confluent.crossplane.io_schemaregistryclusters.yaml b/package/crds/confluent.crossplane.io_schemaregistryclusters.yaml new file mode 100644 index 0000000..031afd3 --- /dev/null +++ b/package/crds/confluent.crossplane.io_schemaregistryclusters.yaml @@ -0,0 +1,419 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + name: schemaregistryclusters.confluent.crossplane.io +spec: + group: confluent.crossplane.io + names: + categories: + - crossplane + - managed + - confluent + kind: SchemaRegistryCluster + listKind: SchemaRegistryClusterList + plural: schemaregistryclusters + singular: schemaregistrycluster + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .status.conditions[?(@.type=='Synced')].status + name: SYNCED + type: string + - jsonPath: .metadata.annotations.crossplane\.io/external-name + name: EXTERNAL-NAME + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: SchemaRegistryCluster is the Schema for the SchemaRegistryClusters + API. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: SchemaRegistryClusterSpec defines the desired state of SchemaRegistryCluster + 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: + environment: + description: 'supports the following: Environment objects represent + an isolated namespace for your Confluent resources for organizational + purposes.' + items: + properties: + id: + description: The ID of the Environment that the Schema Registry + cluster belongs to, for example, env-abc123. The unique + identifier for the environment. + type: string + type: object + type: array + package: + description: 'The type of the billing package. Accepted values + are: ESSENTIALS and ADVANCED. The billing package.' + type: string + region: + description: 'supports the following:' + items: + properties: + id: + description: The ID of the Environment that the Schema Registry + cluster belongs to, for example, env-abc123. The unique + identifier for the Schema Registry Region. + type: string + type: object + type: array + 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: + environment: + description: 'supports the following: Environment objects represent + an isolated namespace for your Confluent resources for organizational + purposes.' + items: + properties: + id: + description: The ID of the Environment that the Schema Registry + cluster belongs to, for example, env-abc123. The unique + identifier for the environment. + type: string + type: object + type: array + package: + description: 'The type of the billing package. Accepted values + are: ESSENTIALS and ADVANCED. The billing package.' + type: string + region: + description: 'supports the following:' + items: + properties: + id: + description: The ID of the Environment that the Schema Registry + cluster belongs to, for example, env-abc123. The unique + identifier for the Schema Registry Region. + type: string + type: object + type: array + 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.environment is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.environment) + || (has(self.initProvider) && has(self.initProvider.environment))' + - message: spec.forProvider.package is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.__package__) + || (has(self.initProvider) && has(self.initProvider.__package__))' + - message: spec.forProvider.region is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.region) + || (has(self.initProvider) && has(self.initProvider.region))' + status: + description: SchemaRegistryClusterStatus defines the observed state of + SchemaRegistryCluster. + properties: + atProvider: + properties: + apiVersion: + description: An API Version of the schema version of the Schema + Registry cluster, for example, srcm/v2. API Version defines + the schema version of this representation of a Schema Registry + Cluster. + type: string + displayName: + description: The name of the Schema Registry cluster, for example, + Stream Governance Package. The name of the Schema Registry Cluster. + type: string + environment: + description: 'supports the following: Environment objects represent + an isolated namespace for your Confluent resources for organizational + purposes.' + items: + properties: + id: + description: The ID of the Environment that the Schema Registry + cluster belongs to, for example, env-abc123. The unique + identifier for the environment. + type: string + type: object + type: array + id: + description: The ID of the Environment that the Schema Registry + cluster belongs to, for example, env-abc123. + type: string + kind: + description: A kind of the Schema Registry cluster, for example, + Cluster. Kind defines the object Schema Registry Cluster represents. + type: string + package: + description: 'The type of the billing package. Accepted values + are: ESSENTIALS and ADVANCED. The billing package.' + type: string + region: + description: 'supports the following:' + items: + properties: + id: + description: The ID of the Environment that the Schema Registry + cluster belongs to, for example, env-abc123. The unique + identifier for the Schema Registry Region. + type: string + type: object + type: array + resourceName: + description: The Confluent Resource Name of the Schema Registry + cluster, for example, crn://confluent.cloud/organization=1111aaaa-11aa-11aa-11aa-111111aaaaaa/environment=env-abc123/schema-registry=lsrc-abc123. + The Confluent Resource Name of the Schema Registry Cluster. + type: string + restEndpoint: + description: The HTTP endpoint of the Schema Registry cluster, + for example, https://psrc-00000.us-west-2.aws.confluent.cloud. + The API endpoint of the Schema Registry Cluster. + type: string + type: object + conditions: + description: Conditions of the resource. + items: + description: A Condition that may apply to a resource. + properties: + lastTransitionTime: + description: LastTransitionTime is the last time this condition + transitioned from one status to another. + format: date-time + type: string + message: + description: A Message containing details about this condition's + last transition from one status to another, if any. + type: string + reason: + description: A Reason for this condition's last transition from + one status to another. + type: string + status: + description: Status of this condition; is it currently True, + False, or Unknown? + type: string + type: + description: Type of this condition. At most one of each condition + type may apply to a resource at any point in time. + type: string + required: + - lastTransitionTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {}