From d2d887f6e416d329930b14d1e7ab99a3b4591ecb Mon Sep 17 00:00:00 2001 From: Jingyi Hu Date: Wed, 4 Dec 2024 19:40:40 +0000 Subject: [PATCH] chore: add public sample for BQCC referenced in IAMPolicyMemeber --- ..._v1beta1_bigqueryconnectionconnection.yaml | 32 +++++++ .../iam_v1beta1_iampolicymember.yaml | 28 ++++++ .../secret.yaml | 22 +++++ .../sql_v1beta1_sqldatabase.yaml | 22 +++++ .../sql_v1beta1_sqlinstance.yaml | 25 +++++ .../sql_v1beta1_sqluser.yaml | 27 ++++++ .../resource-docs/iam/iampolicymember.md | 95 +++++++++++++++++++ 7 files changed, 251 insertions(+) create mode 100644 config/samples/resources/iampolicymember/policy-member-with-bigqueryconnection-reference/bigqueryconnection_v1beta1_bigqueryconnectionconnection.yaml create mode 100644 config/samples/resources/iampolicymember/policy-member-with-bigqueryconnection-reference/iam_v1beta1_iampolicymember.yaml create mode 100644 config/samples/resources/iampolicymember/policy-member-with-bigqueryconnection-reference/secret.yaml create mode 100644 config/samples/resources/iampolicymember/policy-member-with-bigqueryconnection-reference/sql_v1beta1_sqldatabase.yaml create mode 100644 config/samples/resources/iampolicymember/policy-member-with-bigqueryconnection-reference/sql_v1beta1_sqlinstance.yaml create mode 100644 config/samples/resources/iampolicymember/policy-member-with-bigqueryconnection-reference/sql_v1beta1_sqluser.yaml diff --git a/config/samples/resources/iampolicymember/policy-member-with-bigqueryconnection-reference/bigqueryconnection_v1beta1_bigqueryconnectionconnection.yaml b/config/samples/resources/iampolicymember/policy-member-with-bigqueryconnection-reference/bigqueryconnection_v1beta1_bigqueryconnectionconnection.yaml new file mode 100644 index 0000000000..6536502b2a --- /dev/null +++ b/config/samples/resources/iampolicymember/policy-member-with-bigqueryconnection-reference/bigqueryconnection_v1beta1_bigqueryconnectionconnection.yaml @@ -0,0 +1,32 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: bigqueryconnection.cnrm.cloud.google.com/v1beta1 +kind: BigQueryConnectionConnection +metadata: + name: iampolicymember-dep-bqccref +spec: + location: us-central1 + projectRef: + # Replace ${PROJECT_ID?} with your project ID + external: ${PROJECT_ID?} + cloudSQL: + instanceRef: + name: iampolicymember-dep-bqccref + databaseRef: + name: iampolicymember-dep-bqccref + type: "MYSQL" + credential: + secretRef: + name: iampolicymember-dep-bqccref \ No newline at end of file diff --git a/config/samples/resources/iampolicymember/policy-member-with-bigqueryconnection-reference/iam_v1beta1_iampolicymember.yaml b/config/samples/resources/iampolicymember/policy-member-with-bigqueryconnection-reference/iam_v1beta1_iampolicymember.yaml new file mode 100644 index 0000000000..5cee9f4314 --- /dev/null +++ b/config/samples/resources/iampolicymember/policy-member-with-bigqueryconnection-reference/iam_v1beta1_iampolicymember.yaml @@ -0,0 +1,28 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: iam.cnrm.cloud.google.com/v1beta1 +kind: IAMPolicyMember +metadata: + name: iampolicymember-sample-bqccref +spec: + memberFrom: + bigQueryConnectionConnectionRef: + type: cloudSQL + name: iampolicymember-dep-bqccref + role: roles/editor + resourceRef: + kind: Project + # Replace ${PROJECT_ID?} with your project ID + external: projects/${PROJECT_ID?} diff --git a/config/samples/resources/iampolicymember/policy-member-with-bigqueryconnection-reference/secret.yaml b/config/samples/resources/iampolicymember/policy-member-with-bigqueryconnection-reference/secret.yaml new file mode 100644 index 0000000000..952f1187de --- /dev/null +++ b/config/samples/resources/iampolicymember/policy-member-with-bigqueryconnection-reference/secret.yaml @@ -0,0 +1,22 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: Secret +metadata: + name: iampolicymember-dep-bqccref +type: kubernetes.io/basic-auth +stringData: + username: iampolicymember-dep-bqccref + password: cGFzc3dvcmQ= diff --git a/config/samples/resources/iampolicymember/policy-member-with-bigqueryconnection-reference/sql_v1beta1_sqldatabase.yaml b/config/samples/resources/iampolicymember/policy-member-with-bigqueryconnection-reference/sql_v1beta1_sqldatabase.yaml new file mode 100644 index 0000000000..86634a1d47 --- /dev/null +++ b/config/samples/resources/iampolicymember/policy-member-with-bigqueryconnection-reference/sql_v1beta1_sqldatabase.yaml @@ -0,0 +1,22 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: sql.cnrm.cloud.google.com/v1beta1 +kind: SQLDatabase +metadata: + name: iampolicymember-dep-bqccref +spec: + charset: utf8 + instanceRef: + name: iampolicymember-dep-bqccref diff --git a/config/samples/resources/iampolicymember/policy-member-with-bigqueryconnection-reference/sql_v1beta1_sqlinstance.yaml b/config/samples/resources/iampolicymember/policy-member-with-bigqueryconnection-reference/sql_v1beta1_sqlinstance.yaml new file mode 100644 index 0000000000..953ec3a560 --- /dev/null +++ b/config/samples/resources/iampolicymember/policy-member-with-bigqueryconnection-reference/sql_v1beta1_sqlinstance.yaml @@ -0,0 +1,25 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: sql.cnrm.cloud.google.com/v1beta1 +kind: SQLInstance +metadata: + name: iampolicymember-dep-bqccref +spec: + databaseVersion: MYSQL_5_7 + region: us-central1 + settings: + locationPreference: + zone: us-central1-a + tier: db-custom-1-3840 diff --git a/config/samples/resources/iampolicymember/policy-member-with-bigqueryconnection-reference/sql_v1beta1_sqluser.yaml b/config/samples/resources/iampolicymember/policy-member-with-bigqueryconnection-reference/sql_v1beta1_sqluser.yaml new file mode 100644 index 0000000000..3d419879ac --- /dev/null +++ b/config/samples/resources/iampolicymember/policy-member-with-bigqueryconnection-reference/sql_v1beta1_sqluser.yaml @@ -0,0 +1,27 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: sql.cnrm.cloud.google.com/v1beta1 +kind: SQLUser +metadata: + name: iampolicymember-dep-bqccref +spec: + instanceRef: + name: iampolicymember-dep-bqccref + host: foo + password: + valueFrom: + secretKeyRef: + name: iampolicymember-dep-bqccref + key: password diff --git a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/iam/iampolicymember.md b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/iam/iampolicymember.md index b6eb38f6eb..721426e31f 100644 --- a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/iam/iampolicymember.md +++ b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/iam/iampolicymember.md @@ -1091,6 +1091,101 @@ metadata: name: iampolicymember-dep-orgrole ``` +### Policy Member With BigQueryConnection Reference +```yaml +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: iam.cnrm.cloud.google.com/v1beta1 +kind: IAMPolicyMember +metadata: + name: iampolicymember-sample-bqccref +spec: + memberFrom: + bigQueryConnectionConnectionRef: + type: cloudSQL + name: iampolicymember-dep-bqccref + role: roles/editor + resourceRef: + kind: Project + # Replace ${PROJECT_ID?} with your project ID + external: projects/${PROJECT_ID?} +--- +apiVersion: bigqueryconnection.cnrm.cloud.google.com/v1beta1 +kind: BigQueryConnectionConnection +metadata: + name: iampolicymember-dep-bqccref +spec: + location: us-central1 + projectRef: + # Replace ${PROJECT_ID?} with your project ID + external: ${PROJECT_ID?} + cloudSQL: + instanceRef: + name: iampolicymember-dep-bqccref + databaseRef: + name: iampolicymember-dep-bqccref + type: "MYSQL" + credential: + secretRef: + name: iampolicymember-dep-bqccref +--- +apiVersion: v1 +kind: Secret +metadata: + name: iampolicymember-dep-bqccref +type: kubernetes.io/basic-auth +stringData: + username: iampolicymember-dep-bqccref + password: cGFzc3dvcmQ= +--- +apiVersion: sql.cnrm.cloud.google.com/v1beta1 +kind: SQLDatabase +metadata: + name: iampolicymember-dep-bqccref +spec: + charset: utf8 + instanceRef: + name: iampolicymember-dep-bqccref +--- +apiVersion: sql.cnrm.cloud.google.com/v1beta1 +kind: SQLInstance +metadata: + name: iampolicymember-dep-bqccref +spec: + databaseVersion: MYSQL_5_7 + region: us-central1 + settings: + locationPreference: + zone: us-central1-a + tier: db-custom-1-3840 +--- +apiVersion: sql.cnrm.cloud.google.com/v1beta1 +kind: SQLUser +metadata: + name: iampolicymember-dep-bqccref +spec: + instanceRef: + name: iampolicymember-dep-bqccref + host: foo + password: + valueFrom: + secretKeyRef: + name: iampolicymember-dep-bqccref + key: password +``` + ### Policy Member With Member Reference ```yaml # Copyright 2020 Google LLC