pulumi-gcp 8.22.0a1741790977__py3-none-any.whl → 8.23.0a1742001198__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. pulumi_gcp/__init__.py +32 -0
  2. pulumi_gcp/alloydb/_inputs.py +66 -0
  3. pulumi_gcp/alloydb/outputs.py +95 -0
  4. pulumi_gcp/backupdisasterrecovery/_inputs.py +3 -3
  5. pulumi_gcp/backupdisasterrecovery/outputs.py +4 -4
  6. pulumi_gcp/certificatemanager/certificate.py +53 -7
  7. pulumi_gcp/certificatemanager/outputs.py +8 -2
  8. pulumi_gcp/compute/__init__.py +1 -0
  9. pulumi_gcp/compute/_inputs.py +600 -17
  10. pulumi_gcp/compute/backend_service.py +195 -7
  11. pulumi_gcp/compute/disk.py +108 -0
  12. pulumi_gcp/compute/firewall_policy_association.py +28 -2
  13. pulumi_gcp/compute/get_backend_service.py +12 -1
  14. pulumi_gcp/compute/get_disk.py +23 -1
  15. pulumi_gcp/compute/get_region_disk.py +23 -1
  16. pulumi_gcp/compute/get_region_ssl_policy.py +203 -0
  17. pulumi_gcp/compute/outputs.py +623 -23
  18. pulumi_gcp/compute/region_backend_service.py +193 -7
  19. pulumi_gcp/compute/region_disk.py +114 -0
  20. pulumi_gcp/compute/shared_vpc_service_project.py +0 -4
  21. pulumi_gcp/compute/subnetwork.py +147 -0
  22. pulumi_gcp/container/_inputs.py +3 -3
  23. pulumi_gcp/container/outputs.py +4 -4
  24. pulumi_gcp/datastream/_inputs.py +273 -0
  25. pulumi_gcp/datastream/connection_profile.py +54 -2
  26. pulumi_gcp/datastream/outputs.py +224 -0
  27. pulumi_gcp/eventarc/__init__.py +1 -0
  28. pulumi_gcp/eventarc/_inputs.py +40 -0
  29. pulumi_gcp/eventarc/channel.py +85 -93
  30. pulumi_gcp/eventarc/google_api_source.py +997 -0
  31. pulumi_gcp/eventarc/outputs.py +41 -0
  32. pulumi_gcp/firebase/data_connect_service.py +40 -2
  33. pulumi_gcp/iam/__init__.py +2 -0
  34. pulumi_gcp/iam/_inputs.py +51 -18
  35. pulumi_gcp/iam/folders_policy_binding.py +10 -26
  36. pulumi_gcp/iam/oauth_client.py +979 -0
  37. pulumi_gcp/iam/oauth_client_credential.py +641 -0
  38. pulumi_gcp/iam/organizations_policy_binding.py +8 -24
  39. pulumi_gcp/iam/outputs.py +34 -12
  40. pulumi_gcp/iam/principal_access_boundary_policy.py +58 -22
  41. pulumi_gcp/iam/projects_policy_binding.py +8 -24
  42. pulumi_gcp/kms/crypto_key_version.py +14 -7
  43. pulumi_gcp/monitoring/_inputs.py +15 -18
  44. pulumi_gcp/monitoring/alert_policy.py +46 -0
  45. pulumi_gcp/monitoring/outputs.py +10 -12
  46. pulumi_gcp/networksecurity/__init__.py +1 -0
  47. pulumi_gcp/networksecurity/_inputs.py +30 -18
  48. pulumi_gcp/networksecurity/backend_authentication_config.py +847 -0
  49. pulumi_gcp/networksecurity/intercept_deployment.py +178 -94
  50. pulumi_gcp/networksecurity/intercept_deployment_group.py +161 -77
  51. pulumi_gcp/networksecurity/intercept_endpoint_group.py +161 -66
  52. pulumi_gcp/networksecurity/intercept_endpoint_group_association.py +137 -80
  53. pulumi_gcp/networksecurity/mirroring_deployment.py +178 -94
  54. pulumi_gcp/networksecurity/mirroring_deployment_group.py +161 -77
  55. pulumi_gcp/networksecurity/mirroring_endpoint_group.py +161 -80
  56. pulumi_gcp/networksecurity/mirroring_endpoint_group_association.py +137 -105
  57. pulumi_gcp/networksecurity/outputs.py +20 -12
  58. pulumi_gcp/networkservices/endpoint_policy.py +12 -0
  59. pulumi_gcp/networkservices/grpc_route.py +12 -0
  60. pulumi_gcp/networkservices/http_route.py +16 -0
  61. pulumi_gcp/networkservices/mesh.py +16 -0
  62. pulumi_gcp/networkservices/service_binding.py +14 -0
  63. pulumi_gcp/networkservices/tcp_route.py +16 -0
  64. pulumi_gcp/networkservices/tls_route.py +12 -0
  65. pulumi_gcp/pulumi-plugin.json +1 -1
  66. pulumi_gcp/tpu/_inputs.py +21 -1
  67. pulumi_gcp/tpu/outputs.py +13 -1
  68. pulumi_gcp/tpu/v2_vm.py +2 -0
  69. pulumi_gcp/vmwareengine/_inputs.py +6 -0
  70. pulumi_gcp/vmwareengine/outputs.py +8 -0
  71. pulumi_gcp/workstations/workstation_cluster.py +137 -1
  72. {pulumi_gcp-8.22.0a1741790977.dist-info → pulumi_gcp-8.23.0a1742001198.dist-info}/METADATA +1 -1
  73. {pulumi_gcp-8.22.0a1741790977.dist-info → pulumi_gcp-8.23.0a1742001198.dist-info}/RECORD +75 -70
  74. {pulumi_gcp-8.22.0a1741790977.dist-info → pulumi_gcp-8.23.0a1742001198.dist-info}/WHEEL +0 -0
  75. {pulumi_gcp-8.22.0a1741790977.dist-info → pulumi_gcp-8.23.0a1742001198.dist-info}/top_level.txt +0 -0
@@ -28,6 +28,7 @@ class BackendServiceArgs:
28
28
  compression_mode: Optional[pulumi.Input[str]] = None,
29
29
  connection_draining_timeout_sec: Optional[pulumi.Input[int]] = None,
30
30
  consistent_hash: Optional[pulumi.Input['BackendServiceConsistentHashArgs']] = None,
31
+ custom_metrics: Optional[pulumi.Input[Sequence[pulumi.Input['BackendServiceCustomMetricArgs']]]] = None,
31
32
  custom_request_headers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
32
33
  custom_response_headers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
