Skip to content

Commit fc995d4

Browse files
authored
Merge branch 'main' into bug-381228167
2 parents c65ef12 + e44560e commit fc995d4

File tree

9 files changed

+225
-13
lines changed

9 files changed

+225
-13
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ authenticates Terraform, letting you get started with less setup.
2222

2323
1. Clone this repository:
2424

25-
git clone https://github.com/GoogleCloudPlatform/terraform-docs-samples.git
25+
`git clone https://github.com/terraform-google-modules/terraform-docs-samples`
2626

2727
## How to run a sample
2828

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
* Copyright 2024 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
# [START bigquery_create_spanner_external_dataset]
17+
resource "google_bigquery_dataset" "default" {
18+
dataset_id = "my_external_dataset"
19+
friendly_name = "My external dataset"
20+
description = "This is a test description."
21+
location = "US"
22+
external_dataset_reference {
23+
# The full identifier of your Spanner database.
24+
external_source = "google-cloudspanner:/projects/my_project/instances/my_instance/databases/my_database"
25+
# Must be empty for a Spanner external dataset.
26+
connection = ""
27+
}
28+
}
29+
# [END bigquery_create_spanner_external_dataset]
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright 2024 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
apiVersion: blueprints.cloud.google.com/v1alpha1
16+
kind: BlueprintTest
17+
metadata:
18+
name: bigquery_create_spanner_external_dataset
19+
spec:
20+
skip: true
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/**
2+
* Copyright 2024 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
# [START gke_autopilot_config_sync_git]
18+
data "google_project" "default" {}
19+
20+
resource "google_container_cluster" "default" {
21+
name = "gke-autopilot-basic"
22+
location = "us-central1"
23+
24+
fleet {
25+
project = data.google_project.default.project_id
26+
}
27+
28+
enable_autopilot = true
29+
30+
# Set `deletion_protection` to `true` will ensure that one cannot
31+
# accidentally delete this instance by use of Terraform.
32+
deletion_protection = false
33+
}
34+
35+
resource "google_gke_hub_feature" "configmanagement_feature" {
36+
name = "configmanagement"
37+
location = "global"
38+
}
39+
40+
resource "google_gke_hub_feature_membership" "configmanagement_feature_member" {
41+
location = "global"
42+
43+
feature = google_gke_hub_feature.configmanagement_feature.name
44+
membership = google_container_cluster.default.fleet[0].membership_id
45+
membership_location = google_container_cluster.default.fleet[0].membership_location
46+
47+
configmanagement {
48+
config_sync {
49+
# The field `enabled` was introduced in Terraform version 5.41.0, and
50+
# needs to be set to `true` explicitly to install Config Sync.
51+
enabled = true
52+
git {
53+
sync_repo = "REPO"
54+
sync_branch = "BRANCH"
55+
policy_dir = "DIRECTORY"
56+
secret_type = "SECRET"
57+
}
58+
}
59+
}
60+
}
61+
# [END gke_autopilot_config_sync_git]
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright 2024 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# The kubernetes_manifest resource can only be used with pre-existing clusters.
16+
apiVersion: blueprints.cloud.google.com/v1alpha1
17+
kind: BlueprintTest
18+
metadata:
19+
name: config_sync_git
20+
spec:
21+
skip: true
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/**
2+
* Copyright 2024 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
# [START gke_autopilot_config_sync_oci]
18+
data "google_project" "default" {}
19+
20+
resource "google_container_cluster" "default" {
21+
name = "gke-autopilot-basic"
22+
location = "us-central1"
23+
24+
fleet {
25+
project = data.google_project.default.project_id
26+
}
27+
28+
enable_autopilot = true
29+
30+
# Set `deletion_protection` to `true` will ensure that one cannot
31+
# accidentally delete this instance by use of Terraform.
32+
deletion_protection = false
33+
}
34+
35+
resource "google_gke_hub_feature" "configmanagement_feature" {
36+
name = "configmanagement"
37+
location = "global"
38+
}
39+
40+
resource "google_gke_hub_feature_membership" "configmanagement_feature_member" {
41+
location = "global"
42+
43+
feature = google_gke_hub_feature.configmanagement_feature.name
44+
membership = google_container_cluster.default.fleet[0].membership_id
45+
membership_location = google_container_cluster.default.fleet[0].membership_location
46+
47+
configmanagement {
48+
config_sync {
49+
# The field `enabled` was introduced in Terraform version 5.41.0, and
50+
# needs to be set to `true` explicitly to install Config Sync.
51+
enabled = true
52+
oci {
53+
sync_repo = "REPO"
54+
policy_dir = "DIRECTORY"
55+
secret_type = "SECRET"
56+
}
57+
}
58+
}
59+
}
60+
# [END gke_autopilot_config_sync_oci]
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright 2024 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# The kubernetes_manifest resource can only be used with pre-existing clusters.
16+
apiVersion: blueprints.cloud.google.com/v1alpha1
17+
kind: BlueprintTest
18+
metadata:
19+
name: config_sync_oci
20+
spec:
21+
skip: true

test/integration/go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ go 1.22.7
55
toolchain go1.22.9
66

77
require (
8-
github.com/GoogleCloudPlatform/cloud-foundation-toolkit/infra/blueprint-test v0.16.3
9-
github.com/stretchr/testify v1.9.0
8+
github.com/GoogleCloudPlatform/cloud-foundation-toolkit/infra/blueprint-test v0.17.0
9+
github.com/stretchr/testify v1.10.0
1010
)
1111

1212
require (
@@ -42,7 +42,7 @@ require (
4242
github.com/hashicorp/go-version v1.7.0 // indirect
4343
github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f // indirect
4444
github.com/hashicorp/hcl/v2 v2.20.1 // indirect
45-
github.com/hashicorp/terraform-config-inspect v0.0.0-20240801114854-6714b46f5fe4 // indirect
45+
github.com/hashicorp/terraform-config-inspect v0.0.0-20241107133921-3adb156ecfe2 // indirect
4646
github.com/hashicorp/terraform-json v0.23.0 // indirect
4747
github.com/jinzhu/copier v0.4.0 // indirect
4848
github.com/jmespath/go-jmespath v0.4.0 // indirect
@@ -63,7 +63,7 @@ require (
6363
github.com/zclconf/go-cty v1.15.0 // indirect
6464
go.opencensus.io v0.24.0 // indirect
6565
golang.org/x/crypto v0.21.0 // indirect
66-
golang.org/x/mod v0.21.0 // indirect
66+
golang.org/x/mod v0.22.0 // indirect
6767
golang.org/x/net v0.23.0 // indirect
6868
golang.org/x/oauth2 v0.12.0 // indirect
6969
golang.org/x/sync v0.4.0 // indirect

test/integration/go.sum

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoIS
187187
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
188188
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
189189
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
190-
github.com/GoogleCloudPlatform/cloud-foundation-toolkit/infra/blueprint-test v0.16.3 h1:LKouXohMqxE7u43gOHx57Zme/E3sgMpFq0yPArI4DiE=
191-
github.com/GoogleCloudPlatform/cloud-foundation-toolkit/infra/blueprint-test v0.16.3/go.mod h1:6HwC1k0Nr7cu1ZaMeIQjb+sQAHKSHhG5tytYoA8Sn6A=
190+
github.com/GoogleCloudPlatform/cloud-foundation-toolkit/infra/blueprint-test v0.17.0 h1:EcxvASC45eOFrkk+cw9vP8Wztms3ZMWAQyBNEaI5MdU=
191+
github.com/GoogleCloudPlatform/cloud-foundation-toolkit/infra/blueprint-test v0.17.0/go.mod h1:homk/qeh6p4f7onHkLc5Vy8nG31ZmDK2pamBdHrc1OM=
192192
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
193193
github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo=
194194
github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
@@ -377,8 +377,8 @@ github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f h1:UdxlrJz4JOnY8W+Db
377377
github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w=
378378
github.com/hashicorp/hcl/v2 v2.20.1 h1:M6hgdyz7HYt1UN9e61j+qKJBqR3orTWbI1HKBJEdxtc=
379379
github.com/hashicorp/hcl/v2 v2.20.1/go.mod h1:TZDqQ4kNKCbh1iJp99FdPiUaVDDUPivbqxZulxDYqL4=
380-
github.com/hashicorp/terraform-config-inspect v0.0.0-20240801114854-6714b46f5fe4 h1:RwY5HBgtBZ997UtKJAO2Rx+94ETyevwWEVXWx1SL5YY=
381-
github.com/hashicorp/terraform-config-inspect v0.0.0-20240801114854-6714b46f5fe4/go.mod h1:Gz/z9Hbn+4KSp8A2FBtNszfLSdT2Tn/uAKGuVqqWmDI=
380+
github.com/hashicorp/terraform-config-inspect v0.0.0-20241107133921-3adb156ecfe2 h1:h+wcDC5wTiM+5YKjuLtUSWJtdtMVJNCRCPHoWieLpM4=
381+
github.com/hashicorp/terraform-config-inspect v0.0.0-20241107133921-3adb156ecfe2/go.mod h1:Gz/z9Hbn+4KSp8A2FBtNszfLSdT2Tn/uAKGuVqqWmDI=
382382
github.com/hashicorp/terraform-json v0.23.0 h1:sniCkExU4iKtTADReHzACkk8fnpQXrdD2xoR+lppBkI=
383383
github.com/hashicorp/terraform-json v0.23.0/go.mod h1:MHdXbBAbSg0GvzuWazEGKAn/cyNfIB7mN6y7KJN6y2c=
384384
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
@@ -439,8 +439,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
439439
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
440440
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
441441
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
442-
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
443-
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
442+
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
443+
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
444444
github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
445445
github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY=
446446
github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
@@ -520,8 +520,8 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
520520
golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
521521
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
522522
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
523-
golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0=
524-
golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
523+
golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4=
524+
golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
525525
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
526526
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
527527
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=

0 commit comments

Comments
 (0)