-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugin.yaml
163 lines (159 loc) · 4.48 KB
/
plugin.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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
name: gcp
author: outblocks
usage: GCP deploy plugin
description: Deploy whole stack to Google Cloud Platform
cmd:
default: $OUTBLOCKS_PLUGIN_DIR/gcp_plugin
windows: $OUTBLOCKS_PLUGIN_DIR/gcp_plugin.exe
actions:
- deploy
- lock
- state
- secrets
- monitoring
commands:
dbproxy:
short: Create a database proxy
long: Create a local CloudSQL database proxy.
input:
- dependency_states
- plugin_state
flags:
- name: name
short: "n"
type: string
usage: Dependency name to proxy
- name: user
short: "u"
type: string
usage: Database user to use
- name: bind-addr
short: "a"
type: string
usage: IP address to bind at (e.g. 0.0.0.0 to bind on all interfaces, defaults to loopback - 127.0.0.1)
default: "127.0.0.1"
- name: silent
short: "s"
type: boolean
usage: Skip printing any output, just run the proxy
default: "false"
- name: port
short: "p"
type: integer
usage: Port to listen at (defaults to 5432 for postgresql, 3306 for mysql)
dbdump:
short: Dump database to local file
long: >
Create a backup of CloudSQL database. All additional args will be passed to pg_dump/mysqldump.
For postgres creates custom format backup by default (applicable for pg_restore).
input:
- dependency_states
- plugin_state
flags:
- name: name
short: "n"
type: string
usage: Dependency name to dump
- name: user
short: "u"
type: string
usage: Database user to use
required: true
- name: database
short: "d"
type: string
usage: Database name to use
required: true
- name: file
short: "o"
type: string
usage: Output file
required: true
- name: tables
short: "t"
type: stringarray
usage: Only include these tables
- name: exclude-tables
short: "T"
type: stringarray
usage: Exclude these tables
- name: verbose
type: bool
usage: Verbose output
- name: override
type: bool
usage: >
Override all default command params
(for pg_dump: '--format=custom --clean --no-owner',
for mysqldump: '--single-transaction --compress --routines'),
use only params from positional arguments
dbrestore:
short: Restore database from local file
long: >
Restore backup of CloudSQL database. For postgres custom format uses pg_restore, for postgres plaintext uses psql.
If applicable, all additional args will be passed to pg_restore/psql/mysql.
input:
- dependency_states
- plugin_state
flags:
- name: name
short: "n"
type: string
usage: Dependency name to restore
- name: user
short: "u"
type: string
usage: Database user to use
required: true
- name: database
short: "d"
type: string
usage: Database name to use
required: true
- name: file
short: "i"
type: string
usage: Backup file to restore
required: true
- name: tables
short: "t"
type: stringarray
usage: Only include these tables (only applicable to postgres custom format backup)
- name: exclude-tables
short: "T"
type: stringarray
usage: Exclude these tables (only applicable to postgres custom format backup)
- name: verbose
short: "v"
type: bool
usage: Verbose output
- name: pg-psql
type: bool
usage: >
Use psql instead of pg_restore
(only applicable to postgres database and required when feeding plaintext format instead of default one)
- name: override
type: bool
usage: >
Override all default command params (for pg_restore/psql: '--single-transaction --no-owner --if-exists'),
use only params from positional arguments
create-service-account:
short: Create a service account
long: Create a GCP service account with access to current project to use e.g. in CI
flags:
- name: name
short: "n"
type: string
usage: Name of service account (defaults to 'outblocks-ci')
secrets_types:
- gcp
state_types:
- gcp
supports:
- function
- service
- static
supported_types:
- type: postgresql
- type: mysql
- type: storage