pulumi-gcp 8.22.0a1741329280__py3-none-any.whl → 8.22.0a1741888019__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.0a1741329280.dist-info → pulumi_gcp-8.22.0a1741888019.dist-info}/METADATA +1 -1
  73. {pulumi_gcp-8.22.0a1741329280.dist-info → pulumi_gcp-8.22.0a1741888019.dist-info}/RECORD +75 -70
  74. {pulumi_gcp-8.22.0a1741329280.dist-info → pulumi_gcp-8.22.0a1741888019.dist-info}/WHEEL +1 -1
  75. {pulumi_gcp-8.22.0a1741329280.dist-info → pulumi_gcp-8.22.0a1741888019.dist-info}/top_level.txt +0 -0
@@ -28,6 +28,7 @@ class RegionBackendServiceArgs:
28
28
  connection_draining_timeout_sec: Optional[pulumi.Input[int]] = None,
29
29
  connection_tracking_policy: Optional[pulumi.Input['RegionBackendServiceConnectionTrackingPolicyArgs']] = None,
30
30
  consistent_hash: Optional[pulumi.Input['RegionBackendServiceConsistentHashArgs']] = None,
31
+ custom_metrics: Optional[pulumi.Input[Sequence[pulumi.Input['RegionBackendServiceCustomMetricArgs']]]] = None,
31
32
  description: Optional[pulumi.Input[str]] = None,
32
33
  enable_cdn: Optional[pulumi.Input[bool]] = None,
33
34
  failover_policy: Optional[pulumi.Input['RegionBackendServiceFailoverPolicyArgs']] = None,
@@ -77,6 +78,8 @@ class RegionBackendServiceArgs:
77
78
  destination service. This field specifies parameters that control consistent
78
79
  hashing.
79
80
  This field only applies when all of the following are true -
81
+ :param pulumi.Input[Sequence[pulumi.Input['RegionBackendServiceCustomMetricArgs']]] custom_metrics: List of custom metrics that are used for the WEIGHTED_ROUND_ROBIN locality_lb_policy.
82
+ Structure is documented below.
80
83
  :param pulumi.Input[str] description: An optional description of this resource.
81
84
  :param pulumi.Input[bool] enable_cdn: If true, enable Cloud CDN for this RegionBackendService.
82
85
  :param pulumi.Input['RegionBackendServiceFailoverPolicyArgs'] failover_policy: Policy for failovers.
@@ -130,6 +133,12 @@ class RegionBackendServiceArgs:
130
133
  instance either reported a valid weight or had
131
134
  UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains
132
135
  equal-weight.
136
+ * `WEIGHTED_ROUND_ROBIN`: Per-endpoint weighted round-robin Load Balancing using weights computed
137
+ from Backend reported Custom Metrics. If set, the Backend Service
138
+ responses are expected to contain non-standard HTTP response header field
139
+ X-Endpoint-Load-Metrics. The reported metrics
140
+ to use for computing the weights are specified via the
141
+ backends[].customMetrics fields.
133
142
  locality_lb_policy is applicable to either:
134
143
  * A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2,
135
144
  and loadBalancingScheme set to INTERNAL_MANAGED.
@@ -142,7 +151,7 @@ class RegionBackendServiceArgs:
142
151
  Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced
143
152
  by a URL map that is bound to target gRPC proxy that has validate_for_proxyless
144
153
  field set to true.
145
- Possible values are: `ROUND_ROBIN`, `LEAST_REQUEST`, `RING_HASH`, `RANDOM`, `ORIGINAL_DESTINATION`, `MAGLEV`, `WEIGHTED_MAGLEV`.
154
+ Possible values are: `ROUND_ROBIN`, `LEAST_REQUEST`, `RING_HASH`, `RANDOM`, `ORIGINAL_DESTINATION`, `MAGLEV`, `WEIGHTED_MAGLEV`, `WEIGHTED_ROUND_ROBIN`.
146
155
  :param pulumi.Input['RegionBackendServiceLogConfigArgs'] log_config: This field denotes the logging options for the load balancer traffic served by this backend service.
147
156
  If logging is enabled, logs will be exported to Stackdriver.
148
157
  Structure is documented below.
@@ -204,6 +213,8 @@ class RegionBackendServiceArgs:
204
213
  pulumi.set(__self__, "connection_tracking_policy", connection_tracking_policy)
205
214
  if consistent_hash is not None:
206
215
  pulumi.set(__self__, "consistent_hash", consistent_hash)
216
+ if custom_metrics is not None:
217
+ pulumi.set(__self__, "custom_metrics", custom_metrics)
207
218
  if description is not None:
208
219
  pulumi.set(__self__, "description", description)
209
220
  if enable_cdn is not None:
@@ -350,6 +361,19 @@ class RegionBackendServiceArgs:
350
361
  def consistent_hash(self, value: Optional[pulumi.Input['RegionBackendServiceConsistentHashArgs']]):
351
362
  pulumi.set(self, "consistent_hash", value)
352
363
 
364
+ @property
365
+ @pulumi.getter(name="customMetrics")
366
+ def custom_metrics(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['RegionBackendServiceCustomMetricArgs']]]]:
367
+ """
368
+ List of custom metrics that are used for the WEIGHTED_ROUND_ROBIN locality_lb_policy.
369
+ Structure is documented below.
370
+ """
371
+ return pulumi.get(self, "custom_metrics")
372
+
373
+ @custom_metrics.setter
374
+ def custom_metrics(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['RegionBackendServiceCustomMetricArgs']]]]):
375
+ pulumi.set(self, "custom_metrics", value)
376
+
353
377
  @property
354
378
  @pulumi.getter
355
379
  def description(self) -> Optional[pulumi.Input[str]]:
@@ -484,6 +508,12 @@ class RegionBackendServiceArgs:
484
508
  instance either reported a valid weight or had
485
509
  UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains
486
510
  equal-weight.
511
+ * `WEIGHTED_ROUND_ROBIN`: Per-endpoint weighted round-robin Load Balancing using weights computed
512
+ from Backend reported Custom Metrics. If set, the Backend Service
513
+ responses are expected to contain non-standard HTTP response header field
514
+ X-Endpoint-Load-Metrics. The reported metrics
515
+ to use for computing the weights are specified via the
516
+ backends[].customMetrics fields.
487
517
  locality_lb_policy is applicable to either:
