pulumi-gcp 8.35.0a1750142992__py3-none-any.whl → 8.35.0a1750229953__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 (52) hide show
  1. pulumi_gcp/__init__.py +8 -0
  2. pulumi_gcp/backupdisasterrecovery/backup_plan.py +100 -7
  3. pulumi_gcp/backupdisasterrecovery/backup_plan_association.py +35 -7
  4. pulumi_gcp/backupdisasterrecovery/get_backup_plan.py +12 -1
  5. pulumi_gcp/bigqueryanalyticshub/listing.py +108 -0
  6. pulumi_gcp/compute/_inputs.py +2028 -175
  7. pulumi_gcp/compute/disk.py +7 -7
  8. pulumi_gcp/compute/outputs.py +1483 -110
  9. pulumi_gcp/compute/region_url_map.py +344 -0
  10. pulumi_gcp/compute/target_http_proxy.py +118 -0
  11. pulumi_gcp/compute/target_https_proxy.py +132 -0
  12. pulumi_gcp/compute/url_map.py +344 -0
  13. pulumi_gcp/compute/vpn_tunnel.py +178 -0
  14. pulumi_gcp/dataplex/__init__.py +1 -0
  15. pulumi_gcp/dataplex/get_data_quality_rules.py +169 -0
  16. pulumi_gcp/dataplex/outputs.py +420 -0
  17. pulumi_gcp/diagflow/__init__.py +1 -0
  18. pulumi_gcp/diagflow/_inputs.py +939 -0
  19. pulumi_gcp/diagflow/cx_agent.py +34 -0
  20. pulumi_gcp/diagflow/cx_tool.py +899 -0
  21. pulumi_gcp/diagflow/outputs.py +780 -0
  22. pulumi_gcp/firestore/field.py +6 -6
  23. pulumi_gcp/gkehub/membership_binding.py +6 -6
  24. pulumi_gcp/gkehub/membership_rbac_role_binding.py +4 -4
  25. pulumi_gcp/gkehub/namespace.py +4 -4
  26. pulumi_gcp/gkehub/scope_rbac_role_binding.py +8 -8
  27. pulumi_gcp/iap/tunnel_dest_group.py +2 -2
  28. pulumi_gcp/integrationconnectors/_inputs.py +24 -1
  29. pulumi_gcp/integrationconnectors/managed_zone.py +8 -8
  30. pulumi_gcp/integrationconnectors/outputs.py +15 -1
  31. pulumi_gcp/managedkafka/connect_cluster.py +4 -4
  32. pulumi_gcp/managedkafka/connector.py +4 -4
  33. pulumi_gcp/netapp/_inputs.py +23 -0
  34. pulumi_gcp/netapp/outputs.py +16 -0
  35. pulumi_gcp/netapp/storage_pool.py +108 -0
  36. pulumi_gcp/networkconnectivity/_inputs.py +71 -1
  37. pulumi_gcp/networkconnectivity/outputs.py +64 -1
  38. pulumi_gcp/networkconnectivity/spoke.py +14 -14
  39. pulumi_gcp/notebooks/runtime.py +4 -0
  40. pulumi_gcp/orgpolicy/policy.py +2 -2
  41. pulumi_gcp/pubsub/subscription.py +6 -6
  42. pulumi_gcp/pulumi-plugin.json +1 -1
  43. pulumi_gcp/redis/_inputs.py +77 -0
  44. pulumi_gcp/redis/cluster.py +32 -0
  45. pulumi_gcp/redis/outputs.py +63 -0
  46. pulumi_gcp/vertex/ai_endpoint.py +4 -4
  47. pulumi_gcp/vertex/ai_feature_online_store_featureview.py +4 -4
  48. pulumi_gcp/vertex/ai_index_endpoint_deployed_index.py +99 -64
  49. {pulumi_gcp-8.35.0a1750142992.dist-info → pulumi_gcp-8.35.0a1750229953.dist-info}/METADATA +1 -1
  50. {pulumi_gcp-8.35.0a1750142992.dist-info → pulumi_gcp-8.35.0a1750229953.dist-info}/RECORD +52 -50
  51. {pulumi_gcp-8.35.0a1750142992.dist-info → pulumi_gcp-8.35.0a1750229953.dist-info}/WHEEL +0 -0
  52. {pulumi_gcp-8.35.0a1750142992.dist-info → pulumi_gcp-8.35.0a1750229953.dist-info}/top_level.txt +0 -0
