LoggingLogBucket
This resource is able to configure log buckets for a project, folder,
organization, or billing account. The parent resource is configured by setting
one of projectRef
, folderRef
, organizationRef
, or billingAccountRef
.
Property | Value |
---|---|
Google Cloud Service Name | Cloud Logging |
Google Cloud Service Documentation | /logging/docs/ |
Google Cloud REST Resource Name |
v2.billingAccounts.locations.buckets v2.folders.locations.buckets v2.organizations.locations.buckets v2.projects.locations.buckets |
Google Cloud REST Resource Documentation |
/logging/docs/reference/v2/rest/v2/billingAccounts.locations.buckets /logging/docs/reference/v2/rest/v2/folders.locations.buckets /logging/docs/reference/v2/rest/v2/organizations.locations.buckets /logging/docs/reference/v2/rest/v2/projects.locations.buckets |
Config Connector Resource Short Names | gcplogginglogbucket gcplogginglogbuckets logginglogbucket |
Config Connector Service Name | logging.googleapis.com |
Config Connector Resource Fully Qualified Name | logginglogbuckets.logging.cnrm.cloud.google.com |
Can Be Referenced by IAMPolicy/IAMPolicyMember | No |
Config Connector Default Average Reconcile Interval In Seconds | 600 |
Custom Resource Definition Properties
Spec
Schema
billingAccountRef:
external: string
name: string
namespace: string
description: string
enableAnalytics: boolean
folderRef:
external: string
name: string
namespace: string
location: string
locked: boolean
organizationRef:
external: string
name: string
namespace: string
projectRef:
external: string
name: string
namespace: string
resourceID: string
retentionDays: integer
Fields | |
---|---|
Optional |
Immutable. The BillingAccount that this resource belongs to. Only one of [billingAccountRef, folderRef, organizationRef, projectRef] may be specified. |
Optional |
Allowed value: The Google Cloud resource name of a Google Cloud Billing Account (format: `billingAccounts/{{name}}`). |
Optional |
[WARNING] BillingAccount not yet supported in Config Connector, use 'external' field to reference existing resources. Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
Optional |
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ |
Optional |
Describes this bucket. |
Optional |
Whether or not Log Analytics is enabled. Logs for buckets with Log Analytics enabled can be queried in the Log Analytics page using SQL queries. Cannot be disabled once enabled. |
Optional |
Immutable. The Folder that this resource belongs to. Only one of [billingAccountRef, folderRef, organizationRef, projectRef] may be specified. |
Optional |
Allowed value: The Google Cloud resource name of a `Folder` resource (format: `folders/{{name}}`). |
Optional |
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
Optional |
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ |
Required |
Immutable. The location of the resource. The supported locations are: global, us-central1, us-east1, us-west1, asia-east1, europe-west1. |
Optional |
Whether the bucket has been locked. The retention period on a locked bucket may not be changed. Locked buckets may only be deleted if they are empty. |
Optional |
Immutable. The Organization that this resource belongs to. Only one of [billingAccountRef, folderRef, organizationRef, projectRef] may be specified. |
Optional |
Allowed value: The Google Cloud resource name of a Google Cloud Organization (format: `organizations/{{name}}`). |
Optional |
[WARNING] Organization not yet supported in Config Connector, use 'external' field to reference existing resources. Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
Optional |
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ |
Optional |
Immutable. The Project that this resource belongs to. Only one of [billingAccountRef, folderRef, organizationRef, projectRef] may be specified. |
Optional |
Allowed value: The Google Cloud resource name of a `Project` resource (format: `projects/{{name}}`). |
Optional |
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
Optional |
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ |
Optional |
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 |
Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used. |
Status
Schema
conditions:
- lastTransitionTime: string
message: string
reason: string
status: string
type: string
createTime: string
lifecycleState: string
observedGeneration: integer
updateTime: string
Fields | |
---|---|
conditions |
Conditions represent the latest available observation of the resource's current state. |
conditions[] |
|
conditions[].lastTransitionTime |
Last time the condition transitioned from one status to another. |
conditions[].message |
Human-readable message indicating details about last transition. |
conditions[].reason |
Unique, one-word, CamelCase reason for the condition's last transition. |
conditions[].status |
Status is the status of the condition. Can be True, False, Unknown. |
conditions[].type |
Type is the type of the condition. |
createTime |
Output only. The creation timestamp of the bucket. This is not set for any of the default buckets. |
lifecycleState |
Output only. The bucket lifecycle state. Possible values: LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED |
observedGeneration |
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. |
updateTime |
Output only. The last update timestamp of the bucket. |
Sample YAML(s)
Billing Account Log Bucket
# Copyright 2022 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: logging.cnrm.cloud.google.com/v1beta1
kind: LoggingLogBucket
metadata:
name: logginglogbucket-sample-billingaccountlogbucket
spec:
# At the organization, folder, or billing account level _Default and _Required are the only valid resource names
resourceID: "_Default"
billingAccountRef:
# Replace "${BILLING_ACCOUNT_ID_FOR_BILLING_RESOURCES?}" with the numeric ID for your billing account
external: "${BILLING_ACCOUNT_ID_FOR_BILLING_RESOURCES?}"
location: "global"
Folder Log Bucket
# Copyright 2022 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: logging.cnrm.cloud.google.com/v1beta1
kind: LoggingLogBucket
metadata:
name: logginglogbucket-sample-folderlogbucket
spec:
# At the organization, folder, or billing account level _Default and _Required are the only valid resource names
resourceID: "_Required"
folderRef:
name: "logginglogbucket-dep-folderlogbucket"
location: "global"
---
apiVersion: resourcemanager.cnrm.cloud.google.com/v1beta1
kind: Folder
metadata:
annotations:
# Replace "${ORG_ID?}" with the numeric ID for your organization
cnrm.cloud.google.com/organization-id: "${ORG_ID?}"
name: logginglogbucket-dep-folderlogbucket
spec:
displayName: Folder Log Bucket Sample
Organization Log Bucket
# Copyright 2022 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: logging.cnrm.cloud.google.com/v1beta1
kind: LoggingLogBucket
metadata:
name: logginglogbucket-sample-organizationlogbucket
spec:
# At the organization, folder, or billing account level _Default and _Required are the only valid resource names
resourceID: "_Default"
organizationRef:
# Replace "${ORG_ID?}" with the numeric ID for your organization
external: "organizations/${ORG_ID?}"
location: "global"
Project Log Bucket
# Copyright 2022 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: logging.cnrm.cloud.google.com/v1beta1
kind: LoggingLogBucket
metadata:
name: logginglogbucket-sample-projectlogbucket
spec:
projectRef:
# Replace ${PROJECT_ID?} with your project ID
external: "projects/${PROJECT_ID?}"
location: "global"
description: "A sample log bucket"
locked: false
retentionDays: 30