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