33
34
  description: Optional[pulumi.Input[str]] = None,
@@ -78,6 +79,8 @@ class BackendServiceArgs:
78
79
  INTERNAL_SELF_MANAGED. This field is only applicable when locality_lb_policy is
79
80
  set to MAGLEV or RING_HASH.
80
81
  Structure is documented below.
82
+ :param pulumi.Input[Sequence[pulumi.Input['BackendServiceCustomMetricArgs']]] custom_metrics: List of custom metrics that are used for the WEIGHTED_ROUND_ROBIN locality_lb_policy.
83
+ Structure is documented below.
81
84
  :param pulumi.Input[Sequence[pulumi.Input[str]]] custom_request_headers: Headers that the HTTP/S load balancer should add to proxied
82
85
  requests.
83
86
  :param pulumi.Input[Sequence[pulumi.Input[str]]] custom_response_headers: Headers that the HTTP/S load balancer should add to proxied
@@ -142,6 +145,12 @@ class BackendServiceArgs:
142
145
  instance either reported a valid weight or had
143
146
  UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains
144
147
  equal-weight.
148
+ * `WEIGHTED_ROUND_ROBIN`: Per-endpoint weighted round-robin Load Balancing using weights computed
149
+ from Backend reported Custom Metrics. If set, the Backend Service
150
+ responses are expected to contain non-standard HTTP response header field
151
+ X-Endpoint-Load-Metrics. The reported metrics
152
+ to use for computing the weights are specified via the
153
+ backends[].customMetrics fields.
145
154
  locality_lb_policy is applicable to either:
146
155
  * A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2,
147
156
  and loadBalancingScheme set to INTERNAL_MANAGED.
@@ -154,7 +163,7 @@ class BackendServiceArgs:
154
163
  Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced
155
164
  by a URL map that is bound to target gRPC proxy that has validate_for_proxyless
156
165
  field set to true.
157
- Possible values are: `ROUND_ROBIN`, `LEAST_REQUEST`, `RING_HASH`, `RANDOM`, `ORIGINAL_DESTINATION`, `MAGLEV`, `WEIGHTED_MAGLEV`.
166
+ Possible values are: `ROUND_ROBIN`, `LEAST_REQUEST`, `RING_HASH`, `RANDOM`, `ORIGINAL_DESTINATION`, `MAGLEV`, `WEIGHTED_MAGLEV`, `WEIGHTED_ROUND_ROBIN`.
158
167
  :param pulumi.Input['BackendServiceLogConfigArgs'] log_config: This field denotes the logging options for the load balancer traffic served by this backend service.
159
168
  If logging is enabled, logs will be exported to Stackdriver.
160
169
  Structure is documented below.
@@ -215,6 +224,8 @@ class BackendServiceArgs:
215
224
  pulumi.set(__self__, "connection_draining_timeout_sec", connection_draining_timeout_sec)
216
225
  if consistent_hash is not None:
217
226
  pulumi.set(__self__, "consistent_hash", consistent_hash)
227
+ if custom_metrics is not None:
228
+ pulumi.set(__self__, "custom_metrics", custom_metrics)
218
229
  if custom_request_headers is not None:
219
230
  pulumi.set(__self__, "custom_request_headers", custom_request_headers)
220
231
  if custom_response_headers is not None:
@@ -364,6 +375,19 @@ class BackendServiceArgs:
364
375
  def consistent_hash(self, value: Optional[pulumi.Input['BackendServiceConsistentHashArgs']]):
365
376
  pulumi.set(self, "consistent_hash", value)
366
377
 
378
+ @property
379
+ @pulumi.getter(name="customMetrics")
380
+ def custom_metrics(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['BackendServiceCustomMetricArgs']]]]:
381
+ """
382
+ List of custom metrics that are used for the WEIGHTED_ROUND_ROBIN locality_lb_policy.
383
+ Structure is documented below.
384
+ """
385
+ return pulumi.get(self, "custom_metrics")
386
+
387
+ @custom_metrics.setter
388
+ def custom_metrics(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['BackendServiceCustomMetricArgs']]]]):
389
+ pulumi.set(self, "custom_metrics", value)
390
+
367
391
  @property
368
392
  @pulumi.getter(name="customRequestHeaders")
369
393
  def custom_request_headers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
@@ -542,6 +566,12 @@ class BackendServiceArgs:
542
566
  instance either reported a valid weight or had
543
567
  UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains
544
568
  equal-weight.
569
+ * `WEIGHTED_ROUND_ROBIN`: Per-endpoint weighted round-robin Load Balancing using weights computed
570
+ from Backend reported Custom Metrics. If set, the Backend Service
571
+ responses are expected to contain non-standard HTTP response header field
572
+ X-Endpoint-Load-Metrics. The reported metrics
573
+ to use for computing the weights are specified via the
574
+ backends[].customMetrics fields.
545
575
  locality_lb_policy is applicable to either:
546
576
  * A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2,
547
577
  and loadBalancingScheme set to INTERNAL_MANAGED.
@@ -554,7 +584,7 @@ class BackendServiceArgs:
554
584
  Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced
555
585
  by a URL map that is bound to target gRPC proxy that has validate_for_proxyless
556
586
  field set to true.
