From b071a4568307f01a8bca57cd548439ffa38f3a84 Mon Sep 17 00:00:00 2001 From: Jason Vigil Date: Fri, 13 Dec 2024 19:08:17 +0000 Subject: [PATCH] feat: Promote FirestoreDatabase to v1beta1 --- apis/firestore/v1beta1/database_types.go | 152 +++++++ apis/firestore/v1beta1/doc.go | 16 + apis/firestore/v1beta1/groupversion_info.go | 33 ++ apis/firestore/v1beta1/types.generated.go | 93 +++++ .../v1beta1/zz_generated.deepcopy.go | 204 ++++++++++ ...bases.firestore.cnrm.cloud.google.com.yaml | 195 +++++++++ .../firestore_v1beta1_firestoredatabase.yaml | 24 ++ config/servicemappings/firestore.yaml | 3 + dev/tools/controllerbuilder/generate.sh | 4 +- .../firestore/firestoredatabase_controller.go | 2 +- .../firestore/firestoredatabase_mappings.go | 2 +- pkg/gvks/supportedgvks/gvks_generated.go | 10 + .../snippetgeneration/snippetgeneration.go | 1 + pkg/test/resourcefixture/sets.go | 1 + ..._object_firestoredatabase-full.golden.yaml | 4 +- .../firestoredatabase-full/create.yaml | 2 +- .../firestoredatabase-full/update.yaml | 2 +- ...ject_firestoredatabase-minimal.golden.yaml | 4 +- .../firestoredatabase-minimal/create.yaml | 2 +- .../resource-reference/_toc.yaml | 2 + .../firestore/firestoredatabase.md | 384 ++++++++++++++++++ .../resource-reference/overview.md | 4 + .../firestore_firestoredatabase.tmpl | 53 +++ 23 files changed, 1188 insertions(+), 9 deletions(-) create mode 100644 apis/firestore/v1beta1/database_types.go create mode 100644 apis/firestore/v1beta1/doc.go create mode 100644 apis/firestore/v1beta1/groupversion_info.go create mode 100644 apis/firestore/v1beta1/types.generated.go create mode 100644 apis/firestore/v1beta1/zz_generated.deepcopy.go create mode 100644 config/samples/resources/firestoredatabase/basic-firestoredatabase/firestore_v1beta1_firestoredatabase.yaml create mode 100644 scripts/generate-google3-docs/resource-reference/generated/resource-docs/firestore/firestoredatabase.md create mode 100644 scripts/generate-google3-docs/resource-reference/templates/firestore_firestoredatabase.tmpl diff --git a/apis/firestore/v1beta1/database_types.go b/apis/firestore/v1beta1/database_types.go new file mode 100644 index 0000000000..114302bdcc --- /dev/null +++ b/apis/firestore/v1beta1/database_types.go @@ -0,0 +1,152 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1beta1 + +import ( + "github.com/GoogleCloudPlatform/k8s-config-connector/apis/refs/v1beta1" + "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/apis/k8s/v1alpha1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +var FirestoreDatabaseGVK = GroupVersion.WithKind("FirestoreDatabase") + +// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! +// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. + +// FirestoreDatabaseSpec defines the desired state of FirestoreDatabase +// +kcc:proto=google.firestore.admin.v1.Database +type FirestoreDatabaseSpec struct { + // Immutable. The Project that this resource belongs to. + ProjectRef v1beta1.ProjectRef `json:"projectRef"` + + // The FirestoreDatabase name. If not given, the metadata.name will be used. + ResourceID *string `json:"resourceID,omitempty"` + + // The location of the database. Available locations are listed at + // https://cloud.google.com/firestore/docs/locations. + LocationID *string `json:"locationID,omitempty"` + + // The concurrency control mode to use for this database. + // See https://cloud.google.com/firestore/docs/reference/rest/v1/projects.databases#concurrencymode for more info. + ConcurrencyMode *string `json:"concurrencyMode,omitempty"` + + // Whether to enable the PITR feature on this database. + // See https://cloud.google.com/firestore/docs/reference/rest/v1/projects.databases#pointintimerecoveryenablement for more info. + PointInTimeRecoveryEnablement *string `json:"pointInTimeRecoveryEnablement,omitempty"` +} + +// FirestoreDatabaseStatus defines the config connector machine state of FirestoreDatabase +type FirestoreDatabaseStatus struct { + /* Conditions represent the latest available observations of the + object's current state. */ + Conditions []v1alpha1.Condition `json:"conditions,omitempty"` + + // ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource. + // +optional + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + + // A unique specifier for the FirestoreDatabase resource in GCP. + // +optional + ExternalRef *string `json:"externalRef,omitempty"` + + // ObservedState is the state of the resource as most recently observed in GCP. + // +optional + ObservedState *FirestoreDatabaseObservedState `json:"observedState,omitempty"` +} + +// FirestoreDatabaseSpec defines the desired state of FirestoreDatabase +// +kcc:proto=google.firestore.admin.v1.Database +type FirestoreDatabaseObservedState struct { + // Output only. The system-generated UUID4 for this Database. + Uid *string `json:"uid,omitempty"` + + // Output only. The timestamp at which this database was created. Databases + // created before 2016 do not populate create_time. + CreateTime *string `json:"createTime,omitempty"` + + // Output only. The timestamp at which this database was most recently + // updated. Note this only includes updates to the database resource and not + // data contained by the database. + UpdateTime *string `json:"updateTime,omitempty"` + + // Output only. The period during which past versions of data are retained in + // the database. + // + // Any [read][google.firestore.v1.GetDocumentRequest.read_time] + // or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify + // a `read_time` within this window, and will read the state of the database + // at that time. + // + // If the PITR feature is enabled, the retention period is 7 days. Otherwise, + // the retention period is 1 hour. + VersionRetentionPeriod *string `json:"versionRetentionPeriod,omitempty"` + + // Output only. The earliest timestamp at which older versions of the data can + // be read from the database. See [version_retention_period] above; this field + // is populated with `now - version_retention_period`. + // + // This value is continuously updated, and becomes stale the moment it is + // queried. If you are using this value to recover data, make sure to account + // for the time from the moment when the value is queried to the moment when + // you initiate the recovery. + EarliestVersionTime *string `json:"earliestVersionTime,omitempty"` + + // Output only. The key_prefix for this database. This key_prefix is used, in + // combination with the project id ("~") to construct + // the application id that is returned from the Cloud Datastore APIs in Google + // App Engine first generation runtimes. + // + // This value may be empty in which case the appid to use for URL-encoded keys + // is the project_id (eg: foo instead of v~foo). + KeyPrefix *string `json:"keyPrefix,omitempty"` + + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + Etag *string `json:"etag,omitempty"` +} + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:resource:categories=gcp +// +kubebuilder:subresource:status +// +kubebuilder:metadata:labels="cnrm.cloud.google.com/managed-by-kcc=true";"cnrm.cloud.google.com/system=true" +// +kubebuilder:printcolumn:name="Age",JSONPath=".metadata.creationTimestamp",type="date" +// +kubebuilder:printcolumn:name="Ready",JSONPath=".status.conditions[?(@.type=='Ready')].status",type="string",description="When 'True', the most recent reconcile of the resource succeeded" +// +kubebuilder:printcolumn:name="Status",JSONPath=".status.conditions[?(@.type=='Ready')].reason",type="string",description="The reason for the value in 'Ready'" +// +kubebuilder:printcolumn:name="Status Age",JSONPath=".status.conditions[?(@.type=='Ready')].lastTransitionTime",type="date",description="The last transition time for the value in 'Status'" + +// FirestoreDatabase is the Schema for the FirestoreDatabase API +// +k8s:openapi-gen=true +// +kubebuilder:storageversion +type FirestoreDatabase struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec FirestoreDatabaseSpec `json:"spec,omitempty"` + Status FirestoreDatabaseStatus `json:"status,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// FirestoreDatabaseList contains a list of FirestoreDatabase +type FirestoreDatabaseList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []FirestoreDatabase `json:"items"` +} + +func init() { + SchemeBuilder.Register(&FirestoreDatabase{}, &FirestoreDatabaseList{}) +} diff --git a/apis/firestore/v1beta1/doc.go b/apis/firestore/v1beta1/doc.go new file mode 100644 index 0000000000..51539afc31 --- /dev/null +++ b/apis/firestore/v1beta1/doc.go @@ -0,0 +1,16 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// +kcc:proto=google.firestore.admin.v1 +package v1beta1 diff --git a/apis/firestore/v1beta1/groupversion_info.go b/apis/firestore/v1beta1/groupversion_info.go new file mode 100644 index 0000000000..b170c0745a --- /dev/null +++ b/apis/firestore/v1beta1/groupversion_info.go @@ -0,0 +1,33 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// +kubebuilder:object:generate=true +// +groupName=firestore.cnrm.cloud.google.com +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects + GroupVersion = schema.GroupVersion{Group: "firestore.cnrm.cloud.google.com", Version: "v1alpha1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/apis/firestore/v1beta1/types.generated.go b/apis/firestore/v1beta1/types.generated.go new file mode 100644 index 0000000000..42edfd2ecf --- /dev/null +++ b/apis/firestore/v1beta1/types.generated.go @@ -0,0 +1,93 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1beta1 + +/* +// +kcc:proto=google.firestore.admin.v1.Database +type Database struct { + // The resource name of the Database. + // Format: `projects/{project}/databases/{database}` + Name *string `json:"name,omitempty"` + + // Output only. The system-generated UUID4 for this Database. + Uid *string `json:"uid,omitempty"` + + // Output only. The timestamp at which this database was created. Databases + // created before 2016 do not populate create_time. + CreateTime *string `json:"createTime,omitempty"` + + // Output only. The timestamp at which this database was most recently + // updated. Note this only includes updates to the database resource and not + // data contained by the database. + UpdateTime *string `json:"updateTime,omitempty"` + + // The location of the database. Available locations are listed at + // https://cloud.google.com/firestore/docs/locations. + LocationID *string `json:"locationID,omitempty"` + + // The type of the database. + // See https://cloud.google.com/datastore/docs/firestore-or-datastore for + // information about how to choose. + Type *string `json:"type,omitempty"` + + // The concurrency control mode to use for this database. + ConcurrencyMode *string `json:"concurrencyMode,omitempty"` + + // Output only. The period during which past versions of data are retained in + // the database. + // + // Any [read][google.firestore.v1.GetDocumentRequest.read_time] + // or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify + // a `read_time` within this window, and will read the state of the database + // at that time. + // + // If the PITR feature is enabled, the retention period is 7 days. Otherwise, + // the retention period is 1 hour. + VersionRetentionPeriod *string `json:"versionRetentionPeriod,omitempty"` + + // Output only. The earliest timestamp at which older versions of the data can + // be read from the database. See [version_retention_period] above; this field + // is populated with `now - version_retention_period`. + // + // This value is continuously updated, and becomes stale the moment it is + // queried. If you are using this value to recover data, make sure to account + // for the time from the moment when the value is queried to the moment when + // you initiate the recovery. + EarliestVersionTime *string `json:"earliestVersionTime,omitempty"` + + // Whether to enable the PITR feature on this database. + PointInTimeRecoveryEnablement *string `json:"pointInTimeRecoveryEnablement,omitempty"` + + // The App Engine integration mode to use for this database. + AppEngineIntegrationMode *string `json:"appEngineIntegrationMode,omitempty"` + + // Output only. The key_prefix for this database. This key_prefix is used, in + // combination with the project id ("~") to construct + // the application id that is returned from the Cloud Datastore APIs in Google + // App Engine first generation runtimes. + // + // This value may be empty in which case the appid to use for URL-encoded keys + // is the project_id (eg: foo instead of v~foo). + KeyPrefix *string `json:"keyPrefix,omitempty"` + + // State of delete protection for the database. + DeleteProtectionState *string `json:"deleteProtectionState,omitempty"` + + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + Etag *string `json:"etag,omitempty"` +} +*/ diff --git a/apis/firestore/v1beta1/zz_generated.deepcopy.go b/apis/firestore/v1beta1/zz_generated.deepcopy.go new file mode 100644 index 0000000000..e50db5f39c --- /dev/null +++ b/apis/firestore/v1beta1/zz_generated.deepcopy.go @@ -0,0 +1,204 @@ +//go:build !ignore_autogenerated + +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by controller-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/apis/k8s/v1alpha1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FirestoreDatabase) DeepCopyInto(out *FirestoreDatabase) { + *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 FirestoreDatabase. +func (in *FirestoreDatabase) DeepCopy() *FirestoreDatabase { + if in == nil { + return nil + } + out := new(FirestoreDatabase) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *FirestoreDatabase) 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 *FirestoreDatabaseList) DeepCopyInto(out *FirestoreDatabaseList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]FirestoreDatabase, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FirestoreDatabaseList. +func (in *FirestoreDatabaseList) DeepCopy() *FirestoreDatabaseList { + if in == nil { + return nil + } + out := new(FirestoreDatabaseList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *FirestoreDatabaseList) 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 *FirestoreDatabaseObservedState) DeepCopyInto(out *FirestoreDatabaseObservedState) { + *out = *in + if in.Uid != nil { + in, out := &in.Uid, &out.Uid + *out = new(string) + **out = **in + } + if in.CreateTime != nil { + in, out := &in.CreateTime, &out.CreateTime + *out = new(string) + **out = **in + } + if in.UpdateTime != nil { + in, out := &in.UpdateTime, &out.UpdateTime + *out = new(string) + **out = **in + } + if in.VersionRetentionPeriod != nil { + in, out := &in.VersionRetentionPeriod, &out.VersionRetentionPeriod + *out = new(string) + **out = **in + } + if in.EarliestVersionTime != nil { + in, out := &in.EarliestVersionTime, &out.EarliestVersionTime + *out = new(string) + **out = **in + } + if in.KeyPrefix != nil { + in, out := &in.KeyPrefix, &out.KeyPrefix + *out = new(string) + **out = **in + } + if in.Etag != nil { + in, out := &in.Etag, &out.Etag + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FirestoreDatabaseObservedState. +func (in *FirestoreDatabaseObservedState) DeepCopy() *FirestoreDatabaseObservedState { + if in == nil { + return nil + } + out := new(FirestoreDatabaseObservedState) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FirestoreDatabaseSpec) DeepCopyInto(out *FirestoreDatabaseSpec) { + *out = *in + out.ProjectRef = in.ProjectRef + if in.ResourceID != nil { + in, out := &in.ResourceID, &out.ResourceID + *out = new(string) + **out = **in + } + if in.LocationID != nil { + in, out := &in.LocationID, &out.LocationID + *out = new(string) + **out = **in + } + if in.ConcurrencyMode != nil { + in, out := &in.ConcurrencyMode, &out.ConcurrencyMode + *out = new(string) + **out = **in + } + if in.PointInTimeRecoveryEnablement != nil { + in, out := &in.PointInTimeRecoveryEnablement, &out.PointInTimeRecoveryEnablement + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FirestoreDatabaseSpec. +func (in *FirestoreDatabaseSpec) DeepCopy() *FirestoreDatabaseSpec { + if in == nil { + return nil + } + out := new(FirestoreDatabaseSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FirestoreDatabaseStatus) DeepCopyInto(out *FirestoreDatabaseStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1alpha1.Condition, len(*in)) + copy(*out, *in) + } + if in.ObservedGeneration != nil { + in, out := &in.ObservedGeneration, &out.ObservedGeneration + *out = new(int64) + **out = **in + } + if in.ExternalRef != nil { + in, out := &in.ExternalRef, &out.ExternalRef + *out = new(string) + **out = **in + } + if in.ObservedState != nil { + in, out := &in.ObservedState, &out.ObservedState + *out = new(FirestoreDatabaseObservedState) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FirestoreDatabaseStatus. +func (in *FirestoreDatabaseStatus) DeepCopy() *FirestoreDatabaseStatus { + if in == nil { + return nil + } + out := new(FirestoreDatabaseStatus) + in.DeepCopyInto(out) + return out +} diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_firestoredatabases.firestore.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_firestoredatabases.firestore.cnrm.cloud.google.com.yaml index dd602970ff..06e619d11a 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_firestoredatabases.firestore.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_firestoredatabases.firestore.cnrm.cloud.google.com.yaml @@ -212,6 +212,201 @@ spec: type: object type: object served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - description: When 'True', the most recent reconcile of the resource succeeded + jsonPath: .status.conditions[?(@.type=='Ready')].status + name: Ready + type: string + - description: The reason for the value in 'Ready' + jsonPath: .status.conditions[?(@.type=='Ready')].reason + name: Status + type: string + - description: The last transition time for the value in 'Status' + jsonPath: .status.conditions[?(@.type=='Ready')].lastTransitionTime + name: Status Age + type: date + name: v1beta1 + schema: + openAPIV3Schema: + description: FirestoreDatabase is the Schema for the FirestoreDatabase 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: FirestoreDatabaseSpec defines the desired state of FirestoreDatabase + properties: + concurrencyMode: + description: The concurrency control mode to use for this database. + See https://cloud.google.com/firestore/docs/reference/rest/v1/projects.databases#concurrencymode + for more info. + type: string + locationID: + description: The location of the database. Available locations are + listed at https://cloud.google.com/firestore/docs/locations. + type: string + pointInTimeRecoveryEnablement: + description: Whether to enable the PITR feature on this database. + See https://cloud.google.com/firestore/docs/reference/rest/v1/projects.databases#pointintimerecoveryenablement + for more info. + type: string + projectRef: + description: Immutable. The Project that this resource belongs to. + oneOf: + - not: + required: + - external + required: + - name + - not: + anyOf: + - required: + - name + - required: + - namespace + required: + - external + properties: + external: + description: The `projectID` field of a project, when not managed + by Config Connector. + type: string + kind: + description: The kind of the Project resource; optional but must + be `Project` if provided. + type: string + name: + description: The `name` field of a `Project` resource. + type: string + namespace: + description: The `namespace` field of a `Project` resource. + type: string + type: object + resourceID: + description: The FirestoreDatabase name. If not given, the metadata.name + will be used. + type: string + required: + - projectRef + type: object + status: + description: FirestoreDatabaseStatus defines the config connector machine + state of FirestoreDatabase + properties: + conditions: + description: Conditions represent the latest available observations + of the object's current state. + items: + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status + to another. + type: string + message: + description: Human-readable message indicating details about + last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's + last transition. + type: string + status: + description: Status is the status of the condition. Can be True, + False, Unknown. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + externalRef: + description: A unique specifier for the FirestoreDatabase resource + in GCP. + type: string + observedGeneration: + description: ObservedGeneration is the generation of the resource + that was most recently observed by the Config Connector controller. + If this is equal to metadata.generation, then that means that the + current reported status reflects the most recent desired state of + the resource. + format: int64 + type: integer + observedState: + description: ObservedState is the state of the resource as most recently + observed in GCP. + properties: + createTime: + description: Output only. The timestamp at which this database + was created. Databases created before 2016 do not populate create_time. + type: string + earliestVersionTime: + description: |- + Output only. The earliest timestamp at which older versions of the data can + be read from the database. See [version_retention_period] above; this field + is populated with `now - version_retention_period`. + + This value is continuously updated, and becomes stale the moment it is + queried. If you are using this value to recover data, make sure to account + for the time from the moment when the value is queried to the moment when + you initiate the recovery. + type: string + etag: + description: This checksum is computed by the server based on + the value of other fields, and may be sent on update and delete + requests to ensure the client has an up-to-date value before + proceeding. + type: string + keyPrefix: + description: |- + Output only. The key_prefix for this database. This key_prefix is used, in + combination with the project id ("~") to construct + the application id that is returned from the Cloud Datastore APIs in Google + App Engine first generation runtimes. + + This value may be empty in which case the appid to use for URL-encoded keys + is the project_id (eg: foo instead of v~foo). + type: string + uid: + description: Output only. The system-generated UUID4 for this + Database. + type: string + updateTime: + description: Output only. The timestamp at which this database + was most recently updated. Note this only includes updates to + the database resource and not data contained by the database. + type: string + versionRetentionPeriod: + description: |- + Output only. The period during which past versions of data are retained in + the database. + + Any [read][google.firestore.v1.GetDocumentRequest.read_time] + or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify + a `read_time` within this window, and will read the state of the database + at that time. + + If the PITR feature is enabled, the retention period is 7 days. Otherwise, + the retention period is 1 hour. + type: string + type: object + type: object + type: object + served: true storage: true subresources: status: {} diff --git a/config/samples/resources/firestoredatabase/basic-firestoredatabase/firestore_v1beta1_firestoredatabase.yaml b/config/samples/resources/firestoredatabase/basic-firestoredatabase/firestore_v1beta1_firestoredatabase.yaml new file mode 100644 index 0000000000..6a37519304 --- /dev/null +++ b/config/samples/resources/firestoredatabase/basic-firestoredatabase/firestore_v1beta1_firestoredatabase.yaml @@ -0,0 +1,24 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: firestore.cnrm.cloud.google.com/v1beta1 +kind: FirestoreDatabase +metadata: + name: firestoredatabase-sample +spec: + projectRef: + external: ${PROJECT_NUMBER1} + locationID: us-west2 + concurrencyMode: OPTIMISTIC + pointInTimeRecoveryEnablement: POINT_IN_TIME_RECOVERY_ENABLED \ No newline at end of file diff --git a/config/servicemappings/firestore.yaml b/config/servicemappings/firestore.yaml index acef203027..e059be6bbb 100644 --- a/config/servicemappings/firestore.yaml +++ b/config/servicemappings/firestore.yaml @@ -22,6 +22,9 @@ spec: version: v1beta1 serviceHostName: "firestore.googleapis.com" resources: + - name: google_firestore_database + kind: FirestoreDatabase + direct: true - name: google_firestore_index kind: FirestoreIndex serverGeneratedIDField: "name" diff --git a/dev/tools/controllerbuilder/generate.sh b/dev/tools/controllerbuilder/generate.sh index 80ce03b7d8..28f43513a4 100755 --- a/dev/tools/controllerbuilder/generate.sh +++ b/dev/tools/controllerbuilder/generate.sh @@ -119,12 +119,12 @@ go run . generate-mapper \ # Firestore go run . generate-types \ --service google.firestore.admin.v1 \ - --api-version firestore.cnrm.cloud.google.com/v1alpha1 \ + --api-version firestore.cnrm.cloud.google.com/v1beta1 \ --resource FirestoreDatabase:Database go run . generate-mapper \ --service google.firestore.admin.v1 \ - --api-version firestore.cnrm.cloud.google.com/v1alpha1 + --api-version firestore.cnrm.cloud.google.com/v1beta1 # Certificate Manager DNSAuthorization go run . generate-types \ diff --git a/pkg/controller/direct/firestore/firestoredatabase_controller.go b/pkg/controller/direct/firestore/firestoredatabase_controller.go index 54a34ea2e8..2b4e780a8a 100644 --- a/pkg/controller/direct/firestore/firestoredatabase_controller.go +++ b/pkg/controller/direct/firestore/firestoredatabase_controller.go @@ -19,7 +19,7 @@ import ( "fmt" "reflect" - krm "github.com/GoogleCloudPlatform/k8s-config-connector/apis/firestore/v1alpha1" + krm "github.com/GoogleCloudPlatform/k8s-config-connector/apis/firestore/v1beta1" refs "github.com/GoogleCloudPlatform/k8s-config-connector/apis/refs/v1beta1" "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/config" "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct" diff --git a/pkg/controller/direct/firestore/firestoredatabase_mappings.go b/pkg/controller/direct/firestore/firestoredatabase_mappings.go index 8fafbe49e4..f362e9b9ce 100644 --- a/pkg/controller/direct/firestore/firestoredatabase_mappings.go +++ b/pkg/controller/direct/firestore/firestoredatabase_mappings.go @@ -16,7 +16,7 @@ package firestore import ( pb "cloud.google.com/go/firestore/apiv1/admin/adminpb" - krm "github.com/GoogleCloudPlatform/k8s-config-connector/apis/firestore/v1alpha1" + krm "github.com/GoogleCloudPlatform/k8s-config-connector/apis/firestore/v1beta1" "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct" ) diff --git a/pkg/gvks/supportedgvks/gvks_generated.go b/pkg/gvks/supportedgvks/gvks_generated.go index a7d44d8495..4b73515f46 100644 --- a/pkg/gvks/supportedgvks/gvks_generated.go +++ b/pkg/gvks/supportedgvks/gvks_generated.go @@ -2697,6 +2697,16 @@ var SupportedGVKs = map[schema.GroupVersionKind]GVKMetadata{ "cnrm.cloud.google.com/system": "true", }, }, + { + Group: "firestore.cnrm.cloud.google.com", + Version: "v1beta1", + Kind: "FirestoreDatabase", + }: { + Labels: map[string]string{ + "cnrm.cloud.google.com/managed-by-kcc": "true", + "cnrm.cloud.google.com/system": "true", + }, + }, { Group: "firestore.cnrm.cloud.google.com", Version: "v1beta1", diff --git a/pkg/snippet/snippetgeneration/snippetgeneration.go b/pkg/snippet/snippetgeneration/snippetgeneration.go index f460ee5657..0437d92f82 100644 --- a/pkg/snippet/snippetgeneration/snippetgeneration.go +++ b/pkg/snippet/snippetgeneration/snippetgeneration.go @@ -81,6 +81,7 @@ var preferredSampleForResource = map[string]string{ "dlpjobtrigger": "big-query-job-trigger", "dnsrecordset": "dns-a-record-set", "edgecontainercluster": "edgecontainercluster-remote-control-plane", + "firestoredatabase": "basic-firestoredatabase", "folder": "folder-in-folder", "gkehubfeature": "multi-cluster-ingress-feature", "gkehubfeaturemembership": "config-management-feature-membership", diff --git a/pkg/test/resourcefixture/sets.go b/pkg/test/resourcefixture/sets.go index 5fcae33e38..1b2793be9c 100644 --- a/pkg/test/resourcefixture/sets.go +++ b/pkg/test/resourcefixture/sets.go @@ -92,6 +92,7 @@ func IsPureDirectResource(gk schema.GroupKind) bool { "BigQueryDataTransferConfig", "CloudBuildWorkerPool", "DataformRepository", + "FirestoreDatabase", "NetworkConnectivityServiceConnectionPolicy", "PrivilegedAccessManagerEntitlement", "RedisCluster", diff --git a/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-full/_generated_object_firestoredatabase-full.golden.yaml b/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-full/_generated_object_firestoredatabase-full.golden.yaml index a0076d49db..fad3d446a4 100644 --- a/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-full/_generated_object_firestoredatabase-full.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-full/_generated_object_firestoredatabase-full.golden.yaml @@ -1,6 +1,8 @@ -apiVersion: firestore.cnrm.cloud.google.com/v1alpha1 +apiVersion: firestore.cnrm.cloud.google.com/v1beta1 kind: FirestoreDatabase metadata: + annotations: + cnrm.cloud.google.com/management-conflict-prevention-policy: none finalizers: - cnrm.cloud.google.com/finalizer - cnrm.cloud.google.com/deletion-defender diff --git a/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-full/create.yaml b/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-full/create.yaml index 38828c0d70..5520ef6e83 100644 --- a/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-full/create.yaml +++ b/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-full/create.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: firestore.cnrm.cloud.google.com/v1alpha1 +apiVersion: firestore.cnrm.cloud.google.com/v1beta1 kind: FirestoreDatabase metadata: name: firestoredatabase-full-${uniqueId} diff --git a/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-full/update.yaml b/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-full/update.yaml index b7590ca7e2..af528159af 100644 --- a/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-full/update.yaml +++ b/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-full/update.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: firestore.cnrm.cloud.google.com/v1alpha1 +apiVersion: firestore.cnrm.cloud.google.com/v1beta1 kind: FirestoreDatabase metadata: name: firestoredatabase-full-${uniqueId} diff --git a/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-minimal/_generated_object_firestoredatabase-minimal.golden.yaml b/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-minimal/_generated_object_firestoredatabase-minimal.golden.yaml index 07e497d41d..e980e87ddb 100644 --- a/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-minimal/_generated_object_firestoredatabase-minimal.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-minimal/_generated_object_firestoredatabase-minimal.golden.yaml @@ -1,6 +1,8 @@ -apiVersion: firestore.cnrm.cloud.google.com/v1alpha1 +apiVersion: firestore.cnrm.cloud.google.com/v1beta1 kind: FirestoreDatabase metadata: + annotations: + cnrm.cloud.google.com/management-conflict-prevention-policy: none finalizers: - cnrm.cloud.google.com/finalizer - cnrm.cloud.google.com/deletion-defender diff --git a/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-minimal/create.yaml b/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-minimal/create.yaml index eea2aae6f3..e391ed3401 100644 --- a/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-minimal/create.yaml +++ b/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-minimal/create.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: firestore.cnrm.cloud.google.com/v1alpha1 +apiVersion: firestore.cnrm.cloud.google.com/v1beta1 kind: FirestoreDatabase metadata: name: firestoredatabase-minimal-${uniqueId} diff --git a/scripts/generate-google3-docs/resource-reference/_toc.yaml b/scripts/generate-google3-docs/resource-reference/_toc.yaml index 3671d4f29d..a1149f61f1 100644 --- a/scripts/generate-google3-docs/resource-reference/_toc.yaml +++ b/scripts/generate-google3-docs/resource-reference/_toc.yaml @@ -413,6 +413,8 @@ toc: path: /config-connector/docs/reference/resource-docs/filestore/filestoreinstance.md - title: "Firestore" section: + - title: "FirestoreDatabase" + path: /config-connector/docs/reference/resource-docs/firestore/firestoredatabase.md - title: "FirestoreIndex" path: /config-connector/docs/reference/resource-docs/firestore/firestoreindex.md - title: "Google Kubernetes Engine (GKE)" diff --git a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/firestore/firestoredatabase.md b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/firestore/firestoredatabase.md new file mode 100644 index 0000000000..8c857246b9 --- /dev/null +++ b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/firestore/firestoredatabase.md @@ -0,0 +1,384 @@ +{# AUTOGENERATED. DO NOT EDIT. #} + +{% extends "config-connector/_base.html" %} + +{% block page_title %}FirestoreDatabase{% endblock %} +{% block body %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyValue
{{gcp_name_short}} Service NameFirestore
{{gcp_name_short}} Service Documentation/firestore/docs/
{{gcp_name_short}} REST Resource Namev1.projects.databases
{{gcp_name_short}} REST Resource Documentation/firestore/docs/reference/rest/v1/projects.databases
{{product_name_short}} Resource Short Namesfirestoredatabase
{{product_name_short}} Service Namefirestore.googleapis.com
{{product_name_short}} Resource Fully Qualified Namefirestoredatabases.firestore.cnrm.cloud.google.com
Can Be Referenced by IAMPolicy/IAMPolicyMemberNo
{{product_name_short}} Default Average Reconcile Interval In Seconds600
+ +## Custom Resource Definition Properties + + + +### Spec +#### Schema +```yaml +concurrencyMode: string +locationID: string +pointInTimeRecoveryEnablement: string +projectRef: + external: string + kind: string + name: string + namespace: string +resourceID: string +``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Fields
+

concurrencyMode

+

Optional

+
+

string

+

{% verbatim %}The concurrency control mode to use for this database. See https://cloud.google.com/firestore/docs/reference/rest/v1/projects.databases#concurrencymode for more info.{% endverbatim %}

+
+

locationID

+

Optional

+
+

string

+

{% verbatim %}The location of the database. Available locations are listed at https://cloud.google.com/firestore/docs/locations.{% endverbatim %}

+
+

pointInTimeRecoveryEnablement

+

Optional

+
+

string

+

{% verbatim %}Whether to enable the PITR feature on this database. See https://cloud.google.com/firestore/docs/reference/rest/v1/projects.databases#pointintimerecoveryenablement for more info.{% endverbatim %}

+
+

projectRef

+

Required*

+
+

object

+

{% verbatim %}Immutable. The Project that this resource belongs to.{% endverbatim %}

+
+

projectRef.external

+

Optional

+
+

string

+

{% verbatim %}The `projectID` field of a project, when not managed by Config Connector.{% endverbatim %}

+
+

projectRef.kind

+

Optional

+
+

string

+

{% verbatim %}The kind of the Project resource; optional but must be `Project` if provided.{% endverbatim %}

+
+

projectRef.name

+

Optional

+
+

string

+

{% verbatim %}The `name` field of a `Project` resource.{% endverbatim %}

+
+

projectRef.namespace

+

Optional

+
+

string

+

{% verbatim %}The `namespace` field of a `Project` resource.{% endverbatim %}

+
+

resourceID

+

Optional

+
+

string

+

{% verbatim %}The FirestoreDatabase name. If not given, the metadata.name will be used.{% endverbatim %}

+
+ + +

* Field is required when parent field is specified

+ + +### Status +#### Schema +```yaml +conditions: +- lastTransitionTime: string + message: string + reason: string + status: string + type: string +externalRef: string +observedGeneration: integer +observedState: + createTime: string + earliestVersionTime: string + etag: string + keyPrefix: string + uid: string + updateTime: string + versionRetentionPeriod: string +``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Fields
conditions +

list (object)

+

{% verbatim %}Conditions represent the latest available observations of the object's current state.{% endverbatim %}

+
conditions[] +

object

+

{% verbatim %}{% endverbatim %}

+
conditions[].lastTransitionTime +

string

+

{% verbatim %}Last time the condition transitioned from one status to another.{% endverbatim %}

+
conditions[].message +

string

+

{% verbatim %}Human-readable message indicating details about last transition.{% endverbatim %}

+
conditions[].reason +

string

+

{% verbatim %}Unique, one-word, CamelCase reason for the condition's last transition.{% endverbatim %}

+
conditions[].status +

string

+

{% verbatim %}Status is the status of the condition. Can be True, False, Unknown.{% endverbatim %}

+
conditions[].type +

string

+

{% verbatim %}Type is the type of the condition.{% endverbatim %}

+
externalRef +

string

+

{% verbatim %}A unique specifier for the FirestoreDatabase resource in GCP.{% endverbatim %}

+
observedGeneration +

integer

+

{% verbatim %}ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource.{% endverbatim %}

+
observedState +

object

+

{% verbatim %}ObservedState is the state of the resource as most recently observed in GCP.{% endverbatim %}

+
observedState.createTime +

string

+

{% verbatim %}Output only. The timestamp at which this database was created. Databases created before 2016 do not populate create_time.{% endverbatim %}

+
observedState.earliestVersionTime +

string

+

{% verbatim %}Output only. The earliest timestamp at which older versions of the data can + be read from the database. See [version_retention_period] above; this field + is populated with `now - version_retention_period`. + + This value is continuously updated, and becomes stale the moment it is + queried. If you are using this value to recover data, make sure to account + for the time from the moment when the value is queried to the moment when + you initiate the recovery.{% endverbatim %}

+
observedState.etag +

string

+

{% verbatim %}This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.{% endverbatim %}

+
observedState.keyPrefix +

string

+

{% verbatim %}Output only. The key_prefix for this database. This key_prefix is used, in + combination with the project id ("~") to construct + the application id that is returned from the Cloud Datastore APIs in Google + App Engine first generation runtimes. + + This value may be empty in which case the appid to use for URL-encoded keys + is the project_id (eg: foo instead of v~foo).{% endverbatim %}

+
observedState.uid +

string

+

{% verbatim %}Output only. The system-generated UUID4 for this Database.{% endverbatim %}

+
observedState.updateTime +

string

+

{% verbatim %}Output only. The timestamp at which this database was most recently updated. Note this only includes updates to the database resource and not data contained by the database.{% endverbatim %}

+
observedState.versionRetentionPeriod +

string

+

{% verbatim %}Output only. The period during which past versions of data are retained in + the database. + + Any [read][google.firestore.v1.GetDocumentRequest.read_time] + or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify + a `read_time` within this window, and will read the state of the database + at that time. + + If the PITR feature is enabled, the retention period is 7 days. Otherwise, + the retention period is 1 hour.{% endverbatim %}

+
+ +## Sample YAML(s) + +### Basic FirestoreDatabase +```yaml +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: firestore.cnrm.cloud.google.com/v1beta1 +kind: FirestoreDatabase +metadata: + name: firestoredatabase-sample +spec: + projectRef: + external: ${PROJECT_NUMBER1} + locationID: us-west2 + concurrencyMode: OPTIMISTIC + pointInTimeRecoveryEnablement: POINT_IN_TIME_RECOVERY_ENABLED +``` + + +Note: If you have any trouble with instantiating the resource, refer to Troubleshoot Config Connector. + +{% endblock %} diff --git a/scripts/generate-google3-docs/resource-reference/overview.md b/scripts/generate-google3-docs/resource-reference/overview.md index b2d206baa6..9d036e483f 100644 --- a/scripts/generate-google3-docs/resource-reference/overview.md +++ b/scripts/generate-google3-docs/resource-reference/overview.md @@ -494,6 +494,10 @@ issues for {{product_name_short}}. {{filestore_name}} FilestoreInstance + + {{firestore_name}} + FirestoreDatabase + {{firestore_name}} FirestoreIndex diff --git a/scripts/generate-google3-docs/resource-reference/templates/firestore_firestoredatabase.tmpl b/scripts/generate-google3-docs/resource-reference/templates/firestore_firestoredatabase.tmpl new file mode 100644 index 0000000000..db3c903d01 --- /dev/null +++ b/scripts/generate-google3-docs/resource-reference/templates/firestore_firestoredatabase.tmpl @@ -0,0 +1,53 @@ +{{template "headercomment.tmpl" .}} + +{% extends "config-connector/_base.html" %} + +{% block page_title %}{{ .Kind}}{% endblock %} +{% block body %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{{template "iamsupport.tmpl" .}} + + + + + +
PropertyValue
{{"{{gcp_name_short}}"}} Service NameFirestore
{{"{{gcp_name_short}}"}} Service Documentation/firestore/docs/
{{"{{gcp_name_short}}"}} REST Resource Namev1.projects.databases
{{"{{gcp_name_short}}"}} REST Resource Documentation/firestore/docs/reference/rest/v1/projects.databases
{{"{{product_name_short}}"}} Resource Short Names{{ .ShortNames}}
{{"{{product_name_short}}"}} Service Namefirestore.googleapis.com
{{"{{product_name_short}}"}} Resource Fully Qualified Name{{ .FullyQualifiedName}}
{{"{{product_name_short}}"}} Default Average Reconcile Interval In Seconds{{ .DefaultReconcileInterval}}
+ +{{template "resource.tmpl" .}} +{{template "endnote.tmpl" .}} +{% endblock %}