pulumi-gcp 7.30.0__py3-none-any.whl → 7.30.0a1719513455__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pulumi_gcp/__init__.py +0 -32
- pulumi_gcp/artifactregistry/get_docker_image.py +2 -2
- pulumi_gcp/bigtable/gc_policy.py +14 -68
- pulumi_gcp/cloudfunctionsv2/_inputs.py +0 -97
- pulumi_gcp/cloudfunctionsv2/function.py +0 -232
- pulumi_gcp/cloudfunctionsv2/outputs.py +1 -129
- pulumi_gcp/compute/_inputs.py +0 -622
- pulumi_gcp/compute/address.py +7 -0
- pulumi_gcp/compute/backend_service.py +14 -0
- pulumi_gcp/compute/forwarding_rule.py +21 -0
- pulumi_gcp/compute/global_forwarding_rule.py +21 -0
- pulumi_gcp/compute/managed_ssl_certificate.py +7 -0
- pulumi_gcp/compute/manged_ssl_certificate.py +7 -0
- pulumi_gcp/compute/network_attachment.py +0 -16
- pulumi_gcp/compute/outputs.py +8 -504
- pulumi_gcp/compute/region_backend_service.py +14 -0
- pulumi_gcp/compute/region_disk_iam_binding.py +95 -122
- pulumi_gcp/compute/region_disk_iam_member.py +95 -122
- pulumi_gcp/compute/region_disk_iam_policy.py +88 -115
- pulumi_gcp/compute/region_ssl_certificate.py +7 -0
- pulumi_gcp/compute/ssl_certificate.py +7 -0
- pulumi_gcp/compute/target_https_proxy.py +1 -76
- pulumi_gcp/compute/url_map.py +0 -255
- pulumi_gcp/container/aws_cluster.py +2 -2
- pulumi_gcp/container/aws_node_pool.py +2 -2
- pulumi_gcp/container/azure_client.py +2 -2
- pulumi_gcp/container/azure_cluster.py +2 -2
- pulumi_gcp/container/azure_node_pool.py +2 -2
- pulumi_gcp/datafusion/_inputs.py +11 -163
- pulumi_gcp/datafusion/instance.py +0 -64
- pulumi_gcp/datafusion/outputs.py +7 -127
- pulumi_gcp/gkebackup/restore_plan_iam_binding.py +953 -328
- pulumi_gcp/gkebackup/restore_plan_iam_member.py +953 -328
- pulumi_gcp/gkebackup/restore_plan_iam_policy.py +953 -238
- pulumi_gcp/healthcare/_inputs.py +0 -43
- pulumi_gcp/healthcare/dataset.py +0 -110
- pulumi_gcp/healthcare/outputs.py +0 -43
- pulumi_gcp/identityplatform/config.py +1 -1
- pulumi_gcp/logging/billing_account_bucket_config.py +1 -1
- pulumi_gcp/logging/folder_bucket_config.py +1 -1
- pulumi_gcp/logging/organization_bucket_config.py +1 -1
- pulumi_gcp/monitoring/_inputs.py +0 -77
- pulumi_gcp/monitoring/outputs.py +0 -63
- pulumi_gcp/networksecurity/address_group_iam_binding.py +2 -289
- pulumi_gcp/networksecurity/address_group_iam_member.py +2 -289
- pulumi_gcp/pulumi-plugin.json +1 -1
- pulumi_gcp/securitycenter/instance_iam_binding.py +0 -64
- pulumi_gcp/securitycenter/instance_iam_member.py +0 -64
- pulumi_gcp/securitycenter/instance_iam_policy.py +0 -64
- pulumi_gcp/sourcerepo/repository_iam_binding.py +83 -92
- pulumi_gcp/sourcerepo/repository_iam_member.py +83 -92
- pulumi_gcp/sourcerepo/repository_iam_policy.py +76 -85
- pulumi_gcp/storage/__init__.py +0 -5
- pulumi_gcp/storage/_inputs.py +0 -130
- pulumi_gcp/storage/outputs.py +0 -76
- pulumi_gcp/vertex/_inputs.py +3 -3
- pulumi_gcp/vertex/ai_feature_online_store.py +9 -9
- pulumi_gcp/vertex/outputs.py +2 -2
- {pulumi_gcp-7.30.0.dist-info → pulumi_gcp-7.30.0a1719513455.dist-info}/METADATA +1 -1
- {pulumi_gcp-7.30.0.dist-info → pulumi_gcp-7.30.0a1719513455.dist-info}/RECORD +62 -67
- {pulumi_gcp-7.30.0.dist-info → pulumi_gcp-7.30.0a1719513455.dist-info}/WHEEL +1 -1
- pulumi_gcp/storage/get_managed_folder_iam_policy.py +0 -115
- pulumi_gcp/storage/managed_folder.py +0 -440
- pulumi_gcp/storage/managed_folder_iam_binding.py +0 -947
- pulumi_gcp/storage/managed_folder_iam_member.py +0 -947
- pulumi_gcp/storage/managed_folder_iam_policy.py +0 -766
- {pulumi_gcp-7.30.0.dist-info → pulumi_gcp-7.30.0a1719513455.dist-info}/top_level.txt +0 -0
@@ -25,15 +25,8 @@ class RestorePlanIamPolicyArgs:
|
|
25
25
|
project: Optional[pulumi.Input[str]] = None):
|
26
26
|
"""
|
27
27
|
The set of arguments for constructing a RestorePlanIamPolicy resource.
|
28
|
-
:param pulumi.Input[str] policy_data: The policy data generated by
|
29
|
-
a `organizations_get_iam_policy` data source.
|
30
28
|
:param pulumi.Input[str] location: The region of the Restore Plan.
|
31
|
-
|
32
|
-
the value will be parsed from the identifier of the parent resource. If no location is provided in the parent identifier and no
|
33
|
-
location is specified, it is taken from the provider configuration.
|
34
|
-
:param pulumi.Input[str] name: Used to find the parent resource to bind the IAM policy to
|
35
|
-
:param pulumi.Input[str] project: The ID of the project in which the resource belongs.
|
36
|
-
If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
|
29
|
+
:param pulumi.Input[str] name: The full name of the BackupPlan Resource.
|
37
30
|
"""
|
38
31
|
pulumi.set(__self__, "policy_data", policy_data)
|
39
32
|
if location is not None:
|
@@ -46,10 +39,6 @@ class RestorePlanIamPolicyArgs:
|
|
46
39
|
@property
|
47
40
|
@pulumi.getter(name="policyData")
|
48
41
|
def policy_data(self) -> pulumi.Input[str]:
|
49
|
-
"""
|
50
|
-
The policy data generated by
|
51
|
-
a `organizations_get_iam_policy` data source.
|
52
|
-
"""
|
53
42
|
return pulumi.get(self, "policy_data")
|
54
43
|
|
55
44
|
@policy_data.setter
|
@@ -61,9 +50,6 @@ class RestorePlanIamPolicyArgs:
|
|
61
50
|
def location(self) -> Optional[pulumi.Input[str]]:
|
62
51
|
"""
|
63
52
|
The region of the Restore Plan.
|
64
|
-
Used to find the parent resource to bind the IAM policy to. If not specified,
|
65
|
-
the value will be parsed from the identifier of the parent resource. If no location is provided in the parent identifier and no
|
66
|
-
location is specified, it is taken from the provider configuration.
|
67
53
|
"""
|
68
54
|
return pulumi.get(self, "location")
|
69
55
|
|
@@ -75,7 +61,7 @@ class RestorePlanIamPolicyArgs:
|
|
75
61
|
@pulumi.getter
|
76
62
|
def name(self) -> Optional[pulumi.Input[str]]:
|
77
63
|
"""
|
78
|
-
|
64
|
+
The full name of the BackupPlan Resource.
|
79
65
|
"""
|
80
66
|
return pulumi.get(self, "name")
|
81
67
|
|
@@ -86,10 +72,6 @@ class RestorePlanIamPolicyArgs:
|
|
86
72
|
@property
|
87
73
|
@pulumi.getter
|
88
74
|
def project(self) -> Optional[pulumi.Input[str]]:
|
89
|
-
"""
|
90
|
-
The ID of the project in which the resource belongs.
|
91
|
-
If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
|
92
|
-
"""
|
93
75
|
return pulumi.get(self, "project")
|
94
76
|
|
95
77
|
@project.setter
|
@@ -107,16 +89,8 @@ class _RestorePlanIamPolicyState:
|
|
107
89
|
project: Optional[pulumi.Input[str]] = None):
|
108
90
|
"""
|
109
91
|
Input properties used for looking up and filtering RestorePlanIamPolicy resources.
|
110
|
-
:param pulumi.Input[str] etag: (Computed) The etag of the IAM policy.
|
111
92
|
:param pulumi.Input[str] location: The region of the Restore Plan.
|
112
|
-
|
113
|
-
the value will be parsed from the identifier of the parent resource. If no location is provided in the parent identifier and no
|
114
|
-
location is specified, it is taken from the provider configuration.
|
115
|
-
:param pulumi.Input[str] name: Used to find the parent resource to bind the IAM policy to
|
116
|
-
:param pulumi.Input[str] policy_data: The policy data generated by
|
117
|
-
a `organizations_get_iam_policy` data source.
|
118
|
-
:param pulumi.Input[str] project: The ID of the project in which the resource belongs.
|
119
|
-
If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
|
93
|
+
:param pulumi.Input[str] name: The full name of the BackupPlan Resource.
|
120
94
|
"""
|
121
95
|
if etag is not None:
|
122
96
|
pulumi.set(__self__, "etag", etag)
|
@@ -132,9 +106,6 @@ class _RestorePlanIamPolicyState:
|
|
132
106
|
@property
|
133
107
|
@pulumi.getter
|
134
108
|
def etag(self) -> Optional[pulumi.Input[str]]:
|
135
|
-
"""
|
136
|
-
(Computed) The etag of the IAM policy.
|
137
|
-
"""
|
138
109
|
return pulumi.get(self, "etag")
|
139
110
|
|
140
111
|
@etag.setter
|
@@ -146,9 +117,6 @@ class _RestorePlanIamPolicyState:
|
|
146
117
|
def location(self) -> Optional[pulumi.Input[str]]:
|
147
118
|
"""
|
148
119
|
The region of the Restore Plan.
|
149
|
-
Used to find the parent resource to bind the IAM policy to. If not specified,
|
150
|
-
the value will be parsed from the identifier of the parent resource. If no location is provided in the parent identifier and no
|
151
|
-
location is specified, it is taken from the provider configuration.
|
152
120
|
"""
|
153
121
|
return pulumi.get(self, "location")
|
154
122
|
|
@@ -160,7 +128,7 @@ class _RestorePlanIamPolicyState:
|
|
160
128
|
@pulumi.getter
|
161
129
|
def name(self) -> Optional[pulumi.Input[str]]:
|
162
130
|
"""
|
163
|
-
|
131
|
+
The full name of the BackupPlan Resource.
|
164
132
|
"""
|
165
133
|
return pulumi.get(self, "name")
|
166
134
|
|
@@ -171,10 +139,6 @@ class _RestorePlanIamPolicyState:
|
|
171
139
|
@property
|
172
140
|
@pulumi.getter(name="policyData")
|
173
141
|
def policy_data(self) -> Optional[pulumi.Input[str]]:
|
174
|
-
"""
|
175
|
-
The policy data generated by
|
176
|
-
a `organizations_get_iam_policy` data source.
|
177
|
-
"""
|
178
142
|
return pulumi.get(self, "policy_data")
|
179
143
|
|
180
144
|
@policy_data.setter
|
@@ -184,10 +148,6 @@ class _RestorePlanIamPolicyState:
|
|
184
148
|
@property
|
185
149
|
@pulumi.getter
|
186
150
|
def project(self) -> Optional[pulumi.Input[str]]:
|
187
|
-
"""
|
188
|
-
The ID of the project in which the resource belongs.
|
189
|
-
If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
|
190
|
-
"""
|
191
151
|
return pulumi.get(self, "project")
|
192
152
|
|
193
153
|
@project.setter
|
@@ -206,159 +166,544 @@ class RestorePlanIamPolicy(pulumi.CustomResource):
|
|
206
166
|
project: Optional[pulumi.Input[str]] = None,
|
207
167
|
__props__=None):
|
208
168
|
"""
|
209
|
-
|
169
|
+
Represents a Restore Plan instance.
|
210
170
|
|
211
|
-
|
212
|
-
* `gkebackup.RestorePlanIamBinding`: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the restoreplan are preserved.
|
213
|
-
* `gkebackup.RestorePlanIamMember`: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the restoreplan are preserved.
|
171
|
+
To get more information about RestorePlan, see:
|
214
172
|
|
215
|
-
|
173
|
+
* [API documentation](https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/projects.locations.restorePlans)
|
174
|
+
* How-to Guides
|
175
|
+
* [Official Documentation](https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke)
|
216
176
|
|
217
|
-
|
177
|
+
## Example Usage
|
218
178
|
|
219
|
-
|
179
|
+
### Gkebackup Restoreplan All Namespaces
|
220
180
|
|
221
|
-
|
181
|
+
```python
|
182
|
+
import pulumi
|
183
|
+
import pulumi_gcp as gcp
|
222
184
|
|
223
|
-
|
185
|
+
primary = gcp.container.Cluster("primary",
|
186
|
+
name="restore-all-ns-cluster",
|
187
|
+
location="us-central1",
|
188
|
+
initial_node_count=1,
|
189
|
+
workload_identity_config={
|
190
|
+
"workloadPool": "my-project-name.svc.id.goog",
|
191
|
+
},
|
192
|
+
addons_config={
|
193
|
+
"gkeBackupAgentConfig": {
|
194
|
+
"enabled": True,
|
195
|
+
},
|
196
|
+
},
|
197
|
+
deletion_protection="",
|
198
|
+
network="default",
|
199
|
+
subnetwork="default")
|
200
|
+
basic = gcp.gkebackup.BackupPlan("basic",
|
201
|
+
name="restore-all-ns",
|
202
|
+
cluster=primary.id,
|
203
|
+
location="us-central1",
|
204
|
+
backup_config={
|
205
|
+
"includeVolumeData": True,
|
206
|
+
"includeSecrets": True,
|
207
|
+
"allNamespaces": True,
|
208
|
+
})
|
209
|
+
all_ns = gcp.gkebackup.RestorePlan("all_ns",
|
210
|
+
name="restore-all-ns",
|
211
|
+
location="us-central1",
|
212
|
+
backup_plan=basic.id,
|
213
|
+
cluster=primary.id,
|
214
|
+
restore_config={
|
215
|
+
"allNamespaces": True,
|
216
|
+
"namespacedResourceRestoreMode": "FAIL_ON_CONFLICT",
|
217
|
+
"volumeDataRestorePolicy": "RESTORE_VOLUME_DATA_FROM_BACKUP",
|
218
|
+
"clusterResourceRestoreScope": {
|
219
|
+
"allGroupKinds": True,
|
220
|
+
},
|
221
|
+
"clusterResourceConflictPolicy": "USE_EXISTING_VERSION",
|
222
|
+
})
|
223
|
+
```
|
224
|
+
### Gkebackup Restoreplan Rollback Namespace
|
224
225
|
|
225
226
|
```python
|
226
227
|
import pulumi
|
227
228
|
import pulumi_gcp as gcp
|
228
229
|
|
229
|
-
|
230
|
-
"
|
231
|
-
"
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
230
|
+
primary = gcp.container.Cluster("primary",
|
231
|
+
name="rollback-ns-cluster",
|
232
|
+
location="us-central1",
|
233
|
+
initial_node_count=1,
|
234
|
+
workload_identity_config={
|
235
|
+
"workloadPool": "my-project-name.svc.id.goog",
|
236
|
+
},
|
237
|
+
addons_config={
|
238
|
+
"gkeBackupAgentConfig": {
|
239
|
+
"enabled": True,
|
240
|
+
},
|
241
|
+
},
|
242
|
+
deletion_protection="",
|
243
|
+
network="default",
|
244
|
+
subnetwork="default")
|
245
|
+
basic = gcp.gkebackup.BackupPlan("basic",
|
246
|
+
name="rollback-ns",
|
247
|
+
cluster=primary.id,
|
248
|
+
location="us-central1",
|
249
|
+
backup_config={
|
250
|
+
"includeVolumeData": True,
|
251
|
+
"includeSecrets": True,
|
252
|
+
"allNamespaces": True,
|
253
|
+
})
|
254
|
+
rollback_ns = gcp.gkebackup.RestorePlan("rollback_ns",
|
255
|
+
name="rollback-ns-rp",
|
256
|
+
location="us-central1",
|
257
|
+
backup_plan=basic.id,
|
258
|
+
cluster=primary.id,
|
259
|
+
restore_config={
|
260
|
+
"selectedNamespaces": {
|
261
|
+
"namespaces": ["my-ns"],
|
262
|
+
},
|
263
|
+
"namespacedResourceRestoreMode": "DELETE_AND_RESTORE",
|
264
|
+
"volumeDataRestorePolicy": "RESTORE_VOLUME_DATA_FROM_BACKUP",
|
265
|
+
"clusterResourceRestoreScope": {
|
266
|
+
"selectedGroupKinds": [
|
267
|
+
{
|
268
|
+
"resourceGroup": "apiextension.k8s.io",
|
269
|
+
"resourceKind": "CustomResourceDefinition",
|
270
|
+
},
|
271
|
+
{
|
272
|
+
"resourceGroup": "storage.k8s.io",
|
273
|
+
"resourceKind": "StorageClass",
|
274
|
+
},
|
275
|
+
],
|
276
|
+
},
|
277
|
+
"clusterResourceConflictPolicy": "USE_EXISTING_VERSION",
|
278
|
+
})
|
238
279
|
```
|
239
|
-
|
240
|
-
## gkebackup.RestorePlanIamBinding
|
280
|
+
### Gkebackup Restoreplan Protected Application
|
241
281
|
|
242
282
|
```python
|
243
283
|
import pulumi
|
244
284
|
import pulumi_gcp as gcp
|
245
285
|
|
246
|
-
|
247
|
-
|
248
|
-
location=
|
249
|
-
|
250
|
-
|
251
|
-
|
286
|
+
primary = gcp.container.Cluster("primary",
|
287
|
+
name="rollback-app-cluster",
|
288
|
+
location="us-central1",
|
289
|
+
initial_node_count=1,
|
290
|
+
workload_identity_config={
|
291
|
+
"workloadPool": "my-project-name.svc.id.goog",
|
292
|
+
},
|
293
|
+
addons_config={
|
294
|
+
"gkeBackupAgentConfig": {
|
295
|
+
"enabled": True,
|
296
|
+
},
|
297
|
+
},
|
298
|
+
deletion_protection="",
|
299
|
+
network="default",
|
300
|
+
subnetwork="default")
|
301
|
+
basic = gcp.gkebackup.BackupPlan("basic",
|
302
|
+
name="rollback-app",
|
303
|
+
cluster=primary.id,
|
304
|
+
location="us-central1",
|
305
|
+
backup_config={
|
306
|
+
"includeVolumeData": True,
|
307
|
+
"includeSecrets": True,
|
308
|
+
"allNamespaces": True,
|
309
|
+
})
|
310
|
+
rollback_app = gcp.gkebackup.RestorePlan("rollback_app",
|
311
|
+
name="rollback-app-rp",
|
312
|
+
location="us-central1",
|
313
|
+
backup_plan=basic.id,
|
314
|
+
cluster=primary.id,
|
315
|
+
restore_config={
|
316
|
+
"selectedApplications": {
|
317
|
+
"namespacedNames": [{
|
318
|
+
"name": "my-app",
|
319
|
+
"namespace": "my-ns",
|
320
|
+
}],
|
321
|
+
},
|
322
|
+
"namespacedResourceRestoreMode": "DELETE_AND_RESTORE",
|
323
|
+
"volumeDataRestorePolicy": "REUSE_VOLUME_HANDLE_FROM_BACKUP",
|
324
|
+
"clusterResourceRestoreScope": {
|
325
|
+
"noGroupKinds": True,
|
326
|
+
},
|
327
|
+
})
|
252
328
|
```
|
253
|
-
|
254
|
-
## gkebackup.RestorePlanIamMember
|
329
|
+
### Gkebackup Restoreplan All Cluster Resources
|
255
330
|
|
256
331
|
```python
|
257
332
|
import pulumi
|
258
333
|
import pulumi_gcp as gcp
|
259
334
|
|
260
|
-
|
261
|
-
|
262
|
-
location=
|
263
|
-
|
264
|
-
|
265
|
-
|
335
|
+
primary = gcp.container.Cluster("primary",
|
336
|
+
name="all-groupkinds-cluster",
|
337
|
+
location="us-central1",
|
338
|
+
initial_node_count=1,
|
339
|
+
workload_identity_config={
|
340
|
+
"workloadPool": "my-project-name.svc.id.goog",
|
341
|
+
},
|
342
|
+
addons_config={
|
343
|
+
"gkeBackupAgentConfig": {
|
344
|
+
"enabled": True,
|
345
|
+
},
|
346
|
+
},
|
347
|
+
deletion_protection="",
|
348
|
+
network="default",
|
349
|
+
subnetwork="default")
|
350
|
+
basic = gcp.gkebackup.BackupPlan("basic",
|
351
|
+
name="all-groupkinds",
|
352
|
+
cluster=primary.id,
|
353
|
+
location="us-central1",
|
354
|
+
backup_config={
|
355
|
+
"includeVolumeData": True,
|
356
|
+
"includeSecrets": True,
|
357
|
+
"allNamespaces": True,
|
358
|
+
})
|
359
|
+
all_cluster_resources = gcp.gkebackup.RestorePlan("all_cluster_resources",
|
360
|
+
name="all-groupkinds-rp",
|
361
|
+
location="us-central1",
|
362
|
+
backup_plan=basic.id,
|
363
|
+
cluster=primary.id,
|
364
|
+
restore_config={
|
365
|
+
"noNamespaces": True,
|
366
|
+
"namespacedResourceRestoreMode": "FAIL_ON_CONFLICT",
|
367
|
+
"clusterResourceRestoreScope": {
|
368
|
+
"allGroupKinds": True,
|
369
|
+
},
|
370
|
+
"clusterResourceConflictPolicy": "USE_EXISTING_VERSION",
|
371
|
+
})
|
266
372
|
```
|
267
|
-
|
268
|
-
## gkebackup.RestorePlanIamPolicy
|
373
|
+
### Gkebackup Restoreplan Rename Namespace
|
269
374
|
|
270
375
|
```python
|
271
376
|
import pulumi
|
272
377
|
import pulumi_gcp as gcp
|
273
378
|
|
274
|
-
|
275
|
-
"
|
276
|
-
"
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
379
|
+
primary = gcp.container.Cluster("primary",
|
380
|
+
name="rename-ns-cluster",
|
381
|
+
location="us-central1",
|
382
|
+
initial_node_count=1,
|
383
|
+
workload_identity_config={
|
384
|
+
"workloadPool": "my-project-name.svc.id.goog",
|
385
|
+
},
|
386
|
+
addons_config={
|
387
|
+
"gkeBackupAgentConfig": {
|
388
|
+
"enabled": True,
|
389
|
+
},
|
390
|
+
},
|
391
|
+
deletion_protection="",
|
392
|
+
network="default",
|
393
|
+
subnetwork="default")
|
394
|
+
basic = gcp.gkebackup.BackupPlan("basic",
|
395
|
+
name="rename-ns",
|
396
|
+
cluster=primary.id,
|
397
|
+
location="us-central1",
|
398
|
+
backup_config={
|
399
|
+
"includeVolumeData": True,
|
400
|
+
"includeSecrets": True,
|
401
|
+
"allNamespaces": True,
|
402
|
+
})
|
403
|
+
rename_ns = gcp.gkebackup.RestorePlan("rename_ns",
|
404
|
+
name="rename-ns-rp",
|
405
|
+
location="us-central1",
|
406
|
+
backup_plan=basic.id,
|
407
|
+
cluster=primary.id,
|
408
|
+
restore_config={
|
409
|
+
"selectedNamespaces": {
|
410
|
+
"namespaces": ["ns1"],
|
411
|
+
},
|
412
|
+
"namespacedResourceRestoreMode": "FAIL_ON_CONFLICT",
|
413
|
+
"volumeDataRestorePolicy": "REUSE_VOLUME_HANDLE_FROM_BACKUP",
|
414
|
+
"clusterResourceRestoreScope": {
|
415
|
+
"noGroupKinds": True,
|
416
|
+
},
|
417
|
+
"transformationRules": [
|
418
|
+
{
|
419
|
+
"description": "rename namespace from ns1 to ns2",
|
420
|
+
"resourceFilter": {
|
421
|
+
"groupKinds": [{
|
422
|
+
"resourceKind": "Namespace",
|
423
|
+
}],
|
424
|
+
"jsonPath": ".metadata[?(@.name == 'ns1')]",
|
425
|
+
},
|
426
|
+
"fieldActions": [{
|
427
|
+
"op": "REPLACE",
|
428
|
+
"path": "/metadata/name",
|
429
|
+
"value": "ns2",
|
430
|
+
}],
|
431
|
+
},
|
432
|
+
{
|
433
|
+
"description": "move all resources from ns1 to ns2",
|
434
|
+
"resourceFilter": {
|
435
|
+
"namespaces": ["ns1"],
|
436
|
+
},
|
437
|
+
"fieldActions": [{
|
438
|
+
"op": "REPLACE",
|
439
|
+
"path": "/metadata/namespace",
|
440
|
+
"value": "ns2",
|
441
|
+
}],
|
442
|
+
},
|
443
|
+
],
|
444
|
+
})
|
283
445
|
```
|
284
|
-
|
285
|
-
## gkebackup.RestorePlanIamBinding
|
446
|
+
### Gkebackup Restoreplan Second Transformation
|
286
447
|
|
287
448
|
```python
|
288
449
|
import pulumi
|
289
450
|
import pulumi_gcp as gcp
|
290
451
|
|
291
|
-
|
292
|
-
|
293
|
-
location=
|
294
|
-
|
295
|
-
|
296
|
-
|
452
|
+
primary = gcp.container.Cluster("primary",
|
453
|
+
name="transform-rule-cluster",
|
454
|
+
location="us-central1",
|
455
|
+
initial_node_count=1,
|
456
|
+
workload_identity_config={
|
457
|
+
"workloadPool": "my-project-name.svc.id.goog",
|
458
|
+
},
|
459
|
+
addons_config={
|
460
|
+
"gkeBackupAgentConfig": {
|
461
|
+
"enabled": True,
|
462
|
+
},
|
463
|
+
},
|
464
|
+
deletion_protection="",
|
465
|
+
network="default",
|
466
|
+
subnetwork="default")
|
467
|
+
basic = gcp.gkebackup.BackupPlan("basic",
|
468
|
+
name="transform-rule",
|
469
|
+
cluster=primary.id,
|
470
|
+
location="us-central1",
|
471
|
+
backup_config={
|
472
|
+
"includeVolumeData": True,
|
473
|
+
"includeSecrets": True,
|
474
|
+
"allNamespaces": True,
|
475
|
+
})
|
476
|
+
transform_rule = gcp.gkebackup.RestorePlan("transform_rule",
|
477
|
+
name="transform-rule-rp",
|
478
|
+
description="copy nginx env variables",
|
479
|
+
labels={
|
480
|
+
"app": "nginx",
|
481
|
+
},
|
482
|
+
location="us-central1",
|
483
|
+
backup_plan=basic.id,
|
484
|
+
cluster=primary.id,
|
485
|
+
restore_config={
|
486
|
+
"excludedNamespaces": {
|
487
|
+
"namespaces": ["my-ns"],
|
488
|
+
},
|
489
|
+
"namespacedResourceRestoreMode": "DELETE_AND_RESTORE",
|
490
|
+
"volumeDataRestorePolicy": "RESTORE_VOLUME_DATA_FROM_BACKUP",
|
491
|
+
"clusterResourceRestoreScope": {
|
492
|
+
"excludedGroupKinds": [{
|
493
|
+
"resourceGroup": "apiextension.k8s.io",
|
494
|
+
"resourceKind": "CustomResourceDefinition",
|
495
|
+
}],
|
496
|
+
},
|
497
|
+
"clusterResourceConflictPolicy": "USE_EXISTING_VERSION",
|
498
|
+
"transformationRules": [{
|
499
|
+
"description": "Copy environment variables from the nginx container to the install init container.",
|
500
|
+
"resourceFilter": {
|
501
|
+
"groupKinds": [{
|
502
|
+
"resourceKind": "Pod",
|
503
|
+
"resourceGroup": "",
|
504
|
+
}],
|
505
|
+
"jsonPath": ".metadata[?(@.name == 'nginx')]",
|
506
|
+
},
|
507
|
+
"fieldActions": [{
|
508
|
+
"op": "COPY",
|
509
|
+
"path": "/spec/initContainers/0/env",
|
510
|
+
"fromPath": "/spec/containers/0/env",
|
511
|
+
}],
|
512
|
+
}],
|
513
|
+
})
|
297
514
|
```
|
298
|
-
|
299
|
-
## gkebackup.RestorePlanIamMember
|
515
|
+
### Gkebackup Restoreplan Gitops Mode
|
300
516
|
|
301
517
|
```python
|
302
518
|
import pulumi
|
303
519
|
import pulumi_gcp as gcp
|
304
520
|
|
305
|
-
|
306
|
-
|
307
|
-
location=
|
308
|
-
|
309
|
-
|
310
|
-
|
521
|
+
primary = gcp.container.Cluster("primary",
|
522
|
+
name="gitops-mode-cluster",
|
523
|
+
location="us-central1",
|
524
|
+
initial_node_count=1,
|
525
|
+
workload_identity_config={
|
526
|
+
"workloadPool": "my-project-name.svc.id.goog",
|
527
|
+
},
|
528
|
+
addons_config={
|
529
|
+
"gkeBackupAgentConfig": {
|
530
|
+
"enabled": True,
|
531
|
+
},
|
532
|
+
},
|
533
|
+
deletion_protection="",
|
534
|
+
network="default",
|
535
|
+
subnetwork="default")
|
536
|
+
basic = gcp.gkebackup.BackupPlan("basic",
|
537
|
+
name="gitops-mode",
|
538
|
+
cluster=primary.id,
|
539
|
+
location="us-central1",
|
540
|
+
backup_config={
|
541
|
+
"includeVolumeData": True,
|
542
|
+
"includeSecrets": True,
|
543
|
+
"allNamespaces": True,
|
544
|
+
})
|
545
|
+
gitops_mode = gcp.gkebackup.RestorePlan("gitops_mode",
|
546
|
+
name="gitops-mode",
|
547
|
+
location="us-central1",
|
548
|
+
backup_plan=basic.id,
|
549
|
+
cluster=primary.id,
|
550
|
+
restore_config={
|
551
|
+
"allNamespaces": True,
|
552
|
+
"namespacedResourceRestoreMode": "MERGE_SKIP_ON_CONFLICT",
|
553
|
+
"volumeDataRestorePolicy": "RESTORE_VOLUME_DATA_FROM_BACKUP",
|
554
|
+
"clusterResourceRestoreScope": {
|
555
|
+
"allGroupKinds": True,
|
556
|
+
},
|
557
|
+
"clusterResourceConflictPolicy": "USE_EXISTING_VERSION",
|
558
|
+
})
|
311
559
|
```
|
560
|
+
### Gkebackup Restoreplan Restore Order
|
312
561
|
|
313
|
-
|
562
|
+
```python
|
563
|
+
import pulumi
|
564
|
+
import pulumi_gcp as gcp
|
565
|
+
|
566
|
+
primary = gcp.container.Cluster("primary",
|
567
|
+
name="restore-order-cluster",
|
568
|
+
location="us-central1",
|
569
|
+
initial_node_count=1,
|
570
|
+
workload_identity_config={
|
571
|
+
"workloadPool": "my-project-name.svc.id.goog",
|
572
|
+
},
|
573
|
+
addons_config={
|
574
|
+
"gkeBackupAgentConfig": {
|
575
|
+
"enabled": True,
|
576
|
+
},
|
577
|
+
},
|
578
|
+
deletion_protection="",
|
579
|
+
network="default",
|
580
|
+
subnetwork="default")
|
581
|
+
basic = gcp.gkebackup.BackupPlan("basic",
|
582
|
+
name="restore-order",
|
583
|
+
cluster=primary.id,
|
584
|
+
location="us-central1",
|
585
|
+
backup_config={
|
586
|
+
"includeVolumeData": True,
|
587
|
+
"includeSecrets": True,
|
588
|
+
"allNamespaces": True,
|
589
|
+
})
|
590
|
+
restore_order = gcp.gkebackup.RestorePlan("restore_order",
|
591
|
+
name="restore-order",
|
592
|
+
location="us-central1",
|
593
|
+
backup_plan=basic.id,
|
594
|
+
cluster=primary.id,
|
595
|
+
restore_config={
|
596
|
+
"allNamespaces": True,
|
597
|
+
"namespacedResourceRestoreMode": "FAIL_ON_CONFLICT",
|
598
|
+
"volumeDataRestorePolicy": "RESTORE_VOLUME_DATA_FROM_BACKUP",
|
599
|
+
"clusterResourceRestoreScope": {
|
600
|
+
"allGroupKinds": True,
|
601
|
+
},
|
602
|
+
"clusterResourceConflictPolicy": "USE_EXISTING_VERSION",
|
603
|
+
"restoreOrder": {
|
604
|
+
"groupKindDependencies": [
|
605
|
+
{
|
606
|
+
"satisfying": {
|
607
|
+
"resourceGroup": "stable.example.com",
|
608
|
+
"resourceKind": "kindA",
|
609
|
+
},
|
610
|
+
"requiring": {
|
611
|
+
"resourceGroup": "stable.example.com",
|
612
|
+
"resourceKind": "kindB",
|
613
|
+
},
|
614
|
+
},
|
615
|
+
{
|
616
|
+
"satisfying": {
|
617
|
+
"resourceGroup": "stable.example.com",
|
618
|
+
"resourceKind": "kindB",
|
619
|
+
},
|
620
|
+
"requiring": {
|
621
|
+
"resourceGroup": "stable.example.com",
|
622
|
+
"resourceKind": "kindC",
|
623
|
+
},
|
624
|
+
},
|
625
|
+
],
|
626
|
+
},
|
627
|
+
})
|
628
|
+
```
|
629
|
+
### Gkebackup Restoreplan Volume Res
|
314
630
|
|
315
|
-
|
631
|
+
```python
|
632
|
+
import pulumi
|
633
|
+
import pulumi_gcp as gcp
|
316
634
|
|
317
|
-
|
635
|
+
primary = gcp.container.Cluster("primary",
|
636
|
+
name="volume-res-cluster",
|
637
|
+
location="us-central1",
|
638
|
+
initial_node_count=1,
|
639
|
+
workload_identity_config={
|
640
|
+
"workloadPool": "my-project-name.svc.id.goog",
|
641
|
+
},
|
642
|
+
addons_config={
|
643
|
+
"gkeBackupAgentConfig": {
|
644
|
+
"enabled": True,
|
645
|
+
},
|
646
|
+
},
|
647
|
+
deletion_protection="",
|
648
|
+
network="default",
|
649
|
+
subnetwork="default")
|
650
|
+
basic = gcp.gkebackup.BackupPlan("basic",
|
651
|
+
name="volume-res",
|
652
|
+
cluster=primary.id,
|
653
|
+
location="us-central1",
|
654
|
+
backup_config={
|
655
|
+
"includeVolumeData": True,
|
656
|
+
"includeSecrets": True,
|
657
|
+
"allNamespaces": True,
|
658
|
+
})
|
659
|
+
volume_res = gcp.gkebackup.RestorePlan("volume_res",
|
660
|
+
name="volume-res",
|
661
|
+
location="us-central1",
|
662
|
+
backup_plan=basic.id,
|
663
|
+
cluster=primary.id,
|
664
|
+
restore_config={
|
665
|
+
"allNamespaces": True,
|
666
|
+
"namespacedResourceRestoreMode": "FAIL_ON_CONFLICT",
|
667
|
+
"volumeDataRestorePolicy": "NO_VOLUME_DATA_RESTORATION",
|
668
|
+
"clusterResourceRestoreScope": {
|
669
|
+
"allGroupKinds": True,
|
670
|
+
},
|
671
|
+
"clusterResourceConflictPolicy": "USE_EXISTING_VERSION",
|
672
|
+
"volumeDataRestorePolicyBindings": [{
|
673
|
+
"policy": "RESTORE_VOLUME_DATA_FROM_BACKUP",
|
674
|
+
"volumeType": "GCE_PERSISTENT_DISK",
|
675
|
+
}],
|
676
|
+
})
|
677
|
+
```
|
318
678
|
|
319
|
-
|
679
|
+
## Import
|
320
680
|
|
321
|
-
|
681
|
+
RestorePlan can be imported using any of these accepted formats:
|
322
682
|
|
323
|
-
* {{name}}
|
683
|
+
* `projects/{{project}}/locations/{{location}}/restorePlans/{{name}}`
|
324
684
|
|
325
|
-
|
685
|
+
* `{{project}}/{{location}}/{{name}}`
|
326
686
|
|
327
|
-
|
687
|
+
* `{{location}}/{{name}}`
|
328
688
|
|
329
|
-
|
689
|
+
When using the `pulumi import` command, RestorePlan can be imported using one of the formats above. For example:
|
330
690
|
|
331
691
|
```sh
|
332
|
-
$ pulumi import gcp:gkebackup/restorePlanIamPolicy:RestorePlanIamPolicy
|
692
|
+
$ pulumi import gcp:gkebackup/restorePlanIamPolicy:RestorePlanIamPolicy default projects/{{project}}/locations/{{location}}/restorePlans/{{name}}
|
333
693
|
```
|
334
694
|
|
335
|
-
IAM binding imports use space-delimited identifiers: the resource in question and the role, e.g.
|
336
|
-
|
337
695
|
```sh
|
338
|
-
$ pulumi import gcp:gkebackup/restorePlanIamPolicy:RestorePlanIamPolicy
|
696
|
+
$ pulumi import gcp:gkebackup/restorePlanIamPolicy:RestorePlanIamPolicy default {{project}}/{{location}}/{{name}}
|
339
697
|
```
|
340
698
|
|
341
|
-
IAM policy imports use the identifier of the resource in question, e.g.
|
342
|
-
|
343
699
|
```sh
|
344
|
-
$ pulumi import gcp:gkebackup/restorePlanIamPolicy:RestorePlanIamPolicy
|
700
|
+
$ pulumi import gcp:gkebackup/restorePlanIamPolicy:RestorePlanIamPolicy default {{location}}/{{name}}
|
345
701
|
```
|
346
702
|
|
347
|
-
-> **Custom Roles**: If you're importing a IAM resource with a custom role, make sure to use the
|
348
|
-
|
349
|
-
full name of the custom role, e.g. `[projects/my-project|organizations/my-org]/roles/my-custom-role`.
|
350
|
-
|
351
703
|
:param str resource_name: The name of the resource.
|
352
704
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
353
705
|
:param pulumi.Input[str] location: The region of the Restore Plan.
|
354
|
-
|
355
|
-
the value will be parsed from the identifier of the parent resource. If no location is provided in the parent identifier and no
|
356
|
-
location is specified, it is taken from the provider configuration.
|
357
|
-
:param pulumi.Input[str] name: Used to find the parent resource to bind the IAM policy to
|
358
|
-
:param pulumi.Input[str] policy_data: The policy data generated by
|
359
|
-
a `organizations_get_iam_policy` data source.
|
360
|
-
:param pulumi.Input[str] project: The ID of the project in which the resource belongs.
|
361
|
-
If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
|
706
|
+
:param pulumi.Input[str] name: The full name of the BackupPlan Resource.
|
362
707
|
"""
|
363
708
|
...
|
364
709
|
@overload
|
@@ -367,148 +712,540 @@ class RestorePlanIamPolicy(pulumi.CustomResource):
|
|
367
712
|
args: RestorePlanIamPolicyArgs,
|
368
713
|
opts: Optional[pulumi.ResourceOptions] = None):
|
369
714
|
"""
|
370
|
-
|
715
|
+
Represents a Restore Plan instance.
|
371
716
|
|
372
|
-
|
373
|
-
* `gkebackup.RestorePlanIamBinding`: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the restoreplan are preserved.
|
374
|
-
* `gkebackup.RestorePlanIamMember`: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the restoreplan are preserved.
|
717
|
+
To get more information about RestorePlan, see:
|
375
718
|
|
376
|
-
|
719
|
+
* [API documentation](https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/projects.locations.restorePlans)
|
720
|
+
* How-to Guides
|
721
|
+
* [Official Documentation](https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke)
|
377
722
|
|
378
|
-
|
723
|
+
## Example Usage
|
379
724
|
|
380
|
-
|
725
|
+
### Gkebackup Restoreplan All Namespaces
|
381
726
|
|
382
|
-
|
727
|
+
```python
|
728
|
+
import pulumi
|
729
|
+
import pulumi_gcp as gcp
|
383
730
|
|
384
|
-
|
731
|
+
primary = gcp.container.Cluster("primary",
|
732
|
+
name="restore-all-ns-cluster",
|
733
|
+
location="us-central1",
|
734
|
+
initial_node_count=1,
|
735
|
+
workload_identity_config={
|
736
|
+
"workloadPool": "my-project-name.svc.id.goog",
|
737
|
+
},
|
738
|
+
addons_config={
|
739
|
+
"gkeBackupAgentConfig": {
|
740
|
+
"enabled": True,
|
741
|
+
},
|
742
|
+
},
|
743
|
+
deletion_protection="",
|
744
|
+
network="default",
|
745
|
+
subnetwork="default")
|
746
|
+
basic = gcp.gkebackup.BackupPlan("basic",
|
747
|
+
name="restore-all-ns",
|
748
|
+
cluster=primary.id,
|
749
|
+
location="us-central1",
|
750
|
+
backup_config={
|
751
|
+
"includeVolumeData": True,
|
752
|
+
"includeSecrets": True,
|
753
|
+
"allNamespaces": True,
|
754
|
+
})
|
755
|
+
all_ns = gcp.gkebackup.RestorePlan("all_ns",
|
756
|
+
name="restore-all-ns",
|
757
|
+
location="us-central1",
|
758
|
+
backup_plan=basic.id,
|
759
|
+
cluster=primary.id,
|
760
|
+
restore_config={
|
761
|
+
"allNamespaces": True,
|
762
|
+
"namespacedResourceRestoreMode": "FAIL_ON_CONFLICT",
|
763
|
+
"volumeDataRestorePolicy": "RESTORE_VOLUME_DATA_FROM_BACKUP",
|
764
|
+
"clusterResourceRestoreScope": {
|
765
|
+
"allGroupKinds": True,
|
766
|
+
},
|
767
|
+
"clusterResourceConflictPolicy": "USE_EXISTING_VERSION",
|
768
|
+
})
|
769
|
+
```
|
770
|
+
### Gkebackup Restoreplan Rollback Namespace
|
385
771
|
|
386
772
|
```python
|
387
773
|
import pulumi
|
388
774
|
import pulumi_gcp as gcp
|
389
775
|
|
390
|
-
|
391
|
-
"
|
392
|
-
"
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
776
|
+
primary = gcp.container.Cluster("primary",
|
777
|
+
name="rollback-ns-cluster",
|
778
|
+
location="us-central1",
|
779
|
+
initial_node_count=1,
|
780
|
+
workload_identity_config={
|
781
|
+
"workloadPool": "my-project-name.svc.id.goog",
|
782
|
+
},
|
783
|
+
addons_config={
|
784
|
+
"gkeBackupAgentConfig": {
|
785
|
+
"enabled": True,
|
786
|
+
},
|
787
|
+
},
|
788
|
+
deletion_protection="",
|
789
|
+
network="default",
|
790
|
+
subnetwork="default")
|
791
|
+
basic = gcp.gkebackup.BackupPlan("basic",
|
792
|
+
name="rollback-ns",
|
793
|
+
cluster=primary.id,
|
794
|
+
location="us-central1",
|
795
|
+
backup_config={
|
796
|
+
"includeVolumeData": True,
|
797
|
+
"includeSecrets": True,
|
798
|
+
"allNamespaces": True,
|
799
|
+
})
|
800
|
+
rollback_ns = gcp.gkebackup.RestorePlan("rollback_ns",
|
801
|
+
name="rollback-ns-rp",
|
802
|
+
location="us-central1",
|
803
|
+
backup_plan=basic.id,
|
804
|
+
cluster=primary.id,
|
805
|
+
restore_config={
|
806
|
+
"selectedNamespaces": {
|
807
|
+
"namespaces": ["my-ns"],
|
808
|
+
},
|
809
|
+
"namespacedResourceRestoreMode": "DELETE_AND_RESTORE",
|
810
|
+
"volumeDataRestorePolicy": "RESTORE_VOLUME_DATA_FROM_BACKUP",
|
811
|
+
"clusterResourceRestoreScope": {
|
812
|
+
"selectedGroupKinds": [
|
813
|
+
{
|
814
|
+
"resourceGroup": "apiextension.k8s.io",
|
815
|
+
"resourceKind": "CustomResourceDefinition",
|
816
|
+
},
|
817
|
+
{
|
818
|
+
"resourceGroup": "storage.k8s.io",
|
819
|
+
"resourceKind": "StorageClass",
|
820
|
+
},
|
821
|
+
],
|
822
|
+
},
|
823
|
+
"clusterResourceConflictPolicy": "USE_EXISTING_VERSION",
|
824
|
+
})
|
399
825
|
```
|
400
|
-
|
401
|
-
## gkebackup.RestorePlanIamBinding
|
826
|
+
### Gkebackup Restoreplan Protected Application
|
402
827
|
|
403
828
|
```python
|
404
829
|
import pulumi
|
405
830
|
import pulumi_gcp as gcp
|
406
831
|
|
407
|
-
|
408
|
-
|
409
|
-
location=
|
410
|
-
|
411
|
-
|
412
|
-
|
832
|
+
primary = gcp.container.Cluster("primary",
|
833
|
+
name="rollback-app-cluster",
|
834
|
+
location="us-central1",
|
835
|
+
initial_node_count=1,
|
836
|
+
workload_identity_config={
|
837
|
+
"workloadPool": "my-project-name.svc.id.goog",
|
838
|
+
},
|
839
|
+
addons_config={
|
840
|
+
"gkeBackupAgentConfig": {
|
841
|
+
"enabled": True,
|
842
|
+
},
|
843
|
+
},
|
844
|
+
deletion_protection="",
|
845
|
+
network="default",
|
846
|
+
subnetwork="default")
|
847
|
+
basic = gcp.gkebackup.BackupPlan("basic",
|
848
|
+
name="rollback-app",
|
849
|
+
cluster=primary.id,
|
850
|
+
location="us-central1",
|
851
|
+
backup_config={
|
852
|
+
"includeVolumeData": True,
|
853
|
+
"includeSecrets": True,
|
854
|
+
"allNamespaces": True,
|
855
|
+
})
|
856
|
+
rollback_app = gcp.gkebackup.RestorePlan("rollback_app",
|
857
|
+
name="rollback-app-rp",
|
858
|
+
location="us-central1",
|
859
|
+
backup_plan=basic.id,
|
860
|
+
cluster=primary.id,
|
861
|
+
restore_config={
|
862
|
+
"selectedApplications": {
|
863
|
+
"namespacedNames": [{
|
864
|
+
"name": "my-app",
|
865
|
+
"namespace": "my-ns",
|
866
|
+
}],
|
867
|
+
},
|
868
|
+
"namespacedResourceRestoreMode": "DELETE_AND_RESTORE",
|
869
|
+
"volumeDataRestorePolicy": "REUSE_VOLUME_HANDLE_FROM_BACKUP",
|
870
|
+
"clusterResourceRestoreScope": {
|
871
|
+
"noGroupKinds": True,
|
872
|
+
},
|
873
|
+
})
|
413
874
|
```
|
414
|
-
|
415
|
-
## gkebackup.RestorePlanIamMember
|
875
|
+
### Gkebackup Restoreplan All Cluster Resources
|
416
876
|
|
417
877
|
```python
|
418
878
|
import pulumi
|
419
879
|
import pulumi_gcp as gcp
|
420
880
|
|
421
|
-
|
422
|
-
|
423
|
-
location=
|
424
|
-
|
425
|
-
|
426
|
-
|
881
|
+
primary = gcp.container.Cluster("primary",
|
882
|
+
name="all-groupkinds-cluster",
|
883
|
+
location="us-central1",
|
884
|
+
initial_node_count=1,
|
885
|
+
workload_identity_config={
|
886
|
+
"workloadPool": "my-project-name.svc.id.goog",
|
887
|
+
},
|
888
|
+
addons_config={
|
889
|
+
"gkeBackupAgentConfig": {
|
890
|
+
"enabled": True,
|
891
|
+
},
|
892
|
+
},
|
893
|
+
deletion_protection="",
|
894
|
+
network="default",
|
895
|
+
subnetwork="default")
|
896
|
+
basic = gcp.gkebackup.BackupPlan("basic",
|
897
|
+
name="all-groupkinds",
|
898
|
+
cluster=primary.id,
|
899
|
+
location="us-central1",
|
900
|
+
backup_config={
|
901
|
+
"includeVolumeData": True,
|
902
|
+
"includeSecrets": True,
|
903
|
+
"allNamespaces": True,
|
904
|
+
})
|
905
|
+
all_cluster_resources = gcp.gkebackup.RestorePlan("all_cluster_resources",
|
906
|
+
name="all-groupkinds-rp",
|
907
|
+
location="us-central1",
|
908
|
+
backup_plan=basic.id,
|
909
|
+
cluster=primary.id,
|
910
|
+
restore_config={
|
911
|
+
"noNamespaces": True,
|
912
|
+
"namespacedResourceRestoreMode": "FAIL_ON_CONFLICT",
|
913
|
+
"clusterResourceRestoreScope": {
|
914
|
+
"allGroupKinds": True,
|
915
|
+
},
|
916
|
+
"clusterResourceConflictPolicy": "USE_EXISTING_VERSION",
|
917
|
+
})
|
427
918
|
```
|
428
|
-
|
429
|
-
## gkebackup.RestorePlanIamPolicy
|
919
|
+
### Gkebackup Restoreplan Rename Namespace
|
430
920
|
|
431
921
|
```python
|
432
922
|
import pulumi
|
433
923
|
import pulumi_gcp as gcp
|
434
924
|
|
435
|
-
|
436
|
-
"
|
437
|
-
"
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
925
|
+
primary = gcp.container.Cluster("primary",
|
926
|
+
name="rename-ns-cluster",
|
927
|
+
location="us-central1",
|
928
|
+
initial_node_count=1,
|
929
|
+
workload_identity_config={
|
930
|
+
"workloadPool": "my-project-name.svc.id.goog",
|
931
|
+
},
|
932
|
+
addons_config={
|
933
|
+
"gkeBackupAgentConfig": {
|
934
|
+
"enabled": True,
|
935
|
+
},
|
936
|
+
},
|
937
|
+
deletion_protection="",
|
938
|
+
network="default",
|
939
|
+
subnetwork="default")
|
940
|
+
basic = gcp.gkebackup.BackupPlan("basic",
|
941
|
+
name="rename-ns",
|
942
|
+
cluster=primary.id,
|
943
|
+
location="us-central1",
|
944
|
+
backup_config={
|
945
|
+
"includeVolumeData": True,
|
946
|
+
"includeSecrets": True,
|
947
|
+
"allNamespaces": True,
|
948
|
+
})
|
949
|
+
rename_ns = gcp.gkebackup.RestorePlan("rename_ns",
|
950
|
+
name="rename-ns-rp",
|
951
|
+
location="us-central1",
|
952
|
+
backup_plan=basic.id,
|
953
|
+
cluster=primary.id,
|
954
|
+
restore_config={
|
955
|
+
"selectedNamespaces": {
|
956
|
+
"namespaces": ["ns1"],
|
957
|
+
},
|
958
|
+
"namespacedResourceRestoreMode": "FAIL_ON_CONFLICT",
|
959
|
+
"volumeDataRestorePolicy": "REUSE_VOLUME_HANDLE_FROM_BACKUP",
|
960
|
+
"clusterResourceRestoreScope": {
|
961
|
+
"noGroupKinds": True,
|
962
|
+
},
|
963
|
+
"transformationRules": [
|
964
|
+
{
|
965
|
+
"description": "rename namespace from ns1 to ns2",
|
966
|
+
"resourceFilter": {
|
967
|
+
"groupKinds": [{
|
968
|
+
"resourceKind": "Namespace",
|
969
|
+
}],
|
970
|
+
"jsonPath": ".metadata[?(@.name == 'ns1')]",
|
971
|
+
},
|
972
|
+
"fieldActions": [{
|
973
|
+
"op": "REPLACE",
|
974
|
+
"path": "/metadata/name",
|
975
|
+
"value": "ns2",
|
976
|
+
}],
|
977
|
+
},
|
978
|
+
{
|
979
|
+
"description": "move all resources from ns1 to ns2",
|
980
|
+
"resourceFilter": {
|
981
|
+
"namespaces": ["ns1"],
|
982
|
+
},
|
983
|
+
"fieldActions": [{
|
984
|
+
"op": "REPLACE",
|
985
|
+
"path": "/metadata/namespace",
|
986
|
+
"value": "ns2",
|
987
|
+
}],
|
988
|
+
},
|
989
|
+
],
|
990
|
+
})
|
444
991
|
```
|
445
|
-
|
446
|
-
## gkebackup.RestorePlanIamBinding
|
992
|
+
### Gkebackup Restoreplan Second Transformation
|
447
993
|
|
448
994
|
```python
|
449
995
|
import pulumi
|
450
996
|
import pulumi_gcp as gcp
|
451
997
|
|
452
|
-
|
453
|
-
|
454
|
-
location=
|
455
|
-
|
456
|
-
|
457
|
-
|
998
|
+
primary = gcp.container.Cluster("primary",
|
999
|
+
name="transform-rule-cluster",
|
1000
|
+
location="us-central1",
|
1001
|
+
initial_node_count=1,
|
1002
|
+
workload_identity_config={
|
1003
|
+
"workloadPool": "my-project-name.svc.id.goog",
|
1004
|
+
},
|
1005
|
+
addons_config={
|
1006
|
+
"gkeBackupAgentConfig": {
|
1007
|
+
"enabled": True,
|
1008
|
+
},
|
1009
|
+
},
|
1010
|
+
deletion_protection="",
|
1011
|
+
network="default",
|
1012
|
+
subnetwork="default")
|
1013
|
+
basic = gcp.gkebackup.BackupPlan("basic",
|
1014
|
+
name="transform-rule",
|
1015
|
+
cluster=primary.id,
|
1016
|
+
location="us-central1",
|
1017
|
+
backup_config={
|
1018
|
+
"includeVolumeData": True,
|
1019
|
+
"includeSecrets": True,
|
1020
|
+
"allNamespaces": True,
|
1021
|
+
})
|
1022
|
+
transform_rule = gcp.gkebackup.RestorePlan("transform_rule",
|
1023
|
+
name="transform-rule-rp",
|
1024
|
+
description="copy nginx env variables",
|
1025
|
+
labels={
|
1026
|
+
"app": "nginx",
|
1027
|
+
},
|
1028
|
+
location="us-central1",
|
1029
|
+
backup_plan=basic.id,
|
1030
|
+
cluster=primary.id,
|
1031
|
+
restore_config={
|
1032
|
+
"excludedNamespaces": {
|
1033
|
+
"namespaces": ["my-ns"],
|
1034
|
+
},
|
1035
|
+
"namespacedResourceRestoreMode": "DELETE_AND_RESTORE",
|
1036
|
+
"volumeDataRestorePolicy": "RESTORE_VOLUME_DATA_FROM_BACKUP",
|
1037
|
+
"clusterResourceRestoreScope": {
|
1038
|
+
"excludedGroupKinds": [{
|
1039
|
+
"resourceGroup": "apiextension.k8s.io",
|
1040
|
+
"resourceKind": "CustomResourceDefinition",
|
1041
|
+
}],
|
1042
|
+
},
|
1043
|
+
"clusterResourceConflictPolicy": "USE_EXISTING_VERSION",
|
1044
|
+
"transformationRules": [{
|
1045
|
+
"description": "Copy environment variables from the nginx container to the install init container.",
|
1046
|
+
"resourceFilter": {
|
1047
|
+
"groupKinds": [{
|
1048
|
+
"resourceKind": "Pod",
|
1049
|
+
"resourceGroup": "",
|
1050
|
+
}],
|
1051
|
+
"jsonPath": ".metadata[?(@.name == 'nginx')]",
|
1052
|
+
},
|
1053
|
+
"fieldActions": [{
|
1054
|
+
"op": "COPY",
|
1055
|
+
"path": "/spec/initContainers/0/env",
|
1056
|
+
"fromPath": "/spec/containers/0/env",
|
1057
|
+
}],
|
1058
|
+
}],
|
1059
|
+
})
|
458
1060
|
```
|
459
|
-
|
460
|
-
## gkebackup.RestorePlanIamMember
|
1061
|
+
### Gkebackup Restoreplan Gitops Mode
|
461
1062
|
|
462
1063
|
```python
|
463
1064
|
import pulumi
|
464
1065
|
import pulumi_gcp as gcp
|
465
1066
|
|
466
|
-
|
467
|
-
|
468
|
-
location=
|
469
|
-
|
470
|
-
|
471
|
-
|
1067
|
+
primary = gcp.container.Cluster("primary",
|
1068
|
+
name="gitops-mode-cluster",
|
1069
|
+
location="us-central1",
|
1070
|
+
initial_node_count=1,
|
1071
|
+
workload_identity_config={
|
1072
|
+
"workloadPool": "my-project-name.svc.id.goog",
|
1073
|
+
},
|
1074
|
+
addons_config={
|
1075
|
+
"gkeBackupAgentConfig": {
|
1076
|
+
"enabled": True,
|
1077
|
+
},
|
1078
|
+
},
|
1079
|
+
deletion_protection="",
|
1080
|
+
network="default",
|
1081
|
+
subnetwork="default")
|
1082
|
+
basic = gcp.gkebackup.BackupPlan("basic",
|
1083
|
+
name="gitops-mode",
|
1084
|
+
cluster=primary.id,
|
1085
|
+
location="us-central1",
|
1086
|
+
backup_config={
|
1087
|
+
"includeVolumeData": True,
|
1088
|
+
"includeSecrets": True,
|
1089
|
+
"allNamespaces": True,
|
1090
|
+
})
|
1091
|
+
gitops_mode = gcp.gkebackup.RestorePlan("gitops_mode",
|
1092
|
+
name="gitops-mode",
|
1093
|
+
location="us-central1",
|
1094
|
+
backup_plan=basic.id,
|
1095
|
+
cluster=primary.id,
|
1096
|
+
restore_config={
|
1097
|
+
"allNamespaces": True,
|
1098
|
+
"namespacedResourceRestoreMode": "MERGE_SKIP_ON_CONFLICT",
|
1099
|
+
"volumeDataRestorePolicy": "RESTORE_VOLUME_DATA_FROM_BACKUP",
|
1100
|
+
"clusterResourceRestoreScope": {
|
1101
|
+
"allGroupKinds": True,
|
1102
|
+
},
|
1103
|
+
"clusterResourceConflictPolicy": "USE_EXISTING_VERSION",
|
1104
|
+
})
|
472
1105
|
```
|
1106
|
+
### Gkebackup Restoreplan Restore Order
|
473
1107
|
|
474
|
-
|
1108
|
+
```python
|
1109
|
+
import pulumi
|
1110
|
+
import pulumi_gcp as gcp
|
1111
|
+
|
1112
|
+
primary = gcp.container.Cluster("primary",
|
1113
|
+
name="restore-order-cluster",
|
1114
|
+
location="us-central1",
|
1115
|
+
initial_node_count=1,
|
1116
|
+
workload_identity_config={
|
1117
|
+
"workloadPool": "my-project-name.svc.id.goog",
|
1118
|
+
},
|
1119
|
+
addons_config={
|
1120
|
+
"gkeBackupAgentConfig": {
|
1121
|
+
"enabled": True,
|
1122
|
+
},
|
1123
|
+
},
|
1124
|
+
deletion_protection="",
|
1125
|
+
network="default",
|
1126
|
+
subnetwork="default")
|
1127
|
+
basic = gcp.gkebackup.BackupPlan("basic",
|
1128
|
+
name="restore-order",
|
1129
|
+
cluster=primary.id,
|
1130
|
+
location="us-central1",
|
1131
|
+
backup_config={
|
1132
|
+
"includeVolumeData": True,
|
1133
|
+
"includeSecrets": True,
|
1134
|
+
"allNamespaces": True,
|
1135
|
+
})
|
1136
|
+
restore_order = gcp.gkebackup.RestorePlan("restore_order",
|
1137
|
+
name="restore-order",
|
1138
|
+
location="us-central1",
|
1139
|
+
backup_plan=basic.id,
|
1140
|
+
cluster=primary.id,
|
1141
|
+
restore_config={
|
1142
|
+
"allNamespaces": True,
|
1143
|
+
"namespacedResourceRestoreMode": "FAIL_ON_CONFLICT",
|
1144
|
+
"volumeDataRestorePolicy": "RESTORE_VOLUME_DATA_FROM_BACKUP",
|
1145
|
+
"clusterResourceRestoreScope": {
|
1146
|
+
"allGroupKinds": True,
|
1147
|
+
},
|
1148
|
+
"clusterResourceConflictPolicy": "USE_EXISTING_VERSION",
|
1149
|
+
"restoreOrder": {
|
1150
|
+
"groupKindDependencies": [
|
1151
|
+
{
|
1152
|
+
"satisfying": {
|
1153
|
+
"resourceGroup": "stable.example.com",
|
1154
|
+
"resourceKind": "kindA",
|
1155
|
+
},
|
1156
|
+
"requiring": {
|
1157
|
+
"resourceGroup": "stable.example.com",
|
1158
|
+
"resourceKind": "kindB",
|
1159
|
+
},
|
1160
|
+
},
|
1161
|
+
{
|
1162
|
+
"satisfying": {
|
1163
|
+
"resourceGroup": "stable.example.com",
|
1164
|
+
"resourceKind": "kindB",
|
1165
|
+
},
|
1166
|
+
"requiring": {
|
1167
|
+
"resourceGroup": "stable.example.com",
|
1168
|
+
"resourceKind": "kindC",
|
1169
|
+
},
|
1170
|
+
},
|
1171
|
+
],
|
1172
|
+
},
|
1173
|
+
})
|
1174
|
+
```
|
1175
|
+
### Gkebackup Restoreplan Volume Res
|
475
1176
|
|
476
|
-
|
1177
|
+
```python
|
1178
|
+
import pulumi
|
1179
|
+
import pulumi_gcp as gcp
|
477
1180
|
|
478
|
-
|
1181
|
+
primary = gcp.container.Cluster("primary",
|
1182
|
+
name="volume-res-cluster",
|
1183
|
+
location="us-central1",
|
1184
|
+
initial_node_count=1,
|
1185
|
+
workload_identity_config={
|
1186
|
+
"workloadPool": "my-project-name.svc.id.goog",
|
1187
|
+
},
|
1188
|
+
addons_config={
|
1189
|
+
"gkeBackupAgentConfig": {
|
1190
|
+
"enabled": True,
|
1191
|
+
},
|
1192
|
+
},
|
1193
|
+
deletion_protection="",
|
1194
|
+
network="default",
|
1195
|
+
subnetwork="default")
|
1196
|
+
basic = gcp.gkebackup.BackupPlan("basic",
|
1197
|
+
name="volume-res",
|
1198
|
+
cluster=primary.id,
|
1199
|
+
location="us-central1",
|
1200
|
+
backup_config={
|
1201
|
+
"includeVolumeData": True,
|
1202
|
+
"includeSecrets": True,
|
1203
|
+
"allNamespaces": True,
|
1204
|
+
})
|
1205
|
+
volume_res = gcp.gkebackup.RestorePlan("volume_res",
|
1206
|
+
name="volume-res",
|
1207
|
+
location="us-central1",
|
1208
|
+
backup_plan=basic.id,
|
1209
|
+
cluster=primary.id,
|
1210
|
+
restore_config={
|
1211
|
+
"allNamespaces": True,
|
1212
|
+
"namespacedResourceRestoreMode": "FAIL_ON_CONFLICT",
|
1213
|
+
"volumeDataRestorePolicy": "NO_VOLUME_DATA_RESTORATION",
|
1214
|
+
"clusterResourceRestoreScope": {
|
1215
|
+
"allGroupKinds": True,
|
1216
|
+
},
|
1217
|
+
"clusterResourceConflictPolicy": "USE_EXISTING_VERSION",
|
1218
|
+
"volumeDataRestorePolicyBindings": [{
|
1219
|
+
"policy": "RESTORE_VOLUME_DATA_FROM_BACKUP",
|
1220
|
+
"volumeType": "GCE_PERSISTENT_DISK",
|
1221
|
+
}],
|
1222
|
+
})
|
1223
|
+
```
|
479
1224
|
|
480
|
-
|
1225
|
+
## Import
|
481
1226
|
|
482
|
-
|
1227
|
+
RestorePlan can be imported using any of these accepted formats:
|
483
1228
|
|
484
|
-
* {{name}}
|
1229
|
+
* `projects/{{project}}/locations/{{location}}/restorePlans/{{name}}`
|
485
1230
|
|
486
|
-
|
1231
|
+
* `{{project}}/{{location}}/{{name}}`
|
487
1232
|
|
488
|
-
|
1233
|
+
* `{{location}}/{{name}}`
|
489
1234
|
|
490
|
-
|
1235
|
+
When using the `pulumi import` command, RestorePlan can be imported using one of the formats above. For example:
|
491
1236
|
|
492
1237
|
```sh
|
493
|
-
$ pulumi import gcp:gkebackup/restorePlanIamPolicy:RestorePlanIamPolicy
|
1238
|
+
$ pulumi import gcp:gkebackup/restorePlanIamPolicy:RestorePlanIamPolicy default projects/{{project}}/locations/{{location}}/restorePlans/{{name}}
|
494
1239
|
```
|
495
1240
|
|
496
|
-
IAM binding imports use space-delimited identifiers: the resource in question and the role, e.g.
|
497
|
-
|
498
1241
|
```sh
|
499
|
-
$ pulumi import gcp:gkebackup/restorePlanIamPolicy:RestorePlanIamPolicy
|
1242
|
+
$ pulumi import gcp:gkebackup/restorePlanIamPolicy:RestorePlanIamPolicy default {{project}}/{{location}}/{{name}}
|
500
1243
|
```
|
501
1244
|
|
502
|
-
IAM policy imports use the identifier of the resource in question, e.g.
|
503
|
-
|
504
1245
|
```sh
|
505
|
-
$ pulumi import gcp:gkebackup/restorePlanIamPolicy:RestorePlanIamPolicy
|
1246
|
+
$ pulumi import gcp:gkebackup/restorePlanIamPolicy:RestorePlanIamPolicy default {{location}}/{{name}}
|
506
1247
|
```
|
507
1248
|
|
508
|
-
-> **Custom Roles**: If you're importing a IAM resource with a custom role, make sure to use the
|
509
|
-
|
510
|
-
full name of the custom role, e.g. `[projects/my-project|organizations/my-org]/roles/my-custom-role`.
|
511
|
-
|
512
1249
|
:param str resource_name: The name of the resource.
|
513
1250
|
:param RestorePlanIamPolicyArgs args: The arguments to use to populate this resource's properties.
|
514
1251
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
@@ -566,16 +1303,8 @@ class RestorePlanIamPolicy(pulumi.CustomResource):
|
|
566
1303
|
:param str resource_name: The unique name of the resulting resource.
|
567
1304
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
568
1305
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
569
|
-
:param pulumi.Input[str] etag: (Computed) The etag of the IAM policy.
|
570
1306
|
:param pulumi.Input[str] location: The region of the Restore Plan.
|
571
|
-
|
572
|
-
the value will be parsed from the identifier of the parent resource. If no location is provided in the parent identifier and no
|
573
|
-
location is specified, it is taken from the provider configuration.
|
574
|
-
:param pulumi.Input[str] name: Used to find the parent resource to bind the IAM policy to
|
575
|
-
:param pulumi.Input[str] policy_data: The policy data generated by
|
576
|
-
a `organizations_get_iam_policy` data source.
|
577
|
-
:param pulumi.Input[str] project: The ID of the project in which the resource belongs.
|
578
|
-
If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
|
1307
|
+
:param pulumi.Input[str] name: The full name of the BackupPlan Resource.
|
579
1308
|
"""
|
580
1309
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
581
1310
|
|
@@ -591,9 +1320,6 @@ class RestorePlanIamPolicy(pulumi.CustomResource):
|
|
591
1320
|
@property
|
592
1321
|
@pulumi.getter
|
593
1322
|
def etag(self) -> pulumi.Output[str]:
|
594
|
-
"""
|
595
|
-
(Computed) The etag of the IAM policy.
|
596
|
-
"""
|
597
1323
|
return pulumi.get(self, "etag")
|
598
1324
|
|
599
1325
|
@property
|
@@ -601,9 +1327,6 @@ class RestorePlanIamPolicy(pulumi.CustomResource):
|
|
601
1327
|
def location(self) -> pulumi.Output[str]:
|
602
1328
|
"""
|
603
1329
|
The region of the Restore Plan.
|
604
|
-
Used to find the parent resource to bind the IAM policy to. If not specified,
|
605
|
-
the value will be parsed from the identifier of the parent resource. If no location is provided in the parent identifier and no
|
606
|
-
location is specified, it is taken from the provider configuration.
|
607
1330
|
"""
|
608
1331
|
return pulumi.get(self, "location")
|
609
1332
|
|
@@ -611,25 +1334,17 @@ class RestorePlanIamPolicy(pulumi.CustomResource):
|
|
611
1334
|
@pulumi.getter
|
612
1335
|
def name(self) -> pulumi.Output[str]:
|
613
1336
|
"""
|
614
|
-
|
1337
|
+
The full name of the BackupPlan Resource.
|
615
1338
|
"""
|
616
1339
|
return pulumi.get(self, "name")
|
617
1340
|
|
618
1341
|
@property
|
619
1342
|
@pulumi.getter(name="policyData")
|
620
1343
|
def policy_data(self) -> pulumi.Output[str]:
|
621
|
-
"""
|
622
|
-
The policy data generated by
|
623
|
-
a `organizations_get_iam_policy` data source.
|
624
|
-
"""
|
625
1344
|
return pulumi.get(self, "policy_data")
|
626
1345
|
|
627
1346
|
@property
|
628
1347
|
@pulumi.getter
|
629
1348
|
def project(self) -> pulumi.Output[str]:
|
630
|
-
"""
|
631
|
-
The ID of the project in which the resource belongs.
|
632
|
-
If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
|
633
|
-
"""
|
634
1349
|
return pulumi.get(self, "project")
|
635
1350
|
|