pulumi-gcp 8.12.0a1734477662__py3-none-any.whl → 8.12.0a1734479918__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 +32 -0
- pulumi_gcp/accesscontextmanager/_inputs.py +0 -29
- pulumi_gcp/accesscontextmanager/outputs.py +0 -18
- pulumi_gcp/accesscontextmanager/service_perimeter.py +0 -36
- pulumi_gcp/artifactregistry/get_repository_iam_policy.py +12 -4
- pulumi_gcp/artifactregistry/repository.py +86 -39
- pulumi_gcp/artifactregistry/repository_iam_binding.py +42 -14
- pulumi_gcp/artifactregistry/repository_iam_member.py +42 -14
- pulumi_gcp/artifactregistry/repository_iam_policy.py +42 -14
- pulumi_gcp/compute/get_global_forwarding_rule.py +12 -1
- pulumi_gcp/compute/global_forwarding_rule.py +114 -2
- pulumi_gcp/compute/project_cloud_armor_tier.py +7 -7
- pulumi_gcp/firebase/_inputs.py +99 -0
- pulumi_gcp/firebase/database_instance.py +24 -6
- pulumi_gcp/firebase/hosting_version.py +96 -0
- pulumi_gcp/firebase/outputs.py +59 -0
- pulumi_gcp/firebase/project.py +6 -6
- pulumi_gcp/identityplatform/_inputs.py +6 -6
- pulumi_gcp/identityplatform/config.py +2 -2
- pulumi_gcp/identityplatform/outputs.py +4 -4
- pulumi_gcp/looker/instance.py +35 -14
- pulumi_gcp/networkconnectivity/_inputs.py +10 -12
- pulumi_gcp/networkconnectivity/outputs.py +6 -8
- pulumi_gcp/networksecurity/__init__.py +3 -0
- pulumi_gcp/networksecurity/_inputs.py +1903 -0
- pulumi_gcp/networksecurity/authz_policy.py +1008 -0
- pulumi_gcp/networksecurity/intercept_deployment.py +846 -0
- pulumi_gcp/networksecurity/intercept_deployment_group.py +752 -0
- pulumi_gcp/networksecurity/outputs.py +1393 -0
- pulumi_gcp/networkservices/__init__.py +1 -0
- pulumi_gcp/networkservices/authz_extension.py +1080 -0
- pulumi_gcp/oracledatabase/autonomous_database.py +4 -4
- pulumi_gcp/orgpolicy/_inputs.py +40 -0
- pulumi_gcp/orgpolicy/outputs.py +24 -0
- pulumi_gcp/orgpolicy/policy.py +64 -8
- pulumi_gcp/pulumi-plugin.json +1 -1
- pulumi_gcp/sql/_inputs.py +3 -3
- pulumi_gcp/sql/database_instance.py +14 -14
- pulumi_gcp/sql/outputs.py +2 -2
- pulumi_gcp/storage/_inputs.py +53 -6
- pulumi_gcp/storage/outputs.py +33 -4
- pulumi_gcp/tpu/_inputs.py +26 -18
- pulumi_gcp/tpu/outputs.py +18 -12
- pulumi_gcp/tpu/v2_vm.py +63 -0
- {pulumi_gcp-8.12.0a1734477662.dist-info → pulumi_gcp-8.12.0a1734479918.dist-info}/METADATA +1 -1
- {pulumi_gcp-8.12.0a1734477662.dist-info → pulumi_gcp-8.12.0a1734479918.dist-info}/RECORD +48 -44
- {pulumi_gcp-8.12.0a1734477662.dist-info → pulumi_gcp-8.12.0a1734479918.dist-info}/WHEEL +0 -0
- {pulumi_gcp-8.12.0a1734477662.dist-info → pulumi_gcp-8.12.0a1734479918.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,1008 @@
|
|
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__ = ['AuthzPolicyArgs', 'AuthzPolicy']
|
20
|
+
|
21
|
+
@pulumi.input_type
|
22
|
+
class AuthzPolicyArgs:
|
23
|
+
def __init__(__self__, *,
|
24
|
+
action: pulumi.Input[str],
|
25
|
+
location: pulumi.Input[str],
|
26
|
+
target: pulumi.Input['AuthzPolicyTargetArgs'],
|
27
|
+
custom_provider: Optional[pulumi.Input['AuthzPolicyCustomProviderArgs']] = None,
|
28
|
+
description: Optional[pulumi.Input[str]] = None,
|
29
|
+
http_rules: Optional[pulumi.Input[Sequence[pulumi.Input['AuthzPolicyHttpRuleArgs']]]] = None,
|
30
|
+
labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
31
|
+
name: Optional[pulumi.Input[str]] = None,
|
32
|
+
project: Optional[pulumi.Input[str]] = None):
|
33
|
+
"""
|
34
|
+
The set of arguments for constructing a AuthzPolicy resource.
|
35
|
+
:param pulumi.Input[str] action: When the action is CUSTOM, customProvider must be specified.
|
36
|
+
When the action is ALLOW, only requests matching the policy will be allowed.
|
37
|
+
When the action is DENY, only requests matching the policy will be denied.
|
38
|
+
When a request arrives, the policies are evaluated in the following order:
|
39
|
+
1. If there is a CUSTOM policy that matches the request, the CUSTOM policy is evaluated using the custom authorization providers and the request is denied if the provider rejects the request.
|
40
|
+
2. If there are any DENY policies that match the request, the request is denied.
|
41
|
+
3. If there are no ALLOW policies for the resource or if any of the ALLOW policies match the request, the request is allowed.
|
42
|
+
4. Else the request is denied by default if none of the configured AuthzPolicies with ALLOW action match the request.
|
43
|
+
Possible values are: `ALLOW`, `DENY`, `CUSTOM`.
|
44
|
+
:param pulumi.Input[str] location: The location of the resource.
|
45
|
+
:param pulumi.Input['AuthzPolicyTargetArgs'] target: Specifies the set of resources to which this policy should be applied to.
|
46
|
+
Structure is documented below.
|
47
|
+
:param pulumi.Input['AuthzPolicyCustomProviderArgs'] custom_provider: Required if the action is CUSTOM. Allows delegating authorization decisions to Cloud IAP or to Service Extensions. One
|
48
|
+
of cloudIap or authzExtension must be specified.
|
49
|
+
:param pulumi.Input[str] description: A human-readable description of the resource.
|
50
|
+
:param pulumi.Input[Sequence[pulumi.Input['AuthzPolicyHttpRuleArgs']]] http_rules: A list of authorization HTTP rules to match against the incoming request.A policy match occurs when at least one HTTP
|
51
|
+
rule matches the request or when no HTTP rules are specified in the policy. At least one HTTP Rule is required for Allow
|
52
|
+
or Deny Action. Limited to 5 rules.
|
53
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: Set of labels associated with the AuthzExtension resource. **Note**: This field is non-authoritative, and will only
|
54
|
+
manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels
|
55
|
+
present on the resource.
|
56
|
+
:param pulumi.Input[str] name: Identifier. Name of the AuthzPolicy resource.
|
57
|
+
"""
|
58
|
+
pulumi.set(__self__, "action", action)
|
59
|
+
pulumi.set(__self__, "location", location)
|
60
|
+
pulumi.set(__self__, "target", target)
|
61
|
+
if custom_provider is not None:
|
62
|
+
pulumi.set(__self__, "custom_provider", custom_provider)
|
63
|
+
if description is not None:
|
64
|
+
pulumi.set(__self__, "description", description)
|
65
|
+
if http_rules is not None:
|
66
|
+
pulumi.set(__self__, "http_rules", http_rules)
|
67
|
+
if labels is not None:
|
68
|
+
pulumi.set(__self__, "labels", labels)
|
69
|
+
if name is not None:
|
70
|
+
pulumi.set(__self__, "name", name)
|
71
|
+
if project is not None:
|
72
|
+
pulumi.set(__self__, "project", project)
|
73
|
+
|
74
|
+
@property
|
75
|
+
@pulumi.getter
|
76
|
+
def action(self) -> pulumi.Input[str]:
|
77
|
+
"""
|
78
|
+
When the action is CUSTOM, customProvider must be specified.
|
79
|
+
When the action is ALLOW, only requests matching the policy will be allowed.
|
80
|
+
When the action is DENY, only requests matching the policy will be denied.
|
81
|
+
When a request arrives, the policies are evaluated in the following order:
|
82
|
+
1. If there is a CUSTOM policy that matches the request, the CUSTOM policy is evaluated using the custom authorization providers and the request is denied if the provider rejects the request.
|
83
|
+
2. If there are any DENY policies that match the request, the request is denied.
|
84
|
+
3. If there are no ALLOW policies for the resource or if any of the ALLOW policies match the request, the request is allowed.
|
85
|
+
4. Else the request is denied by default if none of the configured AuthzPolicies with ALLOW action match the request.
|
86
|
+
Possible values are: `ALLOW`, `DENY`, `CUSTOM`.
|
87
|
+
"""
|
88
|
+
return pulumi.get(self, "action")
|
89
|
+
|
90
|
+
@action.setter
|
91
|
+
def action(self, value: pulumi.Input[str]):
|
92
|
+
pulumi.set(self, "action", value)
|
93
|
+
|
94
|
+
@property
|
95
|
+
@pulumi.getter
|
96
|
+
def location(self) -> pulumi.Input[str]:
|
97
|
+
"""
|
98
|
+
The location of the resource.
|
99
|
+
"""
|
100
|
+
return pulumi.get(self, "location")
|
101
|
+
|
102
|
+
@location.setter
|
103
|
+
def location(self, value: pulumi.Input[str]):
|
104
|
+
pulumi.set(self, "location", value)
|
105
|
+
|
106
|
+
@property
|
107
|
+
@pulumi.getter
|
108
|
+
def target(self) -> pulumi.Input['AuthzPolicyTargetArgs']:
|
109
|
+
"""
|
110
|
+
Specifies the set of resources to which this policy should be applied to.
|
111
|
+
Structure is documented below.
|
112
|
+
"""
|
113
|
+
return pulumi.get(self, "target")
|
114
|
+
|
115
|
+
@target.setter
|
116
|
+
def target(self, value: pulumi.Input['AuthzPolicyTargetArgs']):
|
117
|
+
pulumi.set(self, "target", value)
|
118
|
+
|
119
|
+
@property
|
120
|
+
@pulumi.getter(name="customProvider")
|
121
|
+
def custom_provider(self) -> Optional[pulumi.Input['AuthzPolicyCustomProviderArgs']]:
|
122
|
+
"""
|
123
|
+
Required if the action is CUSTOM. Allows delegating authorization decisions to Cloud IAP or to Service Extensions. One
|
124
|
+
of cloudIap or authzExtension must be specified.
|
125
|
+
"""
|
126
|
+
return pulumi.get(self, "custom_provider")
|
127
|
+
|
128
|
+
@custom_provider.setter
|
129
|
+
def custom_provider(self, value: Optional[pulumi.Input['AuthzPolicyCustomProviderArgs']]):
|
130
|
+
pulumi.set(self, "custom_provider", value)
|
131
|
+
|
132
|
+
@property
|
133
|
+
@pulumi.getter
|
134
|
+
def description(self) -> Optional[pulumi.Input[str]]:
|
135
|
+
"""
|
136
|
+
A human-readable description of the resource.
|
137
|
+
"""
|
138
|
+
return pulumi.get(self, "description")
|
139
|
+
|
140
|
+
@description.setter
|
141
|
+
def description(self, value: Optional[pulumi.Input[str]]):
|
142
|
+
pulumi.set(self, "description", value)
|
143
|
+
|
144
|
+
@property
|
145
|
+
@pulumi.getter(name="httpRules")
|
146
|
+
def http_rules(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['AuthzPolicyHttpRuleArgs']]]]:
|
147
|
+
"""
|
148
|
+
A list of authorization HTTP rules to match against the incoming request.A policy match occurs when at least one HTTP
|
149
|
+
rule matches the request or when no HTTP rules are specified in the policy. At least one HTTP Rule is required for Allow
|
150
|
+
or Deny Action. Limited to 5 rules.
|
151
|
+
"""
|
152
|
+
return pulumi.get(self, "http_rules")
|
153
|
+
|
154
|
+
@http_rules.setter
|
155
|
+
def http_rules(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['AuthzPolicyHttpRuleArgs']]]]):
|
156
|
+
pulumi.set(self, "http_rules", value)
|
157
|
+
|
158
|
+
@property
|
159
|
+
@pulumi.getter
|
160
|
+
def labels(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
|
161
|
+
"""
|
162
|
+
Set of labels associated with the AuthzExtension resource. **Note**: This field is non-authoritative, and will only
|
163
|
+
manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels
|
164
|
+
present on the resource.
|
165
|
+
"""
|
166
|
+
return pulumi.get(self, "labels")
|
167
|
+
|
168
|
+
@labels.setter
|
169
|
+
def labels(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
|
170
|
+
pulumi.set(self, "labels", value)
|
171
|
+
|
172
|
+
@property
|
173
|
+
@pulumi.getter
|
174
|
+
def name(self) -> Optional[pulumi.Input[str]]:
|
175
|
+
"""
|
176
|
+
Identifier. Name of the AuthzPolicy resource.
|
177
|
+
"""
|
178
|
+
return pulumi.get(self, "name")
|
179
|
+
|
180
|
+
@name.setter
|
181
|
+
def name(self, value: Optional[pulumi.Input[str]]):
|
182
|
+
pulumi.set(self, "name", value)
|
183
|
+
|
184
|
+
@property
|
185
|
+
@pulumi.getter
|
186
|
+
def project(self) -> Optional[pulumi.Input[str]]:
|
187
|
+
return pulumi.get(self, "project")
|
188
|
+
|
189
|
+
@project.setter
|
190
|
+
def project(self, value: Optional[pulumi.Input[str]]):
|
191
|
+
pulumi.set(self, "project", value)
|
192
|
+
|
193
|
+
|
194
|
+
@pulumi.input_type
|
195
|
+
class _AuthzPolicyState:
|
196
|
+
def __init__(__self__, *,
|
197
|
+
action: Optional[pulumi.Input[str]] = None,
|
198
|
+
create_time: Optional[pulumi.Input[str]] = None,
|
199
|
+
custom_provider: Optional[pulumi.Input['AuthzPolicyCustomProviderArgs']] = None,
|
200
|
+
description: Optional[pulumi.Input[str]] = None,
|
201
|
+
effective_labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
202
|
+
http_rules: Optional[pulumi.Input[Sequence[pulumi.Input['AuthzPolicyHttpRuleArgs']]]] = None,
|
203
|
+
labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
204
|
+
location: Optional[pulumi.Input[str]] = None,
|
205
|
+
name: Optional[pulumi.Input[str]] = None,
|
206
|
+
project: Optional[pulumi.Input[str]] = None,
|
207
|
+
pulumi_labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
208
|
+
target: Optional[pulumi.Input['AuthzPolicyTargetArgs']] = None,
|
209
|
+
update_time: Optional[pulumi.Input[str]] = None):
|
210
|
+
"""
|
211
|
+
Input properties used for looking up and filtering AuthzPolicy resources.
|
212
|
+
:param pulumi.Input[str] action: When the action is CUSTOM, customProvider must be specified.
|
213
|
+
When the action is ALLOW, only requests matching the policy will be allowed.
|
214
|
+
When the action is DENY, only requests matching the policy will be denied.
|
215
|
+
When a request arrives, the policies are evaluated in the following order:
|
216
|
+
1. If there is a CUSTOM policy that matches the request, the CUSTOM policy is evaluated using the custom authorization providers and the request is denied if the provider rejects the request.
|
217
|
+
2. If there are any DENY policies that match the request, the request is denied.
|
218
|
+
3. If there are no ALLOW policies for the resource or if any of the ALLOW policies match the request, the request is allowed.
|
219
|
+
4. Else the request is denied by default if none of the configured AuthzPolicies with ALLOW action match the request.
|
220
|
+
Possible values are: `ALLOW`, `DENY`, `CUSTOM`.
|
221
|
+
:param pulumi.Input[str] create_time: The timestamp when the resource was created.
|
222
|
+
:param pulumi.Input['AuthzPolicyCustomProviderArgs'] custom_provider: Required if the action is CUSTOM. Allows delegating authorization decisions to Cloud IAP or to Service Extensions. One
|
223
|
+
of cloudIap or authzExtension must be specified.
|
224
|
+
:param pulumi.Input[str] description: A human-readable description of the resource.
|
225
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] effective_labels: All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
|
226
|
+
:param pulumi.Input[Sequence[pulumi.Input['AuthzPolicyHttpRuleArgs']]] http_rules: A list of authorization HTTP rules to match against the incoming request.A policy match occurs when at least one HTTP
|
227
|
+
rule matches the request or when no HTTP rules are specified in the policy. At least one HTTP Rule is required for Allow
|
228
|
+
or Deny Action. Limited to 5 rules.
|
229
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: Set of labels associated with the AuthzExtension resource. **Note**: This field is non-authoritative, and will only
|
230
|
+
manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels
|
231
|
+
present on the resource.
|
232
|
+
:param pulumi.Input[str] location: The location of the resource.
|
233
|
+
:param pulumi.Input[str] name: Identifier. Name of the AuthzPolicy resource.
|
234
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] pulumi_labels: The combination of labels configured directly on the resource
|
235
|
+
and default labels configured on the provider.
|
236
|
+
:param pulumi.Input['AuthzPolicyTargetArgs'] target: Specifies the set of resources to which this policy should be applied to.
|
237
|
+
Structure is documented below.
|
238
|
+
:param pulumi.Input[str] update_time: The timestamp when the resource was updated.
|
239
|
+
"""
|
240
|
+
if action is not None:
|
241
|
+
pulumi.set(__self__, "action", action)
|
242
|
+
if create_time is not None:
|
243
|
+
pulumi.set(__self__, "create_time", create_time)
|
244
|
+
if custom_provider is not None:
|
245
|
+
pulumi.set(__self__, "custom_provider", custom_provider)
|
246
|
+
if description is not None:
|
247
|
+
pulumi.set(__self__, "description", description)
|
248
|
+
if effective_labels is not None:
|
249
|
+
pulumi.set(__self__, "effective_labels", effective_labels)
|
250
|
+
if http_rules is not None:
|
251
|
+
pulumi.set(__self__, "http_rules", http_rules)
|
252
|
+
if labels is not None:
|
253
|
+
pulumi.set(__self__, "labels", labels)
|
254
|
+
if location is not None:
|
255
|
+
pulumi.set(__self__, "location", location)
|
256
|
+
if name is not None:
|
257
|
+
pulumi.set(__self__, "name", name)
|
258
|
+
if project is not None:
|
259
|
+
pulumi.set(__self__, "project", project)
|
260
|
+
if pulumi_labels is not None:
|
261
|
+
pulumi.set(__self__, "pulumi_labels", pulumi_labels)
|
262
|
+
if target is not None:
|
263
|
+
pulumi.set(__self__, "target", target)
|
264
|
+
if update_time is not None:
|
265
|
+
pulumi.set(__self__, "update_time", update_time)
|
266
|
+
|
267
|
+
@property
|
268
|
+
@pulumi.getter
|
269
|
+
def action(self) -> Optional[pulumi.Input[str]]:
|
270
|
+
"""
|
271
|
+
When the action is CUSTOM, customProvider must be specified.
|
272
|
+
When the action is ALLOW, only requests matching the policy will be allowed.
|
273
|
+
When the action is DENY, only requests matching the policy will be denied.
|
274
|
+
When a request arrives, the policies are evaluated in the following order:
|
275
|
+
1. If there is a CUSTOM policy that matches the request, the CUSTOM policy is evaluated using the custom authorization providers and the request is denied if the provider rejects the request.
|
276
|
+
2. If there are any DENY policies that match the request, the request is denied.
|
277
|
+
3. If there are no ALLOW policies for the resource or if any of the ALLOW policies match the request, the request is allowed.
|
278
|
+
4. Else the request is denied by default if none of the configured AuthzPolicies with ALLOW action match the request.
|
279
|
+
Possible values are: `ALLOW`, `DENY`, `CUSTOM`.
|
280
|
+
"""
|
281
|
+
return pulumi.get(self, "action")
|
282
|
+
|
283
|
+
@action.setter
|
284
|
+
def action(self, value: Optional[pulumi.Input[str]]):
|
285
|
+
pulumi.set(self, "action", value)
|
286
|
+
|
287
|
+
@property
|
288
|
+
@pulumi.getter(name="createTime")
|
289
|
+
def create_time(self) -> Optional[pulumi.Input[str]]:
|
290
|
+
"""
|
291
|
+
The timestamp when the resource was created.
|
292
|
+
"""
|
293
|
+
return pulumi.get(self, "create_time")
|
294
|
+
|
295
|
+
@create_time.setter
|
296
|
+
def create_time(self, value: Optional[pulumi.Input[str]]):
|
297
|
+
pulumi.set(self, "create_time", value)
|
298
|
+
|
299
|
+
@property
|
300
|
+
@pulumi.getter(name="customProvider")
|
301
|
+
def custom_provider(self) -> Optional[pulumi.Input['AuthzPolicyCustomProviderArgs']]:
|
302
|
+
"""
|
303
|
+
Required if the action is CUSTOM. Allows delegating authorization decisions to Cloud IAP or to Service Extensions. One
|
304
|
+
of cloudIap or authzExtension must be specified.
|
305
|
+
"""
|
306
|
+
return pulumi.get(self, "custom_provider")
|
307
|
+
|
308
|
+
@custom_provider.setter
|
309
|
+
def custom_provider(self, value: Optional[pulumi.Input['AuthzPolicyCustomProviderArgs']]):
|
310
|
+
pulumi.set(self, "custom_provider", value)
|
311
|
+
|
312
|
+
@property
|
313
|
+
@pulumi.getter
|
314
|
+
def description(self) -> Optional[pulumi.Input[str]]:
|
315
|
+
"""
|
316
|
+
A human-readable description of the resource.
|
317
|
+
"""
|
318
|
+
return pulumi.get(self, "description")
|
319
|
+
|
320
|
+
@description.setter
|
321
|
+
def description(self, value: Optional[pulumi.Input[str]]):
|
322
|
+
pulumi.set(self, "description", value)
|
323
|
+
|
324
|
+
@property
|
325
|
+
@pulumi.getter(name="effectiveLabels")
|
326
|
+
def effective_labels(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
|
327
|
+
"""
|
328
|
+
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
|
329
|
+
"""
|
330
|
+
return pulumi.get(self, "effective_labels")
|
331
|
+
|
332
|
+
@effective_labels.setter
|
333
|
+
def effective_labels(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
|
334
|
+
pulumi.set(self, "effective_labels", value)
|
335
|
+
|
336
|
+
@property
|
337
|
+
@pulumi.getter(name="httpRules")
|
338
|
+
def http_rules(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['AuthzPolicyHttpRuleArgs']]]]:
|
339
|
+
"""
|
340
|
+
A list of authorization HTTP rules to match against the incoming request.A policy match occurs when at least one HTTP
|
341
|
+
rule matches the request or when no HTTP rules are specified in the policy. At least one HTTP Rule is required for Allow
|
342
|
+
or Deny Action. Limited to 5 rules.
|
343
|
+
"""
|
344
|
+
return pulumi.get(self, "http_rules")
|
345
|
+
|
346
|
+
@http_rules.setter
|
347
|
+
def http_rules(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['AuthzPolicyHttpRuleArgs']]]]):
|
348
|
+
pulumi.set(self, "http_rules", value)
|
349
|
+
|
350
|
+
@property
|
351
|
+
@pulumi.getter
|
352
|
+
def labels(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
|
353
|
+
"""
|
354
|
+
Set of labels associated with the AuthzExtension resource. **Note**: This field is non-authoritative, and will only
|
355
|
+
manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels
|
356
|
+
present on the resource.
|
357
|
+
"""
|
358
|
+
return pulumi.get(self, "labels")
|
359
|
+
|
360
|
+
@labels.setter
|
361
|
+
def labels(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
|
362
|
+
pulumi.set(self, "labels", value)
|
363
|
+
|
364
|
+
@property
|
365
|
+
@pulumi.getter
|
366
|
+
def location(self) -> Optional[pulumi.Input[str]]:
|
367
|
+
"""
|
368
|
+
The location of the resource.
|
369
|
+
"""
|
370
|
+
return pulumi.get(self, "location")
|
371
|
+
|
372
|
+
@location.setter
|
373
|
+
def location(self, value: Optional[pulumi.Input[str]]):
|
374
|
+
pulumi.set(self, "location", value)
|
375
|
+
|
376
|
+
@property
|
377
|
+
@pulumi.getter
|
378
|
+
def name(self) -> Optional[pulumi.Input[str]]:
|
379
|
+
"""
|
380
|
+
Identifier. Name of the AuthzPolicy resource.
|
381
|
+
"""
|
382
|
+
return pulumi.get(self, "name")
|
383
|
+
|
384
|
+
@name.setter
|
385
|
+
def name(self, value: Optional[pulumi.Input[str]]):
|
386
|
+
pulumi.set(self, "name", value)
|
387
|
+
|
388
|
+
@property
|
389
|
+
@pulumi.getter
|
390
|
+
def project(self) -> Optional[pulumi.Input[str]]:
|
391
|
+
return pulumi.get(self, "project")
|
392
|
+
|
393
|
+
@project.setter
|
394
|
+
def project(self, value: Optional[pulumi.Input[str]]):
|
395
|
+
pulumi.set(self, "project", value)
|
396
|
+
|
397
|
+
@property
|
398
|
+
@pulumi.getter(name="pulumiLabels")
|
399
|
+
def pulumi_labels(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
|
400
|
+
"""
|
401
|
+
The combination of labels configured directly on the resource
|
402
|
+
and default labels configured on the provider.
|
403
|
+
"""
|
404
|
+
return pulumi.get(self, "pulumi_labels")
|
405
|
+
|
406
|
+
@pulumi_labels.setter
|
407
|
+
def pulumi_labels(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
|
408
|
+
pulumi.set(self, "pulumi_labels", value)
|
409
|
+
|
410
|
+
@property
|
411
|
+
@pulumi.getter
|
412
|
+
def target(self) -> Optional[pulumi.Input['AuthzPolicyTargetArgs']]:
|
413
|
+
"""
|
414
|
+
Specifies the set of resources to which this policy should be applied to.
|
415
|
+
Structure is documented below.
|
416
|
+
"""
|
417
|
+
return pulumi.get(self, "target")
|
418
|
+
|
419
|
+
@target.setter
|
420
|
+
def target(self, value: Optional[pulumi.Input['AuthzPolicyTargetArgs']]):
|
421
|
+
pulumi.set(self, "target", value)
|
422
|
+
|
423
|
+
@property
|
424
|
+
@pulumi.getter(name="updateTime")
|
425
|
+
def update_time(self) -> Optional[pulumi.Input[str]]:
|
426
|
+
"""
|
427
|
+
The timestamp when the resource was updated.
|
428
|
+
"""
|
429
|
+
return pulumi.get(self, "update_time")
|
430
|
+
|
431
|
+
@update_time.setter
|
432
|
+
def update_time(self, value: Optional[pulumi.Input[str]]):
|
433
|
+
pulumi.set(self, "update_time", value)
|
434
|
+
|
435
|
+
|
436
|
+
class AuthzPolicy(pulumi.CustomResource):
|
437
|
+
@overload
|
438
|
+
def __init__(__self__,
|
439
|
+
resource_name: str,
|
440
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
441
|
+
action: Optional[pulumi.Input[str]] = None,
|
442
|
+
custom_provider: Optional[pulumi.Input[Union['AuthzPolicyCustomProviderArgs', 'AuthzPolicyCustomProviderArgsDict']]] = None,
|
443
|
+
description: Optional[pulumi.Input[str]] = None,
|
444
|
+
http_rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union['AuthzPolicyHttpRuleArgs', 'AuthzPolicyHttpRuleArgsDict']]]]] = None,
|
445
|
+
labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
446
|
+
location: Optional[pulumi.Input[str]] = None,
|
447
|
+
name: Optional[pulumi.Input[str]] = None,
|
448
|
+
project: Optional[pulumi.Input[str]] = None,
|
449
|
+
target: Optional[pulumi.Input[Union['AuthzPolicyTargetArgs', 'AuthzPolicyTargetArgsDict']]] = None,
|
450
|
+
__props__=None):
|
451
|
+
"""
|
452
|
+
AuthzPolicy is a resource that allows to forward traffic to a callout backend designed to scan the traffic for security purposes.
|
453
|
+
|
454
|
+
To get more information about AuthzPolicy, see:
|
455
|
+
|
456
|
+
* [API documentation](https://cloud.google.com/load-balancing/docs/reference/network-security/rest/v1beta1/projects.locations.authzPolicies)
|
457
|
+
|
458
|
+
## Example Usage
|
459
|
+
|
460
|
+
### Network Services Authz Policy Advanced
|
461
|
+
|
462
|
+
```python
|
463
|
+
import pulumi
|
464
|
+
import pulumi_gcp as gcp
|
465
|
+
|
466
|
+
default = gcp.compute.Network("default",
|
467
|
+
name="lb-network",
|
468
|
+
project="my-project-name",
|
469
|
+
auto_create_subnetworks=False)
|
470
|
+
default_subnetwork = gcp.compute.Subnetwork("default",
|
471
|
+
name="backend-subnet",
|
472
|
+
project="my-project-name",
|
473
|
+
region="us-west1",
|
474
|
+
ip_cidr_range="10.1.2.0/24",
|
475
|
+
network=default.id)
|
476
|
+
proxy_only = gcp.compute.Subnetwork("proxy_only",
|
477
|
+
name="proxy-only-subnet",
|
478
|
+
project="my-project-name",
|
479
|
+
region="us-west1",
|
480
|
+
ip_cidr_range="10.129.0.0/23",
|
481
|
+
purpose="REGIONAL_MANAGED_PROXY",
|
482
|
+
role="ACTIVE",
|
483
|
+
network=default.id)
|
484
|
+
default_address = gcp.compute.Address("default",
|
485
|
+
name="l7-ilb-ip-address",
|
486
|
+
project="my-project-name",
|
487
|
+
region="us-west1",
|
488
|
+
subnetwork=default_subnetwork.id,
|
489
|
+
address_type="INTERNAL",
|
490
|
+
purpose="GCE_ENDPOINT")
|
491
|
+
default_region_health_check = gcp.compute.RegionHealthCheck("default",
|
492
|
+
name="l7-ilb-basic-check",
|
493
|
+
project="my-project-name",
|
494
|
+
region="us-west1",
|
495
|
+
http_health_check={
|
496
|
+
"port_specification": "USE_SERVING_PORT",
|
497
|
+
})
|
498
|
+
url_map = gcp.compute.RegionBackendService("url_map",
|
499
|
+
name="l7-ilb-backend-service",
|
500
|
+
project="my-project-name",
|
501
|
+
region="us-west1",
|
502
|
+
load_balancing_scheme="INTERNAL_MANAGED",
|
503
|
+
health_checks=default_region_health_check.id)
|
504
|
+
default_region_url_map = gcp.compute.RegionUrlMap("default",
|
505
|
+
name="l7-ilb-map",
|
506
|
+
project="my-project-name",
|
507
|
+
region="us-west1",
|
508
|
+
default_service=url_map.id)
|
509
|
+
default_region_target_http_proxy = gcp.compute.RegionTargetHttpProxy("default",
|
510
|
+
name="l7-ilb-proxy",
|
511
|
+
project="my-project-name",
|
512
|
+
region="us-west1",
|
513
|
+
url_map=default_region_url_map.id)
|
514
|
+
default_forwarding_rule = gcp.compute.ForwardingRule("default",
|
515
|
+
name="l7-ilb-forwarding-rule",
|
516
|
+
project="my-project-name",
|
517
|
+
region="us-west1",
|
518
|
+
load_balancing_scheme="INTERNAL_MANAGED",
|
519
|
+
network=default.id,
|
520
|
+
subnetwork=default_subnetwork.id,
|
521
|
+
ip_protocol="TCP",
|
522
|
+
port_range="80",
|
523
|
+
target=default_region_target_http_proxy.id,
|
524
|
+
ip_address=default_address.id,
|
525
|
+
opts = pulumi.ResourceOptions(depends_on=[proxy_only]))
|
526
|
+
authz_extension = gcp.compute.RegionBackendService("authz_extension",
|
527
|
+
name="authz-service",
|
528
|
+
project="my-project-name",
|
529
|
+
region="us-west1",
|
530
|
+
protocol="HTTP2",
|
531
|
+
load_balancing_scheme="INTERNAL_MANAGED",
|
532
|
+
port_name="grpc")
|
533
|
+
default_authz_extension = gcp.networkservices.AuthzExtension("default",
|
534
|
+
name="my-authz-ext",
|
535
|
+
project="my-project-name",
|
536
|
+
location="us-west1",
|
537
|
+
description="my description",
|
538
|
+
load_balancing_scheme="INTERNAL_MANAGED",
|
539
|
+
authority="ext11.com",
|
540
|
+
service=authz_extension.self_link,
|
541
|
+
timeout="0.1s",
|
542
|
+
fail_open=False,
|
543
|
+
forward_headers=["Authorization"])
|
544
|
+
default_authz_policy = gcp.networksecurity.AuthzPolicy("default",
|
545
|
+
name="my-authz-policy",
|
546
|
+
project="my-project-name",
|
547
|
+
location="us-west1",
|
548
|
+
description="my description",
|
549
|
+
target={
|
550
|
+
"load_balancing_scheme": "INTERNAL_MANAGED",
|
551
|
+
"resources": [default_forwarding_rule.self_link],
|
552
|
+
},
|
553
|
+
action="CUSTOM",
|
554
|
+
custom_provider={
|
555
|
+
"authz_extension": {
|
556
|
+
"resources": [default_authz_extension.id],
|
557
|
+
},
|
558
|
+
})
|
559
|
+
```
|
560
|
+
|
561
|
+
## Import
|
562
|
+
|
563
|
+
AuthzPolicy can be imported using any of these accepted formats:
|
564
|
+
|
565
|
+
* `projects/{{project}}/locations/{{location}}/authzPolicies/{{name}}`
|
566
|
+
|
567
|
+
* `{{project}}/{{location}}/{{name}}`
|
568
|
+
|
569
|
+
* `{{location}}/{{name}}`
|
570
|
+
|
571
|
+
* `{{name}}`
|
572
|
+
|
573
|
+
When using the `pulumi import` command, AuthzPolicy can be imported using one of the formats above. For example:
|
574
|
+
|
575
|
+
```sh
|
576
|
+
$ pulumi import gcp:networksecurity/authzPolicy:AuthzPolicy default projects/{{project}}/locations/{{location}}/authzPolicies/{{name}}
|
577
|
+
```
|
578
|
+
|
579
|
+
```sh
|
580
|
+
$ pulumi import gcp:networksecurity/authzPolicy:AuthzPolicy default {{project}}/{{location}}/{{name}}
|
581
|
+
```
|
582
|
+
|
583
|
+
```sh
|
584
|
+
$ pulumi import gcp:networksecurity/authzPolicy:AuthzPolicy default {{location}}/{{name}}
|
585
|
+
```
|
586
|
+
|
587
|
+
```sh
|
588
|
+
$ pulumi import gcp:networksecurity/authzPolicy:AuthzPolicy default {{name}}
|
589
|
+
```
|
590
|
+
|
591
|
+
:param str resource_name: The name of the resource.
|
592
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
593
|
+
:param pulumi.Input[str] action: When the action is CUSTOM, customProvider must be specified.
|
594
|
+
When the action is ALLOW, only requests matching the policy will be allowed.
|
595
|
+
When the action is DENY, only requests matching the policy will be denied.
|
596
|
+
When a request arrives, the policies are evaluated in the following order:
|
597
|
+
1. If there is a CUSTOM policy that matches the request, the CUSTOM policy is evaluated using the custom authorization providers and the request is denied if the provider rejects the request.
|
598
|
+
2. If there are any DENY policies that match the request, the request is denied.
|
599
|
+
3. If there are no ALLOW policies for the resource or if any of the ALLOW policies match the request, the request is allowed.
|
600
|
+
4. Else the request is denied by default if none of the configured AuthzPolicies with ALLOW action match the request.
|
601
|
+
Possible values are: `ALLOW`, `DENY`, `CUSTOM`.
|
602
|
+
:param pulumi.Input[Union['AuthzPolicyCustomProviderArgs', 'AuthzPolicyCustomProviderArgsDict']] custom_provider: Required if the action is CUSTOM. Allows delegating authorization decisions to Cloud IAP or to Service Extensions. One
|
603
|
+
of cloudIap or authzExtension must be specified.
|
604
|
+
:param pulumi.Input[str] description: A human-readable description of the resource.
|
605
|
+
:param pulumi.Input[Sequence[pulumi.Input[Union['AuthzPolicyHttpRuleArgs', 'AuthzPolicyHttpRuleArgsDict']]]] http_rules: A list of authorization HTTP rules to match against the incoming request.A policy match occurs when at least one HTTP
|
606
|
+
rule matches the request or when no HTTP rules are specified in the policy. At least one HTTP Rule is required for Allow
|
607
|
+
or Deny Action. Limited to 5 rules.
|
608
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: Set of labels associated with the AuthzExtension resource. **Note**: This field is non-authoritative, and will only
|
609
|
+
manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels
|
610
|
+
present on the resource.
|
611
|
+
:param pulumi.Input[str] location: The location of the resource.
|
612
|
+
:param pulumi.Input[str] name: Identifier. Name of the AuthzPolicy resource.
|
613
|
+
:param pulumi.Input[Union['AuthzPolicyTargetArgs', 'AuthzPolicyTargetArgsDict']] target: Specifies the set of resources to which this policy should be applied to.
|
614
|
+
Structure is documented below.
|
615
|
+
"""
|
616
|
+
...
|
617
|
+
@overload
|
618
|
+
def __init__(__self__,
|
619
|
+
resource_name: str,
|
620
|
+
args: AuthzPolicyArgs,
|
621
|
+
opts: Optional[pulumi.ResourceOptions] = None):
|
622
|
+
"""
|
623
|
+
AuthzPolicy is a resource that allows to forward traffic to a callout backend designed to scan the traffic for security purposes.
|
624
|
+
|
625
|
+
To get more information about AuthzPolicy, see:
|
626
|
+
|
627
|
+
* [API documentation](https://cloud.google.com/load-balancing/docs/reference/network-security/rest/v1beta1/projects.locations.authzPolicies)
|
628
|
+
|
629
|
+
## Example Usage
|
630
|
+
|
631
|
+
### Network Services Authz Policy Advanced
|
632
|
+
|
633
|
+
```python
|
634
|
+
import pulumi
|
635
|
+
import pulumi_gcp as gcp
|
636
|
+
|
637
|
+
default = gcp.compute.Network("default",
|
638
|
+
name="lb-network",
|
639
|
+
project="my-project-name",
|
640
|
+
auto_create_subnetworks=False)
|
641
|
+
default_subnetwork = gcp.compute.Subnetwork("default",
|
642
|
+
name="backend-subnet",
|
643
|
+
project="my-project-name",
|
644
|
+
region="us-west1",
|
645
|
+
ip_cidr_range="10.1.2.0/24",
|
646
|
+
network=default.id)
|
647
|
+
proxy_only = gcp.compute.Subnetwork("proxy_only",
|
648
|
+
name="proxy-only-subnet",
|
649
|
+
project="my-project-name",
|
650
|
+
region="us-west1",
|
651
|
+
ip_cidr_range="10.129.0.0/23",
|
652
|
+
purpose="REGIONAL_MANAGED_PROXY",
|
653
|
+
role="ACTIVE",
|
654
|
+
network=default.id)
|
655
|
+
default_address = gcp.compute.Address("default",
|
656
|
+
name="l7-ilb-ip-address",
|
657
|
+
project="my-project-name",
|
658
|
+
region="us-west1",
|
659
|
+
subnetwork=default_subnetwork.id,
|
660
|
+
address_type="INTERNAL",
|
661
|
+
purpose="GCE_ENDPOINT")
|
662
|
+
default_region_health_check = gcp.compute.RegionHealthCheck("default",
|
663
|
+
name="l7-ilb-basic-check",
|
664
|
+
project="my-project-name",
|
665
|
+
region="us-west1",
|
666
|
+
http_health_check={
|
667
|
+
"port_specification": "USE_SERVING_PORT",
|
668
|
+
})
|
669
|
+
url_map = gcp.compute.RegionBackendService("url_map",
|
670
|
+
name="l7-ilb-backend-service",
|
671
|
+
project="my-project-name",
|
672
|
+
region="us-west1",
|
673
|
+
load_balancing_scheme="INTERNAL_MANAGED",
|
674
|
+
health_checks=default_region_health_check.id)
|
675
|
+
default_region_url_map = gcp.compute.RegionUrlMap("default",
|
676
|
+
name="l7-ilb-map",
|
677
|
+
project="my-project-name",
|
678
|
+
region="us-west1",
|
679
|
+
default_service=url_map.id)
|
680
|
+
default_region_target_http_proxy = gcp.compute.RegionTargetHttpProxy("default",
|
681
|
+
name="l7-ilb-proxy",
|
682
|
+
project="my-project-name",
|
683
|
+
region="us-west1",
|
684
|
+
url_map=default_region_url_map.id)
|
685
|
+
default_forwarding_rule = gcp.compute.ForwardingRule("default",
|
686
|
+
name="l7-ilb-forwarding-rule",
|
687
|
+
project="my-project-name",
|
688
|
+
region="us-west1",
|
689
|
+
load_balancing_scheme="INTERNAL_MANAGED",
|
690
|
+
network=default.id,
|
691
|
+
subnetwork=default_subnetwork.id,
|
692
|
+
ip_protocol="TCP",
|
693
|
+
port_range="80",
|
694
|
+
target=default_region_target_http_proxy.id,
|
695
|
+
ip_address=default_address.id,
|
696
|
+
opts = pulumi.ResourceOptions(depends_on=[proxy_only]))
|
697
|
+
authz_extension = gcp.compute.RegionBackendService("authz_extension",
|
698
|
+
name="authz-service",
|
699
|
+
project="my-project-name",
|
700
|
+
region="us-west1",
|
701
|
+
protocol="HTTP2",
|
702
|
+
load_balancing_scheme="INTERNAL_MANAGED",
|
703
|
+
port_name="grpc")
|
704
|
+
default_authz_extension = gcp.networkservices.AuthzExtension("default",
|
705
|
+
name="my-authz-ext",
|
706
|
+
project="my-project-name",
|
707
|
+
location="us-west1",
|
708
|
+
description="my description",
|
709
|
+
load_balancing_scheme="INTERNAL_MANAGED",
|
710
|
+
authority="ext11.com",
|
711
|
+
service=authz_extension.self_link,
|
712
|
+
timeout="0.1s",
|
713
|
+
fail_open=False,
|
714
|
+
forward_headers=["Authorization"])
|
715
|
+
default_authz_policy = gcp.networksecurity.AuthzPolicy("default",
|
716
|
+
name="my-authz-policy",
|
717
|
+
project="my-project-name",
|
718
|
+
location="us-west1",
|
719
|
+
description="my description",
|
720
|
+
target={
|
721
|
+
"load_balancing_scheme": "INTERNAL_MANAGED",
|
722
|
+
"resources": [default_forwarding_rule.self_link],
|
723
|
+
},
|
724
|
+
action="CUSTOM",
|
725
|
+
custom_provider={
|
726
|
+
"authz_extension": {
|
727
|
+
"resources": [default_authz_extension.id],
|
728
|
+
},
|
729
|
+
})
|
730
|
+
```
|
731
|
+
|
732
|
+
## Import
|
733
|
+
|
734
|
+
AuthzPolicy can be imported using any of these accepted formats:
|
735
|
+
|
736
|
+
* `projects/{{project}}/locations/{{location}}/authzPolicies/{{name}}`
|
737
|
+
|
738
|
+
* `{{project}}/{{location}}/{{name}}`
|
739
|
+
|
740
|
+
* `{{location}}/{{name}}`
|
741
|
+
|
742
|
+
* `{{name}}`
|
743
|
+
|
744
|
+
When using the `pulumi import` command, AuthzPolicy can be imported using one of the formats above. For example:
|
745
|
+
|
746
|
+
```sh
|
747
|
+
$ pulumi import gcp:networksecurity/authzPolicy:AuthzPolicy default projects/{{project}}/locations/{{location}}/authzPolicies/{{name}}
|
748
|
+
```
|
749
|
+
|
750
|
+
```sh
|
751
|
+
$ pulumi import gcp:networksecurity/authzPolicy:AuthzPolicy default {{project}}/{{location}}/{{name}}
|
752
|
+
```
|
753
|
+
|
754
|
+
```sh
|
755
|
+
$ pulumi import gcp:networksecurity/authzPolicy:AuthzPolicy default {{location}}/{{name}}
|
756
|
+
```
|
757
|
+
|
758
|
+
```sh
|
759
|
+
$ pulumi import gcp:networksecurity/authzPolicy:AuthzPolicy default {{name}}
|
760
|
+
```
|
761
|
+
|
762
|
+
:param str resource_name: The name of the resource.
|
763
|
+
:param AuthzPolicyArgs args: The arguments to use to populate this resource's properties.
|
764
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
765
|
+
"""
|
766
|
+
...
|
767
|
+
def __init__(__self__, resource_name: str, *args, **kwargs):
|
768
|
+
resource_args, opts = _utilities.get_resource_args_opts(AuthzPolicyArgs, pulumi.ResourceOptions, *args, **kwargs)
|
769
|
+
if resource_args is not None:
|
770
|
+
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
|
771
|
+
else:
|
772
|
+
__self__._internal_init(resource_name, *args, **kwargs)
|
773
|
+
|
774
|
+
def _internal_init(__self__,
|
775
|
+
resource_name: str,
|
776
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
777
|
+
action: Optional[pulumi.Input[str]] = None,
|
778
|
+
custom_provider: Optional[pulumi.Input[Union['AuthzPolicyCustomProviderArgs', 'AuthzPolicyCustomProviderArgsDict']]] = None,
|
779
|
+
description: Optional[pulumi.Input[str]] = None,
|
780
|
+
http_rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union['AuthzPolicyHttpRuleArgs', 'AuthzPolicyHttpRuleArgsDict']]]]] = None,
|
781
|
+
labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
782
|
+
location: Optional[pulumi.Input[str]] = None,
|
783
|
+
name: Optional[pulumi.Input[str]] = None,
|
784
|
+
project: Optional[pulumi.Input[str]] = None,
|
785
|
+
target: Optional[pulumi.Input[Union['AuthzPolicyTargetArgs', 'AuthzPolicyTargetArgsDict']]] = None,
|
786
|
+
__props__=None):
|
787
|
+
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
788
|
+
if not isinstance(opts, pulumi.ResourceOptions):
|
789
|
+
raise TypeError('Expected resource options to be a ResourceOptions instance')
|
790
|
+
if opts.id is None:
|
791
|
+
if __props__ is not None:
|
792
|
+
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
|
793
|
+
__props__ = AuthzPolicyArgs.__new__(AuthzPolicyArgs)
|
794
|
+
|
795
|
+
if action is None and not opts.urn:
|
796
|
+
raise TypeError("Missing required property 'action'")
|
797
|
+
__props__.__dict__["action"] = action
|
798
|
+
__props__.__dict__["custom_provider"] = custom_provider
|
799
|
+
__props__.__dict__["description"] = description
|
800
|
+
__props__.__dict__["http_rules"] = http_rules
|
801
|
+
__props__.__dict__["labels"] = labels
|
802
|
+
if location is None and not opts.urn:
|
803
|
+
raise TypeError("Missing required property 'location'")
|
804
|
+
__props__.__dict__["location"] = location
|
805
|
+
__props__.__dict__["name"] = name
|
806
|
+
__props__.__dict__["project"] = project
|
807
|
+
if target is None and not opts.urn:
|
808
|
+
raise TypeError("Missing required property 'target'")
|
809
|
+
__props__.__dict__["target"] = target
|
810
|
+
__props__.__dict__["create_time"] = None
|
811
|
+
__props__.__dict__["effective_labels"] = None
|
812
|
+
__props__.__dict__["pulumi_labels"] = None
|
813
|
+
__props__.__dict__["update_time"] = None
|
814
|
+
secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["effectiveLabels", "pulumiLabels"])
|
815
|
+
opts = pulumi.ResourceOptions.merge(opts, secret_opts)
|
816
|
+
super(AuthzPolicy, __self__).__init__(
|
817
|
+
'gcp:networksecurity/authzPolicy:AuthzPolicy',
|
818
|
+
resource_name,
|
819
|
+
__props__,
|
820
|
+
opts)
|
821
|
+
|
822
|
+
@staticmethod
|
823
|
+
def get(resource_name: str,
|
824
|
+
id: pulumi.Input[str],
|
825
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
826
|
+
action: Optional[pulumi.Input[str]] = None,
|
827
|
+
create_time: Optional[pulumi.Input[str]] = None,
|
828
|
+
custom_provider: Optional[pulumi.Input[Union['AuthzPolicyCustomProviderArgs', 'AuthzPolicyCustomProviderArgsDict']]] = None,
|
829
|
+
description: Optional[pulumi.Input[str]] = None,
|
830
|
+
effective_labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
831
|
+
http_rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union['AuthzPolicyHttpRuleArgs', 'AuthzPolicyHttpRuleArgsDict']]]]] = None,
|
832
|
+
labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
833
|
+
location: Optional[pulumi.Input[str]] = None,
|
834
|
+
name: Optional[pulumi.Input[str]] = None,
|
835
|
+
project: Optional[pulumi.Input[str]] = None,
|
836
|
+
pulumi_labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
837
|
+
target: Optional[pulumi.Input[Union['AuthzPolicyTargetArgs', 'AuthzPolicyTargetArgsDict']]] = None,
|
838
|
+
update_time: Optional[pulumi.Input[str]] = None) -> 'AuthzPolicy':
|
839
|
+
"""
|
840
|
+
Get an existing AuthzPolicy resource's state with the given name, id, and optional extra
|
841
|
+
properties used to qualify the lookup.
|
842
|
+
|
843
|
+
:param str resource_name: The unique name of the resulting resource.
|
844
|
+
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
845
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
846
|
+
:param pulumi.Input[str] action: When the action is CUSTOM, customProvider must be specified.
|
847
|
+
When the action is ALLOW, only requests matching the policy will be allowed.
|
848
|
+
When the action is DENY, only requests matching the policy will be denied.
|
849
|
+
When a request arrives, the policies are evaluated in the following order:
|
850
|
+
1. If there is a CUSTOM policy that matches the request, the CUSTOM policy is evaluated using the custom authorization providers and the request is denied if the provider rejects the request.
|
851
|
+
2. If there are any DENY policies that match the request, the request is denied.
|
852
|
+
3. If there are no ALLOW policies for the resource or if any of the ALLOW policies match the request, the request is allowed.
|
853
|
+
4. Else the request is denied by default if none of the configured AuthzPolicies with ALLOW action match the request.
|
854
|
+
Possible values are: `ALLOW`, `DENY`, `CUSTOM`.
|
855
|
+
:param pulumi.Input[str] create_time: The timestamp when the resource was created.
|
856
|
+
:param pulumi.Input[Union['AuthzPolicyCustomProviderArgs', 'AuthzPolicyCustomProviderArgsDict']] custom_provider: Required if the action is CUSTOM. Allows delegating authorization decisions to Cloud IAP or to Service Extensions. One
|
857
|
+
of cloudIap or authzExtension must be specified.
|
858
|
+
:param pulumi.Input[str] description: A human-readable description of the resource.
|
859
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] effective_labels: All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
|
860
|
+
:param pulumi.Input[Sequence[pulumi.Input[Union['AuthzPolicyHttpRuleArgs', 'AuthzPolicyHttpRuleArgsDict']]]] http_rules: A list of authorization HTTP rules to match against the incoming request.A policy match occurs when at least one HTTP
|
861
|
+
rule matches the request or when no HTTP rules are specified in the policy. At least one HTTP Rule is required for Allow
|
862
|
+
or Deny Action. Limited to 5 rules.
|
863
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: Set of labels associated with the AuthzExtension resource. **Note**: This field is non-authoritative, and will only
|
864
|
+
manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels
|
865
|
+
present on the resource.
|
866
|
+
:param pulumi.Input[str] location: The location of the resource.
|
867
|
+
:param pulumi.Input[str] name: Identifier. Name of the AuthzPolicy resource.
|
868
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] pulumi_labels: The combination of labels configured directly on the resource
|
869
|
+
and default labels configured on the provider.
|
870
|
+
:param pulumi.Input[Union['AuthzPolicyTargetArgs', 'AuthzPolicyTargetArgsDict']] target: Specifies the set of resources to which this policy should be applied to.
|
871
|
+
Structure is documented below.
|
872
|
+
:param pulumi.Input[str] update_time: The timestamp when the resource was updated.
|
873
|
+
"""
|
874
|
+
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
875
|
+
|
876
|
+
__props__ = _AuthzPolicyState.__new__(_AuthzPolicyState)
|
877
|
+
|
878
|
+
__props__.__dict__["action"] = action
|
879
|
+
__props__.__dict__["create_time"] = create_time
|
880
|
+
__props__.__dict__["custom_provider"] = custom_provider
|
881
|
+
__props__.__dict__["description"] = description
|
882
|
+
__props__.__dict__["effective_labels"] = effective_labels
|
883
|
+
__props__.__dict__["http_rules"] = http_rules
|
884
|
+
__props__.__dict__["labels"] = labels
|
885
|
+
__props__.__dict__["location"] = location
|
886
|
+
__props__.__dict__["name"] = name
|
887
|
+
__props__.__dict__["project"] = project
|
888
|
+
__props__.__dict__["pulumi_labels"] = pulumi_labels
|
889
|
+
__props__.__dict__["target"] = target
|
890
|
+
__props__.__dict__["update_time"] = update_time
|
891
|
+
return AuthzPolicy(resource_name, opts=opts, __props__=__props__)
|
892
|
+
|
893
|
+
@property
|
894
|
+
@pulumi.getter
|
895
|
+
def action(self) -> pulumi.Output[str]:
|
896
|
+
"""
|
897
|
+
When the action is CUSTOM, customProvider must be specified.
|
898
|
+
When the action is ALLOW, only requests matching the policy will be allowed.
|
899
|
+
When the action is DENY, only requests matching the policy will be denied.
|
900
|
+
When a request arrives, the policies are evaluated in the following order:
|
901
|
+
1. If there is a CUSTOM policy that matches the request, the CUSTOM policy is evaluated using the custom authorization providers and the request is denied if the provider rejects the request.
|
902
|
+
2. If there are any DENY policies that match the request, the request is denied.
|
903
|
+
3. If there are no ALLOW policies for the resource or if any of the ALLOW policies match the request, the request is allowed.
|
904
|
+
4. Else the request is denied by default if none of the configured AuthzPolicies with ALLOW action match the request.
|
905
|
+
Possible values are: `ALLOW`, `DENY`, `CUSTOM`.
|
906
|
+
"""
|
907
|
+
return pulumi.get(self, "action")
|
908
|
+
|
909
|
+
@property
|
910
|
+
@pulumi.getter(name="createTime")
|
911
|
+
def create_time(self) -> pulumi.Output[str]:
|
912
|
+
"""
|
913
|
+
The timestamp when the resource was created.
|
914
|
+
"""
|
915
|
+
return pulumi.get(self, "create_time")
|
916
|
+
|
917
|
+
@property
|
918
|
+
@pulumi.getter(name="customProvider")
|
919
|
+
def custom_provider(self) -> pulumi.Output[Optional['outputs.AuthzPolicyCustomProvider']]:
|
920
|
+
"""
|
921
|
+
Required if the action is CUSTOM. Allows delegating authorization decisions to Cloud IAP or to Service Extensions. One
|
922
|
+
of cloudIap or authzExtension must be specified.
|
923
|
+
"""
|
924
|
+
return pulumi.get(self, "custom_provider")
|
925
|
+
|
926
|
+
@property
|
927
|
+
@pulumi.getter
|
928
|
+
def description(self) -> pulumi.Output[Optional[str]]:
|
929
|
+
"""
|
930
|
+
A human-readable description of the resource.
|
931
|
+
"""
|
932
|
+
return pulumi.get(self, "description")
|
933
|
+
|
934
|
+
@property
|
935
|
+
@pulumi.getter(name="effectiveLabels")
|
936
|
+
def effective_labels(self) -> pulumi.Output[Mapping[str, str]]:
|
937
|
+
"""
|
938
|
+
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
|
939
|
+
"""
|
940
|
+
return pulumi.get(self, "effective_labels")
|
941
|
+
|
942
|
+
@property
|
943
|
+
@pulumi.getter(name="httpRules")
|
944
|
+
def http_rules(self) -> pulumi.Output[Optional[Sequence['outputs.AuthzPolicyHttpRule']]]:
|
945
|
+
"""
|
946
|
+
A list of authorization HTTP rules to match against the incoming request.A policy match occurs when at least one HTTP
|
947
|
+
rule matches the request or when no HTTP rules are specified in the policy. At least one HTTP Rule is required for Allow
|
948
|
+
or Deny Action. Limited to 5 rules.
|
949
|
+
"""
|
950
|
+
return pulumi.get(self, "http_rules")
|
951
|
+
|
952
|
+
@property
|
953
|
+
@pulumi.getter
|
954
|
+
def labels(self) -> pulumi.Output[Optional[Mapping[str, str]]]:
|
955
|
+
"""
|
956
|
+
Set of labels associated with the AuthzExtension resource. **Note**: This field is non-authoritative, and will only
|
957
|
+
manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels
|
958
|
+
present on the resource.
|
959
|
+
"""
|
960
|
+
return pulumi.get(self, "labels")
|
961
|
+
|
962
|
+
@property
|
963
|
+
@pulumi.getter
|
964
|
+
def location(self) -> pulumi.Output[str]:
|
965
|
+
"""
|
966
|
+
The location of the resource.
|
967
|
+
"""
|
968
|
+
return pulumi.get(self, "location")
|
969
|
+
|
970
|
+
@property
|
971
|
+
@pulumi.getter
|
972
|
+
def name(self) -> pulumi.Output[str]:
|
973
|
+
"""
|
974
|
+
Identifier. Name of the AuthzPolicy resource.
|
975
|
+
"""
|
976
|
+
return pulumi.get(self, "name")
|
977
|
+
|
978
|
+
@property
|
979
|
+
@pulumi.getter
|
980
|
+
def project(self) -> pulumi.Output[str]:
|
981
|
+
return pulumi.get(self, "project")
|
982
|
+
|
983
|
+
@property
|
984
|
+
@pulumi.getter(name="pulumiLabels")
|
985
|
+
def pulumi_labels(self) -> pulumi.Output[Mapping[str, str]]:
|
986
|
+
"""
|
987
|
+
The combination of labels configured directly on the resource
|
988
|
+
and default labels configured on the provider.
|
989
|
+
"""
|
990
|
+
return pulumi.get(self, "pulumi_labels")
|
991
|
+
|
992
|
+
@property
|
993
|
+
@pulumi.getter
|
994
|
+
def target(self) -> pulumi.Output['outputs.AuthzPolicyTarget']:
|
995
|
+
"""
|
996
|
+
Specifies the set of resources to which this policy should be applied to.
|
997
|
+
Structure is documented below.
|
998
|
+
"""
|
999
|
+
return pulumi.get(self, "target")
|
1000
|
+
|
1001
|
+
@property
|
1002
|
+
@pulumi.getter(name="updateTime")
|
1003
|
+
def update_time(self) -> pulumi.Output[str]:
|
1004
|
+
"""
|
1005
|
+
The timestamp when the resource was updated.
|
1006
|
+
"""
|
1007
|
+
return pulumi.get(self, "update_time")
|
1008
|
+
|