@@ -343,6 +343,7 @@ class _TargetHttpsProxyState:
343
343
  certificate_map: Optional[pulumi.Input[builtins.str]] = None,
344
344
  creation_timestamp: Optional[pulumi.Input[builtins.str]] = None,
345
345
  description: Optional[pulumi.Input[builtins.str]] = None,
346
+ fingerprint: Optional[pulumi.Input[builtins.str]] = None,
346
347
  http_keep_alive_timeout_sec: Optional[pulumi.Input[builtins.int]] = None,
347
348
  name: Optional[pulumi.Input[builtins.str]] = None,
348
349
  project: Optional[pulumi.Input[builtins.str]] = None,
@@ -368,6 +369,11 @@ class _TargetHttpsProxyState:
368
369
  Accepted format is `//certificatemanager.googleapis.com/projects/{project}/locations/{location}/certificateMaps/{resourceName}`.
369
370
  :param pulumi.Input[builtins.str] creation_timestamp: Creation timestamp in RFC3339 text format.
370
371
  :param pulumi.Input[builtins.str] description: An optional description of this resource.
372
+ :param pulumi.Input[builtins.str] fingerprint: Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking.
373
+ This field will be ignored when inserting a TargetHttpsProxy. An up-to-date fingerprint must be provided in order to
374
+ patch the TargetHttpsProxy; otherwise, the request will fail with error 412 conditionNotMet.
375
+ To see the latest fingerprint, make a get() request to retrieve the TargetHttpsProxy.
376
+ A base64-encoded string.
371
377
  :param pulumi.Input[builtins.int] http_keep_alive_timeout_sec: Specifies how long to keep a connection open, after completing a response,
372
378
  while there is no matching traffic (in seconds). If an HTTP keepalive is
373
379
  not specified, a default value will be used. For Global
@@ -434,6 +440,8 @@ class _TargetHttpsProxyState:
434
440
  pulumi.set(__self__, "creation_timestamp", creation_timestamp)
435
441
  if description is not None:
436
442
  pulumi.set(__self__, "description", description)
443
+ if fingerprint is not None:
444
+ pulumi.set(__self__, "fingerprint", fingerprint)
437
445
  if http_keep_alive_timeout_sec is not None:
438
446
  pulumi.set(__self__, "http_keep_alive_timeout_sec", http_keep_alive_timeout_sec)
439
447
  if name is not None:
@@ -514,6 +522,22 @@ class _TargetHttpsProxyState:
514
522
  def description(self, value: Optional[pulumi.Input[builtins.str]]):
515
523
  pulumi.set(self, "description", value)
516
524
 
525
+ @property
526
+ @pulumi.getter
527
+ def fingerprint(self) -> Optional[pulumi.Input[builtins.str]]:
528
+ """
529
+ Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking.
530
+ This field will be ignored when inserting a TargetHttpsProxy. An up-to-date fingerprint must be provided in order to
531
+ patch the TargetHttpsProxy; otherwise, the request will fail with error 412 conditionNotMet.
532
+ To see the latest fingerprint, make a get() request to retrieve the TargetHttpsProxy.
533
+ A base64-encoded string.
534
+ """
535
+ return pulumi.get(self, "fingerprint")
536
+
537
+ @fingerprint.setter
538
+ def fingerprint(self, value: Optional[pulumi.Input[builtins.str]]):
539
+ pulumi.set(self, "fingerprint", value)
540
+
517
541
  @property
518
542
  @pulumi.getter(name="httpKeepAliveTimeoutSec")
519
543
  def http_keep_alive_timeout_sec(self) -> Optional[pulumi.Input[builtins.int]]:
@@ -934,6 +958,50 @@ class TargetHttpsProxy(pulumi.CustomResource):
934
958
  url_map=default_url_map.id,
935
959
  certificate_manager_certificates=[default_certificate.id.apply(lambda id: f"//certificatemanager.googleapis.com/{id}")])