557
- Possible values are: `ROUND_ROBIN`, `LEAST_REQUEST`, `RING_HASH`, `RANDOM`, `ORIGINAL_DESTINATION`, `MAGLEV`, `WEIGHTED_MAGLEV`.
587
+ Possible values are: `ROUND_ROBIN`, `LEAST_REQUEST`, `RING_HASH`, `RANDOM`, `ORIGINAL_DESTINATION`, `MAGLEV`, `WEIGHTED_MAGLEV`, `WEIGHTED_ROUND_ROBIN`.
558
588
  """
559
589
  return pulumi.get(self, "locality_lb_policy")
560
590
 
@@ -751,6 +781,7 @@ class _BackendServiceState:
751
781
  connection_draining_timeout_sec: Optional[pulumi.Input[int]] = None,
752
782
  consistent_hash: Optional[pulumi.Input['BackendServiceConsistentHashArgs']] = None,
753
783
  creation_timestamp: Optional[pulumi.Input[str]] = None,
784
+ custom_metrics: Optional[pulumi.Input[Sequence[pulumi.Input['BackendServiceCustomMetricArgs']]]] = None,
754
785
  custom_request_headers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
755
786
  custom_response_headers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
756
787
  description: Optional[pulumi.Input[str]] = None,
@@ -805,6 +836,8 @@ class _BackendServiceState:
805
836
  set to MAGLEV or RING_HASH.
806
837
  Structure is documented below.
807
838
  :param pulumi.Input[str] creation_timestamp: Creation timestamp in RFC3339 text format.
839
+ :param pulumi.Input[Sequence[pulumi.Input['BackendServiceCustomMetricArgs']]] custom_metrics: List of custom metrics that are used for the WEIGHTED_ROUND_ROBIN locality_lb_policy.
840
+ Structure is documented below.
808
841
  :param pulumi.Input[Sequence[pulumi.Input[str]]] custom_request_headers: Headers that the HTTP/S load balancer should add to proxied
809
842
  requests.
810
843
  :param pulumi.Input[Sequence[pulumi.Input[str]]] custom_response_headers: Headers that the HTTP/S load balancer should add to proxied
@@ -872,6 +905,12 @@ class _BackendServiceState:
872
905
  instance either reported a valid weight or had
873
906
  UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains
874
907
  equal-weight.
908
+ * `WEIGHTED_ROUND_ROBIN`: Per-endpoint weighted round-robin Load Balancing using weights computed
909
+ from Backend reported Custom Metrics. If set, the Backend Service
910
+ responses are expected to contain non-standard HTTP response header field
911
+ X-Endpoint-Load-Metrics. The reported metrics
912
+ to use for computing the weights are specified via the
913
+ backends[].customMetrics fields.
875
914
  locality_lb_policy is applicable to either:
876
915
  * A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2,
877
916
  and loadBalancingScheme set to INTERNAL_MANAGED.
@@ -884,7 +923,7 @@ class _BackendServiceState:
884
923
  Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced
885
924
  by a URL map that is bound to target gRPC proxy that has validate_for_proxyless
886
925
  field set to true.
887
- Possible values are: `ROUND_ROBIN`, `LEAST_REQUEST`, `RING_HASH`, `RANDOM`, `ORIGINAL_DESTINATION`, `MAGLEV`, `WEIGHTED_MAGLEV`.
926
+ Possible values are: `ROUND_ROBIN`, `LEAST_REQUEST`, `RING_HASH`, `RANDOM`, `ORIGINAL_DESTINATION`, `MAGLEV`, `WEIGHTED_MAGLEV`, `WEIGHTED_ROUND_ROBIN`.
888
927
  :param pulumi.Input['BackendServiceLogConfigArgs'] log_config: This field denotes the logging options for the load balancer traffic served by this backend service.
889
928
  If logging is enabled, logs will be exported to Stackdriver.
890
929
  Structure is documented below.
@@ -948,6 +987,8 @@ class _BackendServiceState:
948
987
  pulumi.set(__self__, "consistent_hash", consistent_hash)
949
988
  if creation_timestamp is not None:
950
989
  pulumi.set(__self__, "creation_timestamp", creation_timestamp)
990
+ if custom_metrics is not None:
991
+ pulumi.set(__self__, "custom_metrics", custom_metrics)
951
992
  if custom_request_headers is not None:
952
993
  pulumi.set(__self__, "custom_request_headers", custom_request_headers)
953
994
  if custom_response_headers is not None:
@@ -1115,6 +1156,19 @@ class _BackendServiceState:
1115
1156
  def creation_timestamp(self, value: Optional[pulumi.Input[str]]):
1116
1157
  pulumi.set(self, "creation_timestamp", value)
1117
1158
 
1159
+ @property
1160
+ @pulumi.getter(name="customMetrics")
1161
+ def custom_metrics(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['BackendServiceCustomMetricArgs']]]]:
1162
+ """
1163
+ List of custom metrics that are used for the WEIGHTED_ROUND_ROBIN locality_lb_policy.
1164
+ Structure is documented below.
1165
+ """
1166
+ return pulumi.get(self, "custom_metrics")
1167
+
1168
+ @custom_metrics.setter
1169
+ def custom_metrics(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['BackendServiceCustomMetricArgs']]]]):
1170
+ pulumi.set(self, "custom_metrics", value)
1171
+
1118
1172
  @property
1119
1173
  @pulumi.getter(name="customRequestHeaders")
1120
1174
  def custom_request_headers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
@@ -1318,6 +1372,12 @@ class _BackendServiceState:
1318
1372
  instance either reported a valid weight or had
1319
1373
  UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains
1320
1374
  equal-weight.
1375
+ * `WEIGHTED_ROUND_ROBIN`: Per-endpoint weighted round-robin Load Balancing using weights computed
1376
+ from Backend reported Custom Metrics. If set, the Backend Service
1377
+ responses are expected to contain non-standard HTTP response header field
1378
+ X-Endpoint-Load-Metrics. The reported metrics
1379
+ to use for computing the weights are specified via the
1380
+ backends[].customMetrics fields.
1321
1381
  locality_lb_policy is applicable to either:
1322
1382
  * A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2,
1323
1383
  and loadBalancingScheme set to INTERNAL_MANAGED.
@@ -1330,7 +1390,7 @@ class _BackendServiceState:
1330
1390
  Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced
1331
1391
  by a URL map that is bound to target gRPC proxy that has validate_for_proxyless
1332
1392
  field set to true.
1333
- Possible values are: `ROUND_ROBIN`, `LEAST_REQUEST`, `RING_HASH`, `RANDOM`, `ORIGINAL_DESTINATION`, `MAGLEV`, `WEIGHTED_MAGLEV`.
1393
+ Possible values are: `ROUND_ROBIN`, `LEAST_REQUEST`, `RING_HASH`, `RANDOM`, `ORIGINAL_DESTINATION`, `MAGLEV`, `WEIGHTED_MAGLEV`, `WEIGHTED_ROUND_ROBIN`.
1334
1394
  """
1335
1395
  return pulumi.get(self, "locality_lb_policy")
1336
1396
 
@@ -1540,6 +1600,7 @@ class BackendService(pulumi.CustomResource):
1540
1600
  compression_mode: Optional[pulumi.Input[str]] = None,
1541
1601
  connection_draining_timeout_sec: Optional[pulumi.Input[int]] = None,
1542
1602
  consistent_hash: Optional[pulumi.Input[Union['BackendServiceConsistentHashArgs', 'BackendServiceConsistentHashArgsDict']]] = None,
1603
+ custom_metrics: Optional[pulumi.Input[Sequence[pulumi.Input[Union['BackendServiceCustomMetricArgs', 'BackendServiceCustomMetricArgsDict']]]]] = None,
1543
1604
  custom_request_headers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
1544
1605
  custom_response_headers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
1545
1606
  description: Optional[pulumi.Input[str]] = None,
