pulumi-gcp 7.16.0a1711520590__py3-none-any.whl → 7.16.0a1711535676__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 +8 -0
- pulumi_gcp/accesscontextmanager/__init__.py +1 -0
- pulumi_gcp/accesscontextmanager/service_perimeter_dry_run_resource.py +345 -0
- pulumi_gcp/accesscontextmanager/service_perimeter_egress_policy.py +80 -0
- pulumi_gcp/accesscontextmanager/service_perimeter_ingress_policy.py +86 -0
- pulumi_gcp/accesscontextmanager/service_perimeter_resource.py +4 -2
- pulumi_gcp/cloudquota/__init__.py +1 -0
- pulumi_gcp/cloudquota/get_s_quota_infos.py +136 -0
- pulumi_gcp/cloudquota/outputs.py +270 -0
- pulumi_gcp/cloudrunv2/_inputs.py +59 -2
- pulumi_gcp/cloudrunv2/outputs.py +107 -4
- pulumi_gcp/cloudrunv2/service.py +6 -6
- pulumi_gcp/composer/_inputs.py +16 -0
- pulumi_gcp/composer/outputs.py +23 -0
- pulumi_gcp/compute/_inputs.py +105 -7
- pulumi_gcp/compute/outputs.py +140 -9
- pulumi_gcp/compute/region_url_map.py +152 -0
- pulumi_gcp/dataform/repository.py +4 -74
- pulumi_gcp/firebase/android_app.py +41 -40
- pulumi_gcp/firestore/index.py +34 -48
- pulumi_gcp/monitoring/_inputs.py +2 -0
- pulumi_gcp/monitoring/outputs.py +2 -0
- pulumi_gcp/networksecurity/firewall_endpoint.py +48 -0
- pulumi_gcp/pubsub/_inputs.py +108 -0
- pulumi_gcp/pubsub/get_topic.py +11 -1
- pulumi_gcp/pubsub/outputs.py +213 -0
- pulumi_gcp/pubsub/topic.py +92 -0
- pulumi_gcp/storage/_inputs.py +40 -0
- pulumi_gcp/storage/bucket.py +54 -0
- pulumi_gcp/storage/get_bucket.py +11 -1
- pulumi_gcp/storage/outputs.py +81 -0
- pulumi_gcp/workstations/_inputs.py +113 -0
- pulumi_gcp/workstations/outputs.py +109 -1
- pulumi_gcp/workstations/workstation_config.py +106 -0
- {pulumi_gcp-7.16.0a1711520590.dist-info → pulumi_gcp-7.16.0a1711535676.dist-info}/METADATA +1 -1
- {pulumi_gcp-7.16.0a1711520590.dist-info → pulumi_gcp-7.16.0a1711535676.dist-info}/RECORD +38 -36
- {pulumi_gcp-7.16.0a1711520590.dist-info → pulumi_gcp-7.16.0a1711535676.dist-info}/WHEEL +0 -0
- {pulumi_gcp-7.16.0a1711520590.dist-info → pulumi_gcp-7.16.0a1711535676.dist-info}/top_level.txt +0 -0
pulumi_gcp/__init__.py
CHANGED
@@ -459,6 +459,14 @@ _utilities.register(
|
|
459
459
|
"gcp:accesscontextmanager/servicePerimeter:ServicePerimeter": "ServicePerimeter"
|
460
460
|
}
|
461
461
|
},
|
462
|
+
{
|
463
|
+
"pkg": "gcp",
|
464
|
+
"mod": "accesscontextmanager/servicePerimeterDryRunResource",
|
465
|
+
"fqn": "pulumi_gcp.accesscontextmanager",
|
466
|
+
"classes": {
|
467
|
+
"gcp:accesscontextmanager/servicePerimeterDryRunResource:ServicePerimeterDryRunResource": "ServicePerimeterDryRunResource"
|
468
|
+
}
|
469
|
+
},
|
462
470
|
{
|
463
471
|
"pkg": "gcp",
|
464
472
|
"mod": "accesscontextmanager/servicePerimeterEgressPolicy",
|
@@ -18,6 +18,7 @@ from .gcp_user_access_binding import *
|
|
18
18
|
from .get_access_policy_iam_policy import *
|
19
19
|
from .ingress_policy import *
|
20
20
|
from .service_perimeter import *
|
21
|
+
from .service_perimeter_dry_run_resource import *
|
21
22
|
from .service_perimeter_egress_policy import *
|
22
23
|
from .service_perimeter_ingress_policy import *
|
23
24
|
from .service_perimeter_resource import *
|
@@ -0,0 +1,345 @@
|
|
1
|
+
# coding=utf-8
|
2
|
+
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
4
|
+
|
5
|
+
import copy
|
6
|
+
import warnings
|
7
|
+
import pulumi
|
8
|
+
import pulumi.runtime
|
9
|
+
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
10
|
+
from .. import _utilities
|
11
|
+
|
12
|
+
__all__ = ['ServicePerimeterDryRunResourceArgs', 'ServicePerimeterDryRunResource']
|
13
|
+
|
14
|
+
@pulumi.input_type
|
15
|
+
class ServicePerimeterDryRunResourceArgs:
|
16
|
+
def __init__(__self__, *,
|
17
|
+
perimeter_name: pulumi.Input[str],
|
18
|
+
resource: pulumi.Input[str]):
|
19
|
+
"""
|
20
|
+
The set of arguments for constructing a ServicePerimeterDryRunResource resource.
|
21
|
+
:param pulumi.Input[str] perimeter_name: The name of the Service Perimeter to add this resource to.
|
22
|
+
|
23
|
+
|
24
|
+
- - -
|
25
|
+
:param pulumi.Input[str] resource: A GCP resource that is inside of the service perimeter.
|
26
|
+
Currently only projects are allowed.
|
27
|
+
Format: projects/{project_number}
|
28
|
+
"""
|
29
|
+
pulumi.set(__self__, "perimeter_name", perimeter_name)
|
30
|
+
pulumi.set(__self__, "resource", resource)
|
31
|
+
|
32
|
+
@property
|
33
|
+
@pulumi.getter(name="perimeterName")
|
34
|
+
def perimeter_name(self) -> pulumi.Input[str]:
|
35
|
+
"""
|
36
|
+
The name of the Service Perimeter to add this resource to.
|
37
|
+
|
38
|
+
|
39
|
+
- - -
|
40
|
+
"""
|
41
|
+
return pulumi.get(self, "perimeter_name")
|
42
|
+
|
43
|
+
@perimeter_name.setter
|
44
|
+
def perimeter_name(self, value: pulumi.Input[str]):
|
45
|
+
pulumi.set(self, "perimeter_name", value)
|
46
|
+
|
47
|
+
@property
|
48
|
+
@pulumi.getter
|
49
|
+
def resource(self) -> pulumi.Input[str]:
|
50
|
+
"""
|
51
|
+
A GCP resource that is inside of the service perimeter.
|
52
|
+
Currently only projects are allowed.
|
53
|
+
Format: projects/{project_number}
|
54
|
+
"""
|
55
|
+
return pulumi.get(self, "resource")
|
56
|
+
|
57
|
+
@resource.setter
|
58
|
+
def resource(self, value: pulumi.Input[str]):
|
59
|
+
pulumi.set(self, "resource", value)
|
60
|
+
|
61
|
+
|
62
|
+
@pulumi.input_type
|
63
|
+
class _ServicePerimeterDryRunResourceState:
|
64
|
+
def __init__(__self__, *,
|
65
|
+
perimeter_name: Optional[pulumi.Input[str]] = None,
|
66
|
+
resource: Optional[pulumi.Input[str]] = None):
|
67
|
+
"""
|
68
|
+
Input properties used for looking up and filtering ServicePerimeterDryRunResource resources.
|
69
|
+
:param pulumi.Input[str] perimeter_name: The name of the Service Perimeter to add this resource to.
|
70
|
+
|
71
|
+
|
72
|
+
- - -
|
73
|
+
:param pulumi.Input[str] resource: A GCP resource that is inside of the service perimeter.
|
74
|
+
Currently only projects are allowed.
|
75
|
+
Format: projects/{project_number}
|
76
|
+
"""
|
77
|
+
if perimeter_name is not None:
|
78
|
+
pulumi.set(__self__, "perimeter_name", perimeter_name)
|
79
|
+
if resource is not None:
|
80
|
+
pulumi.set(__self__, "resource", resource)
|
81
|
+
|
82
|
+
@property
|
83
|
+
@pulumi.getter(name="perimeterName")
|
84
|
+
def perimeter_name(self) -> Optional[pulumi.Input[str]]:
|
85
|
+
"""
|
86
|
+
The name of the Service Perimeter to add this resource to.
|
87
|
+
|
88
|
+
|
89
|
+
- - -
|
90
|
+
"""
|
91
|
+
return pulumi.get(self, "perimeter_name")
|
92
|
+
|
93
|
+
@perimeter_name.setter
|
94
|
+
def perimeter_name(self, value: Optional[pulumi.Input[str]]):
|
95
|
+
pulumi.set(self, "perimeter_name", value)
|
96
|
+
|
97
|
+
@property
|
98
|
+
@pulumi.getter
|
99
|
+
def resource(self) -> Optional[pulumi.Input[str]]:
|
100
|
+
"""
|
101
|
+
A GCP resource that is inside of the service perimeter.
|
102
|
+
Currently only projects are allowed.
|
103
|
+
Format: projects/{project_number}
|
104
|
+
"""
|
105
|
+
return pulumi.get(self, "resource")
|
106
|
+
|
107
|
+
@resource.setter
|
108
|
+
def resource(self, value: Optional[pulumi.Input[str]]):
|
109
|
+
pulumi.set(self, "resource", value)
|
110
|
+
|
111
|
+
|
112
|
+
class ServicePerimeterDryRunResource(pulumi.CustomResource):
|
113
|
+
@overload
|
114
|
+
def __init__(__self__,
|
115
|
+
resource_name: str,
|
116
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
117
|
+
perimeter_name: Optional[pulumi.Input[str]] = None,
|
118
|
+
resource: Optional[pulumi.Input[str]] = None,
|
119
|
+
__props__=None):
|
120
|
+
"""
|
121
|
+
Allows configuring a single GCP resource that should be inside of the `spec` block of a dry run service perimeter.
|
122
|
+
This resource is intended to be used in cases where it is not possible to compile a full list
|
123
|
+
of projects to include in a `accesscontextmanager.ServicePerimeter` resource,
|
124
|
+
to enable them to be added separately.
|
125
|
+
If your perimeter is NOT in dry-run mode use `accesscontextmanager.ServicePerimeterResource` instead.
|
126
|
+
|
127
|
+
> **Note:** If this resource is used alongside a `accesscontextmanager.ServicePerimeter` resource,
|
128
|
+
the service perimeter resource must have a `lifecycle` block with `ignore_changes = [spec[0].resources]` so
|
129
|
+
they don't fight over which resources should be in the policy.
|
130
|
+
|
131
|
+
To get more information about ServicePerimeterDryRunResource, see:
|
132
|
+
|
133
|
+
* [API documentation](https://cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters)
|
134
|
+
* How-to Guides
|
135
|
+
* [Service Perimeter Quickstart](https://cloud.google.com/vpc-service-controls/docs/quickstart)
|
136
|
+
|
137
|
+
> **Warning:** If you are using User ADCs (Application Default Credentials) with this resource,
|
138
|
+
you must specify a `billing_project` and set `user_project_override` to true
|
139
|
+
in the provider configuration. Otherwise the ACM API will return a 403 error.
|
140
|
+
Your account must have the `serviceusage.services.use` permission on the
|
141
|
+
`billing_project` you defined.
|
142
|
+
|
143
|
+
## Example Usage
|
144
|
+
|
145
|
+
### Access Context Manager Service Perimeter Dry Run Resource Basic
|
146
|
+
|
147
|
+
<!--Start PulumiCodeChooser -->
|
148
|
+
```python
|
149
|
+
import pulumi
|
150
|
+
import pulumi_gcp as gcp
|
151
|
+
|
152
|
+
access_policy = gcp.accesscontextmanager.AccessPolicy("access-policy",
|
153
|
+
parent="organizations/123456789",
|
154
|
+
title="my policy")
|
155
|
+
service_perimeter_dry_run_resource_service_perimeter = gcp.accesscontextmanager.ServicePerimeter("service-perimeter-dry-run-resource",
|
156
|
+
parent=access_policy.name.apply(lambda name: f"accessPolicies/{name}"),
|
157
|
+
name=access_policy.name.apply(lambda name: f"accessPolicies/{name}/servicePerimeters/restrict_all"),
|
158
|
+
title="restrict_all",
|
159
|
+
spec=gcp.accesscontextmanager.ServicePerimeterSpecArgs(
|
160
|
+
restricted_services=["storage.googleapis.com"],
|
161
|
+
),
|
162
|
+
use_explicit_dry_run_spec=True)
|
163
|
+
service_perimeter_dry_run_resource = gcp.accesscontextmanager.ServicePerimeterDryRunResource("service-perimeter-dry-run-resource",
|
164
|
+
perimeter_name=service_perimeter_dry_run_resource_service_perimeter.name,
|
165
|
+
resource="projects/987654321")
|
166
|
+
```
|
167
|
+
<!--End PulumiCodeChooser -->
|
168
|
+
|
169
|
+
## Import
|
170
|
+
|
171
|
+
ServicePerimeterDryRunResource can be imported using any of these accepted formats:
|
172
|
+
|
173
|
+
* `{{perimeter_name}}/{{resource}}`
|
174
|
+
|
175
|
+
When using the `pulumi import` command, ServicePerimeterDryRunResource can be imported using one of the formats above. For example:
|
176
|
+
|
177
|
+
```sh
|
178
|
+
$ pulumi import gcp:accesscontextmanager/servicePerimeterDryRunResource:ServicePerimeterDryRunResource default {{perimeter_name}}/{{resource}}
|
179
|
+
```
|
180
|
+
|
181
|
+
:param str resource_name: The name of the resource.
|
182
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
183
|
+
:param pulumi.Input[str] perimeter_name: The name of the Service Perimeter to add this resource to.
|
184
|
+
|
185
|
+
|
186
|
+
- - -
|
187
|
+
:param pulumi.Input[str] resource: A GCP resource that is inside of the service perimeter.
|
188
|
+
Currently only projects are allowed.
|
189
|
+
Format: projects/{project_number}
|
190
|
+
"""
|
191
|
+
...
|
192
|
+
@overload
|
193
|
+
def __init__(__self__,
|
194
|
+
resource_name: str,
|
195
|
+
args: ServicePerimeterDryRunResourceArgs,
|
196
|
+
opts: Optional[pulumi.ResourceOptions] = None):
|
197
|
+
"""
|
198
|
+
Allows configuring a single GCP resource that should be inside of the `spec` block of a dry run service perimeter.
|
199
|
+
This resource is intended to be used in cases where it is not possible to compile a full list
|
200
|
+
of projects to include in a `accesscontextmanager.ServicePerimeter` resource,
|
201
|
+
to enable them to be added separately.
|
202
|
+
If your perimeter is NOT in dry-run mode use `accesscontextmanager.ServicePerimeterResource` instead.
|
203
|
+
|
204
|
+
> **Note:** If this resource is used alongside a `accesscontextmanager.ServicePerimeter` resource,
|
205
|
+
the service perimeter resource must have a `lifecycle` block with `ignore_changes = [spec[0].resources]` so
|
206
|
+
they don't fight over which resources should be in the policy.
|
207
|
+
|
208
|
+
To get more information about ServicePerimeterDryRunResource, see:
|
209
|
+
|
210
|
+
* [API documentation](https://cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters)
|
211
|
+
* How-to Guides
|
212
|
+
* [Service Perimeter Quickstart](https://cloud.google.com/vpc-service-controls/docs/quickstart)
|
213
|
+
|
214
|
+
> **Warning:** If you are using User ADCs (Application Default Credentials) with this resource,
|
215
|
+
you must specify a `billing_project` and set `user_project_override` to true
|
216
|
+
in the provider configuration. Otherwise the ACM API will return a 403 error.
|
217
|
+
Your account must have the `serviceusage.services.use` permission on the
|
218
|
+
`billing_project` you defined.
|
219
|
+
|
220
|
+
## Example Usage
|
221
|
+
|
222
|
+
### Access Context Manager Service Perimeter Dry Run Resource Basic
|
223
|
+
|
224
|
+
<!--Start PulumiCodeChooser -->
|
225
|
+
```python
|
226
|
+
import pulumi
|
227
|
+
import pulumi_gcp as gcp
|
228
|
+
|
229
|
+
access_policy = gcp.accesscontextmanager.AccessPolicy("access-policy",
|
230
|
+
parent="organizations/123456789",
|
231
|
+
title="my policy")
|
232
|
+
service_perimeter_dry_run_resource_service_perimeter = gcp.accesscontextmanager.ServicePerimeter("service-perimeter-dry-run-resource",
|
233
|
+
parent=access_policy.name.apply(lambda name: f"accessPolicies/{name}"),
|
234
|
+
name=access_policy.name.apply(lambda name: f"accessPolicies/{name}/servicePerimeters/restrict_all"),
|
235
|
+
title="restrict_all",
|
236
|
+
spec=gcp.accesscontextmanager.ServicePerimeterSpecArgs(
|
237
|
+
restricted_services=["storage.googleapis.com"],
|
238
|
+
),
|
239
|
+
use_explicit_dry_run_spec=True)
|
240
|
+
service_perimeter_dry_run_resource = gcp.accesscontextmanager.ServicePerimeterDryRunResource("service-perimeter-dry-run-resource",
|
241
|
+
perimeter_name=service_perimeter_dry_run_resource_service_perimeter.name,
|
242
|
+
resource="projects/987654321")
|
243
|
+
```
|
244
|
+
<!--End PulumiCodeChooser -->
|
245
|
+
|
246
|
+
## Import
|
247
|
+
|
248
|
+
ServicePerimeterDryRunResource can be imported using any of these accepted formats:
|
249
|
+
|
250
|
+
* `{{perimeter_name}}/{{resource}}`
|
251
|
+
|
252
|
+
When using the `pulumi import` command, ServicePerimeterDryRunResource can be imported using one of the formats above. For example:
|
253
|
+
|
254
|
+
```sh
|
255
|
+
$ pulumi import gcp:accesscontextmanager/servicePerimeterDryRunResource:ServicePerimeterDryRunResource default {{perimeter_name}}/{{resource}}
|
256
|
+
```
|
257
|
+
|
258
|
+
:param str resource_name: The name of the resource.
|
259
|
+
:param ServicePerimeterDryRunResourceArgs args: The arguments to use to populate this resource's properties.
|
260
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
261
|
+
"""
|
262
|
+
...
|
263
|
+
def __init__(__self__, resource_name: str, *args, **kwargs):
|
264
|
+
resource_args, opts = _utilities.get_resource_args_opts(ServicePerimeterDryRunResourceArgs, pulumi.ResourceOptions, *args, **kwargs)
|
265
|
+
if resource_args is not None:
|
266
|
+
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
|
267
|
+
else:
|
268
|
+
__self__._internal_init(resource_name, *args, **kwargs)
|
269
|
+
|
270
|
+
def _internal_init(__self__,
|
271
|
+
resource_name: str,
|
272
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
273
|
+
perimeter_name: Optional[pulumi.Input[str]] = None,
|
274
|
+
resource: Optional[pulumi.Input[str]] = None,
|
275
|
+
__props__=None):
|
276
|
+
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
277
|
+
if not isinstance(opts, pulumi.ResourceOptions):
|
278
|
+
raise TypeError('Expected resource options to be a ResourceOptions instance')
|
279
|
+
if opts.id is None:
|
280
|
+
if __props__ is not None:
|
281
|
+
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
|
282
|
+
__props__ = ServicePerimeterDryRunResourceArgs.__new__(ServicePerimeterDryRunResourceArgs)
|
283
|
+
|
284
|
+
if perimeter_name is None and not opts.urn:
|
285
|
+
raise TypeError("Missing required property 'perimeter_name'")
|
286
|
+
__props__.__dict__["perimeter_name"] = perimeter_name
|
287
|
+
if resource is None and not opts.urn:
|
288
|
+
raise TypeError("Missing required property 'resource'")
|
289
|
+
__props__.__dict__["resource"] = resource
|
290
|
+
super(ServicePerimeterDryRunResource, __self__).__init__(
|
291
|
+
'gcp:accesscontextmanager/servicePerimeterDryRunResource:ServicePerimeterDryRunResource',
|
292
|
+
resource_name,
|
293
|
+
__props__,
|
294
|
+
opts)
|
295
|
+
|
296
|
+
@staticmethod
|
297
|
+
def get(resource_name: str,
|
298
|
+
id: pulumi.Input[str],
|
299
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
300
|
+
perimeter_name: Optional[pulumi.Input[str]] = None,
|
301
|
+
resource: Optional[pulumi.Input[str]] = None) -> 'ServicePerimeterDryRunResource':
|
302
|
+
"""
|
303
|
+
Get an existing ServicePerimeterDryRunResource resource's state with the given name, id, and optional extra
|
304
|
+
properties used to qualify the lookup.
|
305
|
+
|
306
|
+
:param str resource_name: The unique name of the resulting resource.
|
307
|
+
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
308
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
309
|
+
:param pulumi.Input[str] perimeter_name: The name of the Service Perimeter to add this resource to.
|
310
|
+
|
311
|
+
|
312
|
+
- - -
|
313
|
+
:param pulumi.Input[str] resource: A GCP resource that is inside of the service perimeter.
|
314
|
+
Currently only projects are allowed.
|
315
|
+
Format: projects/{project_number}
|
316
|
+
"""
|
317
|
+
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
318
|
+
|
319
|
+
__props__ = _ServicePerimeterDryRunResourceState.__new__(_ServicePerimeterDryRunResourceState)
|
320
|
+
|
321
|
+
__props__.__dict__["perimeter_name"] = perimeter_name
|
322
|
+
__props__.__dict__["resource"] = resource
|
323
|
+
return ServicePerimeterDryRunResource(resource_name, opts=opts, __props__=__props__)
|
324
|
+
|
325
|
+
@property
|
326
|
+
@pulumi.getter(name="perimeterName")
|
327
|
+
def perimeter_name(self) -> pulumi.Output[str]:
|
328
|
+
"""
|
329
|
+
The name of the Service Perimeter to add this resource to.
|
330
|
+
|
331
|
+
|
332
|
+
- - -
|
333
|
+
"""
|
334
|
+
return pulumi.get(self, "perimeter_name")
|
335
|
+
|
336
|
+
@property
|
337
|
+
@pulumi.getter
|
338
|
+
def resource(self) -> pulumi.Output[str]:
|
339
|
+
"""
|
340
|
+
A GCP resource that is inside of the service perimeter.
|
341
|
+
Currently only projects are allowed.
|
342
|
+
Format: projects/{project_number}
|
343
|
+
"""
|
344
|
+
return pulumi.get(self, "resource")
|
345
|
+
|
@@ -166,10 +166,50 @@ class ServicePerimeterEgressPolicy(pulumi.CustomResource):
|
|
166
166
|
perimeter in certain contexts (e.g. to read data from a Cloud Storage bucket
|
167
167
|
or query against a BigQuery dataset).
|
168
168
|
|
169
|
+
> **Note:** By default, updates to this resource will remove the EgressPolicy from the
|
170
|
+
from the perimeter and add it back in a non-atomic manner. To ensure that the new EgressPolicy
|
171
|
+
is added before the old one is removed, add a `lifecycle` block with `create_before_destroy = true` to this resource.
|
172
|
+
|
169
173
|
To get more information about ServicePerimeterEgressPolicy, see:
|
170
174
|
|
171
175
|
* [API documentation](https://cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#egresspolicy)
|
172
176
|
|
177
|
+
## Example Usage
|
178
|
+
|
179
|
+
### Access Context Manager Service Perimeter Egress Policy
|
180
|
+
|
181
|
+
<!--Start PulumiCodeChooser -->
|
182
|
+
```python
|
183
|
+
import pulumi
|
184
|
+
import pulumi_gcp as gcp
|
185
|
+
|
186
|
+
access_policy = gcp.accesscontextmanager.AccessPolicy("access-policy",
|
187
|
+
parent="organizations/123456789",
|
188
|
+
title="Storage Policy")
|
189
|
+
storage_perimeter = gcp.accesscontextmanager.ServicePerimeter("storage-perimeter",
|
190
|
+
parent=access_policy.name.apply(lambda name: f"accesspolicies/{name}"),
|
191
|
+
name=access_policy.name.apply(lambda name: f"accesspolicies/{name}/serviceperimeters/storage-perimeter"),
|
192
|
+
title="Storage Perimeter",
|
193
|
+
status=gcp.accesscontextmanager.ServicePerimeterStatusArgs(
|
194
|
+
restricted_services=["storage.googleapis.com"],
|
195
|
+
))
|
196
|
+
egress_policy = gcp.accesscontextmanager.ServicePerimeterEgressPolicy("egress_policy",
|
197
|
+
perimeter=storage_perimeter.name,
|
198
|
+
egress_from=gcp.accesscontextmanager.ServicePerimeterEgressPolicyEgressFromArgs(
|
199
|
+
identity_type="ANY_IDENTITY",
|
200
|
+
),
|
201
|
+
egress_to=gcp.accesscontextmanager.ServicePerimeterEgressPolicyEgressToArgs(
|
202
|
+
resources=["*"],
|
203
|
+
operations=[gcp.accesscontextmanager.ServicePerimeterEgressPolicyEgressToOperationArgs(
|
204
|
+
service_name="bigquery.googleapis.com",
|
205
|
+
method_selectors=[gcp.accesscontextmanager.ServicePerimeterEgressPolicyEgressToOperationMethodSelectorArgs(
|
206
|
+
method="*",
|
207
|
+
)],
|
208
|
+
)],
|
209
|
+
))
|
210
|
+
```
|
211
|
+
<!--End PulumiCodeChooser -->
|
212
|
+
|
173
213
|
## Import
|
174
214
|
|
175
215
|
ServicePerimeterEgressPolicy can be imported using any of these accepted formats:
|
@@ -209,10 +249,50 @@ class ServicePerimeterEgressPolicy(pulumi.CustomResource):
|
|
209
249
|
perimeter in certain contexts (e.g. to read data from a Cloud Storage bucket
|
210
250
|
or query against a BigQuery dataset).
|
211
251
|
|
252
|
+
> **Note:** By default, updates to this resource will remove the EgressPolicy from the
|
253
|
+
from the perimeter and add it back in a non-atomic manner. To ensure that the new EgressPolicy
|
254
|
+
is added before the old one is removed, add a `lifecycle` block with `create_before_destroy = true` to this resource.
|
255
|
+
|
212
256
|
To get more information about ServicePerimeterEgressPolicy, see:
|
213
257
|
|
214
258
|
* [API documentation](https://cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#egresspolicy)
|
215
259
|
|
260
|
+
## Example Usage
|
261
|
+
|
262
|
+
### Access Context Manager Service Perimeter Egress Policy
|
263
|
+
|
264
|
+
<!--Start PulumiCodeChooser -->
|
265
|
+
```python
|
266
|
+
import pulumi
|
267
|
+
import pulumi_gcp as gcp
|
268
|
+
|
269
|
+
access_policy = gcp.accesscontextmanager.AccessPolicy("access-policy",
|
270
|
+
parent="organizations/123456789",
|
271
|
+
title="Storage Policy")
|
272
|
+
storage_perimeter = gcp.accesscontextmanager.ServicePerimeter("storage-perimeter",
|
273
|
+
parent=access_policy.name.apply(lambda name: f"accesspolicies/{name}"),
|
274
|
+
name=access_policy.name.apply(lambda name: f"accesspolicies/{name}/serviceperimeters/storage-perimeter"),
|
275
|
+
title="Storage Perimeter",
|
276
|
+
status=gcp.accesscontextmanager.ServicePerimeterStatusArgs(
|
277
|
+
restricted_services=["storage.googleapis.com"],
|
278
|
+
))
|
279
|
+
egress_policy = gcp.accesscontextmanager.ServicePerimeterEgressPolicy("egress_policy",
|
280
|
+
perimeter=storage_perimeter.name,
|
281
|
+
egress_from=gcp.accesscontextmanager.ServicePerimeterEgressPolicyEgressFromArgs(
|
282
|
+
identity_type="ANY_IDENTITY",
|
283
|
+
),
|
284
|
+
egress_to=gcp.accesscontextmanager.ServicePerimeterEgressPolicyEgressToArgs(
|
285
|
+
resources=["*"],
|
286
|
+
operations=[gcp.accesscontextmanager.ServicePerimeterEgressPolicyEgressToOperationArgs(
|
287
|
+
service_name="bigquery.googleapis.com",
|
288
|
+
method_selectors=[gcp.accesscontextmanager.ServicePerimeterEgressPolicyEgressToOperationMethodSelectorArgs(
|
289
|
+
method="*",
|
290
|
+
)],
|
291
|
+
)],
|
292
|
+
))
|
293
|
+
```
|
294
|
+
<!--End PulumiCodeChooser -->
|
295
|
+
|
216
296
|
## Import
|
217
297
|
|
218
298
|
ServicePerimeterEgressPolicy can be imported using any of these accepted formats:
|
@@ -171,10 +171,53 @@ class ServicePerimeterIngressPolicy(pulumi.CustomResource):
|
|
171
171
|
Individual ingress policies can be limited by restricting which services and/
|
172
172
|
or actions they match using the ingressTo field.
|
173
173
|
|
174
|
+
> **Note:** By default, updates to this resource will remove the IngressPolicy from the
|
175
|
+
from the perimeter and add it back in a non-atomic manner. To ensure that the new IngressPolicy
|
176
|
+
is added before the old one is removed, add a `lifecycle` block with `create_before_destroy = true` to this resource.
|
177
|
+
|
174
178
|
To get more information about ServicePerimeterIngressPolicy, see:
|
175
179
|
|
176
180
|
* [API documentation](https://cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ingresspolicy)
|
177
181
|
|
182
|
+
## Example Usage
|
183
|
+
|
184
|
+
### Access Context Manager Service Perimeter Ingress Policy
|
185
|
+
|
186
|
+
<!--Start PulumiCodeChooser -->
|
187
|
+
```python
|
188
|
+
import pulumi
|
189
|
+
import pulumi_gcp as gcp
|
190
|
+
|
191
|
+
access_policy = gcp.accesscontextmanager.AccessPolicy("access-policy",
|
192
|
+
parent="organizations/123456789",
|
193
|
+
title="Storage Policy")
|
194
|
+
storage_perimeter = gcp.accesscontextmanager.ServicePerimeter("storage-perimeter",
|
195
|
+
parent=access_policy.name.apply(lambda name: f"accesspolicies/{name}"),
|
196
|
+
name=access_policy.name.apply(lambda name: f"accesspolicies/{name}/serviceperimeters/storage-perimeter"),
|
197
|
+
title="Storage Perimeter",
|
198
|
+
status=gcp.accesscontextmanager.ServicePerimeterStatusArgs(
|
199
|
+
restricted_services=["storage.googleapis.com"],
|
200
|
+
))
|
201
|
+
ingress_policy = gcp.accesscontextmanager.ServicePerimeterIngressPolicy("ingress_policy",
|
202
|
+
perimeter=storage_perimeter.name,
|
203
|
+
ingress_from=gcp.accesscontextmanager.ServicePerimeterIngressPolicyIngressFromArgs(
|
204
|
+
identity_type="any_identity",
|
205
|
+
sources=[gcp.accesscontextmanager.ServicePerimeterIngressPolicyIngressFromSourceArgs(
|
206
|
+
access_level="*",
|
207
|
+
)],
|
208
|
+
),
|
209
|
+
ingress_to=gcp.accesscontextmanager.ServicePerimeterIngressPolicyIngressToArgs(
|
210
|
+
resources=["*"],
|
211
|
+
operations=[gcp.accesscontextmanager.ServicePerimeterIngressPolicyIngressToOperationArgs(
|
212
|
+
service_name="bigquery.googleapis.com",
|
213
|
+
method_selectors=[gcp.accesscontextmanager.ServicePerimeterIngressPolicyIngressToOperationMethodSelectorArgs(
|
214
|
+
method="*",
|
215
|
+
)],
|
216
|
+
)],
|
217
|
+
))
|
218
|
+
```
|
219
|
+
<!--End PulumiCodeChooser -->
|
220
|
+
|
178
221
|
## Import
|
179
222
|
|
180
223
|
ServicePerimeterIngressPolicy can be imported using any of these accepted formats:
|
@@ -216,10 +259,53 @@ class ServicePerimeterIngressPolicy(pulumi.CustomResource):
|
|
216
259
|
Individual ingress policies can be limited by restricting which services and/
|
217
260
|
or actions they match using the ingressTo field.
|
218
261
|
|
262
|
+
> **Note:** By default, updates to this resource will remove the IngressPolicy from the
|
263
|
+
from the perimeter and add it back in a non-atomic manner. To ensure that the new IngressPolicy
|
264
|
+
is added before the old one is removed, add a `lifecycle` block with `create_before_destroy = true` to this resource.
|
265
|
+
|
219
266
|
To get more information about ServicePerimeterIngressPolicy, see:
|
220
267
|
|
221
268
|
* [API documentation](https://cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ingresspolicy)
|
222
269
|
|
270
|
+
## Example Usage
|
271
|
+
|
272
|
+
### Access Context Manager Service Perimeter Ingress Policy
|
273
|
+
|
274
|
+
<!--Start PulumiCodeChooser -->
|
275
|
+
```python
|
276
|
+
import pulumi
|
277
|
+
import pulumi_gcp as gcp
|
278
|
+
|
279
|
+
access_policy = gcp.accesscontextmanager.AccessPolicy("access-policy",
|
280
|
+
parent="organizations/123456789",
|
281
|
+
title="Storage Policy")
|
282
|
+
storage_perimeter = gcp.accesscontextmanager.ServicePerimeter("storage-perimeter",
|
283
|
+
parent=access_policy.name.apply(lambda name: f"accesspolicies/{name}"),
|
284
|
+
name=access_policy.name.apply(lambda name: f"accesspolicies/{name}/serviceperimeters/storage-perimeter"),
|
285
|
+
title="Storage Perimeter",
|
286
|
+
status=gcp.accesscontextmanager.ServicePerimeterStatusArgs(
|
287
|
+
restricted_services=["storage.googleapis.com"],
|
288
|
+
))
|
289
|
+
ingress_policy = gcp.accesscontextmanager.ServicePerimeterIngressPolicy("ingress_policy",
|
290
|
+
perimeter=storage_perimeter.name,
|
291
|
+
ingress_from=gcp.accesscontextmanager.ServicePerimeterIngressPolicyIngressFromArgs(
|
292
|
+
identity_type="any_identity",
|
293
|
+
sources=[gcp.accesscontextmanager.ServicePerimeterIngressPolicyIngressFromSourceArgs(
|
294
|
+
access_level="*",
|
295
|
+
)],
|
296
|
+
),
|
297
|
+
ingress_to=gcp.accesscontextmanager.ServicePerimeterIngressPolicyIngressToArgs(
|
298
|
+
resources=["*"],
|
299
|
+
operations=[gcp.accesscontextmanager.ServicePerimeterIngressPolicyIngressToOperationArgs(
|
300
|
+
service_name="bigquery.googleapis.com",
|
301
|
+
method_selectors=[gcp.accesscontextmanager.ServicePerimeterIngressPolicyIngressToOperationMethodSelectorArgs(
|
302
|
+
method="*",
|
303
|
+
)],
|
304
|
+
)],
|
305
|
+
))
|
306
|
+
```
|
307
|
+
<!--End PulumiCodeChooser -->
|
308
|
+
|
223
309
|
## Import
|
224
310
|
|
225
311
|
ServicePerimeterIngressPolicy can be imported using any of these accepted formats:
|
@@ -118,10 +118,11 @@ class ServicePerimeterResource(pulumi.CustomResource):
|
|
118
118
|
resource: Optional[pulumi.Input[str]] = None,
|
119
119
|
__props__=None):
|
120
120
|
"""
|
121
|
-
Allows configuring a single GCP resource that should be inside of a service perimeter.
|
121
|
+
Allows configuring a single GCP resource that should be inside the `status` block of a service perimeter.
|
122
122
|
This resource is intended to be used in cases where it is not possible to compile a full list
|
123
123
|
of projects to include in a `accesscontextmanager.ServicePerimeter` resource,
|
124
124
|
to enable them to be added separately.
|
125
|
+
If your perimeter is in dry-run mode use `accesscontextmanager.ServicePerimeterDryRunResource` instead.
|
125
126
|
|
126
127
|
> **Note:** If this resource is used alongside a `accesscontextmanager.ServicePerimeter` resource,
|
127
128
|
the service perimeter resource must have a `lifecycle` block with `ignore_changes = [status[0].resources]` so
|
@@ -193,10 +194,11 @@ class ServicePerimeterResource(pulumi.CustomResource):
|
|
193
194
|
args: ServicePerimeterResourceArgs,
|
194
195
|
opts: Optional[pulumi.ResourceOptions] = None):
|
195
196
|
"""
|
196
|
-
Allows configuring a single GCP resource that should be inside of a service perimeter.
|
197
|
+
Allows configuring a single GCP resource that should be inside the `status` block of a service perimeter.
|
197
198
|
This resource is intended to be used in cases where it is not possible to compile a full list
|
198
199
|
of projects to include in a `accesscontextmanager.ServicePerimeter` resource,
|
199
200
|
to enable them to be added separately.
|
201
|
+
If your perimeter is in dry-run mode use `accesscontextmanager.ServicePerimeterDryRunResource` instead.
|
200
202
|
|
201
203
|
> **Note:** If this resource is used alongside a `accesscontextmanager.ServicePerimeter` resource,
|
202
204
|
the service perimeter resource must have a `lifecycle` block with `ignore_changes = [status[0].resources]` so
|