pulumi-gcp 7.8.0a1706829616__py3-none-any.whl → 7.8.0a1706905467__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. pulumi_gcp/__init__.py +30 -0
  2. pulumi_gcp/artifactregistry/repository.py +26 -28
  3. pulumi_gcp/cloudrun/_inputs.py +87 -4
  4. pulumi_gcp/cloudrun/outputs.py +152 -4
  5. pulumi_gcp/composer/_inputs.py +63 -0
  6. pulumi_gcp/composer/outputs.py +136 -0
  7. pulumi_gcp/compute/_inputs.py +8 -18
  8. pulumi_gcp/compute/backend_service.py +28 -0
  9. pulumi_gcp/compute/outputs.py +10 -20
  10. pulumi_gcp/compute/region_backend_service.py +30 -0
  11. pulumi_gcp/config/__init__.pyi +4 -0
  12. pulumi_gcp/config/vars.py +8 -0
  13. pulumi_gcp/discoveryengine/__init__.py +8 -0
  14. pulumi_gcp/discoveryengine/data_store.py +734 -0
  15. pulumi_gcp/eventarc/_inputs.py +2 -2
  16. pulumi_gcp/eventarc/outputs.py +2 -2
  17. pulumi_gcp/firebase/_inputs.py +4 -2
  18. pulumi_gcp/firebase/extensions_instance.py +6 -8
  19. pulumi_gcp/firebase/outputs.py +4 -2
  20. pulumi_gcp/firestore/backup_schedule.py +36 -12
  21. pulumi_gcp/firestore/database.py +0 -8
  22. pulumi_gcp/firestore/document.py +0 -68
  23. pulumi_gcp/firestore/field.py +22 -102
  24. pulumi_gcp/firestore/index.py +4 -42
  25. pulumi_gcp/gkehub/feature.py +2 -2
  26. pulumi_gcp/provider.py +40 -0
  27. pulumi_gcp/pubsub/_inputs.py +26 -4
  28. pulumi_gcp/pubsub/outputs.py +45 -8
  29. pulumi_gcp/pubsub/subscription.py +82 -0
  30. pulumi_gcp/securityposture/__init__.py +11 -0
  31. pulumi_gcp/securityposture/_inputs.py +1364 -0
  32. pulumi_gcp/securityposture/outputs.py +1372 -0
  33. pulumi_gcp/securityposture/posture.py +828 -0
  34. pulumi_gcp/securityposture/posture_deployment.py +872 -0
  35. pulumi_gcp/vertex/_inputs.py +156 -0
  36. pulumi_gcp/vertex/ai_feature_online_store_featureview.py +259 -3
  37. pulumi_gcp/vertex/outputs.py +170 -0
  38. pulumi_gcp/workflows/workflow.py +75 -7
  39. pulumi_gcp/workstations/_inputs.py +38 -0
  40. pulumi_gcp/workstations/outputs.py +30 -0
  41. pulumi_gcp/workstations/workstation_config.py +54 -0
  42. {pulumi_gcp-7.8.0a1706829616.dist-info → pulumi_gcp-7.8.0a1706905467.dist-info}/METADATA +1 -1
  43. {pulumi_gcp-7.8.0a1706829616.dist-info → pulumi_gcp-7.8.0a1706905467.dist-info}/RECORD +45 -38
  44. {pulumi_gcp-7.8.0a1706829616.dist-info → pulumi_gcp-7.8.0a1706905467.dist-info}/WHEEL +0 -0
  45. {pulumi_gcp-7.8.0a1706829616.dist-info → pulumi_gcp-7.8.0a1706905467.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,828 @@
1
+ # coding=utf-8
2
+ # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+
5
+ import copy
6
+ import warnings
7
+ import pulumi
8
+ import pulumi.runtime
9
+ from typing import Any, Mapping, Optional, Sequence, Union, overload
10
+ from .. import _utilities
11
+ from . import outputs
12
+ from ._inputs import *
13
+
14
+ __all__ = ['PostureArgs', 'Posture']
15
+
16
+ @pulumi.input_type
17
+ class PostureArgs:
18
+ def __init__(__self__, *,
19
+ location: pulumi.Input[str],
20
+ parent: pulumi.Input[str],
21
+ posture_id: pulumi.Input[str],
22
+ state: pulumi.Input[str],
23
+ description: Optional[pulumi.Input[str]] = None,
24
+ policy_sets: Optional[pulumi.Input[Sequence[pulumi.Input['PosturePolicySetArgs']]]] = None):
25
+ """
26
+ The set of arguments for constructing a Posture resource.
27
+ :param pulumi.Input[str] location: Location of the resource, eg: global.
28
+ :param pulumi.Input[str] parent: The parent of the resource, an organization. Format should be `organizations/{organization_id}`.
29
+ :param pulumi.Input[str] posture_id: Id of the posture. It is an immutable field.
30
+
31
+
32
+ - - -
33
+ :param pulumi.Input[str] state: State of the posture. Update to state field should not be triggered along with
34
+ with other field updates.
35
+ Possible values are: `DEPRECATED`, `DRAFT`, `ACTIVE`.
36
+ :param pulumi.Input[str] description: Description of the posture.
37
+ :param pulumi.Input[Sequence[pulumi.Input['PosturePolicySetArgs']]] policy_sets: List of policy sets for the posture.
38
+ Structure is documented below.
39
+ """
40
+ pulumi.set(__self__, "location", location)
41
+ pulumi.set(__self__, "parent", parent)
42
+ pulumi.set(__self__, "posture_id", posture_id)
43
+ pulumi.set(__self__, "state", state)
44
+ if description is not None:
45
+ pulumi.set(__self__, "description", description)
46
+ if policy_sets is not None:
47
+ pulumi.set(__self__, "policy_sets", policy_sets)
48
+
49
+ @property
50
+ @pulumi.getter
51
+ def location(self) -> pulumi.Input[str]:
52
+ """
53
+ Location of the resource, eg: global.
54
+ """
55
+ return pulumi.get(self, "location")
56
+
57
+ @location.setter
58
+ def location(self, value: pulumi.Input[str]):
59
+ pulumi.set(self, "location", value)
60
+
61
+ @property
62
+ @pulumi.getter
63
+ def parent(self) -> pulumi.Input[str]:
64
+ """
65
+ The parent of the resource, an organization. Format should be `organizations/{organization_id}`.
66
+ """
67
+ return pulumi.get(self, "parent")
68
+
69
+ @parent.setter
70
+ def parent(self, value: pulumi.Input[str]):
71
+ pulumi.set(self, "parent", value)
72
+
73
+ @property
74
+ @pulumi.getter(name="postureId")
75
+ def posture_id(self) -> pulumi.Input[str]:
76
+ """
77
+ Id of the posture. It is an immutable field.
78
+
79
+
80
+ - - -
81
+ """
82
+ return pulumi.get(self, "posture_id")
83
+
84
+ @posture_id.setter
85
+ def posture_id(self, value: pulumi.Input[str]):
86
+ pulumi.set(self, "posture_id", value)
87
+
88
+ @property
89
+ @pulumi.getter
90
+ def state(self) -> pulumi.Input[str]:
91
+ """
92
+ State of the posture. Update to state field should not be triggered along with
93
+ with other field updates.
94
+ Possible values are: `DEPRECATED`, `DRAFT`, `ACTIVE`.
95
+ """
96
+ return pulumi.get(self, "state")
97
+
98
+ @state.setter
99
+ def state(self, value: pulumi.Input[str]):
100
+ pulumi.set(self, "state", value)
101
+
102
+ @property
103
+ @pulumi.getter
104
+ def description(self) -> Optional[pulumi.Input[str]]:
105
+ """
106
+ Description of the posture.
107
+ """
108
+ return pulumi.get(self, "description")
109
+
110
+ @description.setter
111
+ def description(self, value: Optional[pulumi.Input[str]]):
112
+ pulumi.set(self, "description", value)
113
+
114
+ @property
115
+ @pulumi.getter(name="policySets")
116
+ def policy_sets(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['PosturePolicySetArgs']]]]:
117
+ """
118
+ List of policy sets for the posture.
119
+ Structure is documented below.
120
+ """
121
+ return pulumi.get(self, "policy_sets")
122
+
123
+ @policy_sets.setter
124
+ def policy_sets(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['PosturePolicySetArgs']]]]):
125
+ pulumi.set(self, "policy_sets", value)
126
+
127
+
128
+ @pulumi.input_type
129
+ class _PostureState:
130
+ def __init__(__self__, *,
131
+ create_time: Optional[pulumi.Input[str]] = None,
132
+ description: Optional[pulumi.Input[str]] = None,
133
+ etag: Optional[pulumi.Input[str]] = None,
134
+ location: Optional[pulumi.Input[str]] = None,
135
+ name: Optional[pulumi.Input[str]] = None,
136
+ parent: Optional[pulumi.Input[str]] = None,
137
+ policy_sets: Optional[pulumi.Input[Sequence[pulumi.Input['PosturePolicySetArgs']]]] = None,
138
+ posture_id: Optional[pulumi.Input[str]] = None,
139
+ reconciling: Optional[pulumi.Input[bool]] = None,
140
+ revision_id: Optional[pulumi.Input[str]] = None,
141
+ state: Optional[pulumi.Input[str]] = None,
142
+ update_time: Optional[pulumi.Input[str]] = None):
143
+ """
144
+ Input properties used for looking up and filtering Posture resources.
145
+ :param pulumi.Input[str] create_time: Time the Posture was created in UTC.
146
+ :param pulumi.Input[str] description: Description of the posture.
147
+ :param pulumi.Input[str] etag: For Resource freshness validation (https://google.aip.dev/154)
148
+ :param pulumi.Input[str] location: Location of the resource, eg: global.
149
+ :param pulumi.Input[str] name: Immutable. The name of the custom constraint. This is unique within the organization.
150
+ :param pulumi.Input[str] parent: The parent of the resource, an organization. Format should be `organizations/{organization_id}`.
151
+ :param pulumi.Input[Sequence[pulumi.Input['PosturePolicySetArgs']]] policy_sets: List of policy sets for the posture.
152
+ Structure is documented below.
153
+ :param pulumi.Input[str] posture_id: Id of the posture. It is an immutable field.
154
+
155
+
156
+ - - -
157
+ :param pulumi.Input[bool] reconciling: If set, there are currently changes in flight to the posture.
158
+ :param pulumi.Input[str] revision_id: Revision_id of the posture.
159
+ :param pulumi.Input[str] state: State of the posture. Update to state field should not be triggered along with
160
+ with other field updates.
161
+ Possible values are: `DEPRECATED`, `DRAFT`, `ACTIVE`.
162
+ :param pulumi.Input[str] update_time: Time the Posture was updated in UTC.
163
+ """
164
+ if create_time is not None:
165
+ pulumi.set(__self__, "create_time", create_time)
166
+ if description is not None:
167
+ pulumi.set(__self__, "description", description)
168
+ if etag is not None:
169
+ pulumi.set(__self__, "etag", etag)
170
+ if location is not None:
171
+ pulumi.set(__self__, "location", location)
172
+ if name is not None:
173
+ pulumi.set(__self__, "name", name)
174
+ if parent is not None:
175
+ pulumi.set(__self__, "parent", parent)
176
+ if policy_sets is not None:
177
+ pulumi.set(__self__, "policy_sets", policy_sets)
178
+ if posture_id is not None:
179
+ pulumi.set(__self__, "posture_id", posture_id)
180
+ if reconciling is not None:
181
+ pulumi.set(__self__, "reconciling", reconciling)
182
+ if revision_id is not None:
183
+ pulumi.set(__self__, "revision_id", revision_id)
184
+ if state is not None:
185
+ pulumi.set(__self__, "state", state)
186
+ if update_time is not None:
187
+ pulumi.set(__self__, "update_time", update_time)
188
+
189
+ @property
190
+ @pulumi.getter(name="createTime")
191
+ def create_time(self) -> Optional[pulumi.Input[str]]:
192
+ """
193
+ Time the Posture was created in UTC.
194
+ """
195
+ return pulumi.get(self, "create_time")
196
+
197
+ @create_time.setter
198
+ def create_time(self, value: Optional[pulumi.Input[str]]):
199
+ pulumi.set(self, "create_time", value)
200
+
201
+ @property
202
+ @pulumi.getter
203
+ def description(self) -> Optional[pulumi.Input[str]]:
204
+ """
205
+ Description of the posture.
206
+ """
207
+ return pulumi.get(self, "description")
208
+
209
+ @description.setter
210
+ def description(self, value: Optional[pulumi.Input[str]]):
211
+ pulumi.set(self, "description", value)
212
+
213
+ @property
214
+ @pulumi.getter
215
+ def etag(self) -> Optional[pulumi.Input[str]]:
216
+ """
217
+ For Resource freshness validation (https://google.aip.dev/154)
218
+ """
219
+ return pulumi.get(self, "etag")
220
+
221
+ @etag.setter
222
+ def etag(self, value: Optional[pulumi.Input[str]]):
223
+ pulumi.set(self, "etag", value)
224
+
225
+ @property
226
+ @pulumi.getter
227
+ def location(self) -> Optional[pulumi.Input[str]]:
228
+ """
229
+ Location of the resource, eg: global.
230
+ """
231
+ return pulumi.get(self, "location")
232
+
233
+ @location.setter
234
+ def location(self, value: Optional[pulumi.Input[str]]):
235
+ pulumi.set(self, "location", value)
236
+
237
+ @property
238
+ @pulumi.getter
239
+ def name(self) -> Optional[pulumi.Input[str]]:
240
+ """
241
+ Immutable. The name of the custom constraint. This is unique within the organization.
242
+ """
243
+ return pulumi.get(self, "name")
244
+
245
+ @name.setter
246
+ def name(self, value: Optional[pulumi.Input[str]]):
247
+ pulumi.set(self, "name", value)
248
+
249
+ @property
250
+ @pulumi.getter
251
+ def parent(self) -> Optional[pulumi.Input[str]]:
252
+ """
253
+ The parent of the resource, an organization. Format should be `organizations/{organization_id}`.
254
+ """
255
+ return pulumi.get(self, "parent")
256
+
257
+ @parent.setter
258
+ def parent(self, value: Optional[pulumi.Input[str]]):
259
+ pulumi.set(self, "parent", value)
260
+
261
+ @property
262
+ @pulumi.getter(name="policySets")
263
+ def policy_sets(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['PosturePolicySetArgs']]]]:
264
+ """
265
+ List of policy sets for the posture.
266
+ Structure is documented below.
267
+ """
268
+ return pulumi.get(self, "policy_sets")
269
+
270
+ @policy_sets.setter
271
+ def policy_sets(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['PosturePolicySetArgs']]]]):
272
+ pulumi.set(self, "policy_sets", value)
273
+
274
+ @property
275
+ @pulumi.getter(name="postureId")
276
+ def posture_id(self) -> Optional[pulumi.Input[str]]:
277
+ """
278
+ Id of the posture. It is an immutable field.
279
+
280
+
281
+ - - -
282
+ """
283
+ return pulumi.get(self, "posture_id")
284
+
285
+ @posture_id.setter
286
+ def posture_id(self, value: Optional[pulumi.Input[str]]):
287
+ pulumi.set(self, "posture_id", value)
288
+
289
+ @property
290
+ @pulumi.getter
291
+ def reconciling(self) -> Optional[pulumi.Input[bool]]:
292
+ """
293
+ If set, there are currently changes in flight to the posture.
294
+ """
295
+ return pulumi.get(self, "reconciling")
296
+
297
+ @reconciling.setter
298
+ def reconciling(self, value: Optional[pulumi.Input[bool]]):
299
+ pulumi.set(self, "reconciling", value)
300
+
301
+ @property
302
+ @pulumi.getter(name="revisionId")
303
+ def revision_id(self) -> Optional[pulumi.Input[str]]:
304
+ """
305
+ Revision_id of the posture.
306
+ """
307
+ return pulumi.get(self, "revision_id")
308
+
309
+ @revision_id.setter
310
+ def revision_id(self, value: Optional[pulumi.Input[str]]):
311
+ pulumi.set(self, "revision_id", value)
312
+
313
+ @property
314
+ @pulumi.getter
315
+ def state(self) -> Optional[pulumi.Input[str]]:
316
+ """
317
+ State of the posture. Update to state field should not be triggered along with
318
+ with other field updates.
319
+ Possible values are: `DEPRECATED`, `DRAFT`, `ACTIVE`.
320
+ """
321
+ return pulumi.get(self, "state")
322
+
323
+ @state.setter
324
+ def state(self, value: Optional[pulumi.Input[str]]):
325
+ pulumi.set(self, "state", value)
326
+
327
+ @property
328
+ @pulumi.getter(name="updateTime")
329
+ def update_time(self) -> Optional[pulumi.Input[str]]:
330
+ """
331
+ Time the Posture was updated in UTC.
332
+ """
333
+ return pulumi.get(self, "update_time")
334
+
335
+ @update_time.setter
336
+ def update_time(self, value: Optional[pulumi.Input[str]]):
337
+ pulumi.set(self, "update_time", value)
338
+
339
+
340
+ class Posture(pulumi.CustomResource):
341
+ @overload
342
+ def __init__(__self__,
343
+ resource_name: str,
344
+ opts: Optional[pulumi.ResourceOptions] = None,
345
+ description: Optional[pulumi.Input[str]] = None,
346
+ location: Optional[pulumi.Input[str]] = None,
347
+ parent: Optional[pulumi.Input[str]] = None,
348
+ policy_sets: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PosturePolicySetArgs']]]]] = None,
349
+ posture_id: Optional[pulumi.Input[str]] = None,
350
+ state: Optional[pulumi.Input[str]] = None,
351
+ __props__=None):
352
+ """
353
+ A Posture represents a collection of policy set including its name, state, description
354
+ and policy sets. A policy set includes set of policies along with their definition.
355
+ A posture can be created at the organization level.
356
+ Every update to a deployed posture creates a new posture revision with an updated revision_id.
357
+
358
+ To get more information about Posture, see:
359
+
360
+ * How-to Guides
361
+ * [Create and deploy a posture](https://cloud.google.com/security-command-center/docs/how-to-use-security-posture)
362
+
363
+ ## Example Usage
364
+ ### Securityposture Posture Basic
365
+
366
+ ```python
367
+ import pulumi
368
+ import pulumi_gcp as gcp
369
+
370
+ posture1 = gcp.securityposture.Posture("posture1",
371
+ description="a new posture",
372
+ location="global",
373
+ parent="organizations/123456789",
374
+ policy_sets=[
375
+ gcp.securityposture.PosturePolicySetArgs(
376
+ description="set of org policies",
377
+ policies=[
378
+ gcp.securityposture.PosturePolicySetPolicyArgs(
379
+ constraint=gcp.securityposture.PosturePolicySetPolicyConstraintArgs(
380
+ org_policy_constraint=gcp.securityposture.PosturePolicySetPolicyConstraintOrgPolicyConstraintArgs(
381
+ canned_constraint_id="storage.uniformBucketLevelAccess",
382
+ policy_rules=[gcp.securityposture.PosturePolicySetPolicyConstraintOrgPolicyConstraintPolicyRuleArgs(
383
+ enforce=True,
384
+ )],
385
+ ),
386
+ ),
387
+ policy_id="canned_org_policy",
388
+ ),
389
+ gcp.securityposture.PosturePolicySetPolicyArgs(
390
+ constraint=gcp.securityposture.PosturePolicySetPolicyConstraintArgs(
391
+ org_policy_constraint_custom=gcp.securityposture.PosturePolicySetPolicyConstraintOrgPolicyConstraintCustomArgs(
392
+ custom_constraint=gcp.securityposture.PosturePolicySetPolicyConstraintOrgPolicyConstraintCustomCustomConstraintArgs(
393
+ action_type="ALLOW",
394
+ condition="resource.management.autoUpgrade == false",
395
+ description="Only allow GKE NodePool resource to be created or updated if AutoUpgrade is not enabled where this custom constraint is enforced.",
396
+ display_name="Disable GKE auto upgrade",
397
+ method_types=[
398
+ "CREATE",
399
+ "UPDATE",
400
+ ],
401
+ name="organizations/123456789/customConstraints/custom.disableGkeAutoUpgrade",
402
+ resource_types=["container.googleapis.com/NodePool"],
403
+ ),
404
+ policy_rules=[gcp.securityposture.PosturePolicySetPolicyConstraintOrgPolicyConstraintCustomPolicyRuleArgs(
405
+ enforce=True,
406
+ )],
407
+ ),
408
+ ),
409
+ policy_id="custom_org_policy",
410
+ ),
411
+ ],
412
+ policy_set_id="org_policy_set",
413
+ ),
414
+ gcp.securityposture.PosturePolicySetArgs(
415
+ description="set of sha policies",
416
+ policies=[
417
+ gcp.securityposture.PosturePolicySetPolicyArgs(
418
+ constraint=gcp.securityposture.PosturePolicySetPolicyConstraintArgs(
419
+ security_health_analytics_module=gcp.securityposture.PosturePolicySetPolicyConstraintSecurityHealthAnalyticsModuleArgs(
420
+ module_enablement_state="ENABLED",
421
+ module_name="BIGQUERY_TABLE_CMEK_DISABLED",
422
+ ),
423
+ ),
424
+ description="enable BIGQUERY_TABLE_CMEK_DISABLED",
425
+ policy_id="sha_builtin_module",
426
+ ),
427
+ gcp.securityposture.PosturePolicySetPolicyArgs(
428
+ constraint=gcp.securityposture.PosturePolicySetPolicyConstraintArgs(
429
+ security_health_analytics_custom_module=gcp.securityposture.PosturePolicySetPolicyConstraintSecurityHealthAnalyticsCustomModuleArgs(
430
+ config=gcp.securityposture.PosturePolicySetPolicyConstraintSecurityHealthAnalyticsCustomModuleConfigArgs(
431
+ custom_output=gcp.securityposture.PosturePolicySetPolicyConstraintSecurityHealthAnalyticsCustomModuleConfigCustomOutputArgs(
432
+ properties=[gcp.securityposture.PosturePolicySetPolicyConstraintSecurityHealthAnalyticsCustomModuleConfigCustomOutputPropertyArgs(
433
+ name="duration",
434
+ value_expression=gcp.securityposture.PosturePolicySetPolicyConstraintSecurityHealthAnalyticsCustomModuleConfigCustomOutputPropertyValueExpressionArgs(
435
+ expression="resource.rotationPeriod",
436
+ ),
437
+ )],
438
+ ),
439
+ description="Custom Module",
440
+ predicate=gcp.securityposture.PosturePolicySetPolicyConstraintSecurityHealthAnalyticsCustomModuleConfigPredicateArgs(
441
+ expression="resource.rotationPeriod > duration('2592000s')",
442
+ ),
443
+ recommendation="Testing custom modules",
444
+ resource_selector=gcp.securityposture.PosturePolicySetPolicyConstraintSecurityHealthAnalyticsCustomModuleConfigResourceSelectorArgs(
445
+ resource_types=["cloudkms.googleapis.com/CryptoKey"],
446
+ ),
447
+ severity="LOW",
448
+ ),
449
+ display_name="custom SHA policy",
450
+ module_enablement_state="ENABLED",
451
+ ),
452
+ ),
453
+ policy_id="sha_custom_module",
454
+ ),
455
+ ],
456
+ policy_set_id="sha_policy_set",
457
+ ),
458
+ ],
459
+ posture_id="posture_1",
460
+ state="ACTIVE")
461
+ ```
462
+
463
+ ## Import
464
+
465
+ Posture can be imported using any of these accepted formats* `{{parent}}/locations/{{location}}/postures/{{posture_id}}` When using the `pulumi import` command, Posture can be imported using one of the formats above. For example
466
+
467
+ ```sh
468
+ $ pulumi import gcp:securityposture/posture:Posture default {{parent}}/locations/{{location}}/postures/{{posture_id}}
469
+ ```
470
+
471
+ :param str resource_name: The name of the resource.
472
+ :param pulumi.ResourceOptions opts: Options for the resource.
473
+ :param pulumi.Input[str] description: Description of the posture.
474
+ :param pulumi.Input[str] location: Location of the resource, eg: global.
475
+ :param pulumi.Input[str] parent: The parent of the resource, an organization. Format should be `organizations/{organization_id}`.
476
+ :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PosturePolicySetArgs']]]] policy_sets: List of policy sets for the posture.
477
+ Structure is documented below.
478
+ :param pulumi.Input[str] posture_id: Id of the posture. It is an immutable field.
479
+
480
+
481
+ - - -
482
+ :param pulumi.Input[str] state: State of the posture. Update to state field should not be triggered along with
483
+ with other field updates.
484
+ Possible values are: `DEPRECATED`, `DRAFT`, `ACTIVE`.
485
+ """
486
+ ...
487
+ @overload
488
+ def __init__(__self__,
489
+ resource_name: str,
490
+ args: PostureArgs,
491
+ opts: Optional[pulumi.ResourceOptions] = None):
492
+ """
493
+ A Posture represents a collection of policy set including its name, state, description
494
+ and policy sets. A policy set includes set of policies along with their definition.
495
+ A posture can be created at the organization level.
496
+ Every update to a deployed posture creates a new posture revision with an updated revision_id.
497
+
498
+ To get more information about Posture, see:
499
+
500
+ * How-to Guides
501
+ * [Create and deploy a posture](https://cloud.google.com/security-command-center/docs/how-to-use-security-posture)
502
+
503
+ ## Example Usage
504
+ ### Securityposture Posture Basic
505
+
506
+ ```python
507
+ import pulumi
508
+ import pulumi_gcp as gcp
509
+
510
+ posture1 = gcp.securityposture.Posture("posture1",
511
+ description="a new posture",
512
+ location="global",
513
+ parent="organizations/123456789",
514
+ policy_sets=[
515
+ gcp.securityposture.PosturePolicySetArgs(
516
+ description="set of org policies",
517
+ policies=[
518
+ gcp.securityposture.PosturePolicySetPolicyArgs(
519
+ constraint=gcp.securityposture.PosturePolicySetPolicyConstraintArgs(
520
+ org_policy_constraint=gcp.securityposture.PosturePolicySetPolicyConstraintOrgPolicyConstraintArgs(
521
+ canned_constraint_id="storage.uniformBucketLevelAccess",
522
+ policy_rules=[gcp.securityposture.PosturePolicySetPolicyConstraintOrgPolicyConstraintPolicyRuleArgs(
523
+ enforce=True,
524
+ )],
525
+ ),
526
+ ),
527
+ policy_id="canned_org_policy",
528
+ ),
529
+ gcp.securityposture.PosturePolicySetPolicyArgs(
530
+ constraint=gcp.securityposture.PosturePolicySetPolicyConstraintArgs(
531
+ org_policy_constraint_custom=gcp.securityposture.PosturePolicySetPolicyConstraintOrgPolicyConstraintCustomArgs(
532
+ custom_constraint=gcp.securityposture.PosturePolicySetPolicyConstraintOrgPolicyConstraintCustomCustomConstraintArgs(
533
+ action_type="ALLOW",
534
+ condition="resource.management.autoUpgrade == false",
535
+ description="Only allow GKE NodePool resource to be created or updated if AutoUpgrade is not enabled where this custom constraint is enforced.",
536
+ display_name="Disable GKE auto upgrade",
537
+ method_types=[
538
+ "CREATE",
539
+ "UPDATE",
540
+ ],
541
+ name="organizations/123456789/customConstraints/custom.disableGkeAutoUpgrade",
542
+ resource_types=["container.googleapis.com/NodePool"],
543
+ ),
544
+ policy_rules=[gcp.securityposture.PosturePolicySetPolicyConstraintOrgPolicyConstraintCustomPolicyRuleArgs(
545
+ enforce=True,
546
+ )],
547
+ ),
548
+ ),
549
+ policy_id="custom_org_policy",
550
+ ),
551
+ ],
552
+ policy_set_id="org_policy_set",
553
+ ),
554
+ gcp.securityposture.PosturePolicySetArgs(
555
+ description="set of sha policies",
556
+ policies=[
557
+ gcp.securityposture.PosturePolicySetPolicyArgs(
558
+ constraint=gcp.securityposture.PosturePolicySetPolicyConstraintArgs(
559
+ security_health_analytics_module=gcp.securityposture.PosturePolicySetPolicyConstraintSecurityHealthAnalyticsModuleArgs(
560
+ module_enablement_state="ENABLED",
561
+ module_name="BIGQUERY_TABLE_CMEK_DISABLED",
562
+ ),
563
+ ),
564
+ description="enable BIGQUERY_TABLE_CMEK_DISABLED",
565
+ policy_id="sha_builtin_module",
566
+ ),
567
+ gcp.securityposture.PosturePolicySetPolicyArgs(
568
+ constraint=gcp.securityposture.PosturePolicySetPolicyConstraintArgs(
569
+ security_health_analytics_custom_module=gcp.securityposture.PosturePolicySetPolicyConstraintSecurityHealthAnalyticsCustomModuleArgs(
570
+ config=gcp.securityposture.PosturePolicySetPolicyConstraintSecurityHealthAnalyticsCustomModuleConfigArgs(
571
+ custom_output=gcp.securityposture.PosturePolicySetPolicyConstraintSecurityHealthAnalyticsCustomModuleConfigCustomOutputArgs(
572
+ properties=[gcp.securityposture.PosturePolicySetPolicyConstraintSecurityHealthAnalyticsCustomModuleConfigCustomOutputPropertyArgs(
573
+ name="duration",
574
+ value_expression=gcp.securityposture.PosturePolicySetPolicyConstraintSecurityHealthAnalyticsCustomModuleConfigCustomOutputPropertyValueExpressionArgs(
575
+ expression="resource.rotationPeriod",
576
+ ),
577
+ )],
578
+ ),
579
+ description="Custom Module",
580
+ predicate=gcp.securityposture.PosturePolicySetPolicyConstraintSecurityHealthAnalyticsCustomModuleConfigPredicateArgs(
581
+ expression="resource.rotationPeriod > duration('2592000s')",
582
+ ),
583
+ recommendation="Testing custom modules",
584
+ resource_selector=gcp.securityposture.PosturePolicySetPolicyConstraintSecurityHealthAnalyticsCustomModuleConfigResourceSelectorArgs(
585
+ resource_types=["cloudkms.googleapis.com/CryptoKey"],
586
+ ),
587
+ severity="LOW",
588
+ ),
589
+ display_name="custom SHA policy",
590
+ module_enablement_state="ENABLED",
591
+ ),
592
+ ),
593
+ policy_id="sha_custom_module",
594
+ ),
595
+ ],
596
+ policy_set_id="sha_policy_set",
597
+ ),
598
+ ],
599
+ posture_id="posture_1",
600
+ state="ACTIVE")
601
+ ```
602
+
603
+ ## Import
604
+
605
+ Posture can be imported using any of these accepted formats* `{{parent}}/locations/{{location}}/postures/{{posture_id}}` When using the `pulumi import` command, Posture can be imported using one of the formats above. For example
606
+
607
+ ```sh
608
+ $ pulumi import gcp:securityposture/posture:Posture default {{parent}}/locations/{{location}}/postures/{{posture_id}}
609
+ ```
610
+
611
+ :param str resource_name: The name of the resource.
612
+ :param PostureArgs args: The arguments to use to populate this resource's properties.
613
+ :param pulumi.ResourceOptions opts: Options for the resource.
614
+ """
615
+ ...
616
+ def __init__(__self__, resource_name: str, *args, **kwargs):
617
+ resource_args, opts = _utilities.get_resource_args_opts(PostureArgs, pulumi.ResourceOptions, *args, **kwargs)
618
+ if resource_args is not None:
619
+ __self__._internal_init(resource_name, opts, **resource_args.__dict__)
620
+ else:
621
+ __self__._internal_init(resource_name, *args, **kwargs)
622
+
623
+ def _internal_init(__self__,
624
+ resource_name: str,
625
+ opts: Optional[pulumi.ResourceOptions] = None,
626
+ description: Optional[pulumi.Input[str]] = None,
627
+ location: Optional[pulumi.Input[str]] = None,
628
+ parent: Optional[pulumi.Input[str]] = None,
629
+ policy_sets: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PosturePolicySetArgs']]]]] = None,
630
+ posture_id: Optional[pulumi.Input[str]] = None,
631
+ state: Optional[pulumi.Input[str]] = None,
632
+ __props__=None):
633
+ opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
634
+ if not isinstance(opts, pulumi.ResourceOptions):
635
+ raise TypeError('Expected resource options to be a ResourceOptions instance')
636
+ if opts.id is None:
637
+ if __props__ is not None:
638
+ raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
639
+ __props__ = PostureArgs.__new__(PostureArgs)
640
+
641
+ __props__.__dict__["description"] = description
642
+ if location is None and not opts.urn:
643
+ raise TypeError("Missing required property 'location'")
644
+ __props__.__dict__["location"] = location
645
+ if parent is None and not opts.urn:
646
+ raise TypeError("Missing required property 'parent'")
647
+ __props__.__dict__["parent"] = parent
648
+ __props__.__dict__["policy_sets"] = policy_sets
649
+ if posture_id is None and not opts.urn:
650
+ raise TypeError("Missing required property 'posture_id'")
651
+ __props__.__dict__["posture_id"] = posture_id
652
+ if state is None and not opts.urn:
653
+ raise TypeError("Missing required property 'state'")
654
+ __props__.__dict__["state"] = state
655
+ __props__.__dict__["create_time"] = None
656
+ __props__.__dict__["etag"] = None
657
+ __props__.__dict__["name"] = None
658
+ __props__.__dict__["reconciling"] = None
659
+ __props__.__dict__["revision_id"] = None
660
+ __props__.__dict__["update_time"] = None
661
+ super(Posture, __self__).__init__(
662
+ 'gcp:securityposture/posture:Posture',
663
+ resource_name,
664
+ __props__,
665
+ opts)
666
+
667
+ @staticmethod
668
+ def get(resource_name: str,
669
+ id: pulumi.Input[str],
670
+ opts: Optional[pulumi.ResourceOptions] = None,
671
+ create_time: Optional[pulumi.Input[str]] = None,
672
+ description: Optional[pulumi.Input[str]] = None,
673
+ etag: Optional[pulumi.Input[str]] = None,
674
+ location: Optional[pulumi.Input[str]] = None,
675
+ name: Optional[pulumi.Input[str]] = None,
676
+ parent: Optional[pulumi.Input[str]] = None,
677
+ policy_sets: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PosturePolicySetArgs']]]]] = None,
678
+ posture_id: Optional[pulumi.Input[str]] = None,
679
+ reconciling: Optional[pulumi.Input[bool]] = None,
680
+ revision_id: Optional[pulumi.Input[str]] = None,
681
+ state: Optional[pulumi.Input[str]] = None,
682
+ update_time: Optional[pulumi.Input[str]] = None) -> 'Posture':
683
+ """
684
+ Get an existing Posture resource's state with the given name, id, and optional extra
685
+ properties used to qualify the lookup.
686
+
687
+ :param str resource_name: The unique name of the resulting resource.
688
+ :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
689
+ :param pulumi.ResourceOptions opts: Options for the resource.
690
+ :param pulumi.Input[str] create_time: Time the Posture was created in UTC.
691
+ :param pulumi.Input[str] description: Description of the posture.
692
+ :param pulumi.Input[str] etag: For Resource freshness validation (https://google.aip.dev/154)
693
+ :param pulumi.Input[str] location: Location of the resource, eg: global.
694
+ :param pulumi.Input[str] name: Immutable. The name of the custom constraint. This is unique within the organization.
695
+ :param pulumi.Input[str] parent: The parent of the resource, an organization. Format should be `organizations/{organization_id}`.
696
+ :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PosturePolicySetArgs']]]] policy_sets: List of policy sets for the posture.
697
+ Structure is documented below.
698
+ :param pulumi.Input[str] posture_id: Id of the posture. It is an immutable field.
699
+
700
+
701
+ - - -
702
+ :param pulumi.Input[bool] reconciling: If set, there are currently changes in flight to the posture.
703
+ :param pulumi.Input[str] revision_id: Revision_id of the posture.
704
+ :param pulumi.Input[str] state: State of the posture. Update to state field should not be triggered along with
705
+ with other field updates.
706
+ Possible values are: `DEPRECATED`, `DRAFT`, `ACTIVE`.
707
+ :param pulumi.Input[str] update_time: Time the Posture was updated in UTC.
708
+ """
709
+ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
710
+
711
+ __props__ = _PostureState.__new__(_PostureState)
712
+
713
+ __props__.__dict__["create_time"] = create_time
714
+ __props__.__dict__["description"] = description
715
+ __props__.__dict__["etag"] = etag
716
+ __props__.__dict__["location"] = location
717
+ __props__.__dict__["name"] = name
718
+ __props__.__dict__["parent"] = parent
719
+ __props__.__dict__["policy_sets"] = policy_sets
720
+ __props__.__dict__["posture_id"] = posture_id
721
+ __props__.__dict__["reconciling"] = reconciling
722
+ __props__.__dict__["revision_id"] = revision_id
723
+ __props__.__dict__["state"] = state
724
+ __props__.__dict__["update_time"] = update_time
725
+ return Posture(resource_name, opts=opts, __props__=__props__)
726
+
727
+ @property
728
+ @pulumi.getter(name="createTime")
729
+ def create_time(self) -> pulumi.Output[str]:
730
+ """
731
+ Time the Posture was created in UTC.
732
+ """
733
+ return pulumi.get(self, "create_time")
734
+
735
+ @property
736
+ @pulumi.getter
737
+ def description(self) -> pulumi.Output[Optional[str]]:
738
+ """
739
+ Description of the posture.
740
+ """
741
+ return pulumi.get(self, "description")
742
+
743
+ @property
744
+ @pulumi.getter
745
+ def etag(self) -> pulumi.Output[str]:
746
+ """
747
+ For Resource freshness validation (https://google.aip.dev/154)
748
+ """
749
+ return pulumi.get(self, "etag")
750
+
751
+ @property
752
+ @pulumi.getter
753
+ def location(self) -> pulumi.Output[str]:
754
+ """
755
+ Location of the resource, eg: global.
756
+ """
757
+ return pulumi.get(self, "location")
758
+
759
+ @property
760
+ @pulumi.getter
761
+ def name(self) -> pulumi.Output[str]:
762
+ """
763
+ Immutable. The name of the custom constraint. This is unique within the organization.
764
+ """
765
+ return pulumi.get(self, "name")
766
+
767
+ @property
768
+ @pulumi.getter
769
+ def parent(self) -> pulumi.Output[str]:
770
+ """
771
+ The parent of the resource, an organization. Format should be `organizations/{organization_id}`.
772
+ """
773
+ return pulumi.get(self, "parent")
774
+
775
+ @property
776
+ @pulumi.getter(name="policySets")
777
+ def policy_sets(self) -> pulumi.Output[Optional[Sequence['outputs.PosturePolicySet']]]:
778
+ """
779
+ List of policy sets for the posture.
780
+ Structure is documented below.
781
+ """
782
+ return pulumi.get(self, "policy_sets")
783
+
784
+ @property
785
+ @pulumi.getter(name="postureId")
786
+ def posture_id(self) -> pulumi.Output[str]:
787
+ """
788
+ Id of the posture. It is an immutable field.
789
+
790
+
791
+ - - -
792
+ """
793
+ return pulumi.get(self, "posture_id")
794
+
795
+ @property
796
+ @pulumi.getter
797
+ def reconciling(self) -> pulumi.Output[bool]:
798
+ """
799
+ If set, there are currently changes in flight to the posture.
800
+ """
801
+ return pulumi.get(self, "reconciling")
802
+
803
+ @property
804
+ @pulumi.getter(name="revisionId")
805
+ def revision_id(self) -> pulumi.Output[str]:
806
+ """
807
+ Revision_id of the posture.
808
+ """
809
+ return pulumi.get(self, "revision_id")
810
+
811
+ @property
812
+ @pulumi.getter
813
+ def state(self) -> pulumi.Output[str]:
814
+ """
815
+ State of the posture. Update to state field should not be triggered along with
816
+ with other field updates.
817
+ Possible values are: `DEPRECATED`, `DRAFT`, `ACTIVE`.
818
+ """
819
+ return pulumi.get(self, "state")
820
+
821
+ @property
822
+ @pulumi.getter(name="updateTime")
823
+ def update_time(self) -> pulumi.Output[str]:
824
+ """
825
+ Time the Posture was updated in UTC.
826
+ """
827
+ return pulumi.get(self, "update_time")
828
+