@@ -1868,6 +1929,52 @@ class BackendService(pulumi.CustomResource):
1868
1929
  load_balancing_scheme="EXTERNAL_MANAGED",
1869
1930
  ip_address_selection_policy="IPV6_ONLY")
1870
1931
  ```
1932
+ ### Backend Service Custom Metrics
1933
+
1934
+ ```python
1935
+ import pulumi
1936
+ import pulumi_gcp as gcp
1937
+
1938
+ default = gcp.compute.Network("default", name="network")
1939
+ # Zonal NEG with GCE_VM_IP_PORT
1940
+ default_network_endpoint_group = gcp.compute.NetworkEndpointGroup("default",
1941
+ name="network-endpoint",
1942
+ network=default.id,
1943
+ default_port=90,
1944
+ zone="us-central1-a",
1945
+ network_endpoint_type="GCE_VM_IP_PORT")
1946
+ default_health_check = gcp.compute.HealthCheck("default",
1947
+ name="health-check",
1948
+ timeout_sec=1,
1949
+ check_interval_sec=1,
1950
+ tcp_health_check={
1951
+ "port": 80,
1952
+ })
1953
+ default_backend_service = gcp.compute.BackendService("default",
1954
+ name="backend-service",
1955
+ health_checks=default_health_check.id,
1956
+ load_balancing_scheme="EXTERNAL_MANAGED",
1957
+ locality_lb_policy="WEIGHTED_ROUND_ROBIN",
1958
+ custom_metrics=[{
1959
+ "name": "orca.application_utilization",
1960
+ "dry_run": False,
1961
+ }],
1962
+ backends=[{
1963
+ "group": default_network_endpoint_group.id,
1964
+ "balancing_mode": "CUSTOM_METRICS",
1965
+ "custom_metrics": [
1966
+ {
1967
+ "name": "orca.cpu_utilization",
1968
+ "max_utilization": 0.9,
1969
+ "dry_run": True,
1970
+ },
1971
+ {
1972
+ "name": "orca.named_metrics.foo",
1973
+ "dry_run": False,
1974
+ },
1975
+ ],
1976
+ }])
1977
+ ```
1871
1978
 
1872
1979
  ## Import
1873
1980
 
@@ -1920,6 +2027,8 @@ class BackendService(pulumi.CustomResource):
1920
2027
  INTERNAL_SELF_MANAGED. This field is only applicable when locality_lb_policy is
1921
2028
  set to MAGLEV or RING_HASH.
1922
2029
  Structure is documented below.
2030
+ :param pulumi.Input[Sequence[pulumi.Input[Union['BackendServiceCustomMetricArgs', 'BackendServiceCustomMetricArgsDict']]]] custom_metrics: List of custom metrics that are used for the WEIGHTED_ROUND_ROBIN locality_lb_policy.
2031
+ Structure is documented below.
1923
2032
  :param pulumi.Input[Sequence[pulumi.Input[str]]] custom_request_headers: Headers that the HTTP/S load balancer should add to proxied
1924
2033
  requests.
1925
2034
  :param pulumi.Input[Sequence[pulumi.Input[str]]] custom_response_headers: Headers that the HTTP/S load balancer should add to proxied
@@ -1984,6 +2093,12 @@ class BackendService(pulumi.CustomResource):
1984
2093
  instance either reported a valid weight or had
1985
2094
  UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains
1986
2095
  equal-weight.
2096
+ * `WEIGHTED_ROUND_ROBIN`: Per-endpoint weighted round-robin Load Balancing using weights computed
2097
+ from Backend reported Custom Metrics. If set, the Backend Service
2098
+ responses are expected to contain non-standard HTTP response header field
2099
+ X-Endpoint-Load-Metrics. The reported metrics
2100
+ to use for computing the weights are specified via the
2101
+ backends[].customMetrics fields.
1987
2102
  locality_lb_policy is applicable to either:
1988
2103
  * A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2,
1989
2104
  and loadBalancingScheme set to INTERNAL_MANAGED.
@@ -1996,7 +2111,7 @@ class BackendService(pulumi.CustomResource):
1996
2111
  Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced
1997
2112
  by a URL map that is bound to target gRPC proxy that has validate_for_proxyless
1998
2113
  field set to true.
1999
- Possible values are: `ROUND_ROBIN`, `LEAST_REQUEST`, `RING_HASH`, `RANDOM`, `ORIGINAL_DESTINATION`, `MAGLEV`, `WEIGHTED_MAGLEV`.
2114
+ Possible values are: `ROUND_ROBIN`, `LEAST_REQUEST`, `RING_HASH`, `RANDOM`, `ORIGINAL_DESTINATION`, `MAGLEV`, `WEIGHTED_MAGLEV`, `WEIGHTED_ROUND_ROBIN`.
2000
2115
  :param pulumi.Input[Union['BackendServiceLogConfigArgs', 'BackendServiceLogConfigArgsDict']] log_config: This field denotes the logging options for the load balancer traffic served by this backend service.
2001
2116
  If logging is enabled, logs will be exported to Stackdriver.
2002
2117
  Structure is documented below.
@@ -2353,6 +2468,52 @@ class BackendService(pulumi.CustomResource):
2353
2468
  load_balancing_scheme="EXTERNAL_MANAGED",
2354
2469
  ip_address_selection_policy="IPV6_ONLY")
2355
2470
  ```
2471
+ ### Backend Service Custom Metrics
2472
+
2473
+ ```python
2474
+ import pulumi
2475
+ import pulumi_gcp as gcp
2476
+
2477
+ default = gcp.compute.Network("default", name="network")
2478
+ # Zonal NEG with GCE_VM_IP_PORT
2479
+ default_network_endpoint_group = gcp.compute.NetworkEndpointGroup("default",
2480
+ name="network-endpoint",
2481
+ network=default.id,
2482
+ default_port=90,
2483
+ zone="us-central1-a",
2484
+ network_endpoint_type="GCE_VM_IP_PORT")
2485
+ default_health_check = gcp.compute.HealthCheck("default",
2486
+ name="health-check",
2487
+ timeout_sec=1,
2488
+ check_interval_sec=1,
2489
+ tcp_health_check={
2490
+ "port": 80,
2491
+ })
2492
+ default_backend_service = gcp.compute.BackendService("default",
2493
+ name="backend-service",
2494
+ health_checks=default_health_check.id,
2495
+ load_balancing_scheme="EXTERNAL_MANAGED",
2496
+ locality_lb_policy="WEIGHTED_ROUND_ROBIN",
2497
+ custom_metrics=[{
2498
+ "name": "orca.application_utilization",
2499
+ "dry_run": False,
2500
+ }],
2501
+ backends=[{
2502
+ "group": default_network_endpoint_group.id,
2503
+ "balancing_mode": "CUSTOM_METRICS",
2504
+ "custom_metrics": [
2505
+ {
2506
+ "name": "orca.cpu_utilization",
2507
+ "max_utilization": 0.9,
2508
+ "dry_run": True,
2509
+ },
2510
+ {
2511
+ "name": "orca.named_metrics.foo",
2512
+ "dry_run": False,
2513
+ },
2514
+ ],
2515
+ }])
2516
+ ```
2356
2517
 
