AlloyDBUser
Property | Value |
---|---|
Google Cloud Service Name | AlloyDB for PostgreSQL |
Google Cloud Service Documentation | /alloydb/docs/ |
Google Cloud REST Resource Name | v1.projects.locations.clusters.users |
Google Cloud REST Resource Documentation | /alloydb/docs/reference/rest/v1/projects.locations.clusters.users |
Config Connector Resource Short Names | gcpalloydbuser gcpalloydbusers alloydbuser |
Config Connector Service Name | alloydb.googleapis.com |
Config Connector Resource Fully Qualified Name | alloydbusers.alloydb.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
clusterRef:
external: string
name: string
namespace: string
databaseRoles:
- string
password:
value: string
valueFrom:
secretKeyRef:
key: string
name: string
resourceID: string
userType: string
Fields | |
---|---|
Required |
|
Optional |
Allowed value: The `name` field of an `AlloyDBCluster` resource. |
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 |
List of database roles this database user has. |
Optional |
|
Optional |
Password for this database user. |
Optional |
Value of the field. Cannot be used if 'valueFrom' is specified. |
Optional |
Source for the field's value. Cannot be used if 'value' is specified. |
Optional |
Reference to a value with the given key in the given Secret in the resource's namespace. |
Required* |
Key that identifies the value to be extracted. |
Required* |
Name of the Secret to extract a value from. |
Optional |
Immutable. Optional. The userId of the resource. Used for creation and acquisition. When unset, the value of `metadata.name` is used as the default. |
Required |
Immutable. The type of this user. Possible values: ["ALLOYDB_BUILT_IN", "ALLOYDB_IAM_USER"]. |
* Field is required when parent field is specified
Status
Schema
conditions:
- lastTransitionTime: string
message: string
reason: string
status: string
type: string
name: string
observedGeneration: integer
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. |
name |
Name of the resource in the form of projects/{project}/locations/{location}/clusters/{cluster}/users/{user}. |
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. |
Sample YAML(s)
Database User
# Copyright 2023 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: alloydb.cnrm.cloud.google.com/v1beta1
kind: AlloyDBUser
metadata:
name: alloydbuser-sample-database
spec:
clusterRef:
name: alloydbuser-dep-database
databaseRoles:
- pg_monitor
- pg_signal_backend
userType: ALLOYDB_BUILT_IN
password:
value: pg-built-in
---
apiVersion: alloydb.cnrm.cloud.google.com/v1beta1
kind: AlloyDBCluster
metadata:
name: alloydbuser-dep-database
spec:
location: me-central1
networkConfig:
networkRef:
name: alloydbuser-dep-database
projectRef:
external: ${PROJECT_ID?}
---
apiVersion: alloydb.cnrm.cloud.google.com/v1beta1
kind: AlloyDBInstance
metadata:
name: alloydbuser-dep-database
spec:
clusterRef:
name: alloydbuser-dep-database
instanceTypeRef:
name: alloydbuser-dep-database
databaseFlags:
enable_google_adaptive_autovacuum: "off"
machineConfig:
cpuCount: 2
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeAddress
metadata:
name: alloydbuser-dep-database
spec:
location: global
addressType: INTERNAL
networkRef:
name: alloydbuser-dep-database
prefixLength: 16
purpose: VPC_PEERING
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeNetwork
metadata:
name: alloydbuser-dep-database
---
apiVersion: servicenetworking.cnrm.cloud.google.com/v1beta1
kind: ServiceNetworkingConnection
metadata:
name: alloydbuser-dep-database
spec:
networkRef:
name: alloydbuser-dep-database
reservedPeeringRanges:
- external: alloydbuser-dep-database
service: servicenetworking.googleapis.com
IAM User
# Copyright 2023 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: alloydb.cnrm.cloud.google.com/v1beta1
kind: AlloyDBUser
metadata:
name: alloydbuser-sample-iam
spec:
clusterRef:
name: alloydbuser-dep-iam
databaseRoles:
- pg_monitor
- pg_signal_backend
- alloydbiamuser
userType: ALLOYDB_IAM_USER
---
apiVersion: alloydb.cnrm.cloud.google.com/v1beta1
kind: AlloyDBCluster
metadata:
name: alloydbuser-dep-iam
spec:
location: me-west1
networkConfig:
networkRef:
name: alloydbuser-dep-iam
projectRef:
external: ${PROJECT_ID?}
---
apiVersion: alloydb.cnrm.cloud.google.com/v1beta1
kind: AlloyDBInstance
metadata:
name: alloydbuser-dep-iam
spec:
clusterRef:
name: alloydbuser-dep-iam
instanceTypeRef:
name: alloydbuser-dep-iam
databaseFlags:
enable_google_adaptive_autovacuum: "off"
machineConfig:
cpuCount: 2
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeAddress
metadata:
name: alloydbuser-dep-iam
spec:
location: global
addressType: INTERNAL
networkRef:
name: alloydbuser-dep-iam
prefixLength: 16
purpose: VPC_PEERING
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeNetwork
metadata:
name: alloydbuser-dep-iam
---
apiVersion: servicenetworking.cnrm.cloud.google.com/v1beta1
kind: ServiceNetworkingConnection
metadata:
name: alloydbuser-dep-iam
spec:
networkRef:
name: alloydbuser-dep-iam
reservedPeeringRanges:
- external: alloydbuser-dep-iam
service: servicenetworking.googleapis.com