936
960
  ```
961
+ ### Target Https Proxy Fingerprint
962
+
963
+ ```python
964
+ import pulumi
965
+ import pulumi_gcp as gcp
966
+ import pulumi_std as std
967
+
968
+ default_ssl_certificate = gcp.compute.SSLCertificate("default",
969
+ name="my-certificate",
970
+ private_key=std.file(input="path/to/private.key").result,
971
+ certificate=std.file(input="path/to/certificate.crt").result)
972
+ default_http_health_check = gcp.compute.HttpHealthCheck("default",
973
+ name="http-health-check",
974
+ request_path="/",
975
+ check_interval_sec=1,
976
+ timeout_sec=1)
977
+ default_backend_service = gcp.compute.BackendService("default",
978
+ name="backend-service",
979
+ port_name="http",
980
+ protocol="HTTP",
981
+ timeout_sec=10,
982
+ health_checks=default_http_health_check.id)
983
+ default_url_map = gcp.compute.URLMap("default",
984
+ name="url-map",
985
+ description="a description",
986
+ default_service=default_backend_service.id,
987
+ host_rules=[{
988
+ "hosts": ["mysite.com"],
989
+ "path_matcher": "allpaths",
990
+ }],
991
+ path_matchers=[{
992
+ "name": "allpaths",
993
+ "default_service": default_backend_service.id,
994
+ "path_rules": [{
995
+ "paths": ["/*"],
996
+ "service": default_backend_service.id,
997
+ }],
998
+ }])
999
+ default = gcp.compute.TargetHttpsProxy("default",
1000
+ name="test-fingerprint-proxy",
1001
+ url_map=default_url_map.id,
1002
+ ssl_certificates=[default_ssl_certificate.id])
1003
+ pulumi.export("targetHttpsProxyFingerprint", default.fingerprint)
1004
+ ```
937
1005
 
938
1006
  ## Import
939
1007
 
@@ -1243,6 +1311,50 @@ class TargetHttpsProxy(pulumi.CustomResource):
1243
1311
  url_map=default_url_map.id,
1244
1312
  certificate_manager_certificates=[default_certificate.id.apply(lambda id: f"//certificatemanager.googleapis.com/{id}")])
1245
1313
  ```
1314
+ ### Target Https Proxy Fingerprint
1315
+
1316
+ ```python
1317
+ import pulumi
1318
+ import pulumi_gcp as gcp
1319
+ import pulumi_std as std
1320
+
1321
+ default_ssl_certificate = gcp.compute.SSLCertificate("default",
1322
+ name="my-certificate",
1323
+ private_key=std.file(input="path/to/private.key").result,
1324
+ certificate=std.file(input="path/to/certificate.crt").result)
1325
+ default_http_health_check = gcp.compute.HttpHealthCheck("default",
1326
+ name="http-health-check",
1327
+ request_path="/",
1328
+ check_interval_sec=1,
1329
+ timeout_sec=1)
1330
+ default_backend_service = gcp.compute.BackendService("default",
1331
+ name="backend-service",
1332
+ port_name="http",
1333
+ protocol="HTTP",
1334
+ timeout_sec=10,
1335
+ health_checks=default_http_health_check.id)
1336
+ default_url_map = gcp.compute.URLMap("default",
1337
+ name="url-map",
1338
+ description="a description",
1339
+ default_service=default_backend_service.id,
1340
+ host_rules=[{
1341
+ "hosts": ["mysite.com"],
1342
+ "path_matcher": "allpaths",
1343
+ }],
1344
+ path_matchers=[{
1345
+ "name": "allpaths",
1346
+ "default_service": default_backend_service.id,
1347
+ "path_rules": [{
1348
+ "paths": ["/*"],
1349
+ "service": default_backend_service.id,
1350
+ }],
1351
+ }])
1352
+ default = gcp.compute.TargetHttpsProxy("default",
1353
+ name="test-fingerprint-proxy",
1354
+ url_map=default_url_map.id,
1355
+ ssl_certificates=[default_ssl_certificate.id])
1356
+ pulumi.export("targetHttpsProxyFingerprint", default.fingerprint)
1357
+ ```
1246
1358
 
1247
1359
  ## Import
1248
1360
 
@@ -1321,6 +1433,7 @@ class TargetHttpsProxy(pulumi.CustomResource):
1321
1433
  raise TypeError("Missing required property 'url_map'")
1322
1434
  __props__.__dict__["url_map"] = url_map
1323
1435
  __props__.__dict__["creation_timestamp"] = None
1436
+ __props__.__dict__["fingerprint"] = None
1324
1437
  __props__.__dict__["proxy_id"] = None
1325
1438
  __props__.__dict__["self_link"] = None
1326
1439
  super(TargetHttpsProxy, __self__).__init__(
@@ -1337,6 +1450,7 @@ class TargetHttpsProxy(pulumi.CustomResource):
1337
1450
  certificate_map: Optional[pulumi.Input[builtins.str]] = None,
1338
1451
  creation_timestamp: Optional[pulumi.Input[builtins.str]] = None,
1339
1452
  description: Optional[pulumi.Input[builtins.str]] = None,
1453
+ fingerprint: Optional[pulumi.Input[builtins.str]] = None,
1340
1454
  http_keep_alive_timeout_sec: Optional[pulumi.Input[builtins.int]] = None,
1341
1455
  name: Optional[pulumi.Input[builtins.str]] = None,
1342
1456
  project: Optional[pulumi.Input[builtins.str]] = None,
@@ -1367,6 +1481,11 @@ class TargetHttpsProxy(pulumi.CustomResource):
1367
1481
  Accepted format is `//certificatemanager.googleapis.com/projects/{project}/locations/{location}/certificateMaps/{resourceName}`.
1368
1482
  :param pulumi.Input[builtins.str] creation_timestamp: Creation timestamp in RFC3339 text format.
1369
1483
  :param pulumi.Input[builtins.str] description: An optional description of this resource.
1484
+ :param pulumi.Input[builtins.str] fingerprint: Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking.
1485
+ This field will be ignored when inserting a TargetHttpsProxy. An up-to-date fingerprint must be provided in order to
1486
+ patch the TargetHttpsProxy; otherwise, the request will fail with error 412 conditionNotMet.
1487
+ To see the latest fingerprint, make a get() request to retrieve the TargetHttpsProxy.
1488
+ A base64-encoded string.
1370
1489
  :param pulumi.Input[builtins.int] http_keep_alive_timeout_sec: Specifies how long to keep a connection open, after completing a response,
1371
1490
  while there is no matching traffic (in seconds). If an HTTP keepalive is
1372
1491
  not specified, a default value will be used. For Global
@@ -1433,6 +1552,7 @@ class TargetHttpsProxy(pulumi.CustomResource):
1433
1552
  __props__.__dict__["certificate_map"] = certificate_map
1434
1553
  __props__.__dict__["creation_timestamp"] = creation_timestamp
1435
1554
  __props__.__dict__["description"] = description
1555
+ __props__.__dict__["fingerprint"] = fingerprint
1436
1556
  __props__.__dict__["http_keep_alive_timeout_sec"] = http_keep_alive_timeout_sec
1437
1557
  __props__.__dict__["name"] = name
1438
1558
  __props__.__dict__["project"] = project
@@ -1486,6 +1606,18 @@ class TargetHttpsProxy(pulumi.CustomResource):
1486
1606
  """
1487
1607
  return pulumi.get(self, "description")
1488
1608
 
1609
+ @property
1610
+ @pulumi.getter
1611
+ def fingerprint(self) -> pulumi.Output[builtins.str]:
1612
+ """
1613
+ Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking.
1614
+ This field will be ignored when inserting a TargetHttpsProxy. An up-to-date fingerprint must be provided in order to
1615
+ patch the TargetHttpsProxy; otherwise, the request will fail with error 412 conditionNotMet.
1616
+ To see the latest fingerprint, make a get() request to retrieve the TargetHttpsProxy.
1617
+ A base64-encoded string.
1618
+ """
1619
+ return pulumi.get(self, "fingerprint")
1620
+
1489
1621
  @property
1490
1622
  @pulumi.getter(name="httpKeepAliveTimeoutSec")
1491
1623
  def http_keep_alive_timeout_sec(self) -> pulumi.Output[Optional[builtins.int]]:
@@ -1310,6 +1310,178 @@ class URLMap(pulumi.CustomResource):
1310
1310
  }],
1311
1311
  }])
1312
1312
  ```
1313
+ ### Url Map Test Headers
1314
+
1315
+ ```python
1316
+ import pulumi
1317
+ import pulumi_gcp as gcp
1318
+
1319
+ health_check = gcp.compute.HealthCheck("health-check",
1320
+ name="health-check",
1321
+ timeout_sec=1,
1322
+ check_interval_sec=1,
1323
+ tcp_health_check={
1324
+ "port": 80,
1325
+ })
1326
+ backend = gcp.compute.BackendService("backend",
1327
+ name="backend",
1328
+ port_name="http",
1329
+ protocol="HTTP",
1330
+ timeout_sec=10,
1331
+ health_checks=health_check.id)
1332
+ urlmap = gcp.compute.URLMap("urlmap",
1333
+ name="urlmap",
1334
+ description="URL map with test headers",
1335
+ default_service=backend.id,
1336
+ tests=[
1337
+ {
1338
+ "description": "Test with custom headers",
1339
+ "host": "example.com",
1340
+ "path": "/",
1341
+ "service": backend.id,
1342
+ "headers": [
1343
+ {
1344
+ "name": "User-Agent",
1345
+ "value": "TestBot/1.0",
1346
+ },
1347
+ {
1348
+ "name": "X-Custom-Header",
1349
+ "value": "test-value",
1350
+ },
1351
+ ],
1352
+ },
1353
+ {
1354
+ "description": "Test with authorization headers",
1355
+ "host": "api.example.com",
1356
+ "path": "/v1/test",
1357
+ "service": backend.id,
1358
+ "headers": [
1359
+ {
1360
+ "name": "Authorization",
1361
+ "value": "Bearer token123",
1362
+ },
1363
+ {
1364
+ "name": "Content-Type",
1365
+ "value": "application/json",
1366
+ },
1367
+ ],
1368
+ },
1369
+ ])
1370
+ ```
1371
+ ### Url Map Test Expected Output Url
1372
+
1373
+ ```python
1374
+ import pulumi
1375
+ import pulumi_gcp as gcp
1376
+
1377
+ health_check = gcp.compute.HealthCheck("health-check",
1378
+ name="health-check",
1379
+ timeout_sec=1,
1380
+ check_interval_sec=1,
1381
+ tcp_health_check={
1382
+ "port": 80,
1383
+ })
1384
+ backend = gcp.compute.BackendService("backend",
1385
+ name="backend",
1386
+ port_name="http",
1387
+ protocol="HTTP",
1388
+ timeout_sec=10,
1389
+ health_checks=health_check.id)
1390
+ urlmap = gcp.compute.URLMap("urlmap",
1391
+ name="urlmap",
1392
+ description="URL map with expected output URL tests",
1393
+ default_service=backend.id,
1394
+ tests=[
1395
+ {
1396
+ "description": "Test with expected output URL",
1397
+ "host": "example.com",
1398
+ "path": "/",
1399
+ "service": backend.id,
1400
+ "headers": [{
1401
+ "name": "User-Agent",
1402
+ "value": "TestBot/1.0",
1403
+ }],
1404
+ "expected_output_url": "http://example.com/",
1405
+ },
1406
+ {
1407
+ "description": "Test API routing with expected output URL",
1408
+ "host": "api.example.com",
1409
+ "path": "/v1/users",
1410
+ "service": backend.id,
1411
+ "headers": [{
1412
+ "name": "Authorization",
1413
+ "value": "Bearer token123",
1414
+ }],
1415
+ "expected_output_url": "http://api.example.com/v1/users",
1416
+ },
1417
+ ])
1418
+ ```
1419
+ ### Url Map Test Redirect Response Code
1420
+
1421
+ ```python
1422
+ import pulumi
1423
+ import pulumi_gcp as gcp
1424
+
1425
+ health_check = gcp.compute.HealthCheck("health-check",
1426
+ name="health-check",
1427
+ timeout_sec=1,
1428
+ check_interval_sec=1,
1429
+ tcp_health_check={
1430
+ "port": 80,
1431
+ })
1432
+ backend = gcp.compute.BackendService("backend",
1433
+ name="backend",
1434
+ port_name="http",
1435
+ protocol="HTTP",
1436
+ timeout_sec=10,
1437
+ health_checks=health_check.id)
1438
+ urlmap = gcp.compute.URLMap("urlmap",
1439
+ name="urlmap",
1440
+ description="URL map with redirect response code tests",
1441
+ default_service=backend.id,
1442
+ host_rules=[{
1443
+ "hosts": ["example.com"],
1444
+ "path_matcher": "allpaths",
1445
+ }],
1446
+ path_matchers=[{
1447
+ "name": "allpaths",
1448
+ "default_service": backend.id,
1449
+ "path_rules": [{
1450
+ "paths": ["/redirect/*"],
1451
+ "url_redirect": {
1452
+ "host_redirect": "newsite.com",
1453
+ "path_redirect": "/new-path/",
1454
+ "https_redirect": True,
1455
+ "redirect_response_code": "MOVED_PERMANENTLY_DEFAULT",
1456
+ "strip_query": False,
1457
+ },
1458
+ }],
1459
+ }],
1460
+ tests=[
1461
+ {
1462
+ "description": "Test redirect with expected response code",
1463
+ "host": "example.com",
1464
+ "path": "/redirect/old-page",
1465
+ "headers": [{
1466
+ "name": "Referer",
1467
+ "value": "https://oldsite.com",
1468
+ }],
1469
+ "expected_output_url": "https://newsite.com/new-path/",
1470
+ "expected_redirect_response_code": 301,
1471
+ },
1472
+ {
1473
+ "description": "Test another redirect scenario",
1474
+ "host": "example.com",
1475
+ "path": "/redirect/another-page",
1476
+ "headers": [{
1477
+ "name": "User-Agent",
1478
+ "value": "TestBot/1.0",
1479
+ }],
1480
+ "expected_output_url": "https://newsite.com/new-path/",
1481
+ "expected_redirect_response_code": 301,
1482
+ },
1483
+ ])
1484
+ ```
1313
1485
  ### Url Map Path Template Match
1314
1486
 
1315
1487
  ```python
@@ -2403,6 +2575,178 @@ class URLMap(pulumi.CustomResource):
2403
2575
  }],
2404
2576
  }])
2405
2577
  ```
2578
+ ### Url Map Test Headers
2579
+
2580
+ ```python
2581
+ import pulumi
2582
+ import pulumi_gcp as gcp
2583
+
2584
+ health_check = gcp.compute.HealthCheck("health-check",
2585
+ name="health-check",
2586
+ timeout_sec=1,
2587
+ check_interval_sec=1,
2588
+ tcp_health_check={
2589
+ "port": 80,
2590
+ })
2591
+ backend = gcp.compute.BackendService("backend",
2592
+ name="backend",
2593
+ port_name="http",
2594
+ protocol="HTTP",
2595
+ timeout_sec=10,
2596
+ health_checks=health_check.id)
2597
+ urlmap = gcp.compute.URLMap("urlmap",
2598
+ name="urlmap",
2599
+ description="URL map with test headers",
2600
+ default_service=backend.id,
2601
+ tests=[
2602
+ {
2603
+ "description": "Test with custom headers",
2604
+ "host": "example.com",
2605
+ "path": "/",
2606
+ "service": backend.id,
2607
+ "headers": [
2608
+ {
2609
+ "name": "User-Agent",
2610
+ "value": "TestBot/1.0",
2611
+ },
2612
+ {
2613
+ "name": "X-Custom-Header",
2614
+ "value": "test-value",
2615
+ },
2616
+ ],
2617
+ },
2618
+ {
2619
+ "description": "Test with authorization headers",
2620
+ "host": "api.example.com",
2621
+ "path": "/v1/test",
2622
+ "service": backend.id,
2623
+ "headers": [
2624
+ {
2625
+ "name": "Authorization",
2626
+ "value": "Bearer token123",
2627
+ },
2628
+ {
2629
+ "name": "Content-Type",
2630
+ "value": "application/json",
2631
+ },
2632
+ ],
2633
+ },
2634
+ ])
2635
+ ```
2636
+ ### Url Map Test Expected Output Url
2637
+
2638
+ ```python
2639
+ import pulumi
2640
+ import pulumi_gcp as gcp
2641
+
2642
+ health_check = gcp.compute.HealthCheck("health-check",
2643
+ name="health-check",
2644
+ timeout_sec=1,
2645
+ check_interval_sec=1,
2646
+ tcp_health_check={
2647
+ "port": 80,
2648
+ })
2649
+ backend = gcp.compute.BackendService("backend",
2650
+ name="backend",
2651
+ port_name="http",
2652
+ protocol="HTTP",
2653
+ timeout_sec=10,
2654
+ health_checks=health_check.id)
2655
+ urlmap = gcp.compute.URLMap("urlmap",
2656
+ name="urlmap",
2657
+ description="URL map with expected output URL tests",
2658
+ default_service=backend.id,
2659
+ tests=[
2660
+ {
2661
+ "description": "Test with expected output URL",
2662
+ "host": "example.com",
2663
+ "path": "/",
2664
+ "service": backend.id,
2665
+ "headers": [{
2666
+ "name": "User-Agent",
2667
+ "value": "TestBot/1.0",
2668
+ }],
2669
+ "expected_output_url": "http://example.com/",
2670
+ },
2671
+ {
2672
+ "description": "Test API routing with expected output URL",
2673
+ "host": "api.example.com",
2674
+ "path": "/v1/users",
2675
+ "service": backend.id,
2676
+ "headers": [{
2677
+ "name": "Authorization",
2678
+ "value": "Bearer token123",
2679
+ }],
2680
+ "expected_output_url": "http://api.example.com/v1/users",
2681
+ },
2682
+ ])
2683
+ ```
2684
+ ### Url Map Test Redirect Response Code
2685
+
2686
+ ```python
2687
+ import pulumi
2688
+ import pulumi_gcp as gcp
2689
+
2690
+ health_check = gcp.compute.HealthCheck("health-check",
2691
+ name="health-check",
2692
+ timeout_sec=1,
2693
+ check_interval_sec=1,
2694
+ tcp_health_check={
2695
+ "port": 80,
2696
+ })
2697
+ backend = gcp.compute.BackendService("backend",
2698
+ name="backend",
2699
+ port_name="http",
2700
+ protocol="HTTP",
2701
+ timeout_sec=10,
2702
+ health_checks=health_check.id)
2703
+ urlmap = gcp.compute.URLMap("urlmap",
2704
+ name="urlmap",
2705
+ description="URL map with redirect response code tests",
2706
+ default_service=backend.id,
2707
+ host_rules=[{
2708
+ "hosts": ["example.com"],
2709
+ "path_matcher": "allpaths",
2710
+ }],
2711
+ path_matchers=[{
2712
+ "name": "allpaths",
2713
+ "default_service": backend.id,
2714
+ "path_rules": [{
2715
+ "paths": ["/redirect/*"],
2716
+ "url_redirect": {
2717
+ "host_redirect": "newsite.com",
2718
+ "path_redirect": "/new-path/",
2719
+ "https_redirect": True,
2720
+ "redirect_response_code": "MOVED_PERMANENTLY_DEFAULT",
2721
+ "strip_query": False,
2722
+ },
2723
+ }],
2724
+ }],
2725
+ tests=[
2726
+ {
2727
+ "description": "Test redirect with expected response code",
2728
+ "host": "example.com",
2729
+ "path": "/redirect/old-page",
2730
+ "headers": [{
2731
+ "name": "Referer",
2732
+ "value": "https://oldsite.com",
2733
+ }],
2734
+ "expected_output_url": "https://newsite.com/new-path/",
2735
+ "expected_redirect_response_code": 301,
2736
+ },
2737
+ {
2738
+ "description": "Test another redirect scenario",
2739
+ "host": "example.com",
2740
+ "path": "/redirect/another-page",
2741
+ "headers": [{
2742
+ "name": "User-Agent",
2743
+ "value": "TestBot/1.0",
2744
+ }],
2745
+ "expected_output_url": "https://newsite.com/new-path/",
2746
+ "expected_redirect_response_code": 301,
2747
+ },
2748
+ ])
2749
+ ```
2406
2750
  ### Url Map Path Template Match
2407
2751
 
2408
2752
  ```python