2357
2518
  ## Import
2358
2519
 
@@ -2400,6 +2561,7 @@ class BackendService(pulumi.CustomResource):
2400
2561
  compression_mode: Optional[pulumi.Input[str]] = None,
2401
2562
  connection_draining_timeout_sec: Optional[pulumi.Input[int]] = None,
2402
2563
  consistent_hash: Optional[pulumi.Input[Union['BackendServiceConsistentHashArgs', 'BackendServiceConsistentHashArgsDict']]] = None,
2564
+ custom_metrics: Optional[pulumi.Input[Sequence[pulumi.Input[Union['BackendServiceCustomMetricArgs', 'BackendServiceCustomMetricArgsDict']]]]] = None,
2403
2565
  custom_request_headers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
2404
2566
  custom_response_headers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
2405
2567
  description: Optional[pulumi.Input[str]] = None,
@@ -2439,6 +2601,7 @@ class BackendService(pulumi.CustomResource):
2439
2601
  __props__.__dict__["compression_mode"] = compression_mode
2440
2602
  __props__.__dict__["connection_draining_timeout_sec"] = connection_draining_timeout_sec
2441
2603
  __props__.__dict__["consistent_hash"] = consistent_hash
2604
+ __props__.__dict__["custom_metrics"] = custom_metrics
2442
2605
  __props__.__dict__["custom_request_headers"] = custom_request_headers
2443
2606
  __props__.__dict__["custom_response_headers"] = custom_response_headers
2444
2607
  __props__.__dict__["description"] = description
@@ -2484,6 +2647,7 @@ class BackendService(pulumi.CustomResource):
2484
2647
  connection_draining_timeout_sec: Optional[pulumi.Input[int]] = None,
2485
2648
  consistent_hash: Optional[pulumi.Input[Union['BackendServiceConsistentHashArgs', 'BackendServiceConsistentHashArgsDict']]] = None,
2486
2649
  creation_timestamp: Optional[pulumi.Input[str]] = None,
2650
+ custom_metrics: Optional[pulumi.Input[Sequence[pulumi.Input[Union['BackendServiceCustomMetricArgs', 'BackendServiceCustomMetricArgsDict']]]]] = None,
2487
2651
  custom_request_headers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
2488
2652
  custom_response_headers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
2489
2653
  description: Optional[pulumi.Input[str]] = None,
@@ -2543,6 +2707,8 @@ class BackendService(pulumi.CustomResource):
2543
2707
  set to MAGLEV or RING_HASH.
2544
2708
  Structure is documented below.
2545
2709
  :param pulumi.Input[str] creation_timestamp: Creation timestamp in RFC3339 text format.
2710
+ :param pulumi.Input[Sequence[pulumi.Input[Union['BackendServiceCustomMetricArgs', 'BackendServiceCustomMetricArgsDict']]]] custom_metrics: List of custom metrics that are used for the WEIGHTED_ROUND_ROBIN locality_lb_policy.
2711
+ Structure is documented below.
2546
2712
  :param pulumi.Input[Sequence[pulumi.Input[str]]] custom_request_headers: Headers that the HTTP/S load balancer should add to proxied
2547
2713
  requests.
2548
2714
  :param pulumi.Input[Sequence[pulumi.Input[str]]] custom_response_headers: Headers that the HTTP/S load balancer should add to proxied
@@ -2610,6 +2776,12 @@ class BackendService(pulumi.CustomResource):
2610
2776
  instance either reported a valid weight or had
2611
2777
  UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains
2612
2778
  equal-weight.
2779
+ * `WEIGHTED_ROUND_ROBIN`: Per-endpoint weighted round-robin Load Balancing using weights computed
2780
+ from Backend reported Custom Metrics. If set, the Backend Service
2781
+ responses are expected to contain non-standard HTTP response header field
2782
+ X-Endpoint-Load-Metrics. The reported metrics
2783
+ to use for computing the weights are specified via the
2784
+ backends[].customMetrics fields.
2613
2785
  locality_lb_policy is applicable to either:
2614
2786
  * A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2,
2615
2787
  and loadBalancingScheme set to INTERNAL_MANAGED.
@@ -2622,7 +2794,7 @@ class BackendService(pulumi.CustomResource):
2622
2794
  Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced
2623
2795
  by a URL map that is bound to target gRPC proxy that has validate_for_proxyless
2624
2796
  field set to true.
2625
- Possible values are: `ROUND_ROBIN`, `LEAST_REQUEST`, `RING_HASH`, `RANDOM`, `ORIGINAL_DESTINATION`, `MAGLEV`, `WEIGHTED_MAGLEV`.
2797
+ Possible values are: `ROUND_ROBIN`, `LEAST_REQUEST`, `RING_HASH`, `RANDOM`, `ORIGINAL_DESTINATION`, `MAGLEV`, `WEIGHTED_MAGLEV`, `WEIGHTED_ROUND_ROBIN`.
2626
2798
  :param pulumi.Input[Union['BackendServiceLogConfigArgs', 'BackendServiceLogConfigArgsDict']] log_config: This field denotes the logging options for the load balancer traffic served by this backend service.
2627
2799
  If logging is enabled, logs will be exported to Stackdriver.
2628
2800
  Structure is documented below.
@@ -2682,6 +2854,7 @@ class BackendService(pulumi.CustomResource):
2682
2854
  __props__.__dict__["connection_draining_timeout_sec"] = connection_draining_timeout_sec
2683
2855
  __props__.__dict__["consistent_hash"] = consistent_hash
2684
2856
  __props__.__dict__["creation_timestamp"] = creation_timestamp
2857
+ __props__.__dict__["custom_metrics"] = custom_metrics
2685
2858
  __props__.__dict__["custom_request_headers"] = custom_request_headers
2686
2859
  __props__.__dict__["custom_response_headers"] = custom_response_headers
2687
2860
  __props__.__dict__["description"] = description
