Added spanner-instance module (#2372)
This commit is contained in:
72
tests/modules/spanner_instance/examples/iam.yaml
Normal file
72
tests/modules/spanner_instance/examples/iam.yaml
Normal file
@@ -0,0 +1,72 @@
|
||||
# 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.
|
||||
|
||||
values:
|
||||
module.spanner_instance.google_spanner_database.spanner_databases["my-database"]:
|
||||
ddl: []
|
||||
deletion_protection: false
|
||||
enable_drop_protection: false
|
||||
encryption_config: []
|
||||
instance: my-instance
|
||||
name: my-database
|
||||
project: project-id
|
||||
timeouts: null
|
||||
version_retention_period: 1d
|
||||
module.spanner_instance.google_spanner_database_iam_binding.authoritative["my-database.roles/spanner.databaseReader"]:
|
||||
condition: []
|
||||
database: my-database
|
||||
instance: my-instance
|
||||
members:
|
||||
- group:group1@myorg.com
|
||||
project: project-id
|
||||
role: roles/spanner.databaseReader
|
||||
module.spanner_instance.google_spanner_database_iam_binding.bindings["my-database.spanner-database-role-user"]:
|
||||
condition:
|
||||
- description: Grant permissions on my_role
|
||||
expression: (resource.type == "spanner.googleapis.com/DatabaseRole" && (resource.name.endsWith("/my_role")))
|
||||
title: role-my_role
|
||||
database: my-database
|
||||
instance: my-instance
|
||||
members:
|
||||
- group:group2@myorg.com
|
||||
project: project-id
|
||||
role: roles/spanner.databaseRoleUser
|
||||
module.spanner_instance.google_spanner_database_iam_member.bindings["my-database.spanner-database-admin"]:
|
||||
condition:
|
||||
- description: Delegated role grants.
|
||||
expression: api.getAttribute('iam.googleapis.com/modifiedGrantsByRole', []).hasOnly(['roles/storage.databaseReader'])
|
||||
title: delegated-role-grants
|
||||
database: my-database
|
||||
instance: my-instance
|
||||
member: group:group3@myorg.com
|
||||
project: project-id
|
||||
role: roles/spanner.databaseAdmin
|
||||
module.spanner_instance.google_spanner_instance.spanner_instance[0]:
|
||||
autoscaling_config: []
|
||||
config: regional-us-central1
|
||||
display_name: Regional instance
|
||||
force_destroy: false
|
||||
labels: null
|
||||
name: my-instance
|
||||
num_nodes: 1
|
||||
project: project-id
|
||||
timeouts: null
|
||||
|
||||
counts:
|
||||
google_spanner_database: 1
|
||||
google_spanner_database_iam_binding: 2
|
||||
google_spanner_database_iam_member: 1
|
||||
google_spanner_instance: 1
|
||||
modules: 1
|
||||
resources: 5
|
||||
@@ -0,0 +1,42 @@
|
||||
# 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.
|
||||
|
||||
values:
|
||||
module.spanner_instance.google_spanner_instance.spanner_instance[0]:
|
||||
autoscaling_config:
|
||||
- autoscaling_limits:
|
||||
- max_nodes: null
|
||||
max_processing_units: 3000
|
||||
min_nodes: null
|
||||
min_processing_units: 2000
|
||||
autoscaling_targets:
|
||||
- high_priority_cpu_utilization_percent: 75
|
||||
storage_utilization_percent: 90
|
||||
config: regional-us-central1
|
||||
display_name: Regional instance
|
||||
effective_labels:
|
||||
foo: bar
|
||||
force_destroy: false
|
||||
labels:
|
||||
foo: bar
|
||||
name: my-instance
|
||||
project: project-id
|
||||
terraform_labels:
|
||||
foo: bar
|
||||
timeouts: null
|
||||
|
||||
counts:
|
||||
google_spanner_instance: 1
|
||||
modules: 1
|
||||
resources: 1
|
||||
@@ -0,0 +1,42 @@
|
||||
# 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.
|
||||
|
||||
values:
|
||||
module.spanner_instance.google_spanner_instance.spanner_instance[0]:
|
||||
autoscaling_config: []
|
||||
config: custom-nam11-config
|
||||
display_name: Regional instance
|
||||
force_destroy: false
|
||||
labels: null
|
||||
name: my-instance
|
||||
num_nodes: 1
|
||||
project: project-id
|
||||
timeouts: null
|
||||
module.spanner_instance.google_spanner_instance_config.spanner_instance_config[0]:
|
||||
base_config: name11
|
||||
display_name: Test Spanner Instance Config
|
||||
labels: null
|
||||
name: custom-nam11-config
|
||||
project: project-id
|
||||
replicas:
|
||||
- default_leader_location: false
|
||||
location: us-west1
|
||||
type: READ_ONLY
|
||||
timeouts: null
|
||||
|
||||
counts:
|
||||
google_spanner_instance: 1
|
||||
google_spanner_instance_config: 1
|
||||
modules: 1
|
||||
resources: 2
|
||||
@@ -0,0 +1,40 @@
|
||||
# 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.
|
||||
|
||||
values:
|
||||
module.spanner_instace.google_spanner_database.spanner_databases["my-database"]:
|
||||
ddl: []
|
||||
deletion_protection: false
|
||||
enable_drop_protection: false
|
||||
encryption_config: []
|
||||
instance: my-instance
|
||||
name: my-database
|
||||
project: project-id
|
||||
timeouts: null
|
||||
module.spanner_instace.google_spanner_instance.spanner_instance[0]:
|
||||
autoscaling_config: []
|
||||
config: regional-us-central1
|
||||
display_name: Regional instance in us-central1
|
||||
force_destroy: false
|
||||
labels: null
|
||||
name: my-instance
|
||||
num_nodes: 1
|
||||
project: project-id
|
||||
timeouts: null
|
||||
|
||||
counts:
|
||||
google_spanner_database: 1
|
||||
google_spanner_instance: 1
|
||||
modules: 1
|
||||
resources: 2
|
||||
Reference in New Issue
Block a user