pulumi-gcp 8.17.0a1738274430__py3-none-any.whl → 8.17.0a1738349438__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.
Files changed (83) hide show
  1. pulumi_gcp/__init__.py +91 -0
  2. pulumi_gcp/alloydb/cluster.py +75 -7
  3. pulumi_gcp/apigee/_inputs.py +91 -0
  4. pulumi_gcp/apigee/endpoint_attachment.py +0 -64
  5. pulumi_gcp/apigee/environment.py +54 -0
  6. pulumi_gcp/apigee/outputs.py +54 -0
  7. pulumi_gcp/apihub/__init__.py +10 -0
  8. pulumi_gcp/apihub/_inputs.py +154 -0
  9. pulumi_gcp/apihub/api_hub_instance.py +784 -0
  10. pulumi_gcp/apihub/outputs.py +124 -0
  11. pulumi_gcp/chronicle/__init__.py +1 -0
  12. pulumi_gcp/chronicle/_inputs.py +124 -0
  13. pulumi_gcp/chronicle/outputs.py +112 -0
  14. pulumi_gcp/chronicle/retrohunt.py +645 -0
  15. pulumi_gcp/cloudrunv2/_inputs.py +197 -0
  16. pulumi_gcp/cloudrunv2/get_service.py +12 -1
  17. pulumi_gcp/cloudrunv2/outputs.py +256 -0
  18. pulumi_gcp/cloudrunv2/service.py +159 -0
  19. pulumi_gcp/colab/__init__.py +5 -0
  20. pulumi_gcp/colab/_inputs.py +131 -0
  21. pulumi_gcp/colab/get_runtime_template_iam_policy.py +182 -0
  22. pulumi_gcp/colab/outputs.py +92 -0
  23. pulumi_gcp/colab/runtime.py +696 -0
  24. pulumi_gcp/colab/runtime_template_iam_binding.py +828 -0
  25. pulumi_gcp/colab/runtime_template_iam_member.py +828 -0
  26. pulumi_gcp/colab/runtime_template_iam_policy.py +667 -0
  27. pulumi_gcp/compute/__init__.py +4 -0
  28. pulumi_gcp/compute/_inputs.py +526 -0
  29. pulumi_gcp/compute/firewall_policy_rule.py +104 -22
  30. pulumi_gcp/compute/firewall_policy_with_rules.py +114 -42
  31. pulumi_gcp/compute/get_instance_template_iam_policy.py +159 -0
  32. pulumi_gcp/compute/instance_template_iam_binding.py +998 -0
  33. pulumi_gcp/compute/instance_template_iam_member.py +998 -0
  34. pulumi_gcp/compute/instance_template_iam_policy.py +817 -0
  35. pulumi_gcp/compute/interconnect_attachment.py +189 -2
  36. pulumi_gcp/compute/network_firewall_policy_rule.py +122 -10
  37. pulumi_gcp/compute/network_firewall_policy_with_rules.py +116 -44
  38. pulumi_gcp/compute/outputs.py +352 -0
  39. pulumi_gcp/compute/project_metadata_item.py +12 -0
  40. pulumi_gcp/compute/public_advertised_prefix.py +87 -0
  41. pulumi_gcp/compute/region_network_firewall_policy_rule.py +130 -10
  42. pulumi_gcp/compute/region_network_firewall_policy_with_rules.py +104 -32
  43. pulumi_gcp/compute/router_peer.py +115 -3
  44. pulumi_gcp/config/__init__.pyi +2 -0
  45. pulumi_gcp/config/vars.py +4 -0
  46. pulumi_gcp/filestore/get_instance.py +12 -1
  47. pulumi_gcp/filestore/instance.py +75 -0
  48. pulumi_gcp/gemini/code_repository_index.py +29 -33
  49. pulumi_gcp/gemini/get_repository_group_iam_policy.py +28 -2
  50. pulumi_gcp/gemini/repository_group.py +76 -26
  51. pulumi_gcp/gemini/repository_group_iam_binding.py +258 -0
  52. pulumi_gcp/gemini/repository_group_iam_member.py +258 -0
  53. pulumi_gcp/gemini/repository_group_iam_policy.py +258 -0
  54. pulumi_gcp/kms/__init__.py +1 -0
  55. pulumi_gcp/kms/get_key_handles.py +172 -0
  56. pulumi_gcp/kms/outputs.py +45 -0
  57. pulumi_gcp/networksecurity/_inputs.py +72 -0
  58. pulumi_gcp/networksecurity/outputs.py +76 -0
  59. pulumi_gcp/networksecurity/security_profile.py +233 -7
  60. pulumi_gcp/networksecurity/security_profile_group.py +218 -0
  61. pulumi_gcp/organizations/__init__.py +1 -0
  62. pulumi_gcp/organizations/get_s.py +128 -0
  63. pulumi_gcp/organizations/outputs.py +63 -0
  64. pulumi_gcp/parametermanager/__init__.py +3 -0
  65. pulumi_gcp/parametermanager/get_parameter.py +211 -0
  66. pulumi_gcp/parametermanager/get_regional_parameters.py +157 -0
  67. pulumi_gcp/parametermanager/outputs.py +210 -0
  68. pulumi_gcp/parametermanager/parameter_version.py +496 -0
  69. pulumi_gcp/parametermanager/regional_parameter_version.py +10 -38
  70. pulumi_gcp/provider.py +20 -0
  71. pulumi_gcp/pubsub/_inputs.py +213 -1
  72. pulumi_gcp/pubsub/outputs.py +278 -2
  73. pulumi_gcp/pubsub/topic.py +42 -0
  74. pulumi_gcp/pulumi-plugin.json +1 -1
  75. pulumi_gcp/redis/__init__.py +1 -0
  76. pulumi_gcp/redis/_inputs.py +342 -6
  77. pulumi_gcp/redis/cluster.py +223 -102
  78. pulumi_gcp/redis/cluster_user_created_connections.py +845 -0
  79. pulumi_gcp/redis/outputs.py +268 -4
  80. {pulumi_gcp-8.17.0a1738274430.dist-info → pulumi_gcp-8.17.0a1738349438.dist-info}/METADATA +1 -1
  81. {pulumi_gcp-8.17.0a1738274430.dist-info → pulumi_gcp-8.17.0a1738349438.dist-info}/RECORD +83 -63
  82. {pulumi_gcp-8.17.0a1738274430.dist-info → pulumi_gcp-8.17.0a1738349438.dist-info}/WHEEL +0 -0
  83. {pulumi_gcp-8.17.0a1738274430.dist-info → pulumi_gcp-8.17.0a1738349438.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,817 @@
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 sys
8
+ import pulumi
9
+ import pulumi.runtime
10
+ from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
15
+ from .. import _utilities
16
+
17
+ __all__ = ['InstanceTemplateIamPolicyArgs', 'InstanceTemplateIamPolicy']
18
+
19
+ @pulumi.input_type
20
+ class InstanceTemplateIamPolicyArgs:
21
+ def __init__(__self__, *,
22
+ policy_data: pulumi.Input[str],
23
+ name: Optional[pulumi.Input[str]] = None,
24
+ project: Optional[pulumi.Input[str]] = None):
25
+ """
26
+ The set of arguments for constructing a InstanceTemplateIamPolicy resource.
27
+ :param pulumi.Input[str] policy_data: The policy data generated by
28
+ a `organizations_get_iam_policy` data source.
29
+ :param pulumi.Input[str] name: Used to find the parent resource to bind the IAM policy to
30
+ :param pulumi.Input[str] project: The ID of the project in which the resource belongs.
31
+ 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.
32
+ """
33
+ pulumi.set(__self__, "policy_data", policy_data)
34
+ if name is not None:
35
+ pulumi.set(__self__, "name", name)
36
+ if project is not None:
37
+ pulumi.set(__self__, "project", project)
38
+
39
+ @property
40
+ @pulumi.getter(name="policyData")
41
+ def policy_data(self) -> pulumi.Input[str]:
42
+ """
43
+ The policy data generated by
44
+ a `organizations_get_iam_policy` data source.
45
+ """
46
+ return pulumi.get(self, "policy_data")
47
+
48
+ @policy_data.setter
49
+ def policy_data(self, value: pulumi.Input[str]):
50
+ pulumi.set(self, "policy_data", value)
51
+
52
+ @property
53
+ @pulumi.getter
54
+ def name(self) -> Optional[pulumi.Input[str]]:
55
+ """
56
+ Used to find the parent resource to bind the IAM policy to
57
+ """
58
+ return pulumi.get(self, "name")
59
+
60
+ @name.setter
61
+ def name(self, value: Optional[pulumi.Input[str]]):
62
+ pulumi.set(self, "name", value)
63
+
64
+ @property
65
+ @pulumi.getter
66
+ def project(self) -> Optional[pulumi.Input[str]]:
67
+ """
68
+ The ID of the project in which the resource belongs.
69
+ 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.
70
+ """
71
+ return pulumi.get(self, "project")
72
+
73
+ @project.setter
74
+ def project(self, value: Optional[pulumi.Input[str]]):
75
+ pulumi.set(self, "project", value)
76
+
77
+
78
+ @pulumi.input_type
79
+ class _InstanceTemplateIamPolicyState:
80
+ def __init__(__self__, *,
81
+ etag: Optional[pulumi.Input[str]] = None,
82
+ name: Optional[pulumi.Input[str]] = None,
83
+ policy_data: Optional[pulumi.Input[str]] = None,
84
+ project: Optional[pulumi.Input[str]] = None):
85
+ """
86
+ Input properties used for looking up and filtering InstanceTemplateIamPolicy resources.
87
+ :param pulumi.Input[str] etag: (Computed) The etag of the IAM policy.
88
+ :param pulumi.Input[str] name: Used to find the parent resource to bind the IAM policy to
89
+ :param pulumi.Input[str] policy_data: The policy data generated by
90
+ a `organizations_get_iam_policy` data source.
91
+ :param pulumi.Input[str] project: The ID of the project in which the resource belongs.
92
+ 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
+ """
94
+ if etag is not None:
95
+ pulumi.set(__self__, "etag", etag)
96
+ if name is not None:
97
+ pulumi.set(__self__, "name", name)
98
+ if policy_data is not None:
99
+ pulumi.set(__self__, "policy_data", policy_data)
100
+ if project is not None:
101
+ pulumi.set(__self__, "project", project)
102
+
103
+ @property
104
+ @pulumi.getter
105
+ def etag(self) -> Optional[pulumi.Input[str]]:
106
+ """
107
+ (Computed) The etag of the IAM policy.
108
+ """
109
+ return pulumi.get(self, "etag")
110
+
111
+ @etag.setter
112
+ def etag(self, value: Optional[pulumi.Input[str]]):
113
+ pulumi.set(self, "etag", value)
114
+
115
+ @property
116
+ @pulumi.getter
117
+ def name(self) -> Optional[pulumi.Input[str]]:
118
+ """
119
+ Used to find the parent resource to bind the IAM policy to
120
+ """
121
+ return pulumi.get(self, "name")
122
+
123
+ @name.setter
124
+ def name(self, value: Optional[pulumi.Input[str]]):
125
+ pulumi.set(self, "name", value)
126
+
127
+ @property
128
+ @pulumi.getter(name="policyData")
129
+ def policy_data(self) -> Optional[pulumi.Input[str]]:
130
+ """
131
+ The policy data generated by
132
+ a `organizations_get_iam_policy` data source.
133
+ """
134
+ return pulumi.get(self, "policy_data")
135
+
136
+ @policy_data.setter
137
+ def policy_data(self, value: Optional[pulumi.Input[str]]):
138
+ pulumi.set(self, "policy_data", value)
139
+
140
+ @property
141
+ @pulumi.getter
142
+ def project(self) -> Optional[pulumi.Input[str]]:
143
+ """
144
+ The ID of the project in which the resource belongs.
145
+ 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.
146
+ """
147
+ return pulumi.get(self, "project")
148
+
149
+ @project.setter
150
+ def project(self, value: Optional[pulumi.Input[str]]):
151
+ pulumi.set(self, "project", value)
152
+
153
+
154
+ class InstanceTemplateIamPolicy(pulumi.CustomResource):
155
+ @overload
156
+ def __init__(__self__,
157
+ resource_name: str,
158
+ opts: Optional[pulumi.ResourceOptions] = None,
159
+ name: Optional[pulumi.Input[str]] = None,
160
+ policy_data: Optional[pulumi.Input[str]] = None,
161
+ project: Optional[pulumi.Input[str]] = None,
162
+ __props__=None):
163
+ """
164
+ Three different resources help you manage your IAM policy for Compute Engine InstanceTemplate. Each of these resources serves a different use case:
165
+
166
+ * `compute.InstanceTemplateIamPolicy`: Authoritative. Sets the IAM policy for the instancetemplate and replaces any existing policy already attached.
167
+ * `compute.InstanceTemplateIamBinding`: 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 instancetemplate are preserved.
168
+ * `compute.InstanceTemplateIamMember`: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the instancetemplate are preserved.
169
+
170
+ A data source can be used to retrieve policy data in advent you do not need creation
171
+
172
+ * `compute.InstanceTemplateIamPolicy`: Retrieves the IAM policy for the instancetemplate
173
+
174
+ > **Note:** `compute.InstanceTemplateIamPolicy` **cannot** be used in conjunction with `compute.InstanceTemplateIamBinding` and `compute.InstanceTemplateIamMember` or they will fight over what your policy should be.
175
+
176
+ > **Note:** `compute.InstanceTemplateIamBinding` resources **can be** used in conjunction with `compute.InstanceTemplateIamMember` resources **only if** they do not grant privilege to the same role.
177
+
178
+ > **Note:** This resource supports IAM Conditions but they have some known limitations which can be found [here](https://cloud.google.com/iam/docs/conditions-overview#limitations). Please review this article if you are having issues with IAM Conditions.
179
+
180
+ ## compute.InstanceTemplateIamPolicy
181
+
182
+ ```python
183
+ import pulumi
184
+ import pulumi_gcp as gcp
185
+
186
+ admin = gcp.organizations.get_iam_policy(bindings=[{
187
+ "role": "roles/compute.instanceAdmin",
188
+ "members": ["user:jane@example.com"],
189
+ }])
190
+ policy = gcp.compute.InstanceTemplateIamPolicy("policy",
191
+ project=default["project"],
192
+ name=default["name"],
193
+ policy_data=admin.policy_data)
194
+ ```
195
+
196
+ With IAM Conditions:
197
+
198
+ ```python
199
+ import pulumi
200
+ import pulumi_gcp as gcp
201
+
202
+ admin = gcp.organizations.get_iam_policy(bindings=[{
203
+ "role": "roles/compute.instanceAdmin",
204
+ "members": ["user:jane@example.com"],
205
+ "condition": {
206
+ "title": "expires_after_2019_12_31",
207
+ "description": "Expiring at midnight of 2019-12-31",
208
+ "expression": "request.time < timestamp(\\"2020-01-01T00:00:00Z\\")",
209
+ },
210
+ }])
211
+ policy = gcp.compute.InstanceTemplateIamPolicy("policy",
212
+ project=default["project"],
213
+ name=default["name"],
214
+ policy_data=admin.policy_data)
215
+ ```
216
+ ## compute.InstanceTemplateIamBinding
217
+
218
+ ```python
219
+ import pulumi
220
+ import pulumi_gcp as gcp
221
+
222
+ binding = gcp.compute.InstanceTemplateIamBinding("binding",
223
+ project=default["project"],
224
+ name=default["name"],
225
+ role="roles/compute.instanceAdmin",
226
+ members=["user:jane@example.com"])
227
+ ```
228
+
229
+ With IAM Conditions:
230
+
231
+ ```python
232
+ import pulumi
233
+ import pulumi_gcp as gcp
234
+
235
+ binding = gcp.compute.InstanceTemplateIamBinding("binding",
236
+ project=default["project"],
237
+ name=default["name"],
238
+ role="roles/compute.instanceAdmin",
239
+ members=["user:jane@example.com"],
240
+ condition={
241
+ "title": "expires_after_2019_12_31",
242
+ "description": "Expiring at midnight of 2019-12-31",
243
+ "expression": "request.time < timestamp(\\"2020-01-01T00:00:00Z\\")",
244
+ })
245
+ ```
246
+ ## compute.InstanceTemplateIamMember
247
+
248
+ ```python
249
+ import pulumi
250
+ import pulumi_gcp as gcp
251
+
252
+ member = gcp.compute.InstanceTemplateIamMember("member",
253
+ project=default["project"],
254
+ name=default["name"],
255
+ role="roles/compute.instanceAdmin",
256
+ member="user:jane@example.com")
257
+ ```
258
+
259
+ With IAM Conditions:
260
+
261
+ ```python
262
+ import pulumi
263
+ import pulumi_gcp as gcp
264
+
265
+ member = gcp.compute.InstanceTemplateIamMember("member",
266
+ project=default["project"],
267
+ name=default["name"],
268
+ role="roles/compute.instanceAdmin",
269
+ member="user:jane@example.com",
270
+ condition={
271
+ "title": "expires_after_2019_12_31",
272
+ "description": "Expiring at midnight of 2019-12-31",
273
+ "expression": "request.time < timestamp(\\"2020-01-01T00:00:00Z\\")",
274
+ })
275
+ ```
276
+
277
+ ## This resource supports User Project Overrides.
278
+
279
+ -
280
+
281
+ # IAM policy for Compute Engine InstanceTemplate
282
+ Three different resources help you manage your IAM policy for Compute Engine InstanceTemplate. Each of these resources serves a different use case:
283
+
284
+ * `compute.InstanceTemplateIamPolicy`: Authoritative. Sets the IAM policy for the instancetemplate and replaces any existing policy already attached.
285
+ * `compute.InstanceTemplateIamBinding`: 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 instancetemplate are preserved.
286
+ * `compute.InstanceTemplateIamMember`: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the instancetemplate are preserved.
287
+
288
+ A data source can be used to retrieve policy data in advent you do not need creation
289
+
290
+ * `compute.InstanceTemplateIamPolicy`: Retrieves the IAM policy for the instancetemplate
291
+
292
+ > **Note:** `compute.InstanceTemplateIamPolicy` **cannot** be used in conjunction with `compute.InstanceTemplateIamBinding` and `compute.InstanceTemplateIamMember` or they will fight over what your policy should be.
293
+
294
+ > **Note:** `compute.InstanceTemplateIamBinding` resources **can be** used in conjunction with `compute.InstanceTemplateIamMember` resources **only if** they do not grant privilege to the same role.
295
+
296
+ > **Note:** This resource supports IAM Conditions but they have some known limitations which can be found [here](https://cloud.google.com/iam/docs/conditions-overview#limitations). Please review this article if you are having issues with IAM Conditions.
297
+
298
+ ## compute.InstanceTemplateIamPolicy
299
+
300
+ ```python
301
+ import pulumi
302
+ import pulumi_gcp as gcp
303
+
304
+ admin = gcp.organizations.get_iam_policy(bindings=[{
305
+ "role": "roles/compute.instanceAdmin",
306
+ "members": ["user:jane@example.com"],
307
+ }])
308
+ policy = gcp.compute.InstanceTemplateIamPolicy("policy",
309
+ project=default["project"],
310
+ name=default["name"],
311
+ policy_data=admin.policy_data)
312
+ ```
313
+
314
+ With IAM Conditions:
315
+
316
+ ```python
317
+ import pulumi
318
+ import pulumi_gcp as gcp
319
+
320
+ admin = gcp.organizations.get_iam_policy(bindings=[{
321
+ "role": "roles/compute.instanceAdmin",
322
+ "members": ["user:jane@example.com"],
323
+ "condition": {
324
+ "title": "expires_after_2019_12_31",
325
+ "description": "Expiring at midnight of 2019-12-31",
326
+ "expression": "request.time < timestamp(\\"2020-01-01T00:00:00Z\\")",
327
+ },
328
+ }])
329
+ policy = gcp.compute.InstanceTemplateIamPolicy("policy",
330
+ project=default["project"],
331
+ name=default["name"],
332
+ policy_data=admin.policy_data)
333
+ ```
334
+ ## compute.InstanceTemplateIamBinding
335
+
336
+ ```python
337
+ import pulumi
338
+ import pulumi_gcp as gcp
339
+
340
+ binding = gcp.compute.InstanceTemplateIamBinding("binding",
341
+ project=default["project"],
342
+ name=default["name"],
343
+ role="roles/compute.instanceAdmin",
344
+ members=["user:jane@example.com"])
345
+ ```
346
+
347
+ With IAM Conditions:
348
+
349
+ ```python
350
+ import pulumi
351
+ import pulumi_gcp as gcp
352
+
353
+ binding = gcp.compute.InstanceTemplateIamBinding("binding",
354
+ project=default["project"],
355
+ name=default["name"],
356
+ role="roles/compute.instanceAdmin",
357
+ members=["user:jane@example.com"],
358
+ condition={
359
+ "title": "expires_after_2019_12_31",
360
+ "description": "Expiring at midnight of 2019-12-31",
361
+ "expression": "request.time < timestamp(\\"2020-01-01T00:00:00Z\\")",
362
+ })
363
+ ```
364
+ ## compute.InstanceTemplateIamMember
365
+
366
+ ```python
367
+ import pulumi
368
+ import pulumi_gcp as gcp
369
+
370
+ member = gcp.compute.InstanceTemplateIamMember("member",
371
+ project=default["project"],
372
+ name=default["name"],
373
+ role="roles/compute.instanceAdmin",
374
+ member="user:jane@example.com")
375
+ ```
376
+
377
+ With IAM Conditions:
378
+
379
+ ```python
380
+ import pulumi
381
+ import pulumi_gcp as gcp
382
+
383
+ member = gcp.compute.InstanceTemplateIamMember("member",
384
+ project=default["project"],
385
+ name=default["name"],
386
+ role="roles/compute.instanceAdmin",
387
+ member="user:jane@example.com",
388
+ condition={
389
+ "title": "expires_after_2019_12_31",
390
+ "description": "Expiring at midnight of 2019-12-31",
391
+ "expression": "request.time < timestamp(\\"2020-01-01T00:00:00Z\\")",
392
+ })
393
+ ```
394
+
395
+ ## Import
396
+
397
+ For all import syntaxes, the "resource in question" can take any of the following forms:
398
+
399
+ * projects/{{project}}/global/instanceTemplates/{{name}}
400
+
401
+ * {{project}}/{{name}}
402
+
403
+ * {{name}}
404
+
405
+ Any variables not passed in the import command will be taken from the provider configuration.
406
+
407
+ Compute Engine instancetemplate IAM resources can be imported using the resource identifiers, role, and member.
408
+
409
+ IAM member imports use space-delimited identifiers: the resource in question, the role, and the member identity, e.g.
410
+
411
+ ```sh
412
+ $ pulumi import gcp:compute/instanceTemplateIamPolicy:InstanceTemplateIamPolicy editor "projects/{{project}}/global/instanceTemplates/{{instance_template}} roles/compute.instanceAdmin user:jane@example.com"
413
+ ```
414
+
415
+ IAM binding imports use space-delimited identifiers: the resource in question and the role, e.g.
416
+
417
+ ```sh
418
+ $ pulumi import gcp:compute/instanceTemplateIamPolicy:InstanceTemplateIamPolicy editor "projects/{{project}}/global/instanceTemplates/{{instance_template}} roles/compute.instanceAdmin"
419
+ ```
420
+
421
+ IAM policy imports use the identifier of the resource in question, e.g.
422
+
423
+ ```sh
424
+ $ pulumi import gcp:compute/instanceTemplateIamPolicy:InstanceTemplateIamPolicy editor projects/{{project}}/global/instanceTemplates/{{instance_template}}
425
+ ```
426
+
427
+ -> **Custom Roles** If you're importing a IAM resource with a custom role, make sure to use the
428
+
429
+ full name of the custom role, e.g. `[projects/my-project|organizations/my-org]/roles/my-custom-role`.
430
+
431
+ :param str resource_name: The name of the resource.
432
+ :param pulumi.ResourceOptions opts: Options for the resource.
433
+ :param pulumi.Input[str] name: Used to find the parent resource to bind the IAM policy to
434
+ :param pulumi.Input[str] policy_data: The policy data generated by
435
+ a `organizations_get_iam_policy` data source.
436
+ :param pulumi.Input[str] project: The ID of the project in which the resource belongs.
437
+ 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.
438
+ """
439
+ ...
440
+ @overload
441
+ def __init__(__self__,
442
+ resource_name: str,
443
+ args: InstanceTemplateIamPolicyArgs,
444
+ opts: Optional[pulumi.ResourceOptions] = None):
445
+ """
446
+ Three different resources help you manage your IAM policy for Compute Engine InstanceTemplate. Each of these resources serves a different use case:
447
+
448
+ * `compute.InstanceTemplateIamPolicy`: Authoritative. Sets the IAM policy for the instancetemplate and replaces any existing policy already attached.
449
+ * `compute.InstanceTemplateIamBinding`: 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 instancetemplate are preserved.
450
+ * `compute.InstanceTemplateIamMember`: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the instancetemplate are preserved.
451
+
452
+ A data source can be used to retrieve policy data in advent you do not need creation
453
+
454
+ * `compute.InstanceTemplateIamPolicy`: Retrieves the IAM policy for the instancetemplate
455
+
456
+ > **Note:** `compute.InstanceTemplateIamPolicy` **cannot** be used in conjunction with `compute.InstanceTemplateIamBinding` and `compute.InstanceTemplateIamMember` or they will fight over what your policy should be.
457
+
458
+ > **Note:** `compute.InstanceTemplateIamBinding` resources **can be** used in conjunction with `compute.InstanceTemplateIamMember` resources **only if** they do not grant privilege to the same role.
459
+
460
+ > **Note:** This resource supports IAM Conditions but they have some known limitations which can be found [here](https://cloud.google.com/iam/docs/conditions-overview#limitations). Please review this article if you are having issues with IAM Conditions.
461
+
462
+ ## compute.InstanceTemplateIamPolicy
463
+
464
+ ```python
465
+ import pulumi
466
+ import pulumi_gcp as gcp
467
+
468
+ admin = gcp.organizations.get_iam_policy(bindings=[{
469
+ "role": "roles/compute.instanceAdmin",
470
+ "members": ["user:jane@example.com"],
471
+ }])
472
+ policy = gcp.compute.InstanceTemplateIamPolicy("policy",
473
+ project=default["project"],
474
+ name=default["name"],
475
+ policy_data=admin.policy_data)
476
+ ```
477
+
478
+ With IAM Conditions:
479
+
480
+ ```python
481
+ import pulumi
482
+ import pulumi_gcp as gcp
483
+
484
+ admin = gcp.organizations.get_iam_policy(bindings=[{
485
+ "role": "roles/compute.instanceAdmin",
486
+ "members": ["user:jane@example.com"],
487
+ "condition": {
488
+ "title": "expires_after_2019_12_31",
489
+ "description": "Expiring at midnight of 2019-12-31",
490
+ "expression": "request.time < timestamp(\\"2020-01-01T00:00:00Z\\")",
491
+ },
492
+ }])
493
+ policy = gcp.compute.InstanceTemplateIamPolicy("policy",
494
+ project=default["project"],
495
+ name=default["name"],
496
+ policy_data=admin.policy_data)
497
+ ```
498
+ ## compute.InstanceTemplateIamBinding
499
+
500
+ ```python
501
+ import pulumi
502
+ import pulumi_gcp as gcp
503
+
504
+ binding = gcp.compute.InstanceTemplateIamBinding("binding",
505
+ project=default["project"],
506
+ name=default["name"],
507
+ role="roles/compute.instanceAdmin",
508
+ members=["user:jane@example.com"])
509
+ ```
510
+
511
+ With IAM Conditions:
512
+
513
+ ```python
514
+ import pulumi
515
+ import pulumi_gcp as gcp
516
+
517
+ binding = gcp.compute.InstanceTemplateIamBinding("binding",
518
+ project=default["project"],
519
+ name=default["name"],
520
+ role="roles/compute.instanceAdmin",
521
+ members=["user:jane@example.com"],
522
+ condition={
523
+ "title": "expires_after_2019_12_31",
524
+ "description": "Expiring at midnight of 2019-12-31",
525
+ "expression": "request.time < timestamp(\\"2020-01-01T00:00:00Z\\")",
526
+ })
527
+ ```
528
+ ## compute.InstanceTemplateIamMember
529
+
530
+ ```python
531
+ import pulumi
532
+ import pulumi_gcp as gcp
533
+
534
+ member = gcp.compute.InstanceTemplateIamMember("member",
535
+ project=default["project"],
536
+ name=default["name"],
537
+ role="roles/compute.instanceAdmin",
538
+ member="user:jane@example.com")
539
+ ```
540
+
541
+ With IAM Conditions:
542
+
543
+ ```python
544
+ import pulumi
545
+ import pulumi_gcp as gcp
546
+
547
+ member = gcp.compute.InstanceTemplateIamMember("member",
548
+ project=default["project"],
549
+ name=default["name"],
550
+ role="roles/compute.instanceAdmin",
551
+ member="user:jane@example.com",
552
+ condition={
553
+ "title": "expires_after_2019_12_31",
554
+ "description": "Expiring at midnight of 2019-12-31",
555
+ "expression": "request.time < timestamp(\\"2020-01-01T00:00:00Z\\")",
556
+ })
557
+ ```
558
+
559
+ ## This resource supports User Project Overrides.
560
+
561
+ -
562
+
563
+ # IAM policy for Compute Engine InstanceTemplate
564
+ Three different resources help you manage your IAM policy for Compute Engine InstanceTemplate. Each of these resources serves a different use case:
565
+
566
+ * `compute.InstanceTemplateIamPolicy`: Authoritative. Sets the IAM policy for the instancetemplate and replaces any existing policy already attached.
567
+ * `compute.InstanceTemplateIamBinding`: 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 instancetemplate are preserved.
568
+ * `compute.InstanceTemplateIamMember`: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the instancetemplate are preserved.
569
+
570
+ A data source can be used to retrieve policy data in advent you do not need creation
571
+
572
+ * `compute.InstanceTemplateIamPolicy`: Retrieves the IAM policy for the instancetemplate
573
+
574
+ > **Note:** `compute.InstanceTemplateIamPolicy` **cannot** be used in conjunction with `compute.InstanceTemplateIamBinding` and `compute.InstanceTemplateIamMember` or they will fight over what your policy should be.
575
+
576
+ > **Note:** `compute.InstanceTemplateIamBinding` resources **can be** used in conjunction with `compute.InstanceTemplateIamMember` resources **only if** they do not grant privilege to the same role.
577
+
578
+ > **Note:** This resource supports IAM Conditions but they have some known limitations which can be found [here](https://cloud.google.com/iam/docs/conditions-overview#limitations). Please review this article if you are having issues with IAM Conditions.
579
+
580
+ ## compute.InstanceTemplateIamPolicy
581
+
582
+ ```python
583
+ import pulumi
584
+ import pulumi_gcp as gcp
585
+
586
+ admin = gcp.organizations.get_iam_policy(bindings=[{
587
+ "role": "roles/compute.instanceAdmin",
588
+ "members": ["user:jane@example.com"],
589
+ }])
590
+ policy = gcp.compute.InstanceTemplateIamPolicy("policy",
591
+ project=default["project"],
592
+ name=default["name"],
593
+ policy_data=admin.policy_data)
594
+ ```
595
+
596
+ With IAM Conditions:
597
+
598
+ ```python
599
+ import pulumi
600
+ import pulumi_gcp as gcp
601
+
602
+ admin = gcp.organizations.get_iam_policy(bindings=[{
603
+ "role": "roles/compute.instanceAdmin",
604
+ "members": ["user:jane@example.com"],
605
+ "condition": {
606
+ "title": "expires_after_2019_12_31",
607
+ "description": "Expiring at midnight of 2019-12-31",
608
+ "expression": "request.time < timestamp(\\"2020-01-01T00:00:00Z\\")",
609
+ },
610
+ }])
611
+ policy = gcp.compute.InstanceTemplateIamPolicy("policy",
612
+ project=default["project"],
613
+ name=default["name"],
614
+ policy_data=admin.policy_data)
615
+ ```
616
+ ## compute.InstanceTemplateIamBinding
617
+
618
+ ```python
619
+ import pulumi
620
+ import pulumi_gcp as gcp
621
+
622
+ binding = gcp.compute.InstanceTemplateIamBinding("binding",
623
+ project=default["project"],
624
+ name=default["name"],
625
+ role="roles/compute.instanceAdmin",
626
+ members=["user:jane@example.com"])
627
+ ```
628
+
629
+ With IAM Conditions:
630
+
631
+ ```python
632
+ import pulumi
633
+ import pulumi_gcp as gcp
634
+
635
+ binding = gcp.compute.InstanceTemplateIamBinding("binding",
636
+ project=default["project"],
637
+ name=default["name"],
638
+ role="roles/compute.instanceAdmin",
639
+ members=["user:jane@example.com"],
640
+ condition={
641
+ "title": "expires_after_2019_12_31",
642
+ "description": "Expiring at midnight of 2019-12-31",
643
+ "expression": "request.time < timestamp(\\"2020-01-01T00:00:00Z\\")",
644
+ })
645
+ ```
646
+ ## compute.InstanceTemplateIamMember
647
+
648
+ ```python
649
+ import pulumi
650
+ import pulumi_gcp as gcp
651
+
652
+ member = gcp.compute.InstanceTemplateIamMember("member",
653
+ project=default["project"],
654
+ name=default["name"],
655
+ role="roles/compute.instanceAdmin",
656
+ member="user:jane@example.com")
657
+ ```
658
+
659
+ With IAM Conditions:
660
+
661
+ ```python
662
+ import pulumi
663
+ import pulumi_gcp as gcp
664
+
665
+ member = gcp.compute.InstanceTemplateIamMember("member",
666
+ project=default["project"],
667
+ name=default["name"],
668
+ role="roles/compute.instanceAdmin",
669
+ member="user:jane@example.com",
670
+ condition={
671
+ "title": "expires_after_2019_12_31",
672
+ "description": "Expiring at midnight of 2019-12-31",
673
+ "expression": "request.time < timestamp(\\"2020-01-01T00:00:00Z\\")",
674
+ })
675
+ ```
676
+
677
+ ## Import
678
+
679
+ For all import syntaxes, the "resource in question" can take any of the following forms:
680
+
681
+ * projects/{{project}}/global/instanceTemplates/{{name}}
682
+
683
+ * {{project}}/{{name}}
684
+
685
+ * {{name}}
686
+
687
+ Any variables not passed in the import command will be taken from the provider configuration.
688
+
689
+ Compute Engine instancetemplate IAM resources can be imported using the resource identifiers, role, and member.
690
+
691
+ IAM member imports use space-delimited identifiers: the resource in question, the role, and the member identity, e.g.
692
+
693
+ ```sh
694
+ $ pulumi import gcp:compute/instanceTemplateIamPolicy:InstanceTemplateIamPolicy editor "projects/{{project}}/global/instanceTemplates/{{instance_template}} roles/compute.instanceAdmin user:jane@example.com"
695
+ ```
696
+
697
+ IAM binding imports use space-delimited identifiers: the resource in question and the role, e.g.
698
+
699
+ ```sh
700
+ $ pulumi import gcp:compute/instanceTemplateIamPolicy:InstanceTemplateIamPolicy editor "projects/{{project}}/global/instanceTemplates/{{instance_template}} roles/compute.instanceAdmin"
701
+ ```
702
+
703
+ IAM policy imports use the identifier of the resource in question, e.g.
704
+
705
+ ```sh
706
+ $ pulumi import gcp:compute/instanceTemplateIamPolicy:InstanceTemplateIamPolicy editor projects/{{project}}/global/instanceTemplates/{{instance_template}}
707
+ ```
708
+
709
+ -> **Custom Roles** If you're importing a IAM resource with a custom role, make sure to use the
710
+
711
+ full name of the custom role, e.g. `[projects/my-project|organizations/my-org]/roles/my-custom-role`.
712
+
713
+ :param str resource_name: The name of the resource.
714
+ :param InstanceTemplateIamPolicyArgs args: The arguments to use to populate this resource's properties.
715
+ :param pulumi.ResourceOptions opts: Options for the resource.
716
+ """
717
+ ...
718
+ def __init__(__self__, resource_name: str, *args, **kwargs):
719
+ resource_args, opts = _utilities.get_resource_args_opts(InstanceTemplateIamPolicyArgs, pulumi.ResourceOptions, *args, **kwargs)
720
+ if resource_args is not None:
721
+ __self__._internal_init(resource_name, opts, **resource_args.__dict__)
722
+ else:
723
+ __self__._internal_init(resource_name, *args, **kwargs)
724
+
725
+ def _internal_init(__self__,
726
+ resource_name: str,
727
+ opts: Optional[pulumi.ResourceOptions] = None,
728
+ name: Optional[pulumi.Input[str]] = None,
729
+ policy_data: Optional[pulumi.Input[str]] = None,
730
+ project: Optional[pulumi.Input[str]] = None,
731
+ __props__=None):
732
+ opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
733
+ if not isinstance(opts, pulumi.ResourceOptions):
734
+ raise TypeError('Expected resource options to be a ResourceOptions instance')
735
+ if opts.id is None:
736
+ if __props__ is not None:
737
+ raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
738
+ __props__ = InstanceTemplateIamPolicyArgs.__new__(InstanceTemplateIamPolicyArgs)
739
+
740
+ __props__.__dict__["name"] = name
741
+ if policy_data is None and not opts.urn:
742
+ raise TypeError("Missing required property 'policy_data'")
743
+ __props__.__dict__["policy_data"] = policy_data
744
+ __props__.__dict__["project"] = project
745
+ __props__.__dict__["etag"] = None
746
+ super(InstanceTemplateIamPolicy, __self__).__init__(
747
+ 'gcp:compute/instanceTemplateIamPolicy:InstanceTemplateIamPolicy',
748
+ resource_name,
749
+ __props__,
750
+ opts)
751
+
752
+ @staticmethod
753
+ def get(resource_name: str,
754
+ id: pulumi.Input[str],
755
+ opts: Optional[pulumi.ResourceOptions] = None,
756
+ etag: Optional[pulumi.Input[str]] = None,
757
+ name: Optional[pulumi.Input[str]] = None,
758
+ policy_data: Optional[pulumi.Input[str]] = None,
759
+ project: Optional[pulumi.Input[str]] = None) -> 'InstanceTemplateIamPolicy':
760
+ """
761
+ Get an existing InstanceTemplateIamPolicy resource's state with the given name, id, and optional extra
762
+ properties used to qualify the lookup.
763
+
764
+ :param str resource_name: The unique name of the resulting resource.
765
+ :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
766
+ :param pulumi.ResourceOptions opts: Options for the resource.
767
+ :param pulumi.Input[str] etag: (Computed) The etag of the IAM policy.
768
+ :param pulumi.Input[str] name: Used to find the parent resource to bind the IAM policy to
769
+ :param pulumi.Input[str] policy_data: The policy data generated by
770
+ a `organizations_get_iam_policy` data source.
771
+ :param pulumi.Input[str] project: The ID of the project in which the resource belongs.
772
+ 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.
773
+ """
774
+ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
775
+
776
+ __props__ = _InstanceTemplateIamPolicyState.__new__(_InstanceTemplateIamPolicyState)
777
+
778
+ __props__.__dict__["etag"] = etag
779
+ __props__.__dict__["name"] = name
780
+ __props__.__dict__["policy_data"] = policy_data
781
+ __props__.__dict__["project"] = project
782
+ return InstanceTemplateIamPolicy(resource_name, opts=opts, __props__=__props__)
783
+
784
+ @property
785
+ @pulumi.getter
786
+ def etag(self) -> pulumi.Output[str]:
787
+ """
788
+ (Computed) The etag of the IAM policy.
789
+ """
790
+ return pulumi.get(self, "etag")
791
+
792
+ @property
793
+ @pulumi.getter
794
+ def name(self) -> pulumi.Output[str]:
795
+ """
796
+ Used to find the parent resource to bind the IAM policy to
797
+ """
798
+ return pulumi.get(self, "name")
799
+
800
+ @property
801
+ @pulumi.getter(name="policyData")
802
+ def policy_data(self) -> pulumi.Output[str]:
803
+ """
804
+ The policy data generated by
805
+ a `organizations_get_iam_policy` data source.
806
+ """
807
+ return pulumi.get(self, "policy_data")
808
+
809
+ @property
810
+ @pulumi.getter
811
+ def project(self) -> pulumi.Output[str]:
812
+ """
813
+ The ID of the project in which the resource belongs.
814
+ 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.
815
+ """
816
+ return pulumi.get(self, "project")
817
+