@@ -2792,6 +2965,15 @@ class BackendService(pulumi.CustomResource):
2792
2965
  """
2793
2966
  return pulumi.get(self, "creation_timestamp")
2794
2967
 
2968
+ @property
2969
+ @pulumi.getter(name="customMetrics")
2970
+ def custom_metrics(self) -> pulumi.Output[Optional[Sequence['outputs.BackendServiceCustomMetric']]]:
2971
+ """
2972
+ List of custom metrics that are used for the WEIGHTED_ROUND_ROBIN locality_lb_policy.
2973
+ Structure is documented below.
2974
+ """
2975
+ return pulumi.get(self, "custom_metrics")
2976
+
2795
2977
  @property
2796
2978
  @pulumi.getter(name="customRequestHeaders")
2797
2979
  def custom_request_headers(self) -> pulumi.Output[Optional[Sequence[str]]]:
@@ -2947,6 +3129,12 @@ class BackendService(pulumi.CustomResource):
2947
3129
  instance either reported a valid weight or had
2948
3130
  UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains
2949
3131
  equal-weight.
3132
+ * `WEIGHTED_ROUND_ROBIN`: Per-endpoint weighted round-robin Load Balancing using weights computed
3133
+ from Backend reported Custom Metrics. If set, the Backend Service
3134
+ responses are expected to contain non-standard HTTP response header field
3135
+ X-Endpoint-Load-Metrics. The reported metrics
3136
+ to use for computing the weights are specified via the
3137
+ backends[].customMetrics fields.
2950
3138
  locality_lb_policy is applicable to either:
2951
3139
  * A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2,
2952
3140
  and loadBalancingScheme set to INTERNAL_MANAGED.
@@ -2959,7 +3147,7 @@ class BackendService(pulumi.CustomResource):
2959
3147
  Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced
2960
3148
  by a URL map that is bound to target gRPC proxy that has validate_for_proxyless
2961
3149
  field set to true.
2962
- Possible values are: `ROUND_ROBIN`, `LEAST_REQUEST`, `RING_HASH`, `RANDOM`, `ORIGINAL_DESTINATION`, `MAGLEV`, `WEIGHTED_MAGLEV`.
3150
+ Possible values are: `ROUND_ROBIN`, `LEAST_REQUEST`, `RING_HASH`, `RANDOM`, `ORIGINAL_DESTINATION`, `MAGLEV`, `WEIGHTED_MAGLEV`, `WEIGHTED_ROUND_ROBIN`.
2963
3151
  """
2964
3152
  return pulumi.get(self, "locality_lb_policy")
2965
3153
 
@@ -24,6 +24,8 @@ class DiskArgs:
24
24
  access_mode: Optional[pulumi.Input[str]] = None,
25
25
  architecture: Optional[pulumi.Input[str]] = None,
26
26
  async_primary_disk: Optional[pulumi.Input['DiskAsyncPrimaryDiskArgs']] = None,
27
+ create_snapshot_before_destroy: Optional[pulumi.Input[bool]] = None,
28
+ create_snapshot_before_destroy_prefix: Optional[pulumi.Input[str]] = None,
27
29
  description: Optional[pulumi.Input[str]] = None,
28
30
  disk_encryption_key: Optional[pulumi.Input['DiskDiskEncryptionKeyArgs']] = None,
29
31
  enable_confidential_compute: Optional[pulumi.Input[bool]] = None,
@@ -60,6 +62,10 @@ class DiskArgs:
60
62
  :param pulumi.Input[str] architecture: (Optional)
61
63
  :param pulumi.Input['DiskAsyncPrimaryDiskArgs'] async_primary_disk: A nested object resource.
62
64
  Structure is documented below.
65
+ :param pulumi.Input[bool] create_snapshot_before_destroy: If set to true, a snapshot of the disk will be created before it is destroyed.
66
+ If your disk is encrypted with customer managed encryption keys these will be reused for the snapshot creation.
67
+ The name of the snapshot by default will be `{{disk-name}}-YYYYMMDD-HHmm`
68
+ :param pulumi.Input[str] create_snapshot_before_destroy_prefix: This will set a custom name prefix for the snapshot that's created when the disk is deleted.
63
69
  :param pulumi.Input[str] description: An optional description of this resource. Provide this property when
64
70
  you create the resource.
65
71
  :param pulumi.Input['DiskDiskEncryptionKeyArgs'] disk_encryption_key: Encrypts the disk using a customer-supplied encryption key.
@@ -185,6 +191,10 @@ class DiskArgs:
185
191
  pulumi.set(__self__, "architecture", architecture)
186
192
  if async_primary_disk is not None:
187
193
  pulumi.set(__self__, "async_primary_disk", async_primary_disk)
194
+ if create_snapshot_before_destroy is not None:
195
+ pulumi.set(__self__, "create_snapshot_before_destroy", create_snapshot_before_destroy)
196
+ if create_snapshot_before_destroy_prefix is not None:
197
+ pulumi.set(__self__, "create_snapshot_before_destroy_prefix", create_snapshot_before_destroy_prefix)
188
198
  if description is not None:
189
199
  pulumi.set(__self__, "description", description)
190
200
  if disk_encryption_key is not None:
@@ -282,6 +292,32 @@ class DiskArgs:
282
292
  def async_primary_disk(self, value: Optional[pulumi.Input['DiskAsyncPrimaryDiskArgs']]):
283
293
  pulumi.set(self, "async_primary_disk", value)
284
294
 
295
+ @property
296
+ @pulumi.getter(name="createSnapshotBeforeDestroy")
297
+ def create_snapshot_before_destroy(self) -> Optional[pulumi.Input[bool]]:
298
+ """
299
+ If set to true, a snapshot of the disk will be created before it is destroyed.
300
+ If your disk is encrypted with customer managed encryption keys these will be reused for the snapshot creation.
301
+ The name of the snapshot by default will be `{{disk-name}}-YYYYMMDD-HHmm`
302
+ """
303
+ return pulumi.get(self, "create_snapshot_before_destroy")
304
+
305
+ @create_snapshot_before_destroy.setter
306
+ def create_snapshot_before_destroy(self, value: Optional[pulumi.Input[bool]]):
307
+ pulumi.set(self, "create_snapshot_before_destroy", value)
308
+
309
+ @property
310
+ @pulumi.getter(name="createSnapshotBeforeDestroyPrefix")
311
+ def create_snapshot_before_destroy_prefix(self) -> Optional[pulumi.Input[str]]:
312
+ """
313
+ This will set a custom name prefix for the snapshot that's created when the disk is deleted.
314
+ """
315
+ return pulumi.get(self, "create_snapshot_before_destroy_prefix")
316
+
317
+ @create_snapshot_before_destroy_prefix.setter
318
+ def create_snapshot_before_destroy_prefix(self, value: Optional[pulumi.Input[str]]):
319
+ pulumi.set(self, "create_snapshot_before_destroy_prefix", value)
320
+
285
321
  @property
