From 9553959470f31cb76797bb5fb9fa0772e1d26bf5 Mon Sep 17 00:00:00 2001 From: Jason Vigil Date: Thu, 19 Dec 2024 18:15:09 +0000 Subject: [PATCH 1/2] fix: Make ResourceID field "mutable" In practice, due to in-controller enforcement, the only valid change is to set from empty string -> actual resource ID. --- .../v1alpha1/config_types.go | 2 -- .../v1beta1/transferconfig_types.go | 2 -- .../v1alpha1/dnsauthorization_types.go | 3 +-- .../v1beta1/dnsauthorization_types.go | 3 +-- apis/compute/v1beta1/targettcpproxy_types.go | 3 +-- .../v1beta1/cluster_types.go | 3 +-- .../discoveryenginedatastore_types.go | 2 -- apis/kms/v1alpha1/keyhandle_types.go | 2 -- apis/kms/v1beta1/keyhandle_types.go | 2 -- .../v1alpha1/entitlement_types.go | 2 -- ...rivilegedaccessmanagerentitlement_types.go | 1 - apis/secretmanager/v1beta1/secret_types.go | 2 -- .../v1alpha1/repository_types.go | 2 -- apis/spanner/v1beta1/instance_types.go | 2 -- apis/workstations/v1alpha1/cluster_types.go | 2 -- apis/workstations/v1alpha1/config_types.go | 2 -- .../v1alpha1/workstation_types.go | 2 -- apis/workstations/v1beta1/cluster_types.go | 2 -- apis/workstations/v1beta1/config_types.go | 2 -- .../workstations/v1beta1/workstation_types.go | 2 -- ...erydatatransfer.cnrm.cloud.google.com.yaml | 14 +++------- ...tificatemanager.cnrm.cloud.google.com.yaml | 18 +++++-------- ...proxies.compute.cnrm.cloud.google.com.yaml | 7 ++--- ...ntainerattached.cnrm.cloud.google.com.yaml | 7 ++--- ...discoveryengine.cnrm.cloud.google.com.yaml | 7 ++--- ...skeyhandles.kms.cnrm.cloud.google.com.yaml | 26 +++++++------------ ...edaccessmanager.cnrm.cloud.google.com.yaml | 10 ++----- ...s.secretmanager.cnrm.cloud.google.com.yaml | 7 ++--- ...resourcemanager.cnrm.cloud.google.com.yaml | 7 ++--- ...stances.spanner.cnrm.cloud.google.com.yaml | 7 ++--- ...rs.workstations.cnrm.cloud.google.com.yaml | 14 +++------- ...gs.workstations.cnrm.cloud.google.com.yaml | 14 +++------- ...ns.workstations.cnrm.cloud.google.com.yaml | 10 ++----- .../controllerbuilder/template/apis/types.go | 2 -- .../bigquerydatatransferconfig.md | 2 +- .../certificatemanagerdnsauthorization.md | 2 +- .../compute/computetargettcpproxy.md | 2 +- .../containerattachedcluster.md | 2 +- .../resource-docs/kms/kmskeyhandle.md | 2 +- .../secretmanager/secretmanagersecret.md | 2 +- .../resource-docs/spanner/spannerinstance.md | 2 +- .../resource-docs/workstations/workstation.md | 2 +- .../workstations/workstationcluster.md | 2 +- .../workstations/workstationconfig.md | 2 +- 44 files changed, 58 insertions(+), 155 deletions(-) diff --git a/apis/bigquerydatatransfer/v1alpha1/config_types.go b/apis/bigquerydatatransfer/v1alpha1/config_types.go index d17df68b5c..96e44e8e51 100644 --- a/apis/bigquerydatatransfer/v1alpha1/config_types.go +++ b/apis/bigquerydatatransfer/v1alpha1/config_types.go @@ -82,8 +82,6 @@ type BigQueryDataTransferConfigSpec struct { Parent `json:",inline"` - // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ResourceID field is immutable" - // Immutable. // The BigQueryDataTransferConfig name. If not given, the metadata.name will be used. ResourceID *string `json:"resourceID,omitempty"` diff --git a/apis/bigquerydatatransfer/v1beta1/transferconfig_types.go b/apis/bigquerydatatransfer/v1beta1/transferconfig_types.go index 597e5126c6..5286345be2 100644 --- a/apis/bigquerydatatransfer/v1beta1/transferconfig_types.go +++ b/apis/bigquerydatatransfer/v1beta1/transferconfig_types.go @@ -108,8 +108,6 @@ type BigQueryDataTransferConfigSpec struct { Parent `json:",inline"` - // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ResourceID field is immutable" - // Immutable. // The BigQueryDataTransferConfig name. If not given, the metadata.name will be used. ResourceID *string `json:"resourceID,omitempty"` diff --git a/apis/certificatemanager/v1alpha1/dnsauthorization_types.go b/apis/certificatemanager/v1alpha1/dnsauthorization_types.go index 3e393b91df..058bc3e5d3 100644 --- a/apis/certificatemanager/v1alpha1/dnsauthorization_types.go +++ b/apis/certificatemanager/v1alpha1/dnsauthorization_types.go @@ -40,8 +40,7 @@ type CertificateManagerDNSAuthorizationSpec struct { // +required ProjectRef refs.ProjectRef `json:"projectRef"` - // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ResourceID field is immutable" - /* Immutable. Optional. The name of the resource. Used for creation and acquisition. When unset, the value of `metadata.name` is used as the default. */ + /* Optional. The name of the resource. Used for creation and acquisition. When unset, the value of `metadata.name` is used as the default. */ // +optional ResourceID *string `json:"resourceID,omitempty"` } diff --git a/apis/certificatemanager/v1beta1/dnsauthorization_types.go b/apis/certificatemanager/v1beta1/dnsauthorization_types.go index 7169c3fe6b..82e3897c61 100644 --- a/apis/certificatemanager/v1beta1/dnsauthorization_types.go +++ b/apis/certificatemanager/v1beta1/dnsauthorization_types.go @@ -44,8 +44,7 @@ type CertificateManagerDNSAuthorizationSpec struct { // +optional Location string `json:"location"` - // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ResourceID field is immutable" - /* Immutable. Optional. The name of the resource. Used for creation and acquisition. When unset, the value of `metadata.name` is used as the default. */ + /* Optional. The name of the resource. Used for creation and acquisition. When unset, the value of `metadata.name` is used as the default. */ // +optional ResourceID *string `json:"resourceID,omitempty"` } diff --git a/apis/compute/v1beta1/targettcpproxy_types.go b/apis/compute/v1beta1/targettcpproxy_types.go index fb17ec5ece..93467358ae 100644 --- a/apis/compute/v1beta1/targettcpproxy_types.go +++ b/apis/compute/v1beta1/targettcpproxy_types.go @@ -53,8 +53,7 @@ type ComputeTargetTCPProxySpec struct { // the backend. Default value: "NONE" Possible values: ["NONE", "PROXY_V1"]. ProxyHeader *string `json:"proxyHeader,omitempty"` - // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ResourceID is immutable" - // Immutable. The ComputeTargetTCPProxy name. If not given, the metadata.name will be used. + // The ComputeTargetTCPProxy name. If not given, the metadata.name will be used. ResourceID *string `json:"resourceID,omitempty"` } diff --git a/apis/containerattached/v1beta1/cluster_types.go b/apis/containerattached/v1beta1/cluster_types.go index 0965f3da71..4cc336ef19 100644 --- a/apis/containerattached/v1beta1/cluster_types.go +++ b/apis/containerattached/v1beta1/cluster_types.go @@ -28,8 +28,7 @@ type ContainerAttachedClusterSpec struct { /* The ID of the project in which the resource belongs.*/ ProjectRef *refs.ProjectRef `json:"projectRef"` - // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ResourceID field is immutable" - // Immutable, Optional. + // Optional. // The ContainerAttachedCluster name. If not given, the metadata.name will be used. ResourceID *string `json:"resourceID,omitempty"` diff --git a/apis/discoveryengine/v1alpha1/discoveryenginedatastore_types.go b/apis/discoveryengine/v1alpha1/discoveryenginedatastore_types.go index 890906bbae..ff834c3184 100644 --- a/apis/discoveryengine/v1alpha1/discoveryenginedatastore_types.go +++ b/apis/discoveryengine/v1alpha1/discoveryenginedatastore_types.go @@ -25,8 +25,6 @@ var DiscoveryEngineDataStoreGVK = GroupVersion.WithKind("DiscoveryEngineDataStor // DiscoveryEngineDataStoreSpec defines the desired state of DiscoveryEngineDataStore // +kcc:proto=google.cloud.discoveryengine.v1.DataStore type DiscoveryEngineDataStoreSpec struct { - // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ResourceID field is immutable" - // Immutable. // The DiscoveryEngineDataStore name. If not given, the metadata.name will be used. ResourceID *string `json:"resourceID,omitempty"` diff --git a/apis/kms/v1alpha1/keyhandle_types.go b/apis/kms/v1alpha1/keyhandle_types.go index 1a4816be2e..ddd165e677 100644 --- a/apis/kms/v1alpha1/keyhandle_types.go +++ b/apis/kms/v1alpha1/keyhandle_types.go @@ -27,8 +27,6 @@ var KMSKeyHandleGVK = GroupVersion.WithKind("KMSKeyHandle") // KMSKeyHandleSpec defines the desired state of KMSKeyHandle // +kcc:proto=google.cloud.kms.v1.KeyHandle type KMSKeyHandleSpec struct { - // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ResourceID field is immutable" - // Immutable. // The KMS Key Handle ID used for resource creation or acquisition. // For creation: If specified, this value is used as the key handle ID. If not provided, a UUID will be generated and assigned as the key handle ID. // For acquisition: This field must be provided to identify the key handle resource to acquire. diff --git a/apis/kms/v1beta1/keyhandle_types.go b/apis/kms/v1beta1/keyhandle_types.go index 8384b6bd4c..80dd800dee 100644 --- a/apis/kms/v1beta1/keyhandle_types.go +++ b/apis/kms/v1beta1/keyhandle_types.go @@ -27,8 +27,6 @@ var KMSKeyHandleGVK = SchemeGroupVersion.WithKind("KMSKeyHandle") // KMSKeyHandleSpec defines the desired state of KMSKeyHandle // +kcc:proto=google.cloud.kms.v1.KeyHandle type KMSKeyHandleSpec struct { - // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ResourceID field is immutable" - // Immutable. // The KMS Key Handle ID used for resource creation or acquisition. // For creation: If specified, this value is used as the key handle ID. If not provided, a UUID will be generated and assigned as the key handle ID. // For acquisition: This field must be provided to identify the key handle resource to acquire. diff --git a/apis/privilegedaccessmanager/v1alpha1/entitlement_types.go b/apis/privilegedaccessmanager/v1alpha1/entitlement_types.go index 2831970502..6013c22dfc 100644 --- a/apis/privilegedaccessmanager/v1alpha1/entitlement_types.go +++ b/apis/privilegedaccessmanager/v1alpha1/entitlement_types.go @@ -48,10 +48,8 @@ type PrivilegedAccessManagerEntitlementSpec struct { // +required Location *string `json:"location"` - // Immutable. // The PrivilegedAccessManagerEntitlement name. If not given, the // 'metadata.name' will be used. - // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ResourceID field is immutable" // +optional ResourceID *string `json:"resourceID,omitempty"` diff --git a/apis/privilegedaccessmanager/v1beta1/privilegedaccessmanagerentitlement_types.go b/apis/privilegedaccessmanager/v1beta1/privilegedaccessmanagerentitlement_types.go index 345c9b5555..e67fcebc08 100644 --- a/apis/privilegedaccessmanager/v1beta1/privilegedaccessmanagerentitlement_types.go +++ b/apis/privilegedaccessmanager/v1beta1/privilegedaccessmanagerentitlement_types.go @@ -51,7 +51,6 @@ type PrivilegedAccessManagerEntitlementSpec struct { // Immutable. // The PrivilegedAccessManagerEntitlement name. If not given, the // 'metadata.name' will be used. - // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ResourceID field is immutable" // +optional ResourceID *string `json:"resourceID,omitempty"` diff --git a/apis/secretmanager/v1beta1/secret_types.go b/apis/secretmanager/v1beta1/secret_types.go index 9c9418ebff..eaf1c3fc93 100644 --- a/apis/secretmanager/v1beta1/secret_types.go +++ b/apis/secretmanager/v1beta1/secret_types.go @@ -28,8 +28,6 @@ var SecretManagerSecretGVK = GroupVersion.WithKind("SecretManagerSecret") // SecretManagerSecretSpec defines the desired state of SecretManagerSecret // +kcc:proto=google.cloud.secretmanager.v1.Secret type SecretManagerSecretSpec struct { - // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ResourceID field is immutable" - // Immutable. // The SecretManagerSecret name. If not given, the metadata.name will be used. ResourceID *string `json:"resourceID,omitempty"` diff --git a/apis/securesourcemanager/v1alpha1/repository_types.go b/apis/securesourcemanager/v1alpha1/repository_types.go index dd035b63c8..da1e6859a8 100644 --- a/apis/securesourcemanager/v1alpha1/repository_types.go +++ b/apis/securesourcemanager/v1alpha1/repository_types.go @@ -35,8 +35,6 @@ type SecureSourceManagerRepositorySpec struct { // +required Location string `json:"location"` - // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ResourceID field is immutable" - // Immutable. // The SecureSourceManagerRepository name. If not given, the metadata.name will be used. ResourceID *string `json:"resourceID,omitempty"` diff --git a/apis/spanner/v1beta1/instance_types.go b/apis/spanner/v1beta1/instance_types.go index f719b8d00a..135ba30a46 100644 --- a/apis/spanner/v1beta1/instance_types.go +++ b/apis/spanner/v1beta1/instance_types.go @@ -45,8 +45,6 @@ type SpannerInstanceSpec struct { // +optional ProcessingUnits *int32 `json:"processingUnits,omitempty"` - // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ResourceID field is immutable" - // Immutable. // The SpannerInstance name. If not given, the metadata.name will be used. ResourceID *string `json:"resourceID,omitempty"` } diff --git a/apis/workstations/v1alpha1/cluster_types.go b/apis/workstations/v1alpha1/cluster_types.go index 5666536904..18813affed 100644 --- a/apis/workstations/v1alpha1/cluster_types.go +++ b/apis/workstations/v1alpha1/cluster_types.go @@ -36,8 +36,6 @@ type WorkstationClusterSpec struct { // The location of the cluster. Location string `json:"location,omitempty"` - // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ResourceID field is immutable" - // Immutable. // The WorkstationCluster name. If not given, the metadata.name will be used. ResourceID *string `json:"resourceID,omitempty"` diff --git a/apis/workstations/v1alpha1/config_types.go b/apis/workstations/v1alpha1/config_types.go index 97e489150c..c3ab8df420 100644 --- a/apis/workstations/v1alpha1/config_types.go +++ b/apis/workstations/v1alpha1/config_types.go @@ -274,8 +274,6 @@ type WorkstationConfigSpec struct { // Parent is a reference to the parent WorkstationCluster for this WorkstationConfig. Parent *WorkstationClusterRef `json:"parentRef"` - // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ResourceID field is immutable" - // Immutable. // The WorkstationConfig name. If not given, the metadata.name will be used. ResourceID *string `json:"resourceID,omitempty"` diff --git a/apis/workstations/v1alpha1/workstation_types.go b/apis/workstations/v1alpha1/workstation_types.go index 04eaecaf22..0601371243 100644 --- a/apis/workstations/v1alpha1/workstation_types.go +++ b/apis/workstations/v1alpha1/workstation_types.go @@ -27,8 +27,6 @@ type WorkstationSpec struct { // Parent is a reference to the parent WorkstationConfig for this Workstation. Parent *WorkstationConfigRef `json:"parentRef"` - // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ResourceID field is immutable" - // Immutable. // The Workstation name. If not given, the metadata.name will be used. ResourceID *string `json:"resourceID,omitempty"` diff --git a/apis/workstations/v1beta1/cluster_types.go b/apis/workstations/v1beta1/cluster_types.go index b22184de3e..acd2f85560 100644 --- a/apis/workstations/v1beta1/cluster_types.go +++ b/apis/workstations/v1beta1/cluster_types.go @@ -36,8 +36,6 @@ type WorkstationClusterSpec struct { // The location of the cluster. Location string `json:"location,omitempty"` - // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ResourceID field is immutable" - // Immutable. // The WorkstationCluster name. If not given, the metadata.name will be used. ResourceID *string `json:"resourceID,omitempty"` diff --git a/apis/workstations/v1beta1/config_types.go b/apis/workstations/v1beta1/config_types.go index aa2f1c7e30..ec65fecea8 100644 --- a/apis/workstations/v1beta1/config_types.go +++ b/apis/workstations/v1beta1/config_types.go @@ -274,8 +274,6 @@ type WorkstationConfigSpec struct { // Parent is a reference to the parent WorkstationCluster for this WorkstationConfig. Parent *WorkstationClusterRef `json:"parentRef"` - // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ResourceID field is immutable" - // Immutable. // The WorkstationConfig name. If not given, the metadata.name will be used. ResourceID *string `json:"resourceID,omitempty"` diff --git a/apis/workstations/v1beta1/workstation_types.go b/apis/workstations/v1beta1/workstation_types.go index 2e7f3ed29a..1df85c01d2 100644 --- a/apis/workstations/v1beta1/workstation_types.go +++ b/apis/workstations/v1beta1/workstation_types.go @@ -27,8 +27,6 @@ type WorkstationSpec struct { // Parent is a reference to the parent WorkstationConfig for this Workstation. Parent *WorkstationConfigRef `json:"parentRef"` - // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ResourceID field is immutable" - // Immutable. // The Workstation name. If not given, the metadata.name will be used. ResourceID *string `json:"resourceID,omitempty"` diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_bigquerydatatransferconfigs.bigquerydatatransfer.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_bigquerydatatransferconfigs.bigquerydatatransfer.cnrm.cloud.google.com.yaml index 20938cd828..2cbad467a2 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_bigquerydatatransferconfigs.bigquerydatatransfer.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_bigquerydatatransferconfigs.bigquerydatatransfer.cnrm.cloud.google.com.yaml @@ -232,12 +232,9 @@ spec: type: string type: object resourceID: - description: Immutable. The BigQueryDataTransferConfig name. If not - given, the metadata.name will be used. + description: The BigQueryDataTransferConfig name. If not given, the + metadata.name will be used. type: string - x-kubernetes-validations: - - message: ResourceID field is immutable - rule: self == oldSelf schedule: description: |- Data transfer schedule. @@ -621,12 +618,9 @@ spec: type: string type: object resourceID: - description: Immutable. The BigQueryDataTransferConfig name. If not - given, the metadata.name will be used. + description: The BigQueryDataTransferConfig name. If not given, the + metadata.name will be used. type: string - x-kubernetes-validations: - - message: ResourceID field is immutable - rule: self == oldSelf schedule: description: |- Data transfer schedule. diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_certificatemanagerdnsauthorizations.certificatemanager.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_certificatemanagerdnsauthorizations.certificatemanager.cnrm.cloud.google.com.yaml index 87beb40017..86681936a3 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_certificatemanagerdnsauthorizations.certificatemanager.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_certificatemanagerdnsauthorizations.certificatemanager.cnrm.cloud.google.com.yaml @@ -107,13 +107,10 @@ spec: type: string type: object resourceID: - description: Immutable. Optional. The name of the resource. Used for - creation and acquisition. When unset, the value of `metadata.name` - is used as the default. + description: Optional. The name of the resource. Used for creation + and acquisition. When unset, the value of `metadata.name` is used + as the default. type: string - x-kubernetes-validations: - - message: ResourceID field is immutable - rule: self == oldSelf required: - domain - projectRef @@ -270,13 +267,10 @@ spec: type: string type: object resourceID: - description: Immutable. Optional. The name of the resource. Used for - creation and acquisition. When unset, the value of `metadata.name` - is used as the default. + description: Optional. The name of the resource. Used for creation + and acquisition. When unset, the value of `metadata.name` is used + as the default. type: string - x-kubernetes-validations: - - message: ResourceID field is immutable - rule: self == oldSelf required: - domain - projectRef diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_computetargettcpproxies.compute.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_computetargettcpproxies.compute.cnrm.cloud.google.com.yaml index 185478604c..d6382d0376 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_computetargettcpproxies.compute.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_computetargettcpproxies.compute.cnrm.cloud.google.com.yaml @@ -116,12 +116,9 @@ spec: ["NONE", "PROXY_V1"].' type: string resourceID: - description: Immutable. The ComputeTargetTCPProxy name. If not given, - the metadata.name will be used. + description: The ComputeTargetTCPProxy name. If not given, the metadata.name + will be used. type: string - x-kubernetes-validations: - - message: ResourceID is immutable - rule: self == oldSelf required: - backendServiceRef type: object diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_containerattachedclusters.containerattached.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_containerattachedclusters.containerattached.cnrm.cloud.google.com.yaml index db85a59b96..4f03b72b64 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_containerattachedclusters.containerattached.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_containerattachedclusters.containerattached.cnrm.cloud.google.com.yaml @@ -270,12 +270,9 @@ spec: type: string type: object resourceID: - description: Immutable, Optional. The ContainerAttachedCluster name. - If not given, the metadata.name will be used. + description: Optional. The ContainerAttachedCluster name. If not given, + the metadata.name will be used. type: string - x-kubernetes-validations: - - message: ResourceID field is immutable - rule: self == oldSelf required: - distribution - fleet diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_discoveryenginedatastores.discoveryengine.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_discoveryenginedatastores.discoveryengine.cnrm.cloud.google.com.yaml index eeb6980193..d2d981fec4 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_discoveryenginedatastores.discoveryengine.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_discoveryenginedatastores.discoveryengine.cnrm.cloud.google.com.yaml @@ -121,12 +121,9 @@ spec: type: string type: object resourceID: - description: Immutable. The DiscoveryEngineDataStore name. If not - given, the metadata.name will be used. + description: The DiscoveryEngineDataStore name. If not given, the + metadata.name will be used. type: string - x-kubernetes-validations: - - message: ResourceID field is immutable - rule: self == oldSelf solutionTypes: description: |- The solutions that the data store enrolls. Available solutions for each diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_kmskeyhandles.kms.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_kmskeyhandles.kms.cnrm.cloud.google.com.yaml index 0032590863..404ae3f702 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_kmskeyhandles.kms.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_kmskeyhandles.kms.cnrm.cloud.google.com.yaml @@ -96,15 +96,12 @@ spec: type: string type: object resourceID: - description: 'Immutable. The KMS Key Handle ID used for resource creation - or acquisition. For creation: If specified, this value is used as - the key handle ID. If not provided, a UUID will be generated and - assigned as the key handle ID. For acquisition: This field must - be provided to identify the key handle resource to acquire.' + description: 'The KMS Key Handle ID used for resource creation or + acquisition. For creation: If specified, this value is used as the + key handle ID. If not provided, a UUID will be generated and assigned + as the key handle ID. For acquisition: This field must be provided + to identify the key handle resource to acquire.' type: string - x-kubernetes-validations: - - message: ResourceID field is immutable - rule: self == oldSelf resourceTypeSelector: description: Indicates the resource type that the resulting [CryptoKey][] is meant to protect, e.g. `{SERVICE}.googleapis.com/{TYPE}`. See @@ -239,15 +236,12 @@ spec: type: string type: object resourceID: - description: 'Immutable. The KMS Key Handle ID used for resource creation - or acquisition. For creation: If specified, this value is used as - the key handle ID. If not provided, a UUID will be generated and - assigned as the key handle ID. For acquisition: This field must - be provided to identify the key handle resource to acquire.' + description: 'The KMS Key Handle ID used for resource creation or + acquisition. For creation: If specified, this value is used as the + key handle ID. If not provided, a UUID will be generated and assigned + as the key handle ID. For acquisition: This field must be provided + to identify the key handle resource to acquire.' type: string - x-kubernetes-validations: - - message: ResourceID field is immutable - rule: self == oldSelf resourceTypeSelector: description: Indicates the resource type that the resulting [CryptoKey][] is meant to protect, e.g. `{SERVICE}.googleapis.com/{TYPE}`. See diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_privilegedaccessmanagerentitlements.privilegedaccessmanager.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_privilegedaccessmanagerentitlements.privilegedaccessmanager.cnrm.cloud.google.com.yaml index 33ed8273e2..a51b2c38bf 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_privilegedaccessmanagerentitlements.privilegedaccessmanager.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_privilegedaccessmanagerentitlements.privilegedaccessmanager.cnrm.cloud.google.com.yaml @@ -303,12 +303,9 @@ spec: x-kubernetes-preserve-unknown-fields: true type: object resourceID: - description: Immutable. The PrivilegedAccessManagerEntitlement name. - If not given, the 'metadata.name' will be used. + description: The PrivilegedAccessManagerEntitlement name. If not given, + the 'metadata.name' will be used. type: string - x-kubernetes-validations: - - message: ResourceID field is immutable - rule: self == oldSelf required: - eligibleUsers - location @@ -673,9 +670,6 @@ spec: description: Immutable. The PrivilegedAccessManagerEntitlement name. If not given, the 'metadata.name' will be used. type: string - x-kubernetes-validations: - - message: ResourceID field is immutable - rule: self == oldSelf required: - eligibleUsers - location diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_secretmanagersecrets.secretmanager.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_secretmanagersecrets.secretmanager.cnrm.cloud.google.com.yaml index 22597ec76f..0390b61062 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_secretmanagersecrets.secretmanager.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_secretmanagersecrets.secretmanager.cnrm.cloud.google.com.yaml @@ -239,12 +239,9 @@ spec: type: object type: object resourceID: - description: Immutable. The SecretManagerSecret name. If not given, - the metadata.name will be used. + description: The SecretManagerSecret name. If not given, the metadata.name + will be used. type: string - x-kubernetes-validations: - - message: ResourceID field is immutable - rule: self == oldSelf rotation: description: Optional. Rotation policy attached to the [Secret][google.cloud.secretmanager.v1.Secret]. May be excluded if there is no rotation policy. diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_securesourcemanagerrepositories.securesourcemanager.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_securesourcemanagerrepositories.securesourcemanager.cnrm.cloud.google.com.yaml index 8e6014f8c6..be6ccb19e7 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_securesourcemanagerrepositories.securesourcemanager.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_securesourcemanagerrepositories.securesourcemanager.cnrm.cloud.google.com.yaml @@ -268,12 +268,9 @@ spec: type: string type: object resourceID: - description: Immutable. The SecureSourceManagerRepository name. If - not given, the metadata.name will be used. + description: The SecureSourceManagerRepository name. If not given, + the metadata.name will be used. type: string - x-kubernetes-validations: - - message: ResourceID field is immutable - rule: self == oldSelf required: - instanceRef - location diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_spannerinstances.spanner.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_spannerinstances.spanner.cnrm.cloud.google.com.yaml index 29863500fc..7107942e95 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_spannerinstances.spanner.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_spannerinstances.spanner.cnrm.cloud.google.com.yaml @@ -83,12 +83,9 @@ spec: format: int32 type: integer resourceID: - description: Immutable. The SpannerInstance name. If not given, the - metadata.name will be used. + description: The SpannerInstance name. If not given, the metadata.name + will be used. type: string - x-kubernetes-validations: - - message: ResourceID field is immutable - rule: self == oldSelf required: - config - displayName diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_workstationclusters.workstations.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_workstationclusters.workstations.cnrm.cloud.google.com.yaml index aab34cd682..6872239ffc 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_workstationclusters.workstations.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_workstationclusters.workstations.cnrm.cloud.google.com.yaml @@ -202,12 +202,9 @@ spec: - message: ResourceID field is immutable rule: self == oldSelf resourceID: - description: Immutable. The WorkstationCluster name. If not given, - the metadata.name will be used. + description: The WorkstationCluster name. If not given, the metadata.name + will be used. type: string - x-kubernetes-validations: - - message: ResourceID field is immutable - rule: self == oldSelf subnetworkRef: description: Immutable. Reference to the Compute Engine subnetwork in which instances associated with this workstation cluster will @@ -548,12 +545,9 @@ spec: - message: ResourceID field is immutable rule: self == oldSelf resourceID: - description: Immutable. The WorkstationCluster name. If not given, - the metadata.name will be used. + description: The WorkstationCluster name. If not given, the metadata.name + will be used. type: string - x-kubernetes-validations: - - message: ResourceID field is immutable - rule: self == oldSelf subnetworkRef: description: Immutable. Reference to the Compute Engine subnetwork in which instances associated with this workstation cluster will diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_workstationconfigs.workstations.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_workstationconfigs.workstations.cnrm.cloud.google.com.yaml index 9c688483fe..24158c3108 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_workstationconfigs.workstations.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_workstationconfigs.workstations.cnrm.cloud.google.com.yaml @@ -506,12 +506,9 @@ spec: type: string type: array resourceID: - description: Immutable. The WorkstationConfig name. If not given, - the metadata.name will be used. + description: The WorkstationConfig name. If not given, the metadata.name + will be used. type: string - x-kubernetes-validations: - - message: ResourceID field is immutable - rule: self == oldSelf runningTimeout: description: |- Optional. Number of seconds that a workstation can run until it is @@ -1136,12 +1133,9 @@ spec: type: string type: array resourceID: - description: Immutable. The WorkstationConfig name. If not given, - the metadata.name will be used. + description: The WorkstationConfig name. If not given, the metadata.name + will be used. type: string - x-kubernetes-validations: - - message: ResourceID field is immutable - rule: self == oldSelf runningTimeout: description: |- Optional. Number of seconds that a workstation can run until it is diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_workstations.workstations.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_workstations.workstations.cnrm.cloud.google.com.yaml index e3fcb20429..c680d7c072 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_workstations.workstations.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_workstations.workstations.cnrm.cloud.google.com.yaml @@ -118,12 +118,9 @@ spec: type: string type: object resourceID: - description: Immutable. The Workstation name. If not given, the metadata.name + description: The Workstation name. If not given, the metadata.name will be used. type: string - x-kubernetes-validations: - - message: ResourceID field is immutable - rule: self == oldSelf required: - parentRef type: object @@ -310,12 +307,9 @@ spec: type: string type: object resourceID: - description: Immutable. The Workstation name. If not given, the metadata.name + description: The Workstation name. If not given, the metadata.name will be used. type: string - x-kubernetes-validations: - - message: ResourceID field is immutable - rule: self == oldSelf required: - parentRef type: object diff --git a/dev/tools/controllerbuilder/template/apis/types.go b/dev/tools/controllerbuilder/template/apis/types.go index 6821e94681..97d083c018 100644 --- a/dev/tools/controllerbuilder/template/apis/types.go +++ b/dev/tools/controllerbuilder/template/apis/types.go @@ -37,8 +37,6 @@ var {{ .Kind }}GVK = GroupVersion.WithKind("{{ .Kind }}") // +kcc:proto={{ .KindProtoTag }} {{- end }} type {{ .Kind }}Spec struct { - // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ResourceID field is immutable" - // Immutable. // The {{ .Kind }} name. If not given, the metadata.name will be used. ResourceID *string ` + "`" + `json:"resourceID,omitempty"` + "`" + ` } diff --git a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/bigquerydatatransfer/bigquerydatatransferconfig.md b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/bigquerydatatransfer/bigquerydatatransferconfig.md index 133b139f81..b9a298c03d 100644 --- a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/bigquerydatatransfer/bigquerydatatransferconfig.md +++ b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/bigquerydatatransfer/bigquerydatatransferconfig.md @@ -387,7 +387,7 @@ serviceAccountRef:

string

-

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

+

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

diff --git a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/certificatemanager/certificatemanagerdnsauthorization.md b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/certificatemanager/certificatemanagerdnsauthorization.md index 7edeac39a5..2b29ebe952 100644 --- a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/certificatemanager/certificatemanagerdnsauthorization.md +++ b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/certificatemanager/certificatemanagerdnsauthorization.md @@ -168,7 +168,7 @@ resourceID: string

string

-

{% verbatim %}Immutable. Optional. The name of the resource. Used for creation and acquisition. When unset, the value of `metadata.name` is used as the default.{% endverbatim %}

+

{% verbatim %}Optional. The name of the resource. Used for creation and acquisition. When unset, the value of `metadata.name` is used as the default.{% endverbatim %}

diff --git a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/compute/computetargettcpproxy.md b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/compute/computetargettcpproxy.md index ea27c12cb6..ab23080999 100644 --- a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/compute/computetargettcpproxy.md +++ b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/compute/computetargettcpproxy.md @@ -182,7 +182,7 @@ resourceID: string

string

-

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

+

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

diff --git a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/containerattached/containerattachedcluster.md b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/containerattached/containerattachedcluster.md index 072d78a671..3cea3273b0 100644 --- a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/containerattached/containerattachedcluster.md +++ b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/containerattached/containerattachedcluster.md @@ -512,7 +512,7 @@ while clusters with private issuers need to provide both 'issuerUrl' and 'jwks'.

string

-

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

+

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

diff --git a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/kms/kmskeyhandle.md b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/kms/kmskeyhandle.md index 19d558294b..fe15c216ed 100644 --- a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/kms/kmskeyhandle.md +++ b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/kms/kmskeyhandle.md @@ -147,7 +147,7 @@ resourceTypeSelector: string

string

-

{% verbatim %}Immutable. The KMS Key Handle ID used for resource creation or acquisition. For creation: If specified, this value is used as the key handle ID. If not provided, a UUID will be generated and assigned as the key handle ID. For acquisition: This field must be provided to identify the key handle resource to acquire.{% endverbatim %}

+

{% verbatim %}The KMS Key Handle ID used for resource creation or acquisition. For creation: If specified, this value is used as the key handle ID. If not provided, a UUID will be generated and assigned as the key handle ID. For acquisition: This field must be provided to identify the key handle resource to acquire.{% endverbatim %}

diff --git a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/secretmanager/secretmanagersecret.md b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/secretmanager/secretmanagersecret.md index 042d553949..2cee06f808 100644 --- a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/secretmanager/secretmanagersecret.md +++ b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/secretmanager/secretmanagersecret.md @@ -395,7 +395,7 @@ versionAliases:

string

-

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

+

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

diff --git a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/spanner/spannerinstance.md b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/spanner/spannerinstance.md index 1acaec36cf..48cd9330bb 100644 --- a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/spanner/spannerinstance.md +++ b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/spanner/spannerinstance.md @@ -159,7 +159,7 @@ resourceID: string

string

-

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

+

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

diff --git a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/workstations/workstation.md b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/workstations/workstation.md index c7ed37994f..9eac4309a1 100644 --- a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/workstations/workstation.md +++ b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/workstations/workstation.md @@ -219,7 +219,7 @@ resourceID: string

string

-

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

+

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

diff --git a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/workstations/workstationcluster.md b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/workstations/workstationcluster.md index 7507fef4ea..423077e179 100644 --- a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/workstations/workstationcluster.md +++ b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/workstations/workstationcluster.md @@ -376,7 +376,7 @@ subnetworkRef:

string

-

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

+

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

diff --git a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/workstations/workstationconfig.md b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/workstations/workstationconfig.md index 989eb6f1d9..c5baeed10b 100644 --- a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/workstations/workstationconfig.md +++ b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/workstations/workstationconfig.md @@ -955,7 +955,7 @@ runningTimeout: string

string

-

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

+

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

From 7d5756a4e223646b3862f0ec0addd6e77f861dad Mon Sep 17 00:00:00 2001 From: Jason Vigil Date: Thu, 19 Dec 2024 21:47:42 +0000 Subject: [PATCH 2/2] fix: Add helper comment for ResourceID validation --- apis/bigquerydatatransfer/v1alpha1/config_types.go | 1 + apis/bigquerydatatransfer/v1beta1/transferconfig_types.go | 1 + .../certificatemanager/v1alpha1/dnsauthorization_types.go | 1 + apis/certificatemanager/v1beta1/dnsauthorization_types.go | 1 + apis/compute/v1beta1/targettcpproxy_types.go | 1 + apis/containerattached/v1beta1/cluster_types.go | 1 + .../v1alpha1/discoveryenginedatastore_types.go | 1 + apis/kms/v1alpha1/keyhandle_types.go | 1 + apis/kms/v1beta1/keyhandle_types.go | 1 + .../privilegedaccessmanager/v1alpha1/entitlement_types.go | 1 + .../v1beta1/privilegedaccessmanagerentitlement_types.go | 1 + apis/secretmanager/v1beta1/secret_types.go | 1 + apis/securesourcemanager/v1alpha1/repository_types.go | 1 + apis/spanner/v1beta1/instance_types.go | 1 + apis/workstations/v1alpha1/cluster_types.go | 1 + apis/workstations/v1alpha1/config_types.go | 1 + apis/workstations/v1alpha1/workstation_types.go | 1 + apis/workstations/v1beta1/cluster_types.go | 1 + apis/workstations/v1beta1/config_types.go | 1 + apis/workstations/v1beta1/workstation_types.go | 1 + ...onfigs.bigquerydatatransfer.cnrm.cloud.google.com.yaml | 6 ++++-- ...izations.certificatemanager.cnrm.cloud.google.com.yaml | 6 ++++-- ...utetargettcpproxies.compute.cnrm.cloud.google.com.yaml | 3 ++- ...dclusters.containerattached.cnrm.cloud.google.com.yaml | 3 ++- ...edatastores.discoveryengine.cnrm.cloud.google.com.yaml | 3 ++- ...efinition_kmskeyhandles.kms.cnrm.cloud.google.com.yaml | 8 ++++++-- ...nts.privilegedaccessmanager.cnrm.cloud.google.com.yaml | 7 +++++-- ...anagersecrets.secretmanager.cnrm.cloud.google.com.yaml | 3 ++- ...itories.securesourcemanager.cnrm.cloud.google.com.yaml | 3 ++- ...on_spannerinstances.spanner.cnrm.cloud.google.com.yaml | 3 ++- ...tationclusters.workstations.cnrm.cloud.google.com.yaml | 6 ++++-- ...stationconfigs.workstations.cnrm.cloud.google.com.yaml | 6 ++++-- ...n_workstations.workstations.cnrm.cloud.google.com.yaml | 6 ++++-- dev/tools/controllerbuilder/template/apis/types.go | 1 + .../bigquerydatatransfer/bigquerydatatransferconfig.md | 2 +- .../certificatemanagerdnsauthorization.md | 2 +- .../resource-docs/compute/computetargettcpproxy.md | 2 +- .../containerattached/containerattachedcluster.md | 2 +- .../generated/resource-docs/kms/kmskeyhandle.md | 2 +- .../privilegedaccessmanagerentitlement.md | 2 +- .../resource-docs/secretmanager/secretmanagersecret.md | 2 +- .../generated/resource-docs/spanner/spannerinstance.md | 2 +- .../generated/resource-docs/workstations/workstation.md | 2 +- .../resource-docs/workstations/workstationcluster.md | 2 +- .../resource-docs/workstations/workstationconfig.md | 2 +- 45 files changed, 75 insertions(+), 31 deletions(-) diff --git a/apis/bigquerydatatransfer/v1alpha1/config_types.go b/apis/bigquerydatatransfer/v1alpha1/config_types.go index 96e44e8e51..4fa5a74b44 100644 --- a/apis/bigquerydatatransfer/v1alpha1/config_types.go +++ b/apis/bigquerydatatransfer/v1alpha1/config_types.go @@ -83,6 +83,7 @@ type BigQueryDataTransferConfigSpec struct { Parent `json:",inline"` // The BigQueryDataTransferConfig name. If not given, the metadata.name will be used. + // Cannot be changed after create, except for updating from empty string to the actual resource ID. ResourceID *string `json:"resourceID,omitempty"` // Data transfer schedule. diff --git a/apis/bigquerydatatransfer/v1beta1/transferconfig_types.go b/apis/bigquerydatatransfer/v1beta1/transferconfig_types.go index 5286345be2..1b84e11bd7 100644 --- a/apis/bigquerydatatransfer/v1beta1/transferconfig_types.go +++ b/apis/bigquerydatatransfer/v1beta1/transferconfig_types.go @@ -109,6 +109,7 @@ type BigQueryDataTransferConfigSpec struct { Parent `json:",inline"` // The BigQueryDataTransferConfig name. If not given, the metadata.name will be used. + // Cannot be changed after create, except for updating from empty string to the actual resource ID. ResourceID *string `json:"resourceID,omitempty"` // Data transfer schedule. diff --git a/apis/certificatemanager/v1alpha1/dnsauthorization_types.go b/apis/certificatemanager/v1alpha1/dnsauthorization_types.go index 058bc3e5d3..d6076f6950 100644 --- a/apis/certificatemanager/v1alpha1/dnsauthorization_types.go +++ b/apis/certificatemanager/v1alpha1/dnsauthorization_types.go @@ -41,6 +41,7 @@ type CertificateManagerDNSAuthorizationSpec struct { ProjectRef refs.ProjectRef `json:"projectRef"` /* Optional. The name of the resource. Used for creation and acquisition. When unset, the value of `metadata.name` is used as the default. */ + // Cannot be changed after create, except for updating from empty string to the actual resource ID. // +optional ResourceID *string `json:"resourceID,omitempty"` } diff --git a/apis/certificatemanager/v1beta1/dnsauthorization_types.go b/apis/certificatemanager/v1beta1/dnsauthorization_types.go index 82e3897c61..051aa4fbd8 100644 --- a/apis/certificatemanager/v1beta1/dnsauthorization_types.go +++ b/apis/certificatemanager/v1beta1/dnsauthorization_types.go @@ -45,6 +45,7 @@ type CertificateManagerDNSAuthorizationSpec struct { Location string `json:"location"` /* Optional. The name of the resource. Used for creation and acquisition. When unset, the value of `metadata.name` is used as the default. */ + // Cannot be changed after create, except for updating from empty string to the actual resource ID. // +optional ResourceID *string `json:"resourceID,omitempty"` } diff --git a/apis/compute/v1beta1/targettcpproxy_types.go b/apis/compute/v1beta1/targettcpproxy_types.go index 93467358ae..3c8d7ef166 100644 --- a/apis/compute/v1beta1/targettcpproxy_types.go +++ b/apis/compute/v1beta1/targettcpproxy_types.go @@ -54,6 +54,7 @@ type ComputeTargetTCPProxySpec struct { ProxyHeader *string `json:"proxyHeader,omitempty"` // The ComputeTargetTCPProxy name. If not given, the metadata.name will be used. + // Cannot be changed after create, except for updating from empty string to the actual resource ID. ResourceID *string `json:"resourceID,omitempty"` } diff --git a/apis/containerattached/v1beta1/cluster_types.go b/apis/containerattached/v1beta1/cluster_types.go index 4cc336ef19..e7fa877d82 100644 --- a/apis/containerattached/v1beta1/cluster_types.go +++ b/apis/containerattached/v1beta1/cluster_types.go @@ -30,6 +30,7 @@ type ContainerAttachedClusterSpec struct { // Optional. // The ContainerAttachedCluster name. If not given, the metadata.name will be used. + // Cannot be changed after create, except for updating from empty string to the actual resource ID. ResourceID *string `json:"resourceID,omitempty"` // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Location field is immutable" diff --git a/apis/discoveryengine/v1alpha1/discoveryenginedatastore_types.go b/apis/discoveryengine/v1alpha1/discoveryenginedatastore_types.go index ff834c3184..e3d1747baf 100644 --- a/apis/discoveryengine/v1alpha1/discoveryenginedatastore_types.go +++ b/apis/discoveryengine/v1alpha1/discoveryenginedatastore_types.go @@ -26,6 +26,7 @@ var DiscoveryEngineDataStoreGVK = GroupVersion.WithKind("DiscoveryEngineDataStor // +kcc:proto=google.cloud.discoveryengine.v1.DataStore type DiscoveryEngineDataStoreSpec struct { // The DiscoveryEngineDataStore name. If not given, the metadata.name will be used. + // Cannot be changed after create, except for updating from empty string to the actual resource ID. ResourceID *string `json:"resourceID,omitempty"` // Required. The data store display name. diff --git a/apis/kms/v1alpha1/keyhandle_types.go b/apis/kms/v1alpha1/keyhandle_types.go index ddd165e677..9346bc0a8b 100644 --- a/apis/kms/v1alpha1/keyhandle_types.go +++ b/apis/kms/v1alpha1/keyhandle_types.go @@ -30,6 +30,7 @@ type KMSKeyHandleSpec struct { // The KMS Key Handle ID used for resource creation or acquisition. // For creation: If specified, this value is used as the key handle ID. If not provided, a UUID will be generated and assigned as the key handle ID. // For acquisition: This field must be provided to identify the key handle resource to acquire. + // Cannot be changed after create, except for updating from empty string to the actual resource ID. ResourceID *string `json:"resourceID,omitempty"` // Project hosting KMSKeyHandle diff --git a/apis/kms/v1beta1/keyhandle_types.go b/apis/kms/v1beta1/keyhandle_types.go index 80dd800dee..2ebf9dd180 100644 --- a/apis/kms/v1beta1/keyhandle_types.go +++ b/apis/kms/v1beta1/keyhandle_types.go @@ -30,6 +30,7 @@ type KMSKeyHandleSpec struct { // The KMS Key Handle ID used for resource creation or acquisition. // For creation: If specified, this value is used as the key handle ID. If not provided, a UUID will be generated and assigned as the key handle ID. // For acquisition: This field must be provided to identify the key handle resource to acquire. + // Cannot be changed after create, except for updating from empty string to the actual resource ID. ResourceID *string `json:"resourceID,omitempty"` // Project hosting KMSKeyHandle diff --git a/apis/privilegedaccessmanager/v1alpha1/entitlement_types.go b/apis/privilegedaccessmanager/v1alpha1/entitlement_types.go index 6013c22dfc..9c1399c7dc 100644 --- a/apis/privilegedaccessmanager/v1alpha1/entitlement_types.go +++ b/apis/privilegedaccessmanager/v1alpha1/entitlement_types.go @@ -50,6 +50,7 @@ type PrivilegedAccessManagerEntitlementSpec struct { // The PrivilegedAccessManagerEntitlement name. If not given, the // 'metadata.name' will be used. + // Cannot be changed after create, except for updating from empty string to the actual resource ID. // +optional ResourceID *string `json:"resourceID,omitempty"` diff --git a/apis/privilegedaccessmanager/v1beta1/privilegedaccessmanagerentitlement_types.go b/apis/privilegedaccessmanager/v1beta1/privilegedaccessmanagerentitlement_types.go index e67fcebc08..0f0c6ed834 100644 --- a/apis/privilegedaccessmanager/v1beta1/privilegedaccessmanagerentitlement_types.go +++ b/apis/privilegedaccessmanager/v1beta1/privilegedaccessmanagerentitlement_types.go @@ -51,6 +51,7 @@ type PrivilegedAccessManagerEntitlementSpec struct { // Immutable. // The PrivilegedAccessManagerEntitlement name. If not given, the // 'metadata.name' will be used. + // Cannot be changed after create, except for updating from empty string to the actual resource ID. // +optional ResourceID *string `json:"resourceID,omitempty"` diff --git a/apis/secretmanager/v1beta1/secret_types.go b/apis/secretmanager/v1beta1/secret_types.go index eaf1c3fc93..4dc4a945db 100644 --- a/apis/secretmanager/v1beta1/secret_types.go +++ b/apis/secretmanager/v1beta1/secret_types.go @@ -29,6 +29,7 @@ var SecretManagerSecretGVK = GroupVersion.WithKind("SecretManagerSecret") // +kcc:proto=google.cloud.secretmanager.v1.Secret type SecretManagerSecretSpec struct { // The SecretManagerSecret name. If not given, the metadata.name will be used. + // Cannot be changed after create, except for updating from empty string to the actual resource ID. ResourceID *string `json:"resourceID,omitempty"` // Optional. Immutable. The replication policy of the secret data attached to diff --git a/apis/securesourcemanager/v1alpha1/repository_types.go b/apis/securesourcemanager/v1alpha1/repository_types.go index da1e6859a8..c2225c36b6 100644 --- a/apis/securesourcemanager/v1alpha1/repository_types.go +++ b/apis/securesourcemanager/v1alpha1/repository_types.go @@ -36,6 +36,7 @@ type SecureSourceManagerRepositorySpec struct { Location string `json:"location"` // The SecureSourceManagerRepository name. If not given, the metadata.name will be used. + // Cannot be changed after create, except for updating from empty string to the actual resource ID. ResourceID *string `json:"resourceID,omitempty"` // The name of the instance in which the repository is hosted, formatted as diff --git a/apis/spanner/v1beta1/instance_types.go b/apis/spanner/v1beta1/instance_types.go index 135ba30a46..84a4d5f9f9 100644 --- a/apis/spanner/v1beta1/instance_types.go +++ b/apis/spanner/v1beta1/instance_types.go @@ -46,6 +46,7 @@ type SpannerInstanceSpec struct { ProcessingUnits *int32 `json:"processingUnits,omitempty"` // The SpannerInstance name. If not given, the metadata.name will be used. + // Cannot be changed after create, except for updating from empty string to the actual resource ID. ResourceID *string `json:"resourceID,omitempty"` } diff --git a/apis/workstations/v1alpha1/cluster_types.go b/apis/workstations/v1alpha1/cluster_types.go index 18813affed..47b67346cb 100644 --- a/apis/workstations/v1alpha1/cluster_types.go +++ b/apis/workstations/v1alpha1/cluster_types.go @@ -37,6 +37,7 @@ type WorkstationClusterSpec struct { Location string `json:"location,omitempty"` // The WorkstationCluster name. If not given, the metadata.name will be used. + // Cannot be changed after create, except for updating from empty string to the actual resource ID. ResourceID *string `json:"resourceID,omitempty"` // Optional. Human-readable name for this workstation cluster. diff --git a/apis/workstations/v1alpha1/config_types.go b/apis/workstations/v1alpha1/config_types.go index c3ab8df420..7783423b81 100644 --- a/apis/workstations/v1alpha1/config_types.go +++ b/apis/workstations/v1alpha1/config_types.go @@ -275,6 +275,7 @@ type WorkstationConfigSpec struct { Parent *WorkstationClusterRef `json:"parentRef"` // The WorkstationConfig name. If not given, the metadata.name will be used. + // Cannot be changed after create, except for updating from empty string to the actual resource ID. ResourceID *string `json:"resourceID,omitempty"` // Optional. Human-readable name for this workstation configuration. diff --git a/apis/workstations/v1alpha1/workstation_types.go b/apis/workstations/v1alpha1/workstation_types.go index 0601371243..5a4e289cee 100644 --- a/apis/workstations/v1alpha1/workstation_types.go +++ b/apis/workstations/v1alpha1/workstation_types.go @@ -28,6 +28,7 @@ type WorkstationSpec struct { Parent *WorkstationConfigRef `json:"parentRef"` // The Workstation name. If not given, the metadata.name will be used. + // Cannot be changed after create, except for updating from empty string to the actual resource ID. ResourceID *string `json:"resourceID,omitempty"` // Optional. Human-readable name for this workstation. diff --git a/apis/workstations/v1beta1/cluster_types.go b/apis/workstations/v1beta1/cluster_types.go index acd2f85560..a0dd6ddeed 100644 --- a/apis/workstations/v1beta1/cluster_types.go +++ b/apis/workstations/v1beta1/cluster_types.go @@ -37,6 +37,7 @@ type WorkstationClusterSpec struct { Location string `json:"location,omitempty"` // The WorkstationCluster name. If not given, the metadata.name will be used. + // Cannot be changed after create, except for updating from empty string to the actual resource ID. ResourceID *string `json:"resourceID,omitempty"` // Optional. Human-readable name for this workstation cluster. diff --git a/apis/workstations/v1beta1/config_types.go b/apis/workstations/v1beta1/config_types.go index ec65fecea8..22128f9977 100644 --- a/apis/workstations/v1beta1/config_types.go +++ b/apis/workstations/v1beta1/config_types.go @@ -275,6 +275,7 @@ type WorkstationConfigSpec struct { Parent *WorkstationClusterRef `json:"parentRef"` // The WorkstationConfig name. If not given, the metadata.name will be used. + // Cannot be changed after create, except for updating from empty string to the actual resource ID. ResourceID *string `json:"resourceID,omitempty"` // Optional. Human-readable name for this workstation configuration. diff --git a/apis/workstations/v1beta1/workstation_types.go b/apis/workstations/v1beta1/workstation_types.go index 1df85c01d2..97541122ff 100644 --- a/apis/workstations/v1beta1/workstation_types.go +++ b/apis/workstations/v1beta1/workstation_types.go @@ -28,6 +28,7 @@ type WorkstationSpec struct { Parent *WorkstationConfigRef `json:"parentRef"` // The Workstation name. If not given, the metadata.name will be used. + // Cannot be changed after create, except for updating from empty string to the actual resource ID. ResourceID *string `json:"resourceID,omitempty"` // Optional. Human-readable name for this workstation. diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_bigquerydatatransferconfigs.bigquerydatatransfer.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_bigquerydatatransferconfigs.bigquerydatatransfer.cnrm.cloud.google.com.yaml index 2cbad467a2..fe62114671 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_bigquerydatatransferconfigs.bigquerydatatransfer.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_bigquerydatatransferconfigs.bigquerydatatransfer.cnrm.cloud.google.com.yaml @@ -233,7 +233,8 @@ spec: type: object resourceID: description: The BigQueryDataTransferConfig name. If not given, the - metadata.name will be used. + metadata.name will be used. Cannot be changed after create, except + for updating from empty string to the actual resource ID. type: string schedule: description: |- @@ -619,7 +620,8 @@ spec: type: object resourceID: description: The BigQueryDataTransferConfig name. If not given, the - metadata.name will be used. + metadata.name will be used. Cannot be changed after create, except + for updating from empty string to the actual resource ID. type: string schedule: description: |- diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_certificatemanagerdnsauthorizations.certificatemanager.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_certificatemanagerdnsauthorizations.certificatemanager.cnrm.cloud.google.com.yaml index 86681936a3..7bf8dcb8f6 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_certificatemanagerdnsauthorizations.certificatemanager.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_certificatemanagerdnsauthorizations.certificatemanager.cnrm.cloud.google.com.yaml @@ -109,7 +109,8 @@ spec: resourceID: description: Optional. The name of the resource. Used for creation and acquisition. When unset, the value of `metadata.name` is used - as the default. + as the default. Cannot be changed after create, except for updating + from empty string to the actual resource ID. type: string required: - domain @@ -269,7 +270,8 @@ spec: resourceID: description: Optional. The name of the resource. Used for creation and acquisition. When unset, the value of `metadata.name` is used - as the default. + as the default. Cannot be changed after create, except for updating + from empty string to the actual resource ID. type: string required: - domain diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_computetargettcpproxies.compute.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_computetargettcpproxies.compute.cnrm.cloud.google.com.yaml index d6382d0376..d47d0574ce 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_computetargettcpproxies.compute.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_computetargettcpproxies.compute.cnrm.cloud.google.com.yaml @@ -117,7 +117,8 @@ spec: type: string resourceID: description: The ComputeTargetTCPProxy name. If not given, the metadata.name - will be used. + will be used. Cannot be changed after create, except for updating + from empty string to the actual resource ID. type: string required: - backendServiceRef diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_containerattachedclusters.containerattached.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_containerattachedclusters.containerattached.cnrm.cloud.google.com.yaml index 4f03b72b64..ff56fef34d 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_containerattachedclusters.containerattached.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_containerattachedclusters.containerattached.cnrm.cloud.google.com.yaml @@ -271,7 +271,8 @@ spec: type: object resourceID: description: Optional. The ContainerAttachedCluster name. If not given, - the metadata.name will be used. + the metadata.name will be used. Cannot be changed after create, + except for updating from empty string to the actual resource ID. type: string required: - distribution diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_discoveryenginedatastores.discoveryengine.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_discoveryenginedatastores.discoveryengine.cnrm.cloud.google.com.yaml index d2d981fec4..31feadaadc 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_discoveryenginedatastores.discoveryengine.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_discoveryenginedatastores.discoveryengine.cnrm.cloud.google.com.yaml @@ -122,7 +122,8 @@ spec: type: object resourceID: description: The DiscoveryEngineDataStore name. If not given, the - metadata.name will be used. + metadata.name will be used. Cannot be changed after create, except + for updating from empty string to the actual resource ID. type: string solutionTypes: description: |- diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_kmskeyhandles.kms.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_kmskeyhandles.kms.cnrm.cloud.google.com.yaml index 404ae3f702..9bcc7f6c6c 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_kmskeyhandles.kms.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_kmskeyhandles.kms.cnrm.cloud.google.com.yaml @@ -100,7 +100,9 @@ spec: acquisition. For creation: If specified, this value is used as the key handle ID. If not provided, a UUID will be generated and assigned as the key handle ID. For acquisition: This field must be provided - to identify the key handle resource to acquire.' + to identify the key handle resource to acquire. Cannot be changed + after create, except for updating from empty string to the actual + resource ID.' type: string resourceTypeSelector: description: Indicates the resource type that the resulting [CryptoKey][] @@ -240,7 +242,9 @@ spec: acquisition. For creation: If specified, this value is used as the key handle ID. If not provided, a UUID will be generated and assigned as the key handle ID. For acquisition: This field must be provided - to identify the key handle resource to acquire.' + to identify the key handle resource to acquire. Cannot be changed + after create, except for updating from empty string to the actual + resource ID.' type: string resourceTypeSelector: description: Indicates the resource type that the resulting [CryptoKey][] diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_privilegedaccessmanagerentitlements.privilegedaccessmanager.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_privilegedaccessmanagerentitlements.privilegedaccessmanager.cnrm.cloud.google.com.yaml index a51b2c38bf..8ec36b2411 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_privilegedaccessmanagerentitlements.privilegedaccessmanager.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_privilegedaccessmanagerentitlements.privilegedaccessmanager.cnrm.cloud.google.com.yaml @@ -304,7 +304,8 @@ spec: type: object resourceID: description: The PrivilegedAccessManagerEntitlement name. If not given, - the 'metadata.name' will be used. + the 'metadata.name' will be used. Cannot be changed after create, + except for updating from empty string to the actual resource ID. type: string required: - eligibleUsers @@ -668,7 +669,9 @@ spec: type: object resourceID: description: Immutable. The PrivilegedAccessManagerEntitlement name. - If not given, the 'metadata.name' will be used. + If not given, the 'metadata.name' will be used. Cannot be changed + after create, except for updating from empty string to the actual + resource ID. type: string required: - eligibleUsers diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_secretmanagersecrets.secretmanager.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_secretmanagersecrets.secretmanager.cnrm.cloud.google.com.yaml index 0390b61062..c951e79f96 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_secretmanagersecrets.secretmanager.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_secretmanagersecrets.secretmanager.cnrm.cloud.google.com.yaml @@ -240,7 +240,8 @@ spec: type: object resourceID: description: The SecretManagerSecret name. If not given, the metadata.name - will be used. + will be used. Cannot be changed after create, except for updating + from empty string to the actual resource ID. type: string rotation: description: Optional. Rotation policy attached to the [Secret][google.cloud.secretmanager.v1.Secret]. diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_securesourcemanagerrepositories.securesourcemanager.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_securesourcemanagerrepositories.securesourcemanager.cnrm.cloud.google.com.yaml index be6ccb19e7..7370e6d5b6 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_securesourcemanagerrepositories.securesourcemanager.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_securesourcemanagerrepositories.securesourcemanager.cnrm.cloud.google.com.yaml @@ -269,7 +269,8 @@ spec: type: object resourceID: description: The SecureSourceManagerRepository name. If not given, - the metadata.name will be used. + the metadata.name will be used. Cannot be changed after create, + except for updating from empty string to the actual resource ID. type: string required: - instanceRef diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_spannerinstances.spanner.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_spannerinstances.spanner.cnrm.cloud.google.com.yaml index 7107942e95..5e506239d9 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_spannerinstances.spanner.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_spannerinstances.spanner.cnrm.cloud.google.com.yaml @@ -84,7 +84,8 @@ spec: type: integer resourceID: description: The SpannerInstance name. If not given, the metadata.name - will be used. + will be used. Cannot be changed after create, except for updating + from empty string to the actual resource ID. type: string required: - config diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_workstationclusters.workstations.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_workstationclusters.workstations.cnrm.cloud.google.com.yaml index 6872239ffc..017c95217a 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_workstationclusters.workstations.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_workstationclusters.workstations.cnrm.cloud.google.com.yaml @@ -203,7 +203,8 @@ spec: rule: self == oldSelf resourceID: description: The WorkstationCluster name. If not given, the metadata.name - will be used. + will be used. Cannot be changed after create, except for updating + from empty string to the actual resource ID. type: string subnetworkRef: description: Immutable. Reference to the Compute Engine subnetwork @@ -546,7 +547,8 @@ spec: rule: self == oldSelf resourceID: description: The WorkstationCluster name. If not given, the metadata.name - will be used. + will be used. Cannot be changed after create, except for updating + from empty string to the actual resource ID. type: string subnetworkRef: description: Immutable. Reference to the Compute Engine subnetwork diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_workstationconfigs.workstations.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_workstationconfigs.workstations.cnrm.cloud.google.com.yaml index 24158c3108..50aecec4b0 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_workstationconfigs.workstations.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_workstationconfigs.workstations.cnrm.cloud.google.com.yaml @@ -507,7 +507,8 @@ spec: type: array resourceID: description: The WorkstationConfig name. If not given, the metadata.name - will be used. + will be used. Cannot be changed after create, except for updating + from empty string to the actual resource ID. type: string runningTimeout: description: |- @@ -1134,7 +1135,8 @@ spec: type: array resourceID: description: The WorkstationConfig name. If not given, the metadata.name - will be used. + will be used. Cannot be changed after create, except for updating + from empty string to the actual resource ID. type: string runningTimeout: description: |- diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_workstations.workstations.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_workstations.workstations.cnrm.cloud.google.com.yaml index c680d7c072..e23c2be9ae 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_workstations.workstations.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_workstations.workstations.cnrm.cloud.google.com.yaml @@ -119,7 +119,8 @@ spec: type: object resourceID: description: The Workstation name. If not given, the metadata.name - will be used. + will be used. Cannot be changed after create, except for updating + from empty string to the actual resource ID. type: string required: - parentRef @@ -308,7 +309,8 @@ spec: type: object resourceID: description: The Workstation name. If not given, the metadata.name - will be used. + will be used. Cannot be changed after create, except for updating + from empty string to the actual resource ID. type: string required: - parentRef diff --git a/dev/tools/controllerbuilder/template/apis/types.go b/dev/tools/controllerbuilder/template/apis/types.go index 97d083c018..26d017d11e 100644 --- a/dev/tools/controllerbuilder/template/apis/types.go +++ b/dev/tools/controllerbuilder/template/apis/types.go @@ -38,6 +38,7 @@ var {{ .Kind }}GVK = GroupVersion.WithKind("{{ .Kind }}") {{- end }} type {{ .Kind }}Spec struct { // The {{ .Kind }} name. If not given, the metadata.name will be used. + // Cannot be changed after create, except for updating from empty string to the actual resource ID. ResourceID *string ` + "`" + `json:"resourceID,omitempty"` + "`" + ` } diff --git a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/bigquerydatatransfer/bigquerydatatransferconfig.md b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/bigquerydatatransfer/bigquerydatatransferconfig.md index b9a298c03d..8cc7474b5b 100644 --- a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/bigquerydatatransfer/bigquerydatatransferconfig.md +++ b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/bigquerydatatransfer/bigquerydatatransferconfig.md @@ -387,7 +387,7 @@ serviceAccountRef:

string

-

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

+

{% verbatim %}The BigQueryDataTransferConfig name. If not given, the metadata.name will be used. Cannot be changed after create, except for updating from empty string to the actual resource ID.{% endverbatim %}

diff --git a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/certificatemanager/certificatemanagerdnsauthorization.md b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/certificatemanager/certificatemanagerdnsauthorization.md index 2b29ebe952..5afbf2b9fa 100644 --- a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/certificatemanager/certificatemanagerdnsauthorization.md +++ b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/certificatemanager/certificatemanagerdnsauthorization.md @@ -168,7 +168,7 @@ resourceID: string

string

-

{% verbatim %}Optional. The name of the resource. Used for creation and acquisition. When unset, the value of `metadata.name` is used as the default.{% endverbatim %}

+

{% verbatim %}Optional. The name of the resource. Used for creation and acquisition. When unset, the value of `metadata.name` is used as the default. Cannot be changed after create, except for updating from empty string to the actual resource ID.{% endverbatim %}

diff --git a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/compute/computetargettcpproxy.md b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/compute/computetargettcpproxy.md index ab23080999..d01c07c9fa 100644 --- a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/compute/computetargettcpproxy.md +++ b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/compute/computetargettcpproxy.md @@ -182,7 +182,7 @@ resourceID: string

string

-

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

+

{% verbatim %}The ComputeTargetTCPProxy name. If not given, the metadata.name will be used. Cannot be changed after create, except for updating from empty string to the actual resource ID.{% endverbatim %}

diff --git a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/containerattached/containerattachedcluster.md b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/containerattached/containerattachedcluster.md index 3cea3273b0..c14594b33e 100644 --- a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/containerattached/containerattachedcluster.md +++ b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/containerattached/containerattachedcluster.md @@ -512,7 +512,7 @@ while clusters with private issuers need to provide both 'issuerUrl' and 'jwks'.

string

-

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

+

{% verbatim %}Optional. The ContainerAttachedCluster name. If not given, the metadata.name will be used. Cannot be changed after create, except for updating from empty string to the actual resource ID.{% endverbatim %}

diff --git a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/kms/kmskeyhandle.md b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/kms/kmskeyhandle.md index fe15c216ed..fbda7ed506 100644 --- a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/kms/kmskeyhandle.md +++ b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/kms/kmskeyhandle.md @@ -147,7 +147,7 @@ resourceTypeSelector: string

string

-

{% verbatim %}The KMS Key Handle ID used for resource creation or acquisition. For creation: If specified, this value is used as the key handle ID. If not provided, a UUID will be generated and assigned as the key handle ID. For acquisition: This field must be provided to identify the key handle resource to acquire.{% endverbatim %}

+

{% verbatim %}The KMS Key Handle ID used for resource creation or acquisition. For creation: If specified, this value is used as the key handle ID. If not provided, a UUID will be generated and assigned as the key handle ID. For acquisition: This field must be provided to identify the key handle resource to acquire. Cannot be changed after create, except for updating from empty string to the actual resource ID.{% endverbatim %}

diff --git a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/privilegedaccessmanager/privilegedaccessmanagerentitlement.md b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/privilegedaccessmanager/privilegedaccessmanagerentitlement.md index 9a73baa71c..9833be7cc6 100644 --- a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/privilegedaccessmanager/privilegedaccessmanagerentitlement.md +++ b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/privilegedaccessmanager/privilegedaccessmanagerentitlement.md @@ -562,7 +562,7 @@ https://cloud.google.com/iam/docs/conditions-overview#attributes.{% endverbatim

string

-

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

+

{% verbatim %}Immutable. The PrivilegedAccessManagerEntitlement name. If not given, the 'metadata.name' will be used. Cannot be changed after create, except for updating from empty string to the actual resource ID.{% endverbatim %}

diff --git a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/secretmanager/secretmanagersecret.md b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/secretmanager/secretmanagersecret.md index 2cee06f808..16fa71d199 100644 --- a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/secretmanager/secretmanagersecret.md +++ b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/secretmanager/secretmanagersecret.md @@ -395,7 +395,7 @@ versionAliases:

string

-

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

+

{% verbatim %}The SecretManagerSecret name. If not given, the metadata.name will be used. Cannot be changed after create, except for updating from empty string to the actual resource ID.{% endverbatim %}

diff --git a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/spanner/spannerinstance.md b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/spanner/spannerinstance.md index 48cd9330bb..703c07f20c 100644 --- a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/spanner/spannerinstance.md +++ b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/spanner/spannerinstance.md @@ -159,7 +159,7 @@ resourceID: string

string

-

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

+

{% verbatim %}The SpannerInstance name. If not given, the metadata.name will be used. Cannot be changed after create, except for updating from empty string to the actual resource ID.{% endverbatim %}

diff --git a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/workstations/workstation.md b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/workstations/workstation.md index 9eac4309a1..bc375f68e6 100644 --- a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/workstations/workstation.md +++ b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/workstations/workstation.md @@ -219,7 +219,7 @@ resourceID: string

string

-

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

+

{% verbatim %}The Workstation name. If not given, the metadata.name will be used. Cannot be changed after create, except for updating from empty string to the actual resource ID.{% endverbatim %}

diff --git a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/workstations/workstationcluster.md b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/workstations/workstationcluster.md index 423077e179..ffa548beaa 100644 --- a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/workstations/workstationcluster.md +++ b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/workstations/workstationcluster.md @@ -376,7 +376,7 @@ subnetworkRef:

string

-

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

+

{% verbatim %}The WorkstationCluster name. If not given, the metadata.name will be used. Cannot be changed after create, except for updating from empty string to the actual resource ID.{% endverbatim %}

diff --git a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/workstations/workstationconfig.md b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/workstations/workstationconfig.md index c5baeed10b..230574ff09 100644 --- a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/workstations/workstationconfig.md +++ b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/workstations/workstationconfig.md @@ -955,7 +955,7 @@ runningTimeout: string

string

-

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

+

{% verbatim %}The WorkstationConfig name. If not given, the metadata.name will be used. Cannot be changed after create, except for updating from empty string to the actual resource ID.{% endverbatim %}