-
Notifications
You must be signed in to change notification settings - Fork 0
/
metadata.yaml
140 lines (139 loc) · 4.62 KB
/
metadata.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# 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: blueprints.cloud.google.com/v1alpha1
kind: BlueprintMetadata
metadata:
name: terraform-google-cloud-spanner
annotations:
config.kubernetes.io/local-config: "true"
spec:
title: terraform-google-cloud-spanner
source:
repo: https://github.com/anaik91/terraform-google-cloud-spanner.git
sourceType: git
version: 0.3.0
actuationTool:
type: Terraform
version: '>= 0.13'
subBlueprints:
- name: schedule_spanner_backup
location: modules/schedule_spanner_backup
examples:
- name: example_with_backup
location: examples/example_with_backup
- name: example_with_kms
location: examples/example_with_kms
- name: simple_example
location: examples/simple_example
variables:
- name: backup_schedule
description: The schedule to be enabled on scheduler to trigger spanner DB backup
type: string
default: 0 */6 * * *
required: false
- name: backup_schedule_region
description: The schedule to be enabled on scheduler to trigger spanner DB backup
type: string
default: us-central1
required: false
- name: create_instance
description: 'Switch to use create OR use existing Spanner Instance '
type: bool
default: true
required: false
- name: database_config
description: 'The list of databases with their configuration to be created '
type: |-
map(object({
version_retention_period = string
ddl = list(string)
kms_key_name = optional(string)
deletion_protection = bool
database_iam = list(string)
enable_backup = optional(bool)
backup_retention = optional(number)
create_db = optional(bool)
}))
default:
db1:
backup_retention: 86400
create_db: true
database_iam: []
ddl: []
deletion_protection: false
enable_backup: true
version_retention_period: 3d
required: false
- name: instance_config
description: The name of the instance's configuration (similar but not quite the same as a region) which defines the geographic placement and replication of your databases in this instance.
type: string
required: true
- name: instance_display_name
description: The descriptive name for this instance as it appears in UIs.
type: string
default: regional-europe-west1
required: false
- name: instance_iam
description: The list of permissions on spanner instance
type: list(string)
default: []
required: false
- name: instance_labels
description: A set of key/value label pairs to assign to the spanner instance
type: map(string)
default: {}
required: false
- name: instance_name
description: A unique identifier for the instance, which cannot be changed after the instance is created. The name must be between 6 and 30 characters in length.
type: string
default: regional-europe-west1
required: false
- name: instance_size
description: The sizing configuration of Spanner Instance based on num of nodes OR instance processing units.
type: |-
object({
num_nodes = optional(number)
processing_units = optional(number)
})
required: true
- name: project_id
description: The project ID to deploy to
type: string
required: true
outputs:
- name: cloud_scheduler_id
description: Spanner Backup Cloud Scheduler ID
- name: spanner_db_details
description: Spanner Databases information map
- name: spanner_instance_id
description: Spanner Instance ID
- name: workflow_id
description: Spanner Backup Workflow ID
roles:
- level: Project
roles:
- roles/owner
services:
- iam.googleapis.com
- cloudresourcemanager.googleapis.com
- storage-api.googleapis.com
- serviceusage.googleapis.com
- workflows.googleapis.com
- cloudscheduler.googleapis.com
- spanner.googleapis.com
- pubsub.googleapis.com
- logging.googleapis.com
- storage.googleapis.com
- appengine.googleapis.com
- cloudkms.googleapis.com