488
518
  * A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2,
489
519
  and loadBalancingScheme set to INTERNAL_MANAGED.
@@ -496,7 +526,7 @@ class RegionBackendServiceArgs:
496
526
  Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced
497
527
  by a URL map that is bound to target gRPC proxy that has validate_for_proxyless
498
528
  field set to true.
499
- Possible values are: `ROUND_ROBIN`, `LEAST_REQUEST`, `RING_HASH`, `RANDOM`, `ORIGINAL_DESTINATION`, `MAGLEV`, `WEIGHTED_MAGLEV`.
529
+ Possible values are: `ROUND_ROBIN`, `LEAST_REQUEST`, `RING_HASH`, `RANDOM`, `ORIGINAL_DESTINATION`, `MAGLEV`, `WEIGHTED_MAGLEV`, `WEIGHTED_ROUND_ROBIN`.
500
530
  """
501
531
  return pulumi.get(self, "locality_lb_policy")
502
532
 
@@ -705,6 +735,7 @@ class _RegionBackendServiceState:
705
735
  connection_tracking_policy: Optional[pulumi.Input['RegionBackendServiceConnectionTrackingPolicyArgs']] = None,
706
736
  consistent_hash: Optional[pulumi.Input['RegionBackendServiceConsistentHashArgs']] = None,
707
737
  creation_timestamp: Optional[pulumi.Input[str]] = None,
738
+ custom_metrics: Optional[pulumi.Input[Sequence[pulumi.Input['RegionBackendServiceCustomMetricArgs']]]] = None,
708
739
  description: Optional[pulumi.Input[str]] = None,
709
740
  enable_cdn: Optional[pulumi.Input[bool]] = None,
710
741
  failover_policy: Optional[pulumi.Input['RegionBackendServiceFailoverPolicyArgs']] = None,
@@ -758,6 +789,8 @@ class _RegionBackendServiceState:
758
789
  hashing.
759
790
  This field only applies when all of the following are true -
760
791
  :param pulumi.Input[str] creation_timestamp: Creation timestamp in RFC3339 text format.
792
+ :param pulumi.Input[Sequence[pulumi.Input['RegionBackendServiceCustomMetricArgs']]] custom_metrics: List of custom metrics that are used for the WEIGHTED_ROUND_ROBIN locality_lb_policy.
793
+ Structure is documented below.
761
794
  :param pulumi.Input[str] description: An optional description of this resource.
762
795
  :param pulumi.Input[bool] enable_cdn: If true, enable Cloud CDN for this RegionBackendService.
763
796
  :param pulumi.Input['RegionBackendServiceFailoverPolicyArgs'] failover_policy: Policy for failovers.
@@ -814,6 +847,12 @@ class _RegionBackendServiceState:
814
847
  instance either reported a valid weight or had
815
848
  UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains
816
849
  equal-weight.
850
+ * `WEIGHTED_ROUND_ROBIN`: Per-endpoint weighted round-robin Load Balancing using weights computed
851
+ from Backend reported Custom Metrics. If set, the Backend Service
852
+ responses are expected to contain non-standard HTTP response header field
853
+ X-Endpoint-Load-Metrics. The reported metrics
854
+ to use for computing the weights are specified via the
855
+ backends[].customMetrics fields.
817
856
  locality_lb_policy is applicable to either:
818
857
  * A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2,
819
858
  and loadBalancingScheme set to INTERNAL_MANAGED.
@@ -826,7 +865,7 @@ class _RegionBackendServiceState:
826
865
  Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced
827
866
  by a URL map that is bound to target gRPC proxy that has validate_for_proxyless
828
867
  field set to true.
829
- Possible values are: `ROUND_ROBIN`, `LEAST_REQUEST`, `RING_HASH`, `RANDOM`, `ORIGINAL_DESTINATION`, `MAGLEV`, `WEIGHTED_MAGLEV`.
868
+ Possible values are: `ROUND_ROBIN`, `LEAST_REQUEST`, `RING_HASH`, `RANDOM`, `ORIGINAL_DESTINATION`, `MAGLEV`, `WEIGHTED_MAGLEV`, `WEIGHTED_ROUND_ROBIN`.
830
869
  :param pulumi.Input['RegionBackendServiceLogConfigArgs'] log_config: This field denotes the logging options for the load balancer traffic served by this backend service.
831
870
  If logging is enabled, logs will be exported to Stackdriver.
832
871
  Structure is documented below.
@@ -891,6 +930,8 @@ class _RegionBackendServiceState:
891
930
  pulumi.set(__self__, "consistent_hash", consistent_hash)
892
931
  if creation_timestamp is not None:
893
932
  pulumi.set(__self__, "creation_timestamp", creation_timestamp)
933
+ if custom_metrics is not None:
934
+ pulumi.set(__self__, "custom_metrics", custom_metrics)
894
935
  if description is not None:
895
936
  pulumi.set(__self__, "description", description)
896
937
  if enable_cdn is not None:
@@ -1055,6 +1096,19 @@ class _RegionBackendServiceState:
1055
1096
  def creation_timestamp(self, value: Optional[pulumi.Input[str]]):
1056
1097
  pulumi.set(self, "creation_timestamp", value)
1057
1098
 
1099
+ @property
1100
+ @pulumi.getter(name="customMetrics")
1101
+ def custom_metrics(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['RegionBackendServiceCustomMetricArgs']]]]:
1102
+ """
1103
+ List of custom metrics that are used for the WEIGHTED_ROUND_ROBIN locality_lb_policy.
1104
+ Structure is documented below.
1105
+ """
1106
+ return pulumi.get(self, "custom_metrics")
1107
+
1108
+ @custom_metrics.setter
1109
+ def custom_metrics(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['RegionBackendServiceCustomMetricArgs']]]]):
1110
+ pulumi.set(self, "custom_metrics", value)
1111
+
1058
1112
  @property
1059
1113
  @pulumi.getter
1060
1114
  def description(self) -> Optional[pulumi.Input[str]]:
@@ -1214,6 +1268,12 @@ class _RegionBackendServiceState:
1214
1268
  instance either reported a valid weight or had
1215
1269
  UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains
1216
1270
  equal-weight.
1271
+ * `WEIGHTED_ROUND_ROBIN`: Per-endpoint weighted round-robin Load Balancing using weights computed
1272
+ from Backend reported Custom Metrics. If set, the Backend Service
1273
+ responses are expected to contain non-standard HTTP response header field
1274
+ X-Endpoint-Load-Metrics. The reported metrics
1275
+ to use for computing the weights are specified via the
1276
+ backends[].customMetrics fields.
1217
1277
  locality_lb_policy is applicable to either:
1218
1278
  * A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2,
1219
1279
  and loadBalancingScheme set to INTERNAL_MANAGED.
@@ -1226,7 +1286,7 @@ class _RegionBackendServiceState:
1226
1286
  Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced
1227
1287
  by a URL map that is bound to target gRPC proxy that has validate_for_proxyless
1228
1288
  field set to true.
1229
- Possible values are: `ROUND_ROBIN`, `LEAST_REQUEST`, `RING_HASH`, `RANDOM`, `ORIGINAL_DESTINATION`, `MAGLEV`, `WEIGHTED_MAGLEV`.
1289
+ Possible values are: `ROUND_ROBIN`, `LEAST_REQUEST`, `RING_HASH`, `RANDOM`, `ORIGINAL_DESTINATION`, `MAGLEV`, `WEIGHTED_MAGLEV`, `WEIGHTED_ROUND_ROBIN`.
1230
1290
  """
1231
1291
  return pulumi.get(self, "locality_lb_policy")
1232
1292
 
@@ -1448,6 +1508,7 @@ class RegionBackendService(pulumi.CustomResource):
1448
1508
  connection_draining_timeout_sec: Optional[pulumi.Input[int]] = None,
1449
1509
  connection_tracking_policy: Optional[pulumi.Input[Union['RegionBackendServiceConnectionTrackingPolicyArgs', 'RegionBackendServiceConnectionTrackingPolicyArgsDict']]] = None,
1450
1510
  consistent_hash: Optional[pulumi.Input[Union['RegionBackendServiceConsistentHashArgs', 'RegionBackendServiceConsistentHashArgsDict']]] = None,
1511
+ custom_metrics: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RegionBackendServiceCustomMetricArgs', 'RegionBackendServiceCustomMetricArgsDict']]]]] = None,
1451
1512
  description: Optional[pulumi.Input[str]] = None,
1452
1513
  enable_cdn: Optional[pulumi.Input[bool]] = None,
1453
1514
  failover_policy: Optional[pulumi.Input[Union['RegionBackendServiceFailoverPolicyArgs', 'RegionBackendServiceFailoverPolicyArgsDict']]] = None,
@@ -1775,6 +1836,51 @@ class RegionBackendService(pulumi.CustomResource):
1775
1836
  protocol="HTTP",
1776
1837
  ip_address_selection_policy="IPV6_ONLY")
1777
1838
  ```
1839
+ ### Region Backend Service Ilb Custom Metrics
1840
+
1841
+ ```python
1842
+ import pulumi
1843
+ import pulumi_gcp as gcp
1844
+
1845
+ default = gcp.compute.Network("default", name="network")
1846
+ # Zonal NEG with GCE_VM_IP_PORT
1847
+ default_network_endpoint_group = gcp.compute.NetworkEndpointGroup("default",
1848
+ name="network-endpoint",
1849
+ network=default.id,
1850
+ default_port=90,
1851
+ zone="us-central1-a",
1852
+ network_endpoint_type="GCE_VM_IP_PORT")
1853
+ health_check = gcp.compute.HealthCheck("health_check",
1854
+ name="rbs-health-check",
1855
+ http_health_check={
1856
+ "port": 80,
1857
+ })
1858
+ default_region_backend_service = gcp.compute.RegionBackendService("default",
1859
+ region="us-central1",
1860
+ name="region-service",
1861
+ health_checks=health_check.id,
1862
+ load_balancing_scheme="INTERNAL_MANAGED",
1863
+ locality_lb_policy="WEIGHTED_ROUND_ROBIN",
1864
+ custom_metrics=[{
1865
+ "name": "orca.application_utilization",
1866
+ "dry_run": False,
1867
+ }],
1868
+ backends=[{
1869
+ "group": default_network_endpoint_group.id,
1870
+ "balancing_mode": "CUSTOM_METRICS",
1871
+ "custom_metrics": [
1872
+ {
1873
+ "name": "orca.cpu_utilization",
1874
+ "max_utilization": 0.9,
1875
+ "dry_run": True,
1876
+ },
1877
+ {
1878
+ "name": "orca.named_metrics.foo",
1879
+ "dry_run": False,
1880
+ },
1881
+ ],
1882
+ }])
1883
+ ```
1778
1884
 
1779
1885
  ## Import
1780
1886
 
@@ -1834,6 +1940,8 @@ class RegionBackendService(pulumi.CustomResource):
1834
1940
  destination service. This field specifies parameters that control consistent
1835
1941
  hashing.
1836
1942
  This field only applies when all of the following are true -
1943
+ :param pulumi.Input[Sequence[pulumi.Input[Union['RegionBackendServiceCustomMetricArgs', 'RegionBackendServiceCustomMetricArgsDict']]]] custom_metrics: List of custom metrics that are used for the WEIGHTED_ROUND_ROBIN locality_lb_policy.
1944
+ Structure is documented below.
1837
1945
  :param pulumi.Input[str] description: An optional description of this resource.
1838
1946
  :param pulumi.Input[bool] enable_cdn: If true, enable Cloud CDN for this RegionBackendService.
1839
1947
  :param pulumi.Input[Union['RegionBackendServiceFailoverPolicyArgs', 'RegionBackendServiceFailoverPolicyArgsDict']] failover_policy: Policy for failovers.
@@ -1887,6 +1995,12 @@ class RegionBackendService(pulumi.CustomResource):
1887
1995
  instance either reported a valid weight or had
1888
1996
  UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains
1889
1997
  equal-weight.
1998
+ * `WEIGHTED_ROUND_ROBIN`: Per-endpoint weighted round-robin Load Balancing using weights computed
1999
+ from Backend reported Custom Metrics. If set, the Backend Service
2000
+ responses are expected to contain non-standard HTTP response header field
2001
+ X-Endpoint-Load-Metrics. The reported metrics
2002
+ to use for computing the weights are specified via the
2003
+ backends[].customMetrics fields.
1890
2004
  locality_lb_policy is applicable to either:
1891
2005
  * A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2,
1892
2006
  and loadBalancingScheme set to INTERNAL_MANAGED.
@@ -1899,7 +2013,7 @@ class RegionBackendService(pulumi.CustomResource):
1899
2013
  Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced
1900
2014
  by a URL map that is bound to target gRPC proxy that has validate_for_proxyless
1901
2015
  field set to true.
1902
- Possible values are: `ROUND_ROBIN`, `LEAST_REQUEST`, `RING_HASH`, `RANDOM`, `ORIGINAL_DESTINATION`, `MAGLEV`, `WEIGHTED_MAGLEV`.
2016
+ Possible values are: `ROUND_ROBIN`, `LEAST_REQUEST`, `RING_HASH`, `RANDOM`, `ORIGINAL_DESTINATION`, `MAGLEV`, `WEIGHTED_MAGLEV`, `WEIGHTED_ROUND_ROBIN`.
1903
2017
  :param pulumi.Input[Union['RegionBackendServiceLogConfigArgs', 'RegionBackendServiceLogConfigArgsDict']] log_config: This field denotes the logging options for the load balancer traffic served by this backend service.
1904
2018
  If logging is enabled, logs will be exported to Stackdriver.
1905
2019
  Structure is documented below.
@@ -2258,6 +2372,51 @@ class RegionBackendService(pulumi.CustomResource):
2258
2372
  protocol="HTTP",
2259
2373
  ip_address_selection_policy="IPV6_ONLY")
2260
2374
  ```