286
322
  @pulumi.getter
287
323
  def description(self) -> Optional[pulumi.Input[str]]:
@@ -694,6 +730,8 @@ class _DiskState:
694
730
  access_mode: Optional[pulumi.Input[str]] = None,
695
731
  architecture: Optional[pulumi.Input[str]] = None,
696
732
  async_primary_disk: Optional[pulumi.Input['DiskAsyncPrimaryDiskArgs']] = None,
733
+ create_snapshot_before_destroy: Optional[pulumi.Input[bool]] = None,
734
+ create_snapshot_before_destroy_prefix: Optional[pulumi.Input[str]] = None,
697
735
  creation_timestamp: Optional[pulumi.Input[str]] = None,
698
736
  description: Optional[pulumi.Input[str]] = None,
699
737
  disk_encryption_key: Optional[pulumi.Input['DiskDiskEncryptionKeyArgs']] = None,
@@ -743,6 +781,10 @@ class _DiskState:
743
781
  :param pulumi.Input[str] architecture: (Optional)
744
782
  :param pulumi.Input['DiskAsyncPrimaryDiskArgs'] async_primary_disk: A nested object resource.
745
783
  Structure is documented below.
784
+ :param pulumi.Input[bool] create_snapshot_before_destroy: If set to true, a snapshot of the disk will be created before it is destroyed.
785
+ If your disk is encrypted with customer managed encryption keys these will be reused for the snapshot creation.
786
+ The name of the snapshot by default will be `{{disk-name}}-YYYYMMDD-HHmm`
787
+ :param pulumi.Input[str] create_snapshot_before_destroy_prefix: This will set a custom name prefix for the snapshot that's created when the disk is deleted.
746
788
  :param pulumi.Input[str] creation_timestamp: Creation timestamp in RFC3339 text format.
747
789
  :param pulumi.Input[str] description: An optional description of this resource. Provide this property when
748
790
  you create the resource.
@@ -899,6 +941,10 @@ class _DiskState:
899
941
  pulumi.set(__self__, "architecture", architecture)
900
942
  if async_primary_disk is not None:
901
943
  pulumi.set(__self__, "async_primary_disk", async_primary_disk)
944
+ if create_snapshot_before_destroy is not None:
945
+ pulumi.set(__self__, "create_snapshot_before_destroy", create_snapshot_before_destroy)
946
+ if create_snapshot_before_destroy_prefix is not None:
947
+ pulumi.set(__self__, "create_snapshot_before_destroy_prefix", create_snapshot_before_destroy_prefix)
902
948
  if creation_timestamp is not None:
903
949
  pulumi.set(__self__, "creation_timestamp", creation_timestamp)
904
950
  if description is not None:
@@ -1022,6 +1068,32 @@ class _DiskState:
1022
1068
  def async_primary_disk(self, value: Optional[pulumi.Input['DiskAsyncPrimaryDiskArgs']]):
1023
1069
  pulumi.set(self, "async_primary_disk", value)
1024
1070
 
1071
+ @property
1072
+ @pulumi.getter(name="createSnapshotBeforeDestroy")
1073
+ def create_snapshot_before_destroy(self) -> Optional[pulumi.Input[bool]]:
1074
+ """
1075
+ If set to true, a snapshot of the disk will be created before it is destroyed.
1076
+ If your disk is encrypted with customer managed encryption keys these will be reused for the snapshot creation.
1077
+ The name of the snapshot by default will be `{{disk-name}}-YYYYMMDD-HHmm`
1078
+ """
1079
+ return pulumi.get(self, "create_snapshot_before_destroy")
1080
+
1081
+ @create_snapshot_before_destroy.setter
1082
+ def create_snapshot_before_destroy(self, value: Optional[pulumi.Input[bool]]):
1083
+ pulumi.set(self, "create_snapshot_before_destroy", value)
1084
+
1085
+ @property
1086
+ @pulumi.getter(name="createSnapshotBeforeDestroyPrefix")
1087
+ def create_snapshot_before_destroy_prefix(self) -> Optional[pulumi.Input[str]]:
1088
+ """
1089
+ This will set a custom name prefix for the snapshot that's created when the disk is deleted.
1090
+ """
1091
+ return pulumi.get(self, "create_snapshot_before_destroy_prefix")
1092
+
1093
+ @create_snapshot_before_destroy_prefix.setter
1094
+ def create_snapshot_before_destroy_prefix(self, value: Optional[pulumi.Input[str]]):
1095
+ pulumi.set(self, "create_snapshot_before_destroy_prefix", value)
1096
+
1025
1097
  @property
1026
1098
  @pulumi.getter(name="creationTimestamp")
1027
1099
  def creation_timestamp(self) -> Optional[pulumi.Input[str]]:
@@ -1610,6 +1682,8 @@ class Disk(pulumi.CustomResource):
1610
1682
  access_mode: Optional[pulumi.Input[str]] = None,
1611
1683
  architecture: Optional[pulumi.Input[str]] = None,
1612
1684
  async_primary_disk: Optional[pulumi.Input[Union['DiskAsyncPrimaryDiskArgs', 'DiskAsyncPrimaryDiskArgsDict']]] = None,
1685
+ create_snapshot_before_destroy: Optional[pulumi.Input[bool]] = None,
1686
+ create_snapshot_before_destroy_prefix: Optional[pulumi.Input[str]] = None,
1613
1687
  description: Optional[pulumi.Input[str]] = None,
1614
1688
  disk_encryption_key: Optional[pulumi.Input[Union['DiskDiskEncryptionKeyArgs', 'DiskDiskEncryptionKeyArgsDict']]] = None,
1615
1689
  enable_confidential_compute: Optional[pulumi.Input[bool]] = None,
@@ -1766,6 +1840,10 @@ class Disk(pulumi.CustomResource):
1766
1840
  :param pulumi.Input[str] architecture: (Optional)
1767
1841
  :param pulumi.Input[Union['DiskAsyncPrimaryDiskArgs', 'DiskAsyncPrimaryDiskArgsDict']] async_primary_disk: A nested object resource.
1768
1842
  Structure is documented below.
1843
+ :param pulumi.Input[bool] create_snapshot_before_destroy: If set to true, a snapshot of the disk will be created before it is destroyed.
1844
+ If your disk is encrypted with customer managed encryption keys these will be reused for the snapshot creation.
1845
+ The name of the snapshot by default will be `{{disk-name}}-YYYYMMDD-HHmm`
1846
+ :param pulumi.Input[str] create_snapshot_before_destroy_prefix: This will set a custom name prefix for the snapshot that's created when the disk is deleted.
1769
1847
  :param pulumi.Input[str] description: An optional description of this resource. Provide this property when
