pulumi-gcp 8.1.0a1726492828__py3-none-any.whl → 8.2.0__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 (43) hide show
  1. pulumi_gcp/__init__.py +38 -0
  2. pulumi_gcp/bigquery/__init__.py +1 -0
  3. pulumi_gcp/bigquery/get_tables.py +143 -0
  4. pulumi_gcp/bigquery/outputs.py +30 -0
  5. pulumi_gcp/compute/__init__.py +1 -0
  6. pulumi_gcp/compute/_inputs.py +2208 -285
  7. pulumi_gcp/compute/get_instance.py +3 -0
  8. pulumi_gcp/compute/network_firewall_policy_with_rules.py +826 -0
  9. pulumi_gcp/compute/outputs.py +1383 -0
  10. pulumi_gcp/compute/region_target_http_proxy.py +159 -0
  11. pulumi_gcp/compute/region_target_https_proxy.py +175 -0
  12. pulumi_gcp/compute/service_attachment.py +75 -0
  13. pulumi_gcp/compute/target_http_proxy.py +49 -28
  14. pulumi_gcp/compute/target_https_proxy.py +49 -28
  15. pulumi_gcp/config/__init__.pyi +4 -0
  16. pulumi_gcp/config/vars.py +8 -0
  17. pulumi_gcp/container/_inputs.py +96 -0
  18. pulumi_gcp/container/attached_cluster.py +54 -1
  19. pulumi_gcp/container/outputs.py +102 -0
  20. pulumi_gcp/dataproc/metastore_federation.py +8 -8
  21. pulumi_gcp/dataproc/metastore_service.py +2 -0
  22. pulumi_gcp/datastream/stream.py +21 -14
  23. pulumi_gcp/developerconnect/__init__.py +11 -0
  24. pulumi_gcp/developerconnect/_inputs.py +301 -0
  25. pulumi_gcp/developerconnect/connection.py +1034 -0
  26. pulumi_gcp/developerconnect/git_repository_link.py +873 -0
  27. pulumi_gcp/developerconnect/outputs.py +247 -0
  28. pulumi_gcp/gkeonprem/_inputs.py +3 -3
  29. pulumi_gcp/gkeonprem/outputs.py +2 -2
  30. pulumi_gcp/memorystore/__init__.py +10 -0
  31. pulumi_gcp/memorystore/_inputs.py +731 -0
  32. pulumi_gcp/memorystore/instance.py +1663 -0
  33. pulumi_gcp/memorystore/outputs.py +598 -0
  34. pulumi_gcp/netapp/volume.py +101 -0
  35. pulumi_gcp/organizations/folder.py +52 -33
  36. pulumi_gcp/provider.py +40 -0
  37. pulumi_gcp/pulumi-plugin.json +1 -1
  38. pulumi_gcp/securitycenter/v2_project_mute_config.py +2 -2
  39. pulumi_gcp/vpcaccess/connector.py +21 -28
  40. {pulumi_gcp-8.1.0a1726492828.dist-info → pulumi_gcp-8.2.0.dist-info}/METADATA +1 -1
  41. {pulumi_gcp-8.1.0a1726492828.dist-info → pulumi_gcp-8.2.0.dist-info}/RECORD +43 -32
  42. {pulumi_gcp-8.1.0a1726492828.dist-info → pulumi_gcp-8.2.0.dist-info}/WHEEL +0 -0
  43. {pulumi_gcp-8.1.0a1726492828.dist-info → pulumi_gcp-8.2.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,826 @@
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
+ from . import outputs
17
+ from ._inputs import *
18
+
19
+ __all__ = ['NetworkFirewallPolicyWithRulesArgs', 'NetworkFirewallPolicyWithRules']
20
+
21
+ @pulumi.input_type
22
+ class NetworkFirewallPolicyWithRulesArgs:
23
+ def __init__(__self__, *,
24
+ rules: pulumi.Input[Sequence[pulumi.Input['NetworkFirewallPolicyWithRulesRuleArgs']]],
25
+ description: Optional[pulumi.Input[str]] = None,
26
+ name: Optional[pulumi.Input[str]] = None,
27
+ project: Optional[pulumi.Input[str]] = None):
28
+ """
29
+ The set of arguments for constructing a NetworkFirewallPolicyWithRules resource.
30
+ :param pulumi.Input[Sequence[pulumi.Input['NetworkFirewallPolicyWithRulesRuleArgs']]] rules: A list of firewall policy rules.
31
+ Structure is documented below.
32
+ :param pulumi.Input[str] description: (Output)
33
+ A description of the rule.
34
+ :param pulumi.Input[str] name: User-provided name of the Network firewall policy.
35
+ The name should be unique in the project in which the firewall policy is created.
36
+ The name must be 1-63 characters long, and comply with RFC1035. Specifically,
37
+ the name must be 1-63 characters long and match the regular expression a-z?
38
+ which means the first character must be a lowercase letter, and all following characters must be a dash,
39
+ lowercase letter, or digit, except the last character, which cannot be a dash.
40
+ """
41
+ pulumi.set(__self__, "rules", rules)
42
+ if description is not None:
43
+ pulumi.set(__self__, "description", description)
44
+ if name is not None:
45
+ pulumi.set(__self__, "name", name)
46
+ if project is not None:
47
+ pulumi.set(__self__, "project", project)
48
+
49
+ @property
50
+ @pulumi.getter
51
+ def rules(self) -> pulumi.Input[Sequence[pulumi.Input['NetworkFirewallPolicyWithRulesRuleArgs']]]:
52
+ """
53
+ A list of firewall policy rules.
54
+ Structure is documented below.
55
+ """
56
+ return pulumi.get(self, "rules")
57
+
58
+ @rules.setter
59
+ def rules(self, value: pulumi.Input[Sequence[pulumi.Input['NetworkFirewallPolicyWithRulesRuleArgs']]]):
60
+ pulumi.set(self, "rules", value)
61
+
62
+ @property
63
+ @pulumi.getter
64
+ def description(self) -> Optional[pulumi.Input[str]]:
65
+ """
66
+ (Output)
67
+ A description of the rule.
68
+ """
69
+ return pulumi.get(self, "description")
70
+
71
+ @description.setter
72
+ def description(self, value: Optional[pulumi.Input[str]]):
73
+ pulumi.set(self, "description", value)
74
+
75
+ @property
76
+ @pulumi.getter
77
+ def name(self) -> Optional[pulumi.Input[str]]:
78
+ """
79
+ User-provided name of the Network firewall policy.
80
+ The name should be unique in the project in which the firewall policy is created.
81
+ The name must be 1-63 characters long, and comply with RFC1035. Specifically,
82
+ the name must be 1-63 characters long and match the regular expression a-z?
83
+ which means the first character must be a lowercase letter, and all following characters must be a dash,
84
+ lowercase letter, or digit, except the last character, which cannot be a dash.
85
+ """
86
+ return pulumi.get(self, "name")
87
+
88
+ @name.setter
89
+ def name(self, value: Optional[pulumi.Input[str]]):
90
+ pulumi.set(self, "name", value)
91
+
92
+ @property
93
+ @pulumi.getter
94
+ def project(self) -> Optional[pulumi.Input[str]]:
95
+ return pulumi.get(self, "project")
96
+
97
+ @project.setter
98
+ def project(self, value: Optional[pulumi.Input[str]]):
99
+ pulumi.set(self, "project", value)
100
+
101
+
102
+ @pulumi.input_type
103
+ class _NetworkFirewallPolicyWithRulesState:
104
+ def __init__(__self__, *,
105
+ creation_timestamp: Optional[pulumi.Input[str]] = None,
106
+ description: Optional[pulumi.Input[str]] = None,
107
+ fingerprint: Optional[pulumi.Input[str]] = None,
108
+ name: Optional[pulumi.Input[str]] = None,
109
+ network_firewall_policy_id: Optional[pulumi.Input[str]] = None,
110
+ predefined_rules: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkFirewallPolicyWithRulesPredefinedRuleArgs']]]] = None,
111
+ project: Optional[pulumi.Input[str]] = None,
112
+ rule_tuple_count: Optional[pulumi.Input[int]] = None,
113
+ rules: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkFirewallPolicyWithRulesRuleArgs']]]] = None,
114
+ self_link: Optional[pulumi.Input[str]] = None,
115
+ self_link_with_id: Optional[pulumi.Input[str]] = None):
116
+ """
117
+ Input properties used for looking up and filtering NetworkFirewallPolicyWithRules resources.
118
+ :param pulumi.Input[str] creation_timestamp: Creation timestamp in RFC3339 text format.
119
+ :param pulumi.Input[str] description: (Output)
120
+ A description of the rule.
121
+ :param pulumi.Input[str] fingerprint: Fingerprint of the resource. This field is used internally during updates of this resource.
122
+ :param pulumi.Input[str] name: User-provided name of the Network firewall policy.
123
+ The name should be unique in the project in which the firewall policy is created.
124
+ The name must be 1-63 characters long, and comply with RFC1035. Specifically,
125
+ the name must be 1-63 characters long and match the regular expression a-z?
126
+ which means the first character must be a lowercase letter, and all following characters must be a dash,
127
+ lowercase letter, or digit, except the last character, which cannot be a dash.
128
+ :param pulumi.Input[str] network_firewall_policy_id: The unique identifier for the resource. This identifier is defined by the server.
129
+ :param pulumi.Input[Sequence[pulumi.Input['NetworkFirewallPolicyWithRulesPredefinedRuleArgs']]] predefined_rules: A list of firewall policy pre-defined rules.
130
+ Structure is documented below.
131
+ :param pulumi.Input[int] rule_tuple_count: Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
132
+ :param pulumi.Input[Sequence[pulumi.Input['NetworkFirewallPolicyWithRulesRuleArgs']]] rules: A list of firewall policy rules.
133
+ Structure is documented below.
134
+ :param pulumi.Input[str] self_link: Server-defined URL for the resource.
135
+ :param pulumi.Input[str] self_link_with_id: Server-defined URL for this resource with the resource id.
136
+ """
137
+ if creation_timestamp is not None:
138
+ pulumi.set(__self__, "creation_timestamp", creation_timestamp)
139
+ if description is not None:
140
+ pulumi.set(__self__, "description", description)
141
+ if fingerprint is not None:
142
+ pulumi.set(__self__, "fingerprint", fingerprint)
143
+ if name is not None:
144
+ pulumi.set(__self__, "name", name)
145
+ if network_firewall_policy_id is not None:
146
+ pulumi.set(__self__, "network_firewall_policy_id", network_firewall_policy_id)
147
+ if predefined_rules is not None:
148
+ pulumi.set(__self__, "predefined_rules", predefined_rules)
149
+ if project is not None:
150
+ pulumi.set(__self__, "project", project)
151
+ if rule_tuple_count is not None:
152
+ pulumi.set(__self__, "rule_tuple_count", rule_tuple_count)
153
+ if rules is not None:
154
+ pulumi.set(__self__, "rules", rules)
155
+ if self_link is not None:
156
+ pulumi.set(__self__, "self_link", self_link)
157
+ if self_link_with_id is not None:
158
+ pulumi.set(__self__, "self_link_with_id", self_link_with_id)
159
+
160
+ @property
161
+ @pulumi.getter(name="creationTimestamp")
162
+ def creation_timestamp(self) -> Optional[pulumi.Input[str]]:
163
+ """
164
+ Creation timestamp in RFC3339 text format.
165
+ """
166
+ return pulumi.get(self, "creation_timestamp")
167
+
168
+ @creation_timestamp.setter
169
+ def creation_timestamp(self, value: Optional[pulumi.Input[str]]):
170
+ pulumi.set(self, "creation_timestamp", value)
171
+
172
+ @property
173
+ @pulumi.getter
174
+ def description(self) -> Optional[pulumi.Input[str]]:
175
+ """
176
+ (Output)
177
+ A description of the rule.
178
+ """
179
+ return pulumi.get(self, "description")
180
+
181
+ @description.setter
182
+ def description(self, value: Optional[pulumi.Input[str]]):
183
+ pulumi.set(self, "description", value)
184
+
185
+ @property
186
+ @pulumi.getter
187
+ def fingerprint(self) -> Optional[pulumi.Input[str]]:
188
+ """
189
+ Fingerprint of the resource. This field is used internally during updates of this resource.
190
+ """
191
+ return pulumi.get(self, "fingerprint")
192
+
193
+ @fingerprint.setter
194
+ def fingerprint(self, value: Optional[pulumi.Input[str]]):
195
+ pulumi.set(self, "fingerprint", value)
196
+
197
+ @property
198
+ @pulumi.getter
199
+ def name(self) -> Optional[pulumi.Input[str]]:
200
+ """
201
+ User-provided name of the Network firewall policy.
202
+ The name should be unique in the project in which the firewall policy is created.
203
+ The name must be 1-63 characters long, and comply with RFC1035. Specifically,
204
+ the name must be 1-63 characters long and match the regular expression a-z?
205
+ which means the first character must be a lowercase letter, and all following characters must be a dash,
206
+ lowercase letter, or digit, except the last character, which cannot be a dash.
207
+ """
208
+ return pulumi.get(self, "name")
209
+
210
+ @name.setter
211
+ def name(self, value: Optional[pulumi.Input[str]]):
212
+ pulumi.set(self, "name", value)
213
+
214
+ @property
215
+ @pulumi.getter(name="networkFirewallPolicyId")
216
+ def network_firewall_policy_id(self) -> Optional[pulumi.Input[str]]:
217
+ """
218
+ The unique identifier for the resource. This identifier is defined by the server.
219
+ """
220
+ return pulumi.get(self, "network_firewall_policy_id")
221
+
222
+ @network_firewall_policy_id.setter
223
+ def network_firewall_policy_id(self, value: Optional[pulumi.Input[str]]):
224
+ pulumi.set(self, "network_firewall_policy_id", value)
225
+
226
+ @property
227
+ @pulumi.getter(name="predefinedRules")
228
+ def predefined_rules(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['NetworkFirewallPolicyWithRulesPredefinedRuleArgs']]]]:
229
+ """
230
+ A list of firewall policy pre-defined rules.
231
+ Structure is documented below.
232
+ """
233
+ return pulumi.get(self, "predefined_rules")
234
+
235
+ @predefined_rules.setter
236
+ def predefined_rules(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkFirewallPolicyWithRulesPredefinedRuleArgs']]]]):
237
+ pulumi.set(self, "predefined_rules", value)
238
+
239
+ @property
240
+ @pulumi.getter
241
+ def project(self) -> Optional[pulumi.Input[str]]:
242
+ return pulumi.get(self, "project")
243
+
244
+ @project.setter
245
+ def project(self, value: Optional[pulumi.Input[str]]):
246
+ pulumi.set(self, "project", value)
247
+
248
+ @property
249
+ @pulumi.getter(name="ruleTupleCount")
250
+ def rule_tuple_count(self) -> Optional[pulumi.Input[int]]:
251
+ """
252
+ Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
253
+ """
254
+ return pulumi.get(self, "rule_tuple_count")
255
+
256
+ @rule_tuple_count.setter
257
+ def rule_tuple_count(self, value: Optional[pulumi.Input[int]]):
258
+ pulumi.set(self, "rule_tuple_count", value)
259
+
260
+ @property
261
+ @pulumi.getter
262
+ def rules(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['NetworkFirewallPolicyWithRulesRuleArgs']]]]:
263
+ """
264
+ A list of firewall policy rules.
265
+ Structure is documented below.
266
+ """
267
+ return pulumi.get(self, "rules")
268
+
269
+ @rules.setter
270
+ def rules(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['NetworkFirewallPolicyWithRulesRuleArgs']]]]):
271
+ pulumi.set(self, "rules", value)
272
+
273
+ @property
274
+ @pulumi.getter(name="selfLink")
275
+ def self_link(self) -> Optional[pulumi.Input[str]]:
276
+ """
277
+ Server-defined URL for the resource.
278
+ """
279
+ return pulumi.get(self, "self_link")
280
+
281
+ @self_link.setter
282
+ def self_link(self, value: Optional[pulumi.Input[str]]):
283
+ pulumi.set(self, "self_link", value)
284
+
285
+ @property
286
+ @pulumi.getter(name="selfLinkWithId")
287
+ def self_link_with_id(self) -> Optional[pulumi.Input[str]]:
288
+ """
289
+ Server-defined URL for this resource with the resource id.
290
+ """
291
+ return pulumi.get(self, "self_link_with_id")
292
+
293
+ @self_link_with_id.setter
294
+ def self_link_with_id(self, value: Optional[pulumi.Input[str]]):
295
+ pulumi.set(self, "self_link_with_id", value)
296
+
297
+
298
+ class NetworkFirewallPolicyWithRules(pulumi.CustomResource):
299
+ @overload
300
+ def __init__(__self__,
301
+ resource_name: str,
302
+ opts: Optional[pulumi.ResourceOptions] = None,
303
+ description: Optional[pulumi.Input[str]] = None,
304
+ name: Optional[pulumi.Input[str]] = None,
305
+ project: Optional[pulumi.Input[str]] = None,
306
+ rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NetworkFirewallPolicyWithRulesRuleArgs', 'NetworkFirewallPolicyWithRulesRuleArgsDict']]]]] = None,
307
+ __props__=None):
308
+ """
309
+ ## Example Usage
310
+
311
+ ### Compute Network Firewall Policy With Rules Full
312
+
313
+ ```python
314
+ import pulumi
315
+ import pulumi_gcp as gcp
316
+
317
+ project = gcp.organizations.get_project()
318
+ address_group1 = gcp.networksecurity.AddressGroup("address_group_1",
319
+ name="tf-address-group",
320
+ parent=f"projects/{project.name}",
321
+ description="Global address group",
322
+ location="global",
323
+ items=["208.80.154.224/32"],
324
+ type="IPV4",
325
+ capacity=100)
326
+ secure_tag_key1 = gcp.tags.TagKey("secure_tag_key_1",
327
+ description="Tag key",
328
+ parent=f"projects/{project.name}",
329
+ purpose="GCE_FIREWALL",
330
+ short_name="tf-tag-key",
331
+ purpose_data={
332
+ "network": f"{project.name}/default",
333
+ })
334
+ secure_tag_value1 = gcp.tags.TagValue("secure_tag_value_1",
335
+ description="Tag value",
336
+ parent=secure_tag_key1.name.apply(lambda name: f"tagKeys/{name}"),
337
+ short_name="tf-tag-value")
338
+ security_profile1 = gcp.networksecurity.SecurityProfile("security_profile_1",
339
+ name="tf-security-profile",
340
+ type="THREAT_PREVENTION",
341
+ parent="organizations/123456789",
342
+ location="global")
343
+ security_profile_group1 = gcp.networksecurity.SecurityProfileGroup("security_profile_group_1",
344
+ name="tf-security-profile-group",
345
+ parent="organizations/123456789",
346
+ description="my description",
347
+ threat_prevention_profile=security_profile1.id)
348
+ network_firewall_policy_with_rules = gcp.compute.NetworkFirewallPolicyWithRules("network-firewall-policy-with-rules",
349
+ name="tf-fw-policy-with-rules",
350
+ description="Terraform test",
351
+ rules=[
352
+ {
353
+ "description": "tcp rule",
354
+ "priority": 1000,
355
+ "enable_logging": True,
356
+ "action": "allow",
357
+ "direction": "EGRESS",
358
+ "match": {
359
+ "layer4_configs": [{
360
+ "ip_protocol": "tcp",
361
+ "ports": [
362
+ "8080",
363
+ "7070",
364
+ ],
365
+ }],
366
+ "dest_ip_ranges": ["11.100.0.1/32"],
367
+ "dest_fqdns": [
368
+ "www.yyy.com",
369
+ "www.zzz.com",
370
+ ],
371
+ "dest_region_codes": [
372
+ "HK",
373
+ "IN",
374
+ ],
375
+ "dest_threat_intelligences": [
376
+ "iplist-search-engines-crawlers",
377
+ "iplist-tor-exit-nodes",
378
+ ],
379
+ "dest_address_groups": [address_group1.id],
380
+ },
381
+ "target_secure_tags": [{
382
+ "name": secure_tag_value1.name.apply(lambda name: f"tagValues/{name}"),
383
+ }],
384
+ },
385
+ {
386
+ "description": "udp rule",
387
+ "priority": 2000,
388
+ "enable_logging": False,
389
+ "action": "deny",
390
+ "direction": "INGRESS",
391
+ "match": {
392
+ "layer4_configs": [{
393
+ "ip_protocol": "udp",
394
+ }],
395
+ "src_ip_ranges": ["0.0.0.0/0"],
396
+ "src_fqdns": [
397
+ "www.abc.com",
398
+ "www.def.com",
399
+ ],
400
+ "src_region_codes": [
401
+ "US",
402
+ "CA",
403
+ ],
404
+ "src_threat_intelligences": [
405
+ "iplist-known-malicious-ips",
406
+ "iplist-public-clouds",
407
+ ],
408
+ "src_address_groups": [address_group1.id],
409
+ "src_secure_tags": [{
410
+ "name": secure_tag_value1.name.apply(lambda name: f"tagValues/{name}"),
411
+ }],
412
+ },
413
+ "disabled": True,
414
+ },
415
+ {
416
+ "description": "security profile group rule",
417
+ "rule_name": "tcp rule",
418
+ "priority": 3000,
419
+ "enable_logging": False,
420
+ "action": "apply_security_profile_group",
421
+ "direction": "INGRESS",
422
+ "match": {
423
+ "layer4_configs": [{
424
+ "ip_protocol": "tcp",
425
+ }],
426
+ "src_ip_ranges": ["0.0.0.0/0"],
427
+ },
428
+ "target_service_accounts": ["test@google.com"],
429
+ "security_profile_group": security_profile_group1.id.apply(lambda id: f"//networksecurity.googleapis.com/{id}"),
430
+ "tls_inspect": True,
431
+ },
432
+ ])
433
+ ```
434
+
435
+ ## Import
436
+
437
+ NetworkFirewallPolicyWithRules can be imported using any of these accepted formats:
438
+
439
+ * `projects/{{project}}/global/firewallPolicies/{{name}}`
440
+
441
+ * `{{project}}/{{name}}`
442
+
443
+ * `{{name}}`
444
+
445
+ When using the `pulumi import` command, NetworkFirewallPolicyWithRules can be imported using one of the formats above. For example:
446
+
447
+ ```sh
448
+ $ pulumi import gcp:compute/networkFirewallPolicyWithRules:NetworkFirewallPolicyWithRules default projects/{{project}}/global/firewallPolicies/{{name}}
449
+ ```
450
+
451
+ ```sh
452
+ $ pulumi import gcp:compute/networkFirewallPolicyWithRules:NetworkFirewallPolicyWithRules default {{project}}/{{name}}
453
+ ```
454
+
455
+ ```sh
456
+ $ pulumi import gcp:compute/networkFirewallPolicyWithRules:NetworkFirewallPolicyWithRules default {{name}}
457
+ ```
458
+
459
+ :param str resource_name: The name of the resource.
460
+ :param pulumi.ResourceOptions opts: Options for the resource.
461
+ :param pulumi.Input[str] description: (Output)
462
+ A description of the rule.
463
+ :param pulumi.Input[str] name: User-provided name of the Network firewall policy.
464
+ The name should be unique in the project in which the firewall policy is created.
465
+ The name must be 1-63 characters long, and comply with RFC1035. Specifically,
466
+ the name must be 1-63 characters long and match the regular expression a-z?
467
+ which means the first character must be a lowercase letter, and all following characters must be a dash,
468
+ lowercase letter, or digit, except the last character, which cannot be a dash.
469
+ :param pulumi.Input[Sequence[pulumi.Input[Union['NetworkFirewallPolicyWithRulesRuleArgs', 'NetworkFirewallPolicyWithRulesRuleArgsDict']]]] rules: A list of firewall policy rules.
470
+ Structure is documented below.
471
+ """
472
+ ...
473
+ @overload
474
+ def __init__(__self__,
475
+ resource_name: str,
476
+ args: NetworkFirewallPolicyWithRulesArgs,
477
+ opts: Optional[pulumi.ResourceOptions] = None):
478
+ """
479
+ ## Example Usage
480
+
481
+ ### Compute Network Firewall Policy With Rules Full
482
+
483
+ ```python
484
+ import pulumi
485
+ import pulumi_gcp as gcp
486
+
487
+ project = gcp.organizations.get_project()
488
+ address_group1 = gcp.networksecurity.AddressGroup("address_group_1",
489
+ name="tf-address-group",
490
+ parent=f"projects/{project.name}",
491
+ description="Global address group",
492
+ location="global",
493
+ items=["208.80.154.224/32"],
494
+ type="IPV4",
495
+ capacity=100)
496
+ secure_tag_key1 = gcp.tags.TagKey("secure_tag_key_1",
497
+ description="Tag key",
498
+ parent=f"projects/{project.name}",
499
+ purpose="GCE_FIREWALL",
500
+ short_name="tf-tag-key",
501
+ purpose_data={
502
+ "network": f"{project.name}/default",
503
+ })
504
+ secure_tag_value1 = gcp.tags.TagValue("secure_tag_value_1",
505
+ description="Tag value",
506
+ parent=secure_tag_key1.name.apply(lambda name: f"tagKeys/{name}"),
507
+ short_name="tf-tag-value")
508
+ security_profile1 = gcp.networksecurity.SecurityProfile("security_profile_1",
509
+ name="tf-security-profile",
510
+ type="THREAT_PREVENTION",
511
+ parent="organizations/123456789",
512
+ location="global")
513
+ security_profile_group1 = gcp.networksecurity.SecurityProfileGroup("security_profile_group_1",
514
+ name="tf-security-profile-group",
515
+ parent="organizations/123456789",
516
+ description="my description",
517
+ threat_prevention_profile=security_profile1.id)
518
+ network_firewall_policy_with_rules = gcp.compute.NetworkFirewallPolicyWithRules("network-firewall-policy-with-rules",
519
+ name="tf-fw-policy-with-rules",
520
+ description="Terraform test",
521
+ rules=[
522
+ {
523
+ "description": "tcp rule",
524
+ "priority": 1000,
525
+ "enable_logging": True,
526
+ "action": "allow",
527
+ "direction": "EGRESS",
528
+ "match": {
529
+ "layer4_configs": [{
530
+ "ip_protocol": "tcp",
531
+ "ports": [
532
+ "8080",
533
+ "7070",
534
+ ],
535
+ }],
536
+ "dest_ip_ranges": ["11.100.0.1/32"],
537
+ "dest_fqdns": [
538
+ "www.yyy.com",
539
+ "www.zzz.com",
540
+ ],
541
+ "dest_region_codes": [
542
+ "HK",
543
+ "IN",
544
+ ],
545
+ "dest_threat_intelligences": [
546
+ "iplist-search-engines-crawlers",
547
+ "iplist-tor-exit-nodes",
548
+ ],
549
+ "dest_address_groups": [address_group1.id],
550
+ },
551
+ "target_secure_tags": [{
552
+ "name": secure_tag_value1.name.apply(lambda name: f"tagValues/{name}"),
553
+ }],
554
+ },
555
+ {
556
+ "description": "udp rule",
557
+ "priority": 2000,
558
+ "enable_logging": False,
559
+ "action": "deny",
560
+ "direction": "INGRESS",
561
+ "match": {
562
+ "layer4_configs": [{
563
+ "ip_protocol": "udp",
564
+ }],
565
+ "src_ip_ranges": ["0.0.0.0/0"],
566
+ "src_fqdns": [
567
+ "www.abc.com",
568
+ "www.def.com",
569
+ ],
570
+ "src_region_codes": [
571
+ "US",
572
+ "CA",
573
+ ],
574
+ "src_threat_intelligences": [
575
+ "iplist-known-malicious-ips",
576
+ "iplist-public-clouds",
577
+ ],
578
+ "src_address_groups": [address_group1.id],
579
+ "src_secure_tags": [{
580
+ "name": secure_tag_value1.name.apply(lambda name: f"tagValues/{name}"),
581
+ }],
582
+ },
583
+ "disabled": True,
584
+ },
585
+ {
586
+ "description": "security profile group rule",
587
+ "rule_name": "tcp rule",
588
+ "priority": 3000,
589
+ "enable_logging": False,
590
+ "action": "apply_security_profile_group",
591
+ "direction": "INGRESS",
592
+ "match": {
593
+ "layer4_configs": [{
594
+ "ip_protocol": "tcp",
595
+ }],
596
+ "src_ip_ranges": ["0.0.0.0/0"],
597
+ },
598
+ "target_service_accounts": ["test@google.com"],
599
+ "security_profile_group": security_profile_group1.id.apply(lambda id: f"//networksecurity.googleapis.com/{id}"),
600
+ "tls_inspect": True,
601
+ },
602
+ ])
603
+ ```
604
+
605
+ ## Import
606
+
607
+ NetworkFirewallPolicyWithRules can be imported using any of these accepted formats:
608
+
609
+ * `projects/{{project}}/global/firewallPolicies/{{name}}`
610
+
611
+ * `{{project}}/{{name}}`
612
+
613
+ * `{{name}}`
614
+
615
+ When using the `pulumi import` command, NetworkFirewallPolicyWithRules can be imported using one of the formats above. For example:
616
+
617
+ ```sh
618
+ $ pulumi import gcp:compute/networkFirewallPolicyWithRules:NetworkFirewallPolicyWithRules default projects/{{project}}/global/firewallPolicies/{{name}}
619
+ ```
620
+
621
+ ```sh
622
+ $ pulumi import gcp:compute/networkFirewallPolicyWithRules:NetworkFirewallPolicyWithRules default {{project}}/{{name}}
623
+ ```
624
+
625
+ ```sh
626
+ $ pulumi import gcp:compute/networkFirewallPolicyWithRules:NetworkFirewallPolicyWithRules default {{name}}
627
+ ```
628
+
629
+ :param str resource_name: The name of the resource.
630
+ :param NetworkFirewallPolicyWithRulesArgs args: The arguments to use to populate this resource's properties.
631
+ :param pulumi.ResourceOptions opts: Options for the resource.
632
+ """
633
+ ...
634
+ def __init__(__self__, resource_name: str, *args, **kwargs):
635
+ resource_args, opts = _utilities.get_resource_args_opts(NetworkFirewallPolicyWithRulesArgs, pulumi.ResourceOptions, *args, **kwargs)
636
+ if resource_args is not None:
637
+ __self__._internal_init(resource_name, opts, **resource_args.__dict__)
638
+ else:
639
+ __self__._internal_init(resource_name, *args, **kwargs)
640
+
641
+ def _internal_init(__self__,
642
+ resource_name: str,
643
+ opts: Optional[pulumi.ResourceOptions] = None,
644
+ description: Optional[pulumi.Input[str]] = None,
645
+ name: Optional[pulumi.Input[str]] = None,
646
+ project: Optional[pulumi.Input[str]] = None,
647
+ rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NetworkFirewallPolicyWithRulesRuleArgs', 'NetworkFirewallPolicyWithRulesRuleArgsDict']]]]] = None,
648
+ __props__=None):
649
+ opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
650
+ if not isinstance(opts, pulumi.ResourceOptions):
651
+ raise TypeError('Expected resource options to be a ResourceOptions instance')
652
+ if opts.id is None:
653
+ if __props__ is not None:
654
+ raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
655
+ __props__ = NetworkFirewallPolicyWithRulesArgs.__new__(NetworkFirewallPolicyWithRulesArgs)
656
+
657
+ __props__.__dict__["description"] = description
658
+ __props__.__dict__["name"] = name
659
+ __props__.__dict__["project"] = project
660
+ if rules is None and not opts.urn:
661
+ raise TypeError("Missing required property 'rules'")
662
+ __props__.__dict__["rules"] = rules
663
+ __props__.__dict__["creation_timestamp"] = None
664
+ __props__.__dict__["fingerprint"] = None
665
+ __props__.__dict__["network_firewall_policy_id"] = None
666
+ __props__.__dict__["predefined_rules"] = None
667
+ __props__.__dict__["rule_tuple_count"] = None
668
+ __props__.__dict__["self_link"] = None
669
+ __props__.__dict__["self_link_with_id"] = None
670
+ super(NetworkFirewallPolicyWithRules, __self__).__init__(
671
+ 'gcp:compute/networkFirewallPolicyWithRules:NetworkFirewallPolicyWithRules',
672
+ resource_name,
673
+ __props__,
674
+ opts)
675
+
676
+ @staticmethod
677
+ def get(resource_name: str,
678
+ id: pulumi.Input[str],
679
+ opts: Optional[pulumi.ResourceOptions] = None,
680
+ creation_timestamp: Optional[pulumi.Input[str]] = None,
681
+ description: Optional[pulumi.Input[str]] = None,
682
+ fingerprint: Optional[pulumi.Input[str]] = None,
683
+ name: Optional[pulumi.Input[str]] = None,
684
+ network_firewall_policy_id: Optional[pulumi.Input[str]] = None,
685
+ predefined_rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NetworkFirewallPolicyWithRulesPredefinedRuleArgs', 'NetworkFirewallPolicyWithRulesPredefinedRuleArgsDict']]]]] = None,
686
+ project: Optional[pulumi.Input[str]] = None,
687
+ rule_tuple_count: Optional[pulumi.Input[int]] = None,
688
+ rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NetworkFirewallPolicyWithRulesRuleArgs', 'NetworkFirewallPolicyWithRulesRuleArgsDict']]]]] = None,
689
+ self_link: Optional[pulumi.Input[str]] = None,
690
+ self_link_with_id: Optional[pulumi.Input[str]] = None) -> 'NetworkFirewallPolicyWithRules':
691
+ """
692
+ Get an existing NetworkFirewallPolicyWithRules resource's state with the given name, id, and optional extra
693
+ properties used to qualify the lookup.
694
+
695
+ :param str resource_name: The unique name of the resulting resource.
696
+ :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
697
+ :param pulumi.ResourceOptions opts: Options for the resource.
698
+ :param pulumi.Input[str] creation_timestamp: Creation timestamp in RFC3339 text format.
699
+ :param pulumi.Input[str] description: (Output)
700
+ A description of the rule.
701
+ :param pulumi.Input[str] fingerprint: Fingerprint of the resource. This field is used internally during updates of this resource.
702
+ :param pulumi.Input[str] name: User-provided name of the Network firewall policy.
703
+ The name should be unique in the project in which the firewall policy is created.
704
+ The name must be 1-63 characters long, and comply with RFC1035. Specifically,
705
+ the name must be 1-63 characters long and match the regular expression a-z?
706
+ which means the first character must be a lowercase letter, and all following characters must be a dash,
707
+ lowercase letter, or digit, except the last character, which cannot be a dash.
708
+ :param pulumi.Input[str] network_firewall_policy_id: The unique identifier for the resource. This identifier is defined by the server.
709
+ :param pulumi.Input[Sequence[pulumi.Input[Union['NetworkFirewallPolicyWithRulesPredefinedRuleArgs', 'NetworkFirewallPolicyWithRulesPredefinedRuleArgsDict']]]] predefined_rules: A list of firewall policy pre-defined rules.
710
+ Structure is documented below.
711
+ :param pulumi.Input[int] rule_tuple_count: Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
712
+ :param pulumi.Input[Sequence[pulumi.Input[Union['NetworkFirewallPolicyWithRulesRuleArgs', 'NetworkFirewallPolicyWithRulesRuleArgsDict']]]] rules: A list of firewall policy rules.
713
+ Structure is documented below.
714
+ :param pulumi.Input[str] self_link: Server-defined URL for the resource.
715
+ :param pulumi.Input[str] self_link_with_id: Server-defined URL for this resource with the resource id.
716
+ """
717
+ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
718
+
719
+ __props__ = _NetworkFirewallPolicyWithRulesState.__new__(_NetworkFirewallPolicyWithRulesState)
720
+
721
+ __props__.__dict__["creation_timestamp"] = creation_timestamp
722
+ __props__.__dict__["description"] = description
723
+ __props__.__dict__["fingerprint"] = fingerprint
724
+ __props__.__dict__["name"] = name
725
+ __props__.__dict__["network_firewall_policy_id"] = network_firewall_policy_id
726
+ __props__.__dict__["predefined_rules"] = predefined_rules
727
+ __props__.__dict__["project"] = project
728
+ __props__.__dict__["rule_tuple_count"] = rule_tuple_count
729
+ __props__.__dict__["rules"] = rules
730
+ __props__.__dict__["self_link"] = self_link
731
+ __props__.__dict__["self_link_with_id"] = self_link_with_id
732
+ return NetworkFirewallPolicyWithRules(resource_name, opts=opts, __props__=__props__)
733
+
734
+ @property
735
+ @pulumi.getter(name="creationTimestamp")
736
+ def creation_timestamp(self) -> pulumi.Output[str]:
737
+ """
738
+ Creation timestamp in RFC3339 text format.
739
+ """
740
+ return pulumi.get(self, "creation_timestamp")
741
+
742
+ @property
743
+ @pulumi.getter
744
+ def description(self) -> pulumi.Output[Optional[str]]:
745
+ """
746
+ (Output)
747
+ A description of the rule.
748
+ """
749
+ return pulumi.get(self, "description")
750
+
751
+ @property
752
+ @pulumi.getter
753
+ def fingerprint(self) -> pulumi.Output[str]:
754
+ """
755
+ Fingerprint of the resource. This field is used internally during updates of this resource.
756
+ """
757
+ return pulumi.get(self, "fingerprint")
758
+
759
+ @property
760
+ @pulumi.getter
761
+ def name(self) -> pulumi.Output[str]:
762
+ """
763
+ User-provided name of the Network firewall policy.
764
+ The name should be unique in the project in which the firewall policy is created.
765
+ The name must be 1-63 characters long, and comply with RFC1035. Specifically,
766
+ the name must be 1-63 characters long and match the regular expression a-z?
767
+ which means the first character must be a lowercase letter, and all following characters must be a dash,
768
+ lowercase letter, or digit, except the last character, which cannot be a dash.
769
+ """
770
+ return pulumi.get(self, "name")
771
+
772
+ @property
773
+ @pulumi.getter(name="networkFirewallPolicyId")
774
+ def network_firewall_policy_id(self) -> pulumi.Output[str]:
775
+ """
776
+ The unique identifier for the resource. This identifier is defined by the server.
777
+ """
778
+ return pulumi.get(self, "network_firewall_policy_id")
779
+
780
+ @property
781
+ @pulumi.getter(name="predefinedRules")
782
+ def predefined_rules(self) -> pulumi.Output[Sequence['outputs.NetworkFirewallPolicyWithRulesPredefinedRule']]:
783
+ """
784
+ A list of firewall policy pre-defined rules.
785
+ Structure is documented below.
786
+ """
787
+ return pulumi.get(self, "predefined_rules")
788
+
789
+ @property
790
+ @pulumi.getter
791
+ def project(self) -> pulumi.Output[str]:
792
+ return pulumi.get(self, "project")
793
+
794
+ @property
795
+ @pulumi.getter(name="ruleTupleCount")
796
+ def rule_tuple_count(self) -> pulumi.Output[int]:
797
+ """
798
+ Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
799
+ """
800
+ return pulumi.get(self, "rule_tuple_count")
801
+
802
+ @property
803
+ @pulumi.getter
804
+ def rules(self) -> pulumi.Output[Sequence['outputs.NetworkFirewallPolicyWithRulesRule']]:
805
+ """
806
+ A list of firewall policy rules.
807
+ Structure is documented below.
808
+ """
809
+ return pulumi.get(self, "rules")
810
+
811
+ @property
812
+ @pulumi.getter(name="selfLink")
813
+ def self_link(self) -> pulumi.Output[str]:
814
+ """
815
+ Server-defined URL for the resource.
816
+ """
817
+ return pulumi.get(self, "self_link")
818
+
819
+ @property
820
+ @pulumi.getter(name="selfLinkWithId")
821
+ def self_link_with_id(self) -> pulumi.Output[str]:
822
+ """
823
+ Server-defined URL for this resource with the resource id.
824
+ """
825
+ return pulumi.get(self, "self_link_with_id")
826
+