2375
+ ### Region Backend Service Ilb Custom Metrics
2376
+
2377
+ ```python
2378
+ import pulumi
2379
+ import pulumi_gcp as gcp
2380
+
2381
+ default = gcp.compute.Network("default", name="network")
2382
+ # Zonal NEG with GCE_VM_IP_PORT
2383
+ default_network_endpoint_group = gcp.compute.NetworkEndpointGroup("default",
2384
+ name="network-endpoint",
2385
+ network=default.id,
2386
+ default_port=90,
2387
+ zone="us-central1-a",
2388
+ network_endpoint_type="GCE_VM_IP_PORT")
2389
+ health_check = gcp.compute.HealthCheck("health_check",
2390
+ name="rbs-health-check",
2391
+ http_health_check={
2392
+ "port": 80,
2393
+ })
2394
+ default_region_backend_service = gcp.compute.RegionBackendService("default",
2395
+ region="us-central1",
2396
+ name="region-service",
2397
+ health_checks=health_check.id,
2398
+ load_balancing_scheme="INTERNAL_MANAGED",
2399
+ locality_lb_policy="WEIGHTED_ROUND_ROBIN",
2400
+ custom_metrics=[{
2401
+ "name": "orca.application_utilization",
2402
+ "dry_run": False,
2403
+ }],
2404
+ backends=[{
2405
+ "group": default_network_endpoint_group.id,
2406
+ "balancing_mode": "CUSTOM_METRICS",
2407
+ "custom_metrics": [
2408
+ {
2409
+ "name": "orca.cpu_utilization",
2410
+ "max_utilization": 0.9,
2411
+ "dry_run": True,
2412
+ },
2413
+ {
2414
+ "name": "orca.named_metrics.foo",
2415
+ "dry_run": False,
2416
+ },
2417
+ ],
2418
+ }])
2419
+ ```
2261
2420
 
2262
2421
  ## Import
2263
2422
 
@@ -2311,6 +2470,7 @@ class RegionBackendService(pulumi.CustomResource):
2311
2470
  connection_draining_timeout_sec: Optional[pulumi.Input[int]] = None,
2312
2471
  connection_tracking_policy: Optional[pulumi.Input[Union['RegionBackendServiceConnectionTrackingPolicyArgs', 'RegionBackendServiceConnectionTrackingPolicyArgsDict']]] = None,
2313
2472
  consistent_hash: Optional[pulumi.Input[Union['RegionBackendServiceConsistentHashArgs', 'RegionBackendServiceConsistentHashArgsDict']]] = None,
2473
+ custom_metrics: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RegionBackendServiceCustomMetricArgs', 'RegionBackendServiceCustomMetricArgsDict']]]]] = None,
2314
2474
  description: Optional[pulumi.Input[str]] = None,
2315
2475
  enable_cdn: Optional[pulumi.Input[bool]] = None,
2316
2476
  failover_policy: Optional[pulumi.Input[Union['RegionBackendServiceFailoverPolicyArgs', 'RegionBackendServiceFailoverPolicyArgsDict']]] = None,
@@ -2348,6 +2508,7 @@ class RegionBackendService(pulumi.CustomResource):
2348
2508
  __props__.__dict__["connection_draining_timeout_sec"] = connection_draining_timeout_sec
2349
2509
  __props__.__dict__["connection_tracking_policy"] = connection_tracking_policy
2350
2510
  __props__.__dict__["consistent_hash"] = consistent_hash
2511
+ __props__.__dict__["custom_metrics"] = custom_metrics
2351
2512
  __props__.__dict__["description"] = description
2352
2513
  __props__.__dict__["enable_cdn"] = enable_cdn
2353
2514
  __props__.__dict__["failover_policy"] = failover_policy
@@ -2391,6 +2552,7 @@ class RegionBackendService(pulumi.CustomResource):
2391
2552
  connection_tracking_policy: Optional[pulumi.Input[Union['RegionBackendServiceConnectionTrackingPolicyArgs', 'RegionBackendServiceConnectionTrackingPolicyArgsDict']]] = None,
2392
2553
  consistent_hash: Optional[pulumi.Input[Union['RegionBackendServiceConsistentHashArgs', 'RegionBackendServiceConsistentHashArgsDict']]] = None,
2393
2554
  creation_timestamp: Optional[pulumi.Input[str]] = None,
2555
+ custom_metrics: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RegionBackendServiceCustomMetricArgs', 'RegionBackendServiceCustomMetricArgsDict']]]]] = None,
2394
2556
  description: Optional[pulumi.Input[str]] = None,
2395
2557
  enable_cdn: Optional[pulumi.Input[bool]] = None,
2396
2558
  failover_policy: Optional[pulumi.Input[Union['RegionBackendServiceFailoverPolicyArgs', 'RegionBackendServiceFailoverPolicyArgsDict']]] = None,
@@ -2449,6 +2611,8 @@ class RegionBackendService(pulumi.CustomResource):
2449
2611
  hashing.
2450
2612
  This field only applies when all of the following are true -
2451
2613
  :param pulumi.Input[str] creation_timestamp: Creation timestamp in RFC3339 text format.
2614
+ :param pulumi.Input[Sequence[pulumi.Input[Union['RegionBackendServiceCustomMetricArgs', 'RegionBackendServiceCustomMetricArgsDict']]]] custom_metrics: List of custom metrics that are used for the WEIGHTED_ROUND_ROBIN locality_lb_policy.
2615
+ Structure is documented below.
2452
2616
  :param pulumi.Input[str] description: An optional description of this resource.
2453
2617
  :param pulumi.Input[bool] enable_cdn: If true, enable Cloud CDN for this RegionBackendService.
2454
2618
  :param pulumi.Input[Union['RegionBackendServiceFailoverPolicyArgs', 'RegionBackendServiceFailoverPolicyArgsDict']] failover_policy: Policy for failovers.
@@ -2505,6 +2669,12 @@ class RegionBackendService(pulumi.CustomResource):
2505
2669
  instance either reported a valid weight or had
2506
2670
  UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains
2507
2671
  equal-weight.
2672
+ * `WEIGHTED_ROUND_ROBIN`: Per-endpoint weighted round-robin Load Balancing using weights computed
2673
+ from Backend reported Custom Metrics. If set, the Backend Service
2674
+ responses are expected to contain non-standard HTTP response header field
2675
+ X-Endpoint-Load-Metrics. The reported metrics
2676
+ to use for computing the weights are specified via the
2677
+ backends[].customMetrics fields.
2508
2678
  locality_lb_policy is applicable to either:
2509
2679
  * A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2,
2510
2680
  and loadBalancingScheme set to INTERNAL_MANAGED.
@@ -2517,7 +2687,7 @@ class RegionBackendService(pulumi.CustomResource):
2517
2687
  Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced
2518
2688
  by a URL map that is bound to target gRPC proxy that has validate_for_proxyless
2519
2689
  field set to true.
2520
- Possible values are: `ROUND_ROBIN`, `LEAST_REQUEST`, `RING_HASH`, `RANDOM`, `ORIGINAL_DESTINATION`, `MAGLEV`, `WEIGHTED_MAGLEV`.
2690
+ Possible values are: `ROUND_ROBIN`, `LEAST_REQUEST`, `RING_HASH`, `RANDOM`, `ORIGINAL_DESTINATION`, `MAGLEV`, `WEIGHTED_MAGLEV`, `WEIGHTED_ROUND_ROBIN`.
2521
2691
  :param pulumi.Input[Union['RegionBackendServiceLogConfigArgs', 'RegionBackendServiceLogConfigArgsDict']] log_config: This field denotes the logging options for the load balancer traffic served by this backend service.
2522
2692
  If logging is enabled, logs will be exported to Stackdriver.
2523
2693
  Structure is documented below.
@@ -2578,6 +2748,7 @@ class RegionBackendService(pulumi.CustomResource):
2578
2748
  __props__.__dict__["connection_tracking_policy"] = connection_tracking_policy
2579
2749
  __props__.__dict__["consistent_hash"] = consistent_hash
2580
2750
  __props__.__dict__["creation_timestamp"] = creation_timestamp
2751
+ __props__.__dict__["custom_metrics"] = custom_metrics
2581
2752
  __props__.__dict__["description"] = description
2582
2753
  __props__.__dict__["enable_cdn"] = enable_cdn
2583
2754
  __props__.__dict__["failover_policy"] = failover_policy
@@ -2687,6 +2858,15 @@ class RegionBackendService(pulumi.CustomResource):
2687
2858
  """
2688
2859
  return pulumi.get(self, "creation_timestamp")
2689
2860
 
2861
+ @property
2862
+ @pulumi.getter(name="customMetrics")
2863
+ def custom_metrics(self) -> pulumi.Output[Optional[Sequence['outputs.RegionBackendServiceCustomMetric']]]:
2864
+ """
2865
+ List of custom metrics that are used for the WEIGHTED_ROUND_ROBIN locality_lb_policy.
2866
+ Structure is documented below.
2867
+ """
2868
+ return pulumi.get(self, "custom_metrics")
2869
+
2690
2870
  @property
2691
2871
  @pulumi.getter
2692
2872
  def description(self) -> pulumi.Output[Optional[str]]:
@@ -2810,6 +2990,12 @@ class RegionBackendService(pulumi.CustomResource):
2810
2990
  instance either reported a valid weight or had
2811
2991
  UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains
2812
2992
  equal-weight.
2993
+ * `WEIGHTED_ROUND_ROBIN`: Per-endpoint weighted round-robin Load Balancing using weights computed
2994
+ from Backend reported Custom Metrics. If set, the Backend Service
2995
+ responses are expected to contain non-standard HTTP response header field
2996
+ X-Endpoint-Load-Metrics. The reported metrics
2997
+ to use for computing the weights are specified via the
2998
+ backends[].customMetrics fields.
2813
2999
  locality_lb_policy is applicable to either:
2814
3000
  * A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2,
2815
3001
  and loadBalancingScheme set to INTERNAL_MANAGED.
@@ -2822,7 +3008,7 @@ class RegionBackendService(pulumi.CustomResource):
2822
3008
  Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced
2823
3009
  by a URL map that is bound to target gRPC proxy that has validate_for_proxyless
2824
3010
  field set to true.
2825
- Possible values are: `ROUND_ROBIN`, `LEAST_REQUEST`, `RING_HASH`, `RANDOM`, `ORIGINAL_DESTINATION`, `MAGLEV`, `WEIGHTED_MAGLEV`.
3011
+ Possible values are: `ROUND_ROBIN`, `LEAST_REQUEST`, `RING_HASH`, `RANDOM`, `ORIGINAL_DESTINATION`, `MAGLEV`, `WEIGHTED_MAGLEV`, `WEIGHTED_ROUND_ROBIN`.
2826
3012
  """
2827
3013
  return pulumi.get(self, "locality_lb_policy")
2828
3014
 
@@ -23,6 +23,8 @@ class RegionDiskArgs:
23
23
  def __init__(__self__, *,
24
24
  replica_zones: pulumi.Input[Sequence[pulumi.Input[str]]],
25
25
  async_primary_disk: Optional[pulumi.Input['RegionDiskAsyncPrimaryDiskArgs']] = None,
26
+ create_snapshot_before_destroy: Optional[pulumi.Input[bool]] = None,
27
+ create_snapshot_before_destroy_prefix: Optional[pulumi.Input[str]] = None,
26
28
  description: Optional[pulumi.Input[str]] = None,
27
29
  disk_encryption_key: Optional[pulumi.Input['RegionDiskDiskEncryptionKeyArgs']] = None,
28
30
  guest_os_features: Optional[pulumi.Input[Sequence[pulumi.Input['RegionDiskGuestOsFeatureArgs']]]] = None,
@@ -46,6 +48,10 @@ class RegionDiskArgs:
46
48
  - - -
47
49
  :param pulumi.Input['RegionDiskAsyncPrimaryDiskArgs'] async_primary_disk: A nested object resource.
48
50
  Structure is documented below.
51
+ :param pulumi.Input[bool] create_snapshot_before_destroy: If set to true, a snapshot of the disk will be created before it is destroyed.
52
+ If your disk is encrypted with customer managed encryption keys these will be reused for the snapshot creation.
53
+ The name of the snapshot by default will be `{{disk-name}}-YYYYMMDD-HHmm`
54
+ :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.
49
55
  :param pulumi.Input[str] description: An optional description of this resource. Provide this property when
50
56
  you create the resource.
51
57
  :param pulumi.Input['RegionDiskDiskEncryptionKeyArgs'] disk_encryption_key: Encrypts the disk using a customer-supplied encryption key.
@@ -115,6 +121,10 @@ class RegionDiskArgs:
115
121
  pulumi.set(__self__, "replica_zones", replica_zones)
116
122
  if async_primary_disk is not None:
117
123
  pulumi.set(__self__, "async_primary_disk", async_primary_disk)
124
+ if create_snapshot_before_destroy is not None:
125
+ pulumi.set(__self__, "create_snapshot_before_destroy", create_snapshot_before_destroy)
126
+ if create_snapshot_before_destroy_prefix is not None:
127
+ pulumi.set(__self__, "create_snapshot_before_destroy_prefix", create_snapshot_before_destroy_prefix)
118
128
  if description is not None:
119
129
  pulumi.set(__self__, "description", description)
120
130
  if disk_encryption_key is not None:
@@ -177,6 +187,32 @@ class RegionDiskArgs:
177
187
  def async_primary_disk(self, value: Optional[pulumi.Input['RegionDiskAsyncPrimaryDiskArgs']]):
178
188
  pulumi.set(self, "async_primary_disk", value)
179
189
 
190
+ @property
191
+ @pulumi.getter(name="createSnapshotBeforeDestroy")
192
+ def create_snapshot_before_destroy(self) -> Optional[pulumi.Input[bool]]:
193
+ """
194
+ If set to true, a snapshot of the disk will be created before it is destroyed.
195
+ If your disk is encrypted with customer managed encryption keys these will be reused for the snapshot creation.
196
+ The name of the snapshot by default will be `{{disk-name}}-YYYYMMDD-HHmm`
197
+ """
198
+ return pulumi.get(self, "create_snapshot_before_destroy")
199
+
200
+ @create_snapshot_before_destroy.setter
201
+ def create_snapshot_before_destroy(self, value: Optional[pulumi.Input[bool]]):
202
+ pulumi.set(self, "create_snapshot_before_destroy", value)
203
+
204
+ @property
205
+ @pulumi.getter(name="createSnapshotBeforeDestroyPrefix")
206
+ def create_snapshot_before_destroy_prefix(self) -> Optional[pulumi.Input[str]]:
207
+ """
208
+ This will set a custom name prefix for the snapshot that's created when the disk is deleted.
209
+ """
210
+ return pulumi.get(self, "create_snapshot_before_destroy_prefix")
211
+
212
+ @create_snapshot_before_destroy_prefix.setter
213
+ def create_snapshot_before_destroy_prefix(self, value: Optional[pulumi.Input[str]]):
214
+ pulumi.set(self, "create_snapshot_before_destroy_prefix", value)
215
+
180
216
  @property
181
217
  @pulumi.getter
182
218
  def description(self) -> Optional[pulumi.Input[str]]:
@@ -413,6 +449,8 @@ class RegionDiskArgs:
413
449
  class _RegionDiskState:
414
450
  def __init__(__self__, *,
415
451
  async_primary_disk: Optional[pulumi.Input['RegionDiskAsyncPrimaryDiskArgs']] = None,
452
+ create_snapshot_before_destroy: Optional[pulumi.Input[bool]] = None,
453
+ create_snapshot_before_destroy_prefix: Optional[pulumi.Input[str]] = None,
416
454
  creation_timestamp: Optional[pulumi.Input[str]] = None,
417
455
  description: Optional[pulumi.Input[str]] = None,
418
456
  disk_encryption_key: Optional[pulumi.Input['RegionDiskDiskEncryptionKeyArgs']] = None,
@@ -443,6 +481,10 @@ class _RegionDiskState:
443
481
  Input properties used for looking up and filtering RegionDisk resources.
444
482
  :param pulumi.Input['RegionDiskAsyncPrimaryDiskArgs'] async_primary_disk: A nested object resource.
445
483
  Structure is documented below.
484
+ :param pulumi.Input[bool] create_snapshot_before_destroy: If set to true, a snapshot of the disk will be created before it is destroyed.
485
+ If your disk is encrypted with customer managed encryption keys these will be reused for the snapshot creation.
486
+ The name of the snapshot by default will be `{{disk-name}}-YYYYMMDD-HHmm`
487
+ :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.
446
488
  :param pulumi.Input[str] creation_timestamp: Creation timestamp in RFC3339 text format.
447
489
  :param pulumi.Input[str] description: An optional description of this resource. Provide this property when
448
490
  you create the resource.
@@ -535,6 +577,10 @@ class _RegionDiskState:
535
577
  """
536
578
  if async_primary_disk is not None:
537
579
  pulumi.set(__self__, "async_primary_disk", async_primary_disk)
580
+ if create_snapshot_before_destroy is not None:
581
+ pulumi.set(__self__, "create_snapshot_before_destroy", create_snapshot_before_destroy)
582
+ if create_snapshot_before_destroy_prefix is not None:
583
+ pulumi.set(__self__, "create_snapshot_before_destroy_prefix", create_snapshot_before_destroy_prefix)
538
584
  if creation_timestamp is not None:
539
585
  pulumi.set(__self__, "creation_timestamp", creation_timestamp)
540
586
  if description is not None:
@@ -604,6 +650,32 @@ class _RegionDiskState:
604
650
  def async_primary_disk(self, value: Optional[pulumi.Input['RegionDiskAsyncPrimaryDiskArgs']]):
605
651
  pulumi.set(self, "async_primary_disk", value)
606
652
 
653
+ @property
654
+ @pulumi.getter(name="createSnapshotBeforeDestroy")
655
+ def create_snapshot_before_destroy(self) -> Optional[pulumi.Input[bool]]:
656
+ """
657
+ If set to true, a snapshot of the disk will be created before it is destroyed.
658
+ If your disk is encrypted with customer managed encryption keys these will be reused for the snapshot creation.
659
+ The name of the snapshot by default will be `{{disk-name}}-YYYYMMDD-HHmm`
660
+ """
661
+ return pulumi.get(self, "create_snapshot_before_destroy")
662
+
663
+ @create_snapshot_before_destroy.setter
664
+ def create_snapshot_before_destroy(self, value: Optional[pulumi.Input[bool]]):
665
+ pulumi.set(self, "create_snapshot_before_destroy", value)
666
+
667
+ @property
668
+ @pulumi.getter(name="createSnapshotBeforeDestroyPrefix")
669
+ def create_snapshot_before_destroy_prefix(self) -> Optional[pulumi.Input[str]]:
670
+ """
671
+ This will set a custom name prefix for the snapshot that's created when the disk is deleted.
672
+ """
673
+ return pulumi.get(self, "create_snapshot_before_destroy_prefix")
674
+
675
+ @create_snapshot_before_destroy_prefix.setter
676
+ def create_snapshot_before_destroy_prefix(self, value: Optional[pulumi.Input[str]]):
677
+ pulumi.set(self, "create_snapshot_before_destroy_prefix", value)
678
+
607
679
  @property
608
680
  @pulumi.getter(name="creationTimestamp")
609
681
  def creation_timestamp(self) -> Optional[pulumi.Input[str]]:
@@ -987,6 +1059,8 @@ class RegionDisk(pulumi.CustomResource):
987
1059
  resource_name: str,
988
1060
  opts: Optional[pulumi.ResourceOptions] = None,
989
1061
  async_primary_disk: Optional[pulumi.Input[Union['RegionDiskAsyncPrimaryDiskArgs', 'RegionDiskAsyncPrimaryDiskArgsDict']]] = None,
1062
+ create_snapshot_before_destroy: Optional[pulumi.Input[bool]] = None,
1063
+ create_snapshot_before_destroy_prefix: Optional[pulumi.Input[str]] = None,
990
1064
  description: Optional[pulumi.Input[str]] = None,
991
1065
  disk_encryption_key: Optional[pulumi.Input[Union['RegionDiskDiskEncryptionKeyArgs', 'RegionDiskDiskEncryptionKeyArgsDict']]] = None,
992
1066
  guest_os_features: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RegionDiskGuestOsFeatureArgs', 'RegionDiskGuestOsFeatureArgsDict']]]]] = None,
@@ -1027,6 +1101,9 @@ class RegionDisk(pulumi.CustomResource):
1027
1101
  * How-to Guides
1028
1102
  * [Adding or Resizing Regional Persistent Disks](https://cloud.google.com/compute/docs/disks/regional-persistent-disk)
1029
1103
 
1104
+ > **Warning:** All arguments including the following potentially sensitive
1105
+ values will be stored in the raw state as plain text: `disk_encryption_key.raw_key`, `disk_encryption_key.rsa_encrypted_key`.
1106
+
1030
1107
  ## Example Usage
1031
1108
 
1032
1109
  ### Region Disk Basic
@@ -1147,6 +1224,10 @@ class RegionDisk(pulumi.CustomResource):
1147
1224
  :param pulumi.ResourceOptions opts: Options for the resource.
1148
1225
  :param pulumi.Input[Union['RegionDiskAsyncPrimaryDiskArgs', 'RegionDiskAsyncPrimaryDiskArgsDict']] async_primary_disk: A nested object resource.
1149
1226
  Structure is documented below.
1227
+ :param pulumi.Input[bool] create_snapshot_before_destroy: If set to true, a snapshot of the disk will be created before it is destroyed.
1228
+ If your disk is encrypted with customer managed encryption keys these will be reused for the snapshot creation.
1229
+ The name of the snapshot by default will be `{{disk-name}}-YYYYMMDD-HHmm`
1230
+ :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.
1150
1231
  :param pulumi.Input[str] description: An optional description of this resource. Provide this property when
1151
1232
  you create the resource.
1152
1233
  :param pulumi.Input[Union['RegionDiskDiskEncryptionKeyArgs', 'RegionDiskDiskEncryptionKeyArgsDict']] disk_encryption_key: Encrypts the disk using a customer-supplied encryption key.
@@ -1246,6 +1327,9 @@ class RegionDisk(pulumi.CustomResource):
1246
1327
  * How-to Guides
1247
1328
  * [Adding or Resizing Regional Persistent Disks](https://cloud.google.com/compute/docs/disks/regional-persistent-disk)
1248
1329
 
1330
+ > **Warning:** All arguments including the following potentially sensitive
1331
+ values will be stored in the raw state as plain text: `disk_encryption_key.raw_key`, `disk_encryption_key.rsa_encrypted_key`.
1332
+
1249
1333
  ## Example Usage
1250
1334
 
1251
1335
  ### Region Disk Basic
@@ -1378,6 +1462,8 @@ class RegionDisk(pulumi.CustomResource):
1378
1462
  resource_name: str,
1379
1463
  opts: Optional[pulumi.ResourceOptions] = None,
1380
1464
  async_primary_disk: Optional[pulumi.Input[Union['RegionDiskAsyncPrimaryDiskArgs', 'RegionDiskAsyncPrimaryDiskArgsDict']]] = None,
1465
+ create_snapshot_before_destroy: Optional[pulumi.Input[bool]] = None,
1466
+ create_snapshot_before_destroy_prefix: Optional[pulumi.Input[str]] = None,
1381
1467
  description: Optional[pulumi.Input[str]] = None,
1382
1468
  disk_encryption_key: Optional[pulumi.Input[Union['RegionDiskDiskEncryptionKeyArgs', 'RegionDiskDiskEncryptionKeyArgsDict']]] = None,
1383
1469
  guest_os_features: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RegionDiskGuestOsFeatureArgs', 'RegionDiskGuestOsFeatureArgsDict']]]]] = None,
@@ -1404,6 +1490,8 @@ class RegionDisk(pulumi.CustomResource):
1404
1490
  __props__ = RegionDiskArgs.__new__(RegionDiskArgs)
1405
1491
 
1406
1492
  __props__.__dict__["async_primary_disk"] = async_primary_disk
1493
+ __props__.__dict__["create_snapshot_before_destroy"] = create_snapshot_before_destroy
1494
+ __props__.__dict__["create_snapshot_before_destroy_prefix"] = create_snapshot_before_destroy_prefix
1407
1495
  __props__.__dict__["description"] = description
1408
1496
  __props__.__dict__["disk_encryption_key"] = disk_encryption_key
1409
1497
  __props__.__dict__["guest_os_features"] = guest_os_features
@@ -1445,6 +1533,8 @@ class RegionDisk(pulumi.CustomResource):
1445
1533
  id: pulumi.Input[str],
1446
1534
  opts: Optional[pulumi.ResourceOptions] = None,
1447
1535
  async_primary_disk: Optional[pulumi.Input[Union['RegionDiskAsyncPrimaryDiskArgs', 'RegionDiskAsyncPrimaryDiskArgsDict']]] = None,
1536
+ create_snapshot_before_destroy: Optional[pulumi.Input[bool]] = None,
1537
+ create_snapshot_before_destroy_prefix: Optional[pulumi.Input[str]] = None,
1448
1538
  creation_timestamp: Optional[pulumi.Input[str]] = None,
1449
1539
  description: Optional[pulumi.Input[str]] = None,
1450
1540
  disk_encryption_key: Optional[pulumi.Input[Union['RegionDiskDiskEncryptionKeyArgs', 'RegionDiskDiskEncryptionKeyArgsDict']]] = None,
@@ -1480,6 +1570,10 @@ class RegionDisk(pulumi.CustomResource):
1480
1570
  :param pulumi.ResourceOptions opts: Options for the resource.
1481
1571
  :param pulumi.Input[Union['RegionDiskAsyncPrimaryDiskArgs', 'RegionDiskAsyncPrimaryDiskArgsDict']] async_primary_disk: A nested object resource.
1482
1572
  Structure is documented below.
1573
+ :param pulumi.Input[bool] create_snapshot_before_destroy: If set to true, a snapshot of the disk will be created before it is destroyed.
1574
+ If your disk is encrypted with customer managed encryption keys these will be reused for the snapshot creation.
1575
+ The name of the snapshot by default will be `{{disk-name}}-YYYYMMDD-HHmm`
1576
+ :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.
1483
1577
  :param pulumi.Input[str] creation_timestamp: Creation timestamp in RFC3339 text format.
1484
1578
  :param pulumi.Input[str] description: An optional description of this resource. Provide this property when
1485
1579
  you create the resource.
@@ -1575,6 +1669,8 @@ class RegionDisk(pulumi.CustomResource):
1575
1669
  __props__ = _RegionDiskState.__new__(_RegionDiskState)
1576
1670
 
1577
1671
  __props__.__dict__["async_primary_disk"] = async_primary_disk
1672
+ __props__.__dict__["create_snapshot_before_destroy"] = create_snapshot_before_destroy
1673
+ __props__.__dict__["create_snapshot_before_destroy_prefix"] = create_snapshot_before_destroy_prefix
1578
1674
  __props__.__dict__["creation_timestamp"] = creation_timestamp
1579
1675
  __props__.__dict__["description"] = description
1580
1676
  __props__.__dict__["disk_encryption_key"] = disk_encryption_key
@@ -1612,6 +1708,24 @@ class RegionDisk(pulumi.CustomResource):
1612
1708
  """
1613
1709
  return pulumi.get(self, "async_primary_disk")
1614
1710
 
1711
+ @property
1712
+ @pulumi.getter(name="createSnapshotBeforeDestroy")
1713
+ def create_snapshot_before_destroy(self) -> pulumi.Output[Optional[bool]]:
1714
+ """
1715
+ If set to true, a snapshot of the disk will be created before it is destroyed.
1716
+ If your disk is encrypted with customer managed encryption keys these will be reused for the snapshot creation.
1717
+ The name of the snapshot by default will be `{{disk-name}}-YYYYMMDD-HHmm`
1718
+ """
1719
+ return pulumi.get(self, "create_snapshot_before_destroy")
1720
+
1721
+ @property
1722
+ @pulumi.getter(name="createSnapshotBeforeDestroyPrefix")
1723
+ def create_snapshot_before_destroy_prefix(self) -> pulumi.Output[Optional[str]]:
1724
+ """
1725
+ This will set a custom name prefix for the snapshot that's created when the disk is deleted.
1726
+ """
1727
+ return pulumi.get(self, "create_snapshot_before_destroy_prefix")
1728
+
1615
1729
  @property
1616
1730
  @pulumi.getter(name="creationTimestamp")
1617
1731
  def creation_timestamp(self) -> pulumi.Output[str]: