pulumi-gcp 8.17.0a1738090062__py3-none-any.whl → 8.17.0a1738349438__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pulumi_gcp/__init__.py +91 -0
- pulumi_gcp/alloydb/cluster.py +75 -7
- pulumi_gcp/apigee/_inputs.py +91 -0
- pulumi_gcp/apigee/endpoint_attachment.py +0 -64
- pulumi_gcp/apigee/environment.py +54 -0
- pulumi_gcp/apigee/outputs.py +54 -0
- pulumi_gcp/apihub/__init__.py +10 -0
- pulumi_gcp/apihub/_inputs.py +154 -0
- pulumi_gcp/apihub/api_hub_instance.py +784 -0
- pulumi_gcp/apihub/outputs.py +124 -0
- pulumi_gcp/chronicle/__init__.py +1 -0
- pulumi_gcp/chronicle/_inputs.py +124 -0
- pulumi_gcp/chronicle/outputs.py +112 -0
- pulumi_gcp/chronicle/retrohunt.py +645 -0
- pulumi_gcp/cloudrunv2/_inputs.py +197 -0
- pulumi_gcp/cloudrunv2/get_service.py +12 -1
- pulumi_gcp/cloudrunv2/outputs.py +256 -0
- pulumi_gcp/cloudrunv2/service.py +159 -0
- pulumi_gcp/colab/__init__.py +5 -0
- pulumi_gcp/colab/_inputs.py +131 -0
- pulumi_gcp/colab/get_runtime_template_iam_policy.py +182 -0
- pulumi_gcp/colab/outputs.py +92 -0
- pulumi_gcp/colab/runtime.py +696 -0
- pulumi_gcp/colab/runtime_template_iam_binding.py +828 -0
- pulumi_gcp/colab/runtime_template_iam_member.py +828 -0
- pulumi_gcp/colab/runtime_template_iam_policy.py +667 -0
- pulumi_gcp/compute/__init__.py +4 -0
- pulumi_gcp/compute/_inputs.py +526 -0
- pulumi_gcp/compute/firewall_policy_rule.py +104 -22
- pulumi_gcp/compute/firewall_policy_with_rules.py +114 -42
- pulumi_gcp/compute/get_instance_template_iam_policy.py +159 -0
- pulumi_gcp/compute/instance_template_iam_binding.py +998 -0
- pulumi_gcp/compute/instance_template_iam_member.py +998 -0
- pulumi_gcp/compute/instance_template_iam_policy.py +817 -0
- pulumi_gcp/compute/interconnect_attachment.py +189 -2
- pulumi_gcp/compute/network_firewall_policy_rule.py +122 -10
- pulumi_gcp/compute/network_firewall_policy_with_rules.py +116 -44
- pulumi_gcp/compute/outputs.py +352 -0
- pulumi_gcp/compute/project_metadata_item.py +12 -0
- pulumi_gcp/compute/public_advertised_prefix.py +87 -0
- pulumi_gcp/compute/region_network_firewall_policy_rule.py +130 -10
- pulumi_gcp/compute/region_network_firewall_policy_with_rules.py +104 -32
- pulumi_gcp/compute/router_peer.py +115 -3
- pulumi_gcp/config/__init__.pyi +2 -0
- pulumi_gcp/config/vars.py +4 -0
- pulumi_gcp/filestore/get_instance.py +12 -1
- pulumi_gcp/filestore/instance.py +75 -0
- pulumi_gcp/gemini/code_repository_index.py +29 -33
- pulumi_gcp/gemini/get_repository_group_iam_policy.py +28 -2
- pulumi_gcp/gemini/repository_group.py +76 -26
- pulumi_gcp/gemini/repository_group_iam_binding.py +258 -0
- pulumi_gcp/gemini/repository_group_iam_member.py +258 -0
- pulumi_gcp/gemini/repository_group_iam_policy.py +258 -0
- pulumi_gcp/kms/__init__.py +1 -0
- pulumi_gcp/kms/get_key_handles.py +172 -0
- pulumi_gcp/kms/outputs.py +45 -0
- pulumi_gcp/networksecurity/_inputs.py +72 -0
- pulumi_gcp/networksecurity/outputs.py +76 -0
- pulumi_gcp/networksecurity/security_profile.py +233 -7
- pulumi_gcp/networksecurity/security_profile_group.py +218 -0
- pulumi_gcp/organizations/__init__.py +1 -0
- pulumi_gcp/organizations/get_s.py +128 -0
- pulumi_gcp/organizations/outputs.py +63 -0
- pulumi_gcp/parametermanager/__init__.py +3 -0
- pulumi_gcp/parametermanager/get_parameter.py +211 -0
- pulumi_gcp/parametermanager/get_regional_parameters.py +157 -0
- pulumi_gcp/parametermanager/outputs.py +210 -0
- pulumi_gcp/parametermanager/parameter_version.py +496 -0
- pulumi_gcp/parametermanager/regional_parameter_version.py +10 -38
- pulumi_gcp/provider.py +20 -0
- pulumi_gcp/pubsub/_inputs.py +213 -1
- pulumi_gcp/pubsub/outputs.py +278 -2
- pulumi_gcp/pubsub/topic.py +42 -0
- pulumi_gcp/pulumi-plugin.json +1 -1
- pulumi_gcp/redis/__init__.py +1 -0
- pulumi_gcp/redis/_inputs.py +342 -6
- pulumi_gcp/redis/cluster.py +223 -102
- pulumi_gcp/redis/cluster_user_created_connections.py +845 -0
- pulumi_gcp/redis/outputs.py +268 -4
- {pulumi_gcp-8.17.0a1738090062.dist-info → pulumi_gcp-8.17.0a1738349438.dist-info}/METADATA +1 -1
- {pulumi_gcp-8.17.0a1738090062.dist-info → pulumi_gcp-8.17.0a1738349438.dist-info}/RECORD +83 -63
- {pulumi_gcp-8.17.0a1738090062.dist-info → pulumi_gcp-8.17.0a1738349438.dist-info}/WHEEL +0 -0
- {pulumi_gcp-8.17.0a1738090062.dist-info → pulumi_gcp-8.17.0a1738349438.dist-info}/top_level.txt +0 -0
@@ -539,7 +539,7 @@ class FirewallPolicyRule(pulumi.CustomResource):
|
|
539
539
|
import pulumi_gcp as gcp
|
540
540
|
|
541
541
|
basic_global_networksecurity_address_group = gcp.networksecurity.AddressGroup("basic_global_networksecurity_address_group",
|
542
|
-
name="address",
|
542
|
+
name="address-group",
|
543
543
|
parent="organizations/123456789",
|
544
544
|
description="Sample global networksecurity_address_group",
|
545
545
|
location="global",
|
@@ -552,9 +552,9 @@ class FirewallPolicyRule(pulumi.CustomResource):
|
|
552
552
|
deletion_protection=False)
|
553
553
|
default = gcp.compute.FirewallPolicy("default",
|
554
554
|
parent=folder.id,
|
555
|
-
short_name="policy",
|
555
|
+
short_name="fw-policy",
|
556
556
|
description="Resource created for Terraform acceptance testing")
|
557
|
-
|
557
|
+
primary = gcp.compute.FirewallPolicyRule("primary",
|
558
558
|
firewall_policy=default.name,
|
559
559
|
description="Resource created for Terraform acceptance testing",
|
560
560
|
priority=9000,
|
@@ -562,7 +562,15 @@ class FirewallPolicyRule(pulumi.CustomResource):
|
|
562
562
|
action="allow",
|
563
563
|
direction="EGRESS",
|
564
564
|
disabled=False,
|
565
|
+
target_service_accounts=["my@service-account.com"],
|
565
566
|
match={
|
567
|
+
"dest_ip_ranges": ["11.100.0.1/32"],
|
568
|
+
"dest_fqdns": [],
|
569
|
+
"dest_region_codes": ["US"],
|
570
|
+
"dest_threat_intelligences": ["iplist-known-malicious-ips"],
|
571
|
+
"src_address_groups": [],
|
572
|
+
"dest_address_groups": [basic_global_networksecurity_address_group.id],
|
573
|
+
"dest_network_scope": "INTERNET",
|
566
574
|
"layer4_configs": [
|
567
575
|
{
|
568
576
|
"ip_protocol": "tcp",
|
@@ -573,14 +581,47 @@ class FirewallPolicyRule(pulumi.CustomResource):
|
|
573
581
|
"ports": ["22"],
|
574
582
|
},
|
575
583
|
],
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
+
})
|
585
|
+
```
|
586
|
+
### Firewall Policy Rule Network Scope
|
587
|
+
|
588
|
+
```python
|
589
|
+
import pulumi
|
590
|
+
import pulumi_gcp as gcp
|
591
|
+
|
592
|
+
folder = gcp.organizations.Folder("folder",
|
593
|
+
display_name="folder",
|
594
|
+
parent="organizations/123456789",
|
595
|
+
deletion_protection=False)
|
596
|
+
default = gcp.compute.FirewallPolicy("default",
|
597
|
+
parent=folder.id,
|
598
|
+
short_name="fw-policy",
|
599
|
+
description="Firewall policy")
|
600
|
+
network = gcp.compute.Network("network",
|
601
|
+
name="network",
|
602
|
+
auto_create_subnetworks=False)
|
603
|
+
primary = gcp.compute.FirewallPolicyRule("primary",
|
604
|
+
firewall_policy=default.name,
|
605
|
+
description="Firewall policy rule with network scope",
|
606
|
+
priority=9000,
|
607
|
+
action="allow",
|
608
|
+
direction="INGRESS",
|
609
|
+
disabled=False,
|
610
|
+
match={
|
611
|
+
"src_ip_ranges": ["11.100.0.1/32"],
|
612
|
+
"src_network_scope": "VPC_NETWORKS",
|
613
|
+
"src_networks": [network.id],
|
614
|
+
"layer4_configs": [
|
615
|
+
{
|
616
|
+
"ip_protocol": "tcp",
|
617
|
+
"ports": ["8080"],
|
618
|
+
},
|
619
|
+
{
|
620
|
+
"ip_protocol": "udp",
|
621
|
+
"ports": ["22"],
|
622
|
+
},
|
623
|
+
],
|
624
|
+
})
|
584
625
|
```
|
585
626
|
|
586
627
|
## Import
|
@@ -649,7 +690,7 @@ class FirewallPolicyRule(pulumi.CustomResource):
|
|
649
690
|
import pulumi_gcp as gcp
|
650
691
|
|
651
692
|
basic_global_networksecurity_address_group = gcp.networksecurity.AddressGroup("basic_global_networksecurity_address_group",
|
652
|
-
name="address",
|
693
|
+
name="address-group",
|
653
694
|
parent="organizations/123456789",
|
654
695
|
description="Sample global networksecurity_address_group",
|
655
696
|
location="global",
|
@@ -662,9 +703,9 @@ class FirewallPolicyRule(pulumi.CustomResource):
|
|
662
703
|
deletion_protection=False)
|
663
704
|
default = gcp.compute.FirewallPolicy("default",
|
664
705
|
parent=folder.id,
|
665
|
-
short_name="policy",
|
706
|
+
short_name="fw-policy",
|
666
707
|
description="Resource created for Terraform acceptance testing")
|
667
|
-
|
708
|
+
primary = gcp.compute.FirewallPolicyRule("primary",
|
668
709
|
firewall_policy=default.name,
|
669
710
|
description="Resource created for Terraform acceptance testing",
|
670
711
|
priority=9000,
|
@@ -672,7 +713,15 @@ class FirewallPolicyRule(pulumi.CustomResource):
|
|
672
713
|
action="allow",
|
673
714
|
direction="EGRESS",
|
674
715
|
disabled=False,
|
716
|
+
target_service_accounts=["my@service-account.com"],
|
675
717
|
match={
|
718
|
+
"dest_ip_ranges": ["11.100.0.1/32"],
|
719
|
+
"dest_fqdns": [],
|
720
|
+
"dest_region_codes": ["US"],
|
721
|
+
"dest_threat_intelligences": ["iplist-known-malicious-ips"],
|
722
|
+
"src_address_groups": [],
|
723
|
+
"dest_address_groups": [basic_global_networksecurity_address_group.id],
|
724
|
+
"dest_network_scope": "INTERNET",
|
676
725
|
"layer4_configs": [
|
677
726
|
{
|
678
727
|
"ip_protocol": "tcp",
|
@@ -683,14 +732,47 @@ class FirewallPolicyRule(pulumi.CustomResource):
|
|
683
732
|
"ports": ["22"],
|
684
733
|
},
|
685
734
|
],
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
735
|
+
})
|
736
|
+
```
|
737
|
+
### Firewall Policy Rule Network Scope
|
738
|
+
|
739
|
+
```python
|
740
|
+
import pulumi
|
741
|
+
import pulumi_gcp as gcp
|
742
|
+
|
743
|
+
folder = gcp.organizations.Folder("folder",
|
744
|
+
display_name="folder",
|
745
|
+
parent="organizations/123456789",
|
746
|
+
deletion_protection=False)
|
747
|
+
default = gcp.compute.FirewallPolicy("default",
|
748
|
+
parent=folder.id,
|
749
|
+
short_name="fw-policy",
|
750
|
+
description="Firewall policy")
|
751
|
+
network = gcp.compute.Network("network",
|
752
|
+
name="network",
|
753
|
+
auto_create_subnetworks=False)
|
754
|
+
primary = gcp.compute.FirewallPolicyRule("primary",
|
755
|
+
firewall_policy=default.name,
|
756
|
+
description="Firewall policy rule with network scope",
|
757
|
+
priority=9000,
|
758
|
+
action="allow",
|
759
|
+
direction="INGRESS",
|
760
|
+
disabled=False,
|
761
|
+
match={
|
762
|
+
"src_ip_ranges": ["11.100.0.1/32"],
|
763
|
+
"src_network_scope": "VPC_NETWORKS",
|
764
|
+
"src_networks": [network.id],
|
765
|
+
"layer4_configs": [
|
766
|
+
{
|
767
|
+
"ip_protocol": "tcp",
|
768
|
+
"ports": ["8080"],
|
769
|
+
},
|
770
|
+
{
|
771
|
+
"ip_protocol": "udp",
|
772
|
+
"ports": ["22"],
|
773
|
+
},
|
774
|
+
],
|
775
|
+
})
|
694
776
|
```
|
695
777
|
|
696
778
|
## Import
|
@@ -306,7 +306,7 @@ class FirewallPolicyWithRules(pulumi.CustomResource):
|
|
306
306
|
|
307
307
|
project = gcp.organizations.get_project()
|
308
308
|
address_group1 = gcp.networksecurity.AddressGroup("address_group_1",
|
309
|
-
name="
|
309
|
+
name="address-group",
|
310
310
|
parent="organizations/123456789",
|
311
311
|
description="Global address group",
|
312
312
|
location="global",
|
@@ -314,17 +314,20 @@ class FirewallPolicyWithRules(pulumi.CustomResource):
|
|
314
314
|
type="IPV4",
|
315
315
|
capacity=100)
|
316
316
|
security_profile1 = gcp.networksecurity.SecurityProfile("security_profile_1",
|
317
|
-
name="
|
317
|
+
name="sp",
|
318
318
|
type="THREAT_PREVENTION",
|
319
319
|
parent="organizations/123456789",
|
320
320
|
location="global")
|
321
321
|
security_profile_group1 = gcp.networksecurity.SecurityProfileGroup("security_profile_group_1",
|
322
|
-
name="
|
322
|
+
name="spg",
|
323
323
|
parent="organizations/123456789",
|
324
324
|
description="my description",
|
325
325
|
threat_prevention_profile=security_profile1.id)
|
326
|
-
|
327
|
-
|
326
|
+
network = gcp.compute.Network("network",
|
327
|
+
name="network",
|
328
|
+
auto_create_subnetworks=False)
|
329
|
+
primary = gcp.compute.FirewallPolicyWithRules("primary",
|
330
|
+
short_name="fw-policy",
|
328
331
|
description="Terraform test",
|
329
332
|
parent="organizations/123456789",
|
330
333
|
rules=[
|
@@ -334,14 +337,8 @@ class FirewallPolicyWithRules(pulumi.CustomResource):
|
|
334
337
|
"enable_logging": True,
|
335
338
|
"action": "allow",
|
336
339
|
"direction": "EGRESS",
|
340
|
+
"target_resources": [f"https://www.googleapis.com/compute/beta/projects/{project.name}/global/networks/default"],
|
337
341
|
"match": {
|
338
|
-
"layer4_configs": [{
|
339
|
-
"ip_protocol": "tcp",
|
340
|
-
"ports": [
|
341
|
-
"8080",
|
342
|
-
"7070",
|
343
|
-
],
|
344
|
-
}],
|
345
342
|
"dest_ip_ranges": ["11.100.0.1/32"],
|
346
343
|
"dest_fqdns": [
|
347
344
|
"www.yyy.com",
|
@@ -356,8 +353,14 @@ class FirewallPolicyWithRules(pulumi.CustomResource):
|
|
356
353
|
"iplist-tor-exit-nodes",
|
357
354
|
],
|
358
355
|
"dest_address_groups": [address_group1.id],
|
356
|
+
"layer4_configs": [{
|
357
|
+
"ip_protocol": "tcp",
|
358
|
+
"ports": [
|
359
|
+
"8080",
|
360
|
+
"7070",
|
361
|
+
],
|
362
|
+
}],
|
359
363
|
},
|
360
|
-
"target_resources": [f"https://www.googleapis.com/compute/beta/projects/{project.name}/global/networks/default"],
|
361
364
|
},
|
362
365
|
{
|
363
366
|
"description": "udp rule",
|
@@ -365,10 +368,8 @@ class FirewallPolicyWithRules(pulumi.CustomResource):
|
|
365
368
|
"enable_logging": False,
|
366
369
|
"action": "deny",
|
367
370
|
"direction": "INGRESS",
|
371
|
+
"disabled": True,
|
368
372
|
"match": {
|
369
|
-
"layer4_configs": [{
|
370
|
-
"ip_protocol": "udp",
|
371
|
-
}],
|
372
373
|
"src_ip_ranges": ["0.0.0.0/0"],
|
373
374
|
"src_fqdns": [
|
374
375
|
"www.abc.com",
|
@@ -383,8 +384,10 @@ class FirewallPolicyWithRules(pulumi.CustomResource):
|
|
383
384
|
"iplist-public-clouds",
|
384
385
|
],
|
385
386
|
"src_address_groups": [address_group1.id],
|
387
|
+
"layer4_configs": [{
|
388
|
+
"ip_protocol": "udp",
|
389
|
+
}],
|
386
390
|
},
|
387
|
-
"disabled": True,
|
388
391
|
},
|
389
392
|
{
|
390
393
|
"description": "security profile group rule",
|
@@ -393,15 +396,48 @@ class FirewallPolicyWithRules(pulumi.CustomResource):
|
|
393
396
|
"enable_logging": False,
|
394
397
|
"action": "apply_security_profile_group",
|
395
398
|
"direction": "INGRESS",
|
399
|
+
"target_service_accounts": ["test@google.com"],
|
400
|
+
"security_profile_group": security_profile_group1.id.apply(lambda id: f"//networksecurity.googleapis.com/{id}"),
|
401
|
+
"tls_inspect": True,
|
402
|
+
"match": {
|
403
|
+
"src_ip_ranges": ["0.0.0.0/0"],
|
404
|
+
"layer4_configs": [{
|
405
|
+
"ip_protocol": "tcp",
|
406
|
+
}],
|
407
|
+
},
|
408
|
+
},
|
409
|
+
{
|
410
|
+
"description": "network scope rule 1",
|
411
|
+
"rule_name": "network scope 1",
|
412
|
+
"priority": 4000,
|
413
|
+
"enable_logging": False,
|
414
|
+
"action": "allow",
|
415
|
+
"direction": "INGRESS",
|
396
416
|
"match": {
|
417
|
+
"src_ip_ranges": ["11.100.0.1/32"],
|
418
|
+
"src_network_scope": "VPC_NETWORKS",
|
419
|
+
"src_networks": [network.id],
|
397
420
|
"layer4_configs": [{
|
398
421
|
"ip_protocol": "tcp",
|
422
|
+
"ports": ["8080"],
|
423
|
+
}],
|
424
|
+
},
|
425
|
+
},
|
426
|
+
{
|
427
|
+
"description": "network scope rule 2",
|
428
|
+
"rule_name": "network scope 2",
|
429
|
+
"priority": 5000,
|
430
|
+
"enable_logging": False,
|
431
|
+
"action": "allow",
|
432
|
+
"direction": "EGRESS",
|
433
|
+
"match": {
|
434
|
+
"dest_ip_ranges": ["0.0.0.0/0"],
|
435
|
+
"dest_network_scope": "INTERNET",
|
436
|
+
"layer4_configs": [{
|
437
|
+
"ip_protocol": "tcp",
|
438
|
+
"ports": ["8080"],
|
399
439
|
}],
|
400
|
-
"src_ip_ranges": ["0.0.0.0/0"],
|
401
440
|
},
|
402
|
-
"target_service_accounts": ["test@google.com"],
|
403
|
-
"security_profile_group": security_profile_group1.id.apply(lambda id: f"//networksecurity.googleapis.com/{id}"),
|
404
|
-
"tls_inspect": True,
|
405
441
|
},
|
406
442
|
])
|
407
443
|
```
|
@@ -451,7 +487,7 @@ class FirewallPolicyWithRules(pulumi.CustomResource):
|
|
451
487
|
|
452
488
|
project = gcp.organizations.get_project()
|
453
489
|
address_group1 = gcp.networksecurity.AddressGroup("address_group_1",
|
454
|
-
name="
|
490
|
+
name="address-group",
|
455
491
|
parent="organizations/123456789",
|
456
492
|
description="Global address group",
|
457
493
|
location="global",
|
@@ -459,17 +495,20 @@ class FirewallPolicyWithRules(pulumi.CustomResource):
|
|
459
495
|
type="IPV4",
|
460
496
|
capacity=100)
|
461
497
|
security_profile1 = gcp.networksecurity.SecurityProfile("security_profile_1",
|
462
|
-
name="
|
498
|
+
name="sp",
|
463
499
|
type="THREAT_PREVENTION",
|
464
500
|
parent="organizations/123456789",
|
465
501
|
location="global")
|
466
502
|
security_profile_group1 = gcp.networksecurity.SecurityProfileGroup("security_profile_group_1",
|
467
|
-
name="
|
503
|
+
name="spg",
|
468
504
|
parent="organizations/123456789",
|
469
505
|
description="my description",
|
470
506
|
threat_prevention_profile=security_profile1.id)
|
471
|
-
|
472
|
-
|
507
|
+
network = gcp.compute.Network("network",
|
508
|
+
name="network",
|
509
|
+
auto_create_subnetworks=False)
|
510
|
+
primary = gcp.compute.FirewallPolicyWithRules("primary",
|
511
|
+
short_name="fw-policy",
|
473
512
|
description="Terraform test",
|
474
513
|
parent="organizations/123456789",
|
475
514
|
rules=[
|
@@ -479,14 +518,8 @@ class FirewallPolicyWithRules(pulumi.CustomResource):
|
|
479
518
|
"enable_logging": True,
|
480
519
|
"action": "allow",
|
481
520
|
"direction": "EGRESS",
|
521
|
+
"target_resources": [f"https://www.googleapis.com/compute/beta/projects/{project.name}/global/networks/default"],
|
482
522
|
"match": {
|
483
|
-
"layer4_configs": [{
|
484
|
-
"ip_protocol": "tcp",
|
485
|
-
"ports": [
|
486
|
-
"8080",
|
487
|
-
"7070",
|
488
|
-
],
|
489
|
-
}],
|
490
523
|
"dest_ip_ranges": ["11.100.0.1/32"],
|
491
524
|
"dest_fqdns": [
|
492
525
|
"www.yyy.com",
|
@@ -501,8 +534,14 @@ class FirewallPolicyWithRules(pulumi.CustomResource):
|
|
501
534
|
"iplist-tor-exit-nodes",
|
502
535
|
],
|
503
536
|
"dest_address_groups": [address_group1.id],
|
537
|
+
"layer4_configs": [{
|
538
|
+
"ip_protocol": "tcp",
|
539
|
+
"ports": [
|
540
|
+
"8080",
|
541
|
+
"7070",
|
542
|
+
],
|
543
|
+
}],
|
504
544
|
},
|
505
|
-
"target_resources": [f"https://www.googleapis.com/compute/beta/projects/{project.name}/global/networks/default"],
|
506
545
|
},
|
507
546
|
{
|
508
547
|
"description": "udp rule",
|
@@ -510,10 +549,8 @@ class FirewallPolicyWithRules(pulumi.CustomResource):
|
|
510
549
|
"enable_logging": False,
|
511
550
|
"action": "deny",
|
512
551
|
"direction": "INGRESS",
|
552
|
+
"disabled": True,
|
513
553
|
"match": {
|
514
|
-
"layer4_configs": [{
|
515
|
-
"ip_protocol": "udp",
|
516
|
-
}],
|
517
554
|
"src_ip_ranges": ["0.0.0.0/0"],
|
518
555
|
"src_fqdns": [
|
519
556
|
"www.abc.com",
|
@@ -528,8 +565,10 @@ class FirewallPolicyWithRules(pulumi.CustomResource):
|
|
528
565
|
"iplist-public-clouds",
|
529
566
|
],
|
530
567
|
"src_address_groups": [address_group1.id],
|
568
|
+
"layer4_configs": [{
|
569
|
+
"ip_protocol": "udp",
|
570
|
+
}],
|
531
571
|
},
|
532
|
-
"disabled": True,
|
533
572
|
},
|
534
573
|
{
|
535
574
|
"description": "security profile group rule",
|
@@ -538,15 +577,48 @@ class FirewallPolicyWithRules(pulumi.CustomResource):
|
|
538
577
|
"enable_logging": False,
|
539
578
|
"action": "apply_security_profile_group",
|
540
579
|
"direction": "INGRESS",
|
580
|
+
"target_service_accounts": ["test@google.com"],
|
581
|
+
"security_profile_group": security_profile_group1.id.apply(lambda id: f"//networksecurity.googleapis.com/{id}"),
|
582
|
+
"tls_inspect": True,
|
583
|
+
"match": {
|
584
|
+
"src_ip_ranges": ["0.0.0.0/0"],
|
585
|
+
"layer4_configs": [{
|
586
|
+
"ip_protocol": "tcp",
|
587
|
+
}],
|
588
|
+
},
|
589
|
+
},
|
590
|
+
{
|
591
|
+
"description": "network scope rule 1",
|
592
|
+
"rule_name": "network scope 1",
|
593
|
+
"priority": 4000,
|
594
|
+
"enable_logging": False,
|
595
|
+
"action": "allow",
|
596
|
+
"direction": "INGRESS",
|
541
597
|
"match": {
|
598
|
+
"src_ip_ranges": ["11.100.0.1/32"],
|
599
|
+
"src_network_scope": "VPC_NETWORKS",
|
600
|
+
"src_networks": [network.id],
|
542
601
|
"layer4_configs": [{
|
543
602
|
"ip_protocol": "tcp",
|
603
|
+
"ports": ["8080"],
|
604
|
+
}],
|
605
|
+
},
|
606
|
+
},
|
607
|
+
{
|
608
|
+
"description": "network scope rule 2",
|
609
|
+
"rule_name": "network scope 2",
|
610
|
+
"priority": 5000,
|
611
|
+
"enable_logging": False,
|
612
|
+
"action": "allow",
|
613
|
+
"direction": "EGRESS",
|
614
|
+
"match": {
|
615
|
+
"dest_ip_ranges": ["0.0.0.0/0"],
|
616
|
+
"dest_network_scope": "INTERNET",
|
617
|
+
"layer4_configs": [{
|
618
|
+
"ip_protocol": "tcp",
|
619
|
+
"ports": ["8080"],
|
544
620
|
}],
|
545
|
-
"src_ip_ranges": ["0.0.0.0/0"],
|
546
621
|
},
|
547
|
-
"target_service_accounts": ["test@google.com"],
|
548
|
-
"security_profile_group": security_profile_group1.id.apply(lambda id: f"//networksecurity.googleapis.com/{id}"),
|
549
|
-
"tls_inspect": True,
|
550
622
|
},
|
551
623
|
])
|
552
624
|
```
|
@@ -0,0 +1,159 @@
|
|
1
|
+
# coding=utf-8
|
2
|
+
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
4
|
+
|
5
|
+
import copy
|
6
|
+
import warnings
|
7
|
+
import sys
|
8
|
+
import pulumi
|
9
|
+
import pulumi.runtime
|
10
|
+
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
11
|
+
if sys.version_info >= (3, 11):
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
13
|
+
else:
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
15
|
+
from .. import _utilities
|
16
|
+
|
17
|
+
__all__ = [
|
18
|
+
'GetInstanceTemplateIamPolicyResult',
|
19
|
+
'AwaitableGetInstanceTemplateIamPolicyResult',
|
20
|
+
'get_instance_template_iam_policy',
|
21
|
+
'get_instance_template_iam_policy_output',
|
22
|
+
]
|
23
|
+
|
24
|
+
@pulumi.output_type
|
25
|
+
class GetInstanceTemplateIamPolicyResult:
|
26
|
+
"""
|
27
|
+
A collection of values returned by getInstanceTemplateIamPolicy.
|
28
|
+
"""
|
29
|
+
def __init__(__self__, etag=None, id=None, name=None, policy_data=None, project=None):
|
30
|
+
if etag and not isinstance(etag, str):
|
31
|
+
raise TypeError("Expected argument 'etag' to be a str")
|
32
|
+
pulumi.set(__self__, "etag", etag)
|
33
|
+
if id and not isinstance(id, str):
|
34
|
+
raise TypeError("Expected argument 'id' to be a str")
|
35
|
+
pulumi.set(__self__, "id", id)
|
36
|
+
if name and not isinstance(name, str):
|
37
|
+
raise TypeError("Expected argument 'name' to be a str")
|
38
|
+
pulumi.set(__self__, "name", name)
|
39
|
+
if policy_data and not isinstance(policy_data, str):
|
40
|
+
raise TypeError("Expected argument 'policy_data' to be a str")
|
41
|
+
pulumi.set(__self__, "policy_data", policy_data)
|
42
|
+
if project and not isinstance(project, str):
|
43
|
+
raise TypeError("Expected argument 'project' to be a str")
|
44
|
+
pulumi.set(__self__, "project", project)
|
45
|
+
|
46
|
+
@property
|
47
|
+
@pulumi.getter
|
48
|
+
def etag(self) -> str:
|
49
|
+
"""
|
50
|
+
(Computed) The etag of the IAM policy.
|
51
|
+
"""
|
52
|
+
return pulumi.get(self, "etag")
|
53
|
+
|
54
|
+
@property
|
55
|
+
@pulumi.getter
|
56
|
+
def id(self) -> str:
|
57
|
+
"""
|
58
|
+
The provider-assigned unique ID for this managed resource.
|
59
|
+
"""
|
60
|
+
return pulumi.get(self, "id")
|
61
|
+
|
62
|
+
@property
|
63
|
+
@pulumi.getter
|
64
|
+
def name(self) -> str:
|
65
|
+
return pulumi.get(self, "name")
|
66
|
+
|
67
|
+
@property
|
68
|
+
@pulumi.getter(name="policyData")
|
69
|
+
def policy_data(self) -> str:
|
70
|
+
"""
|
71
|
+
(Required only by `compute.InstanceTemplateIamPolicy`) The policy data generated by
|
72
|
+
a `organizations_get_iam_policy` data source.
|
73
|
+
"""
|
74
|
+
return pulumi.get(self, "policy_data")
|
75
|
+
|
76
|
+
@property
|
77
|
+
@pulumi.getter
|
78
|
+
def project(self) -> str:
|
79
|
+
return pulumi.get(self, "project")
|
80
|
+
|
81
|
+
|
82
|
+
class AwaitableGetInstanceTemplateIamPolicyResult(GetInstanceTemplateIamPolicyResult):
|
83
|
+
# pylint: disable=using-constant-test
|
84
|
+
def __await__(self):
|
85
|
+
if False:
|
86
|
+
yield self
|
87
|
+
return GetInstanceTemplateIamPolicyResult(
|
88
|
+
etag=self.etag,
|
89
|
+
id=self.id,
|
90
|
+
name=self.name,
|
91
|
+
policy_data=self.policy_data,
|
92
|
+
project=self.project)
|
93
|
+
|
94
|
+
|
95
|
+
def get_instance_template_iam_policy(name: Optional[str] = None,
|
96
|
+
project: Optional[str] = None,
|
97
|
+
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetInstanceTemplateIamPolicyResult:
|
98
|
+
"""
|
99
|
+
Retrieves the current IAM policy data for instancetemplate
|
100
|
+
|
101
|
+
## example
|
102
|
+
|
103
|
+
```python
|
104
|
+
import pulumi
|
105
|
+
import pulumi_gcp as gcp
|
106
|
+
|
107
|
+
policy = gcp.compute.get_instance_template_iam_policy(project=default["project"],
|
108
|
+
name=default["name"])
|
109
|
+
```
|
110
|
+
|
111
|
+
|
112
|
+
:param str name: Used to find the parent resource to bind the IAM policy to
|
113
|
+
:param str project: The ID of the project in which the resource belongs.
|
114
|
+
If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
|
115
|
+
"""
|
116
|
+
__args__ = dict()
|
117
|
+
__args__['name'] = name
|
118
|
+
__args__['project'] = project
|
119
|
+
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
120
|
+
__ret__ = pulumi.runtime.invoke('gcp:compute/getInstanceTemplateIamPolicy:getInstanceTemplateIamPolicy', __args__, opts=opts, typ=GetInstanceTemplateIamPolicyResult).value
|
121
|
+
|
122
|
+
return AwaitableGetInstanceTemplateIamPolicyResult(
|
123
|
+
etag=pulumi.get(__ret__, 'etag'),
|
124
|
+
id=pulumi.get(__ret__, 'id'),
|
125
|
+
name=pulumi.get(__ret__, 'name'),
|
126
|
+
policy_data=pulumi.get(__ret__, 'policy_data'),
|
127
|
+
project=pulumi.get(__ret__, 'project'))
|
128
|
+
def get_instance_template_iam_policy_output(name: Optional[pulumi.Input[str]] = None,
|
129
|
+
project: Optional[pulumi.Input[Optional[str]]] = None,
|
130
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetInstanceTemplateIamPolicyResult]:
|
131
|
+
"""
|
132
|
+
Retrieves the current IAM policy data for instancetemplate
|
133
|
+
|
134
|
+
## example
|
135
|
+
|
136
|
+
```python
|
137
|
+
import pulumi
|
138
|
+
import pulumi_gcp as gcp
|
139
|
+
|
140
|
+
policy = gcp.compute.get_instance_template_iam_policy(project=default["project"],
|
141
|
+
name=default["name"])
|
142
|
+
```
|
143
|
+
|
144
|
+
|
145
|
+
:param str name: Used to find the parent resource to bind the IAM policy to
|
146
|
+
:param str project: The ID of the project in which the resource belongs.
|
147
|
+
If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
|
148
|
+
"""
|
149
|
+
__args__ = dict()
|
150
|
+
__args__['name'] = name
|
151
|
+
__args__['project'] = project
|
152
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
153
|
+
__ret__ = pulumi.runtime.invoke_output('gcp:compute/getInstanceTemplateIamPolicy:getInstanceTemplateIamPolicy', __args__, opts=opts, typ=GetInstanceTemplateIamPolicyResult)
|
154
|
+
return __ret__.apply(lambda __response__: GetInstanceTemplateIamPolicyResult(
|
155
|
+
etag=pulumi.get(__response__, 'etag'),
|
156
|
+
id=pulumi.get(__response__, 'id'),
|
157
|
+
name=pulumi.get(__response__, 'name'),
|
158
|
+
policy_data=pulumi.get(__response__, 'policy_data'),
|
159
|
+
project=pulumi.get(__response__, 'project')))
|