1770
1848
  you create the resource.
1771
1849
  :param pulumi.Input[Union['DiskDiskEncryptionKeyArgs', 'DiskDiskEncryptionKeyArgsDict']] disk_encryption_key: Encrypts the disk using a customer-supplied encryption key.
@@ -2028,6 +2106,8 @@ class Disk(pulumi.CustomResource):
2028
2106
  access_mode: Optional[pulumi.Input[str]] = None,
2029
2107
  architecture: Optional[pulumi.Input[str]] = None,
2030
2108
  async_primary_disk: Optional[pulumi.Input[Union['DiskAsyncPrimaryDiskArgs', 'DiskAsyncPrimaryDiskArgsDict']]] = None,
2109
+ create_snapshot_before_destroy: Optional[pulumi.Input[bool]] = None,
2110
+ create_snapshot_before_destroy_prefix: Optional[pulumi.Input[str]] = None,
2031
2111
  description: Optional[pulumi.Input[str]] = None,
2032
2112
  disk_encryption_key: Optional[pulumi.Input[Union['DiskDiskEncryptionKeyArgs', 'DiskDiskEncryptionKeyArgsDict']]] = None,
2033
2113
  enable_confidential_compute: Optional[pulumi.Input[bool]] = None,
@@ -2066,6 +2146,8 @@ class Disk(pulumi.CustomResource):
2066
2146
  __props__.__dict__["access_mode"] = access_mode
2067
2147
  __props__.__dict__["architecture"] = architecture
2068
2148
  __props__.__dict__["async_primary_disk"] = async_primary_disk
2149
+ __props__.__dict__["create_snapshot_before_destroy"] = create_snapshot_before_destroy
2150
+ __props__.__dict__["create_snapshot_before_destroy_prefix"] = create_snapshot_before_destroy_prefix
2069
2151
  __props__.__dict__["description"] = description
2070
2152
  __props__.__dict__["disk_encryption_key"] = disk_encryption_key
2071
2153
  __props__.__dict__["enable_confidential_compute"] = enable_confidential_compute
@@ -2120,6 +2202,8 @@ class Disk(pulumi.CustomResource):
2120
2202
  access_mode: Optional[pulumi.Input[str]] = None,
2121
2203
  architecture: Optional[pulumi.Input[str]] = None,
2122
2204
  async_primary_disk: Optional[pulumi.Input[Union['DiskAsyncPrimaryDiskArgs', 'DiskAsyncPrimaryDiskArgsDict']]] = None,
2205
+ create_snapshot_before_destroy: Optional[pulumi.Input[bool]] = None,
2206
+ create_snapshot_before_destroy_prefix: Optional[pulumi.Input[str]] = None,
2123
2207
  creation_timestamp: Optional[pulumi.Input[str]] = None,
2124
2208
  description: Optional[pulumi.Input[str]] = None,
2125
2209
  disk_encryption_key: Optional[pulumi.Input[Union['DiskDiskEncryptionKeyArgs', 'DiskDiskEncryptionKeyArgsDict']]] = None,
@@ -2174,6 +2258,10 @@ class Disk(pulumi.CustomResource):
2174
2258
  :param pulumi.Input[str] architecture: (Optional)
2175
2259
  :param pulumi.Input[Union['DiskAsyncPrimaryDiskArgs', 'DiskAsyncPrimaryDiskArgsDict']] async_primary_disk: A nested object resource.
2176
2260
  Structure is documented below.
2261
+ :param pulumi.Input[bool] create_snapshot_before_destroy: If set to true, a snapshot of the disk will be created before it is destroyed.
2262
+ If your disk is encrypted with customer managed encryption keys these will be reused for the snapshot creation.
2263
+ The name of the snapshot by default will be `{{disk-name}}-YYYYMMDD-HHmm`
2264
+ :param pulumi.Input[str] create_snapshot_before_destroy_prefix: This will set a custom name prefix for the snapshot that's created when the disk is deleted.
2177
2265
  :param pulumi.Input[str] creation_timestamp: Creation timestamp in RFC3339 text format.
2178
2266
  :param pulumi.Input[str] description: An optional description of this resource. Provide this property when
2179
2267
  you create the resource.
@@ -2331,6 +2419,8 @@ class Disk(pulumi.CustomResource):
2331
2419
  __props__.__dict__["access_mode"] = access_mode
2332
2420
  __props__.__dict__["architecture"] = architecture
2333
2421
  __props__.__dict__["async_primary_disk"] = async_primary_disk
2422
+ __props__.__dict__["create_snapshot_before_destroy"] = create_snapshot_before_destroy
2423
+ __props__.__dict__["create_snapshot_before_destroy_prefix"] = create_snapshot_before_destroy_prefix
2334
2424
  __props__.__dict__["creation_timestamp"] = creation_timestamp
2335
2425
  __props__.__dict__["description"] = description
2336
2426
  __props__.__dict__["disk_encryption_key"] = disk_encryption_key
@@ -2401,6 +2491,24 @@ class Disk(pulumi.CustomResource):
2401
2491
  """
2402
2492
  return pulumi.get(self, "async_primary_disk")
2403
2493
 
2494
+ @property
2495
+ @pulumi.getter(name="createSnapshotBeforeDestroy")
2496
+ def create_snapshot_before_destroy(self) -> pulumi.Output[Optional[bool]]:
2497
+ """
2498
+ If set to true, a snapshot of the disk will be created before it is destroyed.
2499
+ If your disk is encrypted with customer managed encryption keys these will be reused for the snapshot creation.
2500
+ The name of the snapshot by default will be `{{disk-name}}-YYYYMMDD-HHmm`
2501
+ """
2502
+ return pulumi.get(self, "create_snapshot_before_destroy")
2503
+
2504
+ @property
2505
+ @pulumi.getter(name="createSnapshotBeforeDestroyPrefix")
2506
+ def create_snapshot_before_destroy_prefix(self) -> pulumi.Output[Optional[str]]:
2507
+ """
2508
+ This will set a custom name prefix for the snapshot that's created when the disk is deleted.
2509
+ """
2510
+ return pulumi.get(self, "create_snapshot_before_destroy_prefix")
2511
+
2404
2512
  @property
2405
2513
  @pulumi.getter(name="creationTimestamp")
2406
2514
  def creation_timestamp(self) -> pulumi.Output[str]: