pulumi-gcp 7.21.0__py3-none-any.whl → 7.21.0a1714002516__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 +0 -40
- pulumi_gcp/alloydb/_inputs.py +0 -74
- pulumi_gcp/alloydb/backup.py +12 -0
- pulumi_gcp/alloydb/cluster.py +12 -0
- pulumi_gcp/alloydb/instance.py +81 -90
- pulumi_gcp/alloydb/outputs.py +0 -98
- pulumi_gcp/apigee/environment.py +0 -47
- pulumi_gcp/apigee/sharedflow.py +20 -0
- pulumi_gcp/appengine/flexible_app_version.py +20 -0
- pulumi_gcp/applicationintegration/__init__.py +0 -1
- pulumi_gcp/applicationintegration/_inputs.py +0 -843
- pulumi_gcp/applicationintegration/outputs.py +0 -891
- pulumi_gcp/bigquerydatapolicy/_inputs.py +4 -21
- pulumi_gcp/bigquerydatapolicy/data_policy.py +0 -78
- pulumi_gcp/bigquerydatapolicy/outputs.py +3 -16
- pulumi_gcp/certificateauthority/_inputs.py +12 -92
- pulumi_gcp/certificateauthority/authority.py +27 -117
- pulumi_gcp/certificateauthority/certificate.py +0 -176
- pulumi_gcp/certificateauthority/outputs.py +12 -144
- pulumi_gcp/cloudbuild/worker_pool.py +12 -0
- pulumi_gcp/cloudbuildv2/connection.py +12 -0
- pulumi_gcp/cloudbuildv2/repository.py +12 -0
- pulumi_gcp/clouddeploy/automation.py +12 -0
- pulumi_gcp/clouddeploy/custom_target_type.py +12 -0
- pulumi_gcp/clouddeploy/delivery_pipeline.py +12 -0
- pulumi_gcp/clouddeploy/target.py +12 -0
- pulumi_gcp/cloudrunv2/job.py +12 -0
- pulumi_gcp/cloudrunv2/service.py +12 -0
- pulumi_gcp/composer/__init__.py +0 -1
- pulumi_gcp/composer/environment.py +47 -35
- pulumi_gcp/compute/__init__.py +0 -1
- pulumi_gcp/compute/_inputs.py +58 -121
- pulumi_gcp/compute/forwarding_rule.py +13 -0
- pulumi_gcp/compute/global_address.py +12 -0
- pulumi_gcp/compute/global_forwarding_rule.py +282 -0
- pulumi_gcp/compute/instance_from_machine_image.py +46 -14
- pulumi_gcp/compute/instance_from_template.py +46 -14
- pulumi_gcp/compute/outputs.py +65 -120
- pulumi_gcp/compute/region_instance_template.py +13 -0
- pulumi_gcp/compute/region_target_https_proxy.py +0 -257
- pulumi_gcp/compute/region_url_map.py +470 -0
- pulumi_gcp/container/attached_cluster.py +12 -0
- pulumi_gcp/container/aws_cluster.py +12 -0
- pulumi_gcp/container/aws_node_pool.py +12 -0
- pulumi_gcp/container/azure_cluster.py +12 -0
- pulumi_gcp/container/azure_node_pool.py +12 -0
- pulumi_gcp/container/cluster.py +20 -0
- pulumi_gcp/dataflow/flex_template_job.py +39 -0
- pulumi_gcp/dataloss/__init__.py +0 -1
- pulumi_gcp/dataloss/_inputs.py +0 -1040
- pulumi_gcp/dataloss/outputs.py +0 -1123
- pulumi_gcp/dataproc/cluster.py +20 -0
- pulumi_gcp/dataproc/workflow_template.py +26 -21
- pulumi_gcp/deploymentmanager/deployment.py +34 -0
- pulumi_gcp/dns/_inputs.py +2 -2
- pulumi_gcp/dns/outputs.py +2 -2
- pulumi_gcp/dns/record_set.py +36 -2
- pulumi_gcp/filestore/get_instance.py +1 -11
- pulumi_gcp/filestore/instance.py +0 -101
- pulumi_gcp/firebase/_inputs.py +0 -16
- pulumi_gcp/firebase/android_app.py +27 -0
- pulumi_gcp/firebase/app_check_play_integrity_config.py +0 -20
- pulumi_gcp/firebase/app_check_recaptcha_enterprise_config.py +0 -10
- pulumi_gcp/firebase/app_check_service_config.py +125 -0
- pulumi_gcp/firebase/apple_app.py +27 -0
- pulumi_gcp/firebase/hosting_custom_domain.py +27 -0
- pulumi_gcp/firebase/hosting_version.py +0 -44
- pulumi_gcp/firebase/outputs.py +0 -12
- pulumi_gcp/firebase/web_app.py +20 -0
- pulumi_gcp/firestore/database.py +68 -0
- pulumi_gcp/gkeonprem/bare_metal_admin_cluster.py +12 -0
- pulumi_gcp/gkeonprem/bare_metal_cluster.py +12 -0
- pulumi_gcp/gkeonprem/bare_metal_node_pool.py +12 -0
- pulumi_gcp/gkeonprem/v_mware_cluster.py +12 -0
- pulumi_gcp/gkeonprem/v_mware_node_pool.py +12 -0
- pulumi_gcp/logging/folder_sink.py +0 -54
- pulumi_gcp/logging/organization_sink.py +0 -54
- pulumi_gcp/monitoring/_inputs.py +2 -46
- pulumi_gcp/monitoring/outputs.py +2 -40
- pulumi_gcp/monitoring/uptime_check_config.py +0 -6
- pulumi_gcp/netapp/active_directory.py +20 -0
- pulumi_gcp/netapp/volume_replication.py +68 -0
- pulumi_gcp/networkconnectivity/__init__.py +0 -1
- pulumi_gcp/provider.py +1 -3
- pulumi_gcp/secretmanager/get_secret.py +3 -13
- pulumi_gcp/secretmanager/outputs.py +1 -20
- pulumi_gcp/secretmanager/secret.py +15 -90
- pulumi_gcp/servicenetworking/connection.py +20 -0
- pulumi_gcp/spanner/database.py +41 -0
- pulumi_gcp/spanner/instance.py +40 -0
- pulumi_gcp/storage/__init__.py +0 -1
- pulumi_gcp/storage/bucket.py +12 -0
- pulumi_gcp/storage/outputs.py +0 -63
- pulumi_gcp/workstations/workstation.py +12 -0
- pulumi_gcp/workstations/workstation_cluster.py +12 -0
- pulumi_gcp/workstations/workstation_config.py +12 -0
- {pulumi_gcp-7.21.0.dist-info → pulumi_gcp-7.21.0a1714002516.dist-info}/METADATA +1 -1
- {pulumi_gcp-7.21.0.dist-info → pulumi_gcp-7.21.0a1714002516.dist-info}/RECORD +100 -106
- pulumi_gcp/applicationintegration/auth_config.py +0 -998
- pulumi_gcp/composer/user_workloads_secret.py +0 -441
- pulumi_gcp/compute/security_policy_rule.py +0 -850
- pulumi_gcp/dataloss/prevention_discovery_config.py +0 -737
- pulumi_gcp/networkconnectivity/internal_range.py +0 -1024
- pulumi_gcp/storage/get_bucket_objects.py +0 -153
- {pulumi_gcp-7.21.0.dist-info → pulumi_gcp-7.21.0a1714002516.dist-info}/WHEEL +0 -0
- {pulumi_gcp-7.21.0.dist-info → pulumi_gcp-7.21.0a1714002516.dist-info}/top_level.txt +0 -0
@@ -1072,6 +1072,241 @@ class RegionUrlMap(pulumi.CustomResource):
|
|
1072
1072
|
path="/home",
|
1073
1073
|
)])
|
1074
1074
|
```
|
1075
|
+
### Int Https Lb Https Redirect
|
1076
|
+
|
1077
|
+
```python
|
1078
|
+
import pulumi
|
1079
|
+
import pulumi_gcp as gcp
|
1080
|
+
import pulumi_tls as tls
|
1081
|
+
|
1082
|
+
# Internal HTTPS load balancer with HTTP-to-HTTPS redirect
|
1083
|
+
# VPC network
|
1084
|
+
default = gcp.compute.Network("default",
|
1085
|
+
name="l7-ilb-network",
|
1086
|
+
auto_create_subnetworks=False)
|
1087
|
+
# Proxy-only subnet
|
1088
|
+
proxy_subnet = gcp.compute.Subnetwork("proxy_subnet",
|
1089
|
+
name="l7-ilb-proxy-subnet",
|
1090
|
+
ip_cidr_range="10.0.0.0/24",
|
1091
|
+
region="europe-west1",
|
1092
|
+
purpose="REGIONAL_MANAGED_PROXY",
|
1093
|
+
role="ACTIVE",
|
1094
|
+
network=default.id)
|
1095
|
+
# Backend subnet
|
1096
|
+
default_subnetwork = gcp.compute.Subnetwork("default",
|
1097
|
+
name="l7-ilb-subnet",
|
1098
|
+
ip_cidr_range="10.0.1.0/24",
|
1099
|
+
region="europe-west1",
|
1100
|
+
network=default.id)
|
1101
|
+
# Reserved internal address
|
1102
|
+
default_address = gcp.compute.Address("default",
|
1103
|
+
name="l7-ilb-ip",
|
1104
|
+
subnetwork=default_subnetwork.id,
|
1105
|
+
address_type="INTERNAL",
|
1106
|
+
address="10.0.1.5",
|
1107
|
+
region="europe-west1",
|
1108
|
+
purpose="SHARED_LOADBALANCER_VIP")
|
1109
|
+
# Self-signed regional SSL certificate for testing
|
1110
|
+
default_private_key = tls.PrivateKey("default",
|
1111
|
+
algorithm="RSA",
|
1112
|
+
rsa_bits=2048)
|
1113
|
+
default_self_signed_cert = tls.SelfSignedCert("default",
|
1114
|
+
key_algorithm=default_private_key.algorithm,
|
1115
|
+
private_key_pem=default_private_key.private_key_pem,
|
1116
|
+
validity_period_hours=12,
|
1117
|
+
early_renewal_hours=3,
|
1118
|
+
allowed_uses=[
|
1119
|
+
"key_encipherment",
|
1120
|
+
"digital_signature",
|
1121
|
+
"server_auth",
|
1122
|
+
],
|
1123
|
+
dns_names=["example.com"],
|
1124
|
+
subject=tls.SelfSignedCertSubjectArgs(
|
1125
|
+
common_name="example.com",
|
1126
|
+
organization="ACME Examples, Inc",
|
1127
|
+
))
|
1128
|
+
default_region_ssl_certificate = gcp.compute.RegionSslCertificate("default",
|
1129
|
+
name_prefix="my-certificate-",
|
1130
|
+
private_key=default_private_key.private_key_pem,
|
1131
|
+
certificate=default_self_signed_cert.cert_pem,
|
1132
|
+
region="europe-west1")
|
1133
|
+
# Regional health check
|
1134
|
+
default_region_health_check = gcp.compute.RegionHealthCheck("default",
|
1135
|
+
name="l7-ilb-hc",
|
1136
|
+
region="europe-west1",
|
1137
|
+
http_health_check=gcp.compute.RegionHealthCheckHttpHealthCheckArgs(
|
1138
|
+
port_specification="USE_SERVING_PORT",
|
1139
|
+
))
|
1140
|
+
# Instance template
|
1141
|
+
default_instance_template = gcp.compute.InstanceTemplate("default",
|
1142
|
+
network_interfaces=[gcp.compute.InstanceTemplateNetworkInterfaceArgs(
|
1143
|
+
access_configs=[gcp.compute.InstanceTemplateNetworkInterfaceAccessConfigArgs()],
|
1144
|
+
network=default.id,
|
1145
|
+
subnetwork=default_subnetwork.id,
|
1146
|
+
)],
|
1147
|
+
name="l7-ilb-mig-template",
|
1148
|
+
machine_type="e2-small",
|
1149
|
+
tags=["http-server"],
|
1150
|
+
disks=[gcp.compute.InstanceTemplateDiskArgs(
|
1151
|
+
source_image="debian-cloud/debian-10",
|
1152
|
+
auto_delete=True,
|
1153
|
+
boot=True,
|
1154
|
+
)],
|
1155
|
+
metadata={
|
1156
|
+
"startup-script": \"\"\"#! /bin/bash
|
1157
|
+
set -euo pipefail
|
1158
|
+
|
1159
|
+
export DEBIAN_FRONTEND=noninteractive
|
1160
|
+
apt-get update
|
1161
|
+
apt-get install -y nginx-light jq
|
1162
|
+
|
1163
|
+
NAME=$(curl -H "Metadata-Flavor: Google" "http://metadata.google.internal/computeMetadata/v1/instance/hostname")
|
1164
|
+
IP=$(curl -H "Metadata-Flavor: Google" "http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/ip")
|
1165
|
+
METADATA=$(curl -f -H "Metadata-Flavor: Google" "http://metadata.google.internal/computeMetadata/v1/instance/attributes/?recursive=True" | jq 'del(.["startup-script"])')
|
1166
|
+
|
1167
|
+
cat <<EOF > /var/www/html/index.html
|
1168
|
+
<pre>
|
1169
|
+
Name: $NAME
|
1170
|
+
IP: $IP
|
1171
|
+
Metadata: $METADATA
|
1172
|
+
</pre>
|
1173
|
+
EOF
|
1174
|
+
\"\"\",
|
1175
|
+
})
|
1176
|
+
# Regional MIG
|
1177
|
+
default_region_instance_group_manager = gcp.compute.RegionInstanceGroupManager("default",
|
1178
|
+
name="l7-ilb-mig1",
|
1179
|
+
region="europe-west1",
|
1180
|
+
versions=[gcp.compute.RegionInstanceGroupManagerVersionArgs(
|
1181
|
+
instance_template=default_instance_template.id,
|
1182
|
+
name="primary",
|
1183
|
+
)],
|
1184
|
+
named_ports=[gcp.compute.RegionInstanceGroupManagerNamedPortArgs(
|
1185
|
+
name="http-server",
|
1186
|
+
port=80,
|
1187
|
+
)],
|
1188
|
+
base_instance_name="vm",
|
1189
|
+
target_size=2)
|
1190
|
+
# Regional backend service
|
1191
|
+
default_region_backend_service = gcp.compute.RegionBackendService("default",
|
1192
|
+
name="l7-ilb-backend-service",
|
1193
|
+
region="europe-west1",
|
1194
|
+
protocol="HTTP",
|
1195
|
+
port_name="http-server",
|
1196
|
+
load_balancing_scheme="INTERNAL_MANAGED",
|
1197
|
+
timeout_sec=10,
|
1198
|
+
health_checks=default_region_health_check.id,
|
1199
|
+
backends=[gcp.compute.RegionBackendServiceBackendArgs(
|
1200
|
+
group=default_region_instance_group_manager.instance_group,
|
1201
|
+
balancing_mode="UTILIZATION",
|
1202
|
+
capacity_scaler=1,
|
1203
|
+
)])
|
1204
|
+
# Regional URL map
|
1205
|
+
https_lb = gcp.compute.RegionUrlMap("https_lb",
|
1206
|
+
name="l7-ilb-regional-url-map",
|
1207
|
+
region="europe-west1",
|
1208
|
+
default_service=default_region_backend_service.id)
|
1209
|
+
# Regional target HTTPS proxy
|
1210
|
+
default_region_target_https_proxy = gcp.compute.RegionTargetHttpsProxy("default",
|
1211
|
+
name="l7-ilb-target-https-proxy",
|
1212
|
+
region="europe-west1",
|
1213
|
+
url_map=https_lb.id,
|
1214
|
+
ssl_certificates=[default_region_ssl_certificate.self_link])
|
1215
|
+
# Regional forwarding rule
|
1216
|
+
default_forwarding_rule = gcp.compute.ForwardingRule("default",
|
1217
|
+
name="l7-ilb-forwarding-rule",
|
1218
|
+
region="europe-west1",
|
1219
|
+
ip_protocol="TCP",
|
1220
|
+
ip_address=default_address.id,
|
1221
|
+
load_balancing_scheme="INTERNAL_MANAGED",
|
1222
|
+
port_range="443",
|
1223
|
+
target=default_region_target_https_proxy.id,
|
1224
|
+
network=default.id,
|
1225
|
+
subnetwork=default_subnetwork.id,
|
1226
|
+
network_tier="PREMIUM")
|
1227
|
+
# Allow all access to health check ranges
|
1228
|
+
default_firewall = gcp.compute.Firewall("default",
|
1229
|
+
name="l7-ilb-fw-allow-hc",
|
1230
|
+
direction="INGRESS",
|
1231
|
+
network=default.id,
|
1232
|
+
source_ranges=[
|
1233
|
+
"130.211.0.0/22",
|
1234
|
+
"35.191.0.0/16",
|
1235
|
+
"35.235.240.0/20",
|
1236
|
+
],
|
1237
|
+
allows=[gcp.compute.FirewallAllowArgs(
|
1238
|
+
protocol="tcp",
|
1239
|
+
)])
|
1240
|
+
# Allow http from proxy subnet to backends
|
1241
|
+
backends = gcp.compute.Firewall("backends",
|
1242
|
+
name="l7-ilb-fw-allow-ilb-to-backends",
|
1243
|
+
direction="INGRESS",
|
1244
|
+
network=default.id,
|
1245
|
+
source_ranges=["10.0.0.0/24"],
|
1246
|
+
target_tags=["http-server"],
|
1247
|
+
allows=[gcp.compute.FirewallAllowArgs(
|
1248
|
+
protocol="tcp",
|
1249
|
+
ports=[
|
1250
|
+
"80",
|
1251
|
+
"443",
|
1252
|
+
"8080",
|
1253
|
+
],
|
1254
|
+
)])
|
1255
|
+
# Test instance
|
1256
|
+
default_instance = gcp.compute.Instance("default",
|
1257
|
+
name="l7-ilb-test-vm",
|
1258
|
+
zone="europe-west1-b",
|
1259
|
+
machine_type="e2-small",
|
1260
|
+
network_interfaces=[gcp.compute.InstanceNetworkInterfaceArgs(
|
1261
|
+
network=default.id,
|
1262
|
+
subnetwork=default_subnetwork.id,
|
1263
|
+
)],
|
1264
|
+
boot_disk=gcp.compute.InstanceBootDiskArgs(
|
1265
|
+
initialize_params=gcp.compute.InstanceBootDiskInitializeParamsArgs(
|
1266
|
+
image="debian-cloud/debian-10",
|
1267
|
+
),
|
1268
|
+
))
|
1269
|
+
### HTTP-to-HTTPS redirect ###
|
1270
|
+
# Regional URL map
|
1271
|
+
redirect_region_url_map = gcp.compute.RegionUrlMap("redirect",
|
1272
|
+
name="l7-ilb-redirect-url-map",
|
1273
|
+
region="europe-west1",
|
1274
|
+
default_service=default_region_backend_service.id,
|
1275
|
+
host_rules=[gcp.compute.RegionUrlMapHostRuleArgs(
|
1276
|
+
hosts=["*"],
|
1277
|
+
path_matcher="allpaths",
|
1278
|
+
)],
|
1279
|
+
path_matchers=[gcp.compute.RegionUrlMapPathMatcherArgs(
|
1280
|
+
name="allpaths",
|
1281
|
+
default_service=default_region_backend_service.id,
|
1282
|
+
path_rules=[gcp.compute.RegionUrlMapPathMatcherPathRuleArgs(
|
1283
|
+
paths=["/"],
|
1284
|
+
url_redirect=gcp.compute.RegionUrlMapPathMatcherPathRuleUrlRedirectArgs(
|
1285
|
+
https_redirect=True,
|
1286
|
+
host_redirect="10.0.1.5:443",
|
1287
|
+
redirect_response_code="PERMANENT_REDIRECT",
|
1288
|
+
strip_query=True,
|
1289
|
+
),
|
1290
|
+
)],
|
1291
|
+
)])
|
1292
|
+
# Regional HTTP proxy
|
1293
|
+
default_region_target_http_proxy = gcp.compute.RegionTargetHttpProxy("default",
|
1294
|
+
name="l7-ilb-target-http-proxy",
|
1295
|
+
region="europe-west1",
|
1296
|
+
url_map=redirect_region_url_map.id)
|
1297
|
+
# Regional forwarding rule
|
1298
|
+
redirect = gcp.compute.ForwardingRule("redirect",
|
1299
|
+
name="l7-ilb-redirect",
|
1300
|
+
region="europe-west1",
|
1301
|
+
ip_protocol="TCP",
|
1302
|
+
ip_address=default_address.id,
|
1303
|
+
load_balancing_scheme="INTERNAL_MANAGED",
|
1304
|
+
port_range="80",
|
1305
|
+
target=default_region_target_http_proxy.id,
|
1306
|
+
network=default.id,
|
1307
|
+
subnetwork=default_subnetwork.id,
|
1308
|
+
network_tier="PREMIUM")
|
1309
|
+
```
|
1075
1310
|
### Region Url Map Path Template Match
|
1076
1311
|
|
1077
1312
|
```python
|
@@ -1750,6 +1985,241 @@ class RegionUrlMap(pulumi.CustomResource):
|
|
1750
1985
|
path="/home",
|
1751
1986
|
)])
|
1752
1987
|
```
|
1988
|
+
### Int Https Lb Https Redirect
|
1989
|
+
|
1990
|
+
```python
|
1991
|
+
import pulumi
|
1992
|
+
import pulumi_gcp as gcp
|
1993
|
+
import pulumi_tls as tls
|
1994
|
+
|
1995
|
+
# Internal HTTPS load balancer with HTTP-to-HTTPS redirect
|
1996
|
+
# VPC network
|
1997
|
+
default = gcp.compute.Network("default",
|
1998
|
+
name="l7-ilb-network",
|
1999
|
+
auto_create_subnetworks=False)
|
2000
|
+
# Proxy-only subnet
|
2001
|
+
proxy_subnet = gcp.compute.Subnetwork("proxy_subnet",
|
2002
|
+
name="l7-ilb-proxy-subnet",
|
2003
|
+
ip_cidr_range="10.0.0.0/24",
|
2004
|
+
region="europe-west1",
|
2005
|
+
purpose="REGIONAL_MANAGED_PROXY",
|
2006
|
+
role="ACTIVE",
|
2007
|
+
network=default.id)
|
2008
|
+
# Backend subnet
|
2009
|
+
default_subnetwork = gcp.compute.Subnetwork("default",
|
2010
|
+
name="l7-ilb-subnet",
|
2011
|
+
ip_cidr_range="10.0.1.0/24",
|
2012
|
+
region="europe-west1",
|
2013
|
+
network=default.id)
|
2014
|
+
# Reserved internal address
|
2015
|
+
default_address = gcp.compute.Address("default",
|
2016
|
+
name="l7-ilb-ip",
|
2017
|
+
subnetwork=default_subnetwork.id,
|
2018
|
+
address_type="INTERNAL",
|
2019
|
+
address="10.0.1.5",
|
2020
|
+
region="europe-west1",
|
2021
|
+
purpose="SHARED_LOADBALANCER_VIP")
|
2022
|
+
# Self-signed regional SSL certificate for testing
|
2023
|
+
default_private_key = tls.PrivateKey("default",
|
2024
|
+
algorithm="RSA",
|
2025
|
+
rsa_bits=2048)
|
2026
|
+
default_self_signed_cert = tls.SelfSignedCert("default",
|
2027
|
+
key_algorithm=default_private_key.algorithm,
|
2028
|
+
private_key_pem=default_private_key.private_key_pem,
|
2029
|
+
validity_period_hours=12,
|
2030
|
+
early_renewal_hours=3,
|
2031
|
+
allowed_uses=[
|
2032
|
+
"key_encipherment",
|
2033
|
+
"digital_signature",
|
2034
|
+
"server_auth",
|
2035
|
+
],
|
2036
|
+
dns_names=["example.com"],
|
2037
|
+
subject=tls.SelfSignedCertSubjectArgs(
|
2038
|
+
common_name="example.com",
|
2039
|
+
organization="ACME Examples, Inc",
|
2040
|
+
))
|
2041
|
+
default_region_ssl_certificate = gcp.compute.RegionSslCertificate("default",
|
2042
|
+
name_prefix="my-certificate-",
|
2043
|
+
private_key=default_private_key.private_key_pem,
|
2044
|
+
certificate=default_self_signed_cert.cert_pem,
|
2045
|
+
region="europe-west1")
|
2046
|
+
# Regional health check
|
2047
|
+
default_region_health_check = gcp.compute.RegionHealthCheck("default",
|
2048
|
+
name="l7-ilb-hc",
|
2049
|
+
region="europe-west1",
|
2050
|
+
http_health_check=gcp.compute.RegionHealthCheckHttpHealthCheckArgs(
|
2051
|
+
port_specification="USE_SERVING_PORT",
|
2052
|
+
))
|
2053
|
+
# Instance template
|
2054
|
+
default_instance_template = gcp.compute.InstanceTemplate("default",
|
2055
|
+
network_interfaces=[gcp.compute.InstanceTemplateNetworkInterfaceArgs(
|
2056
|
+
access_configs=[gcp.compute.InstanceTemplateNetworkInterfaceAccessConfigArgs()],
|
2057
|
+
network=default.id,
|
2058
|
+
subnetwork=default_subnetwork.id,
|
2059
|
+
)],
|
2060
|
+
name="l7-ilb-mig-template",
|
2061
|
+
machine_type="e2-small",
|
2062
|
+
tags=["http-server"],
|
2063
|
+
disks=[gcp.compute.InstanceTemplateDiskArgs(
|
2064
|
+
source_image="debian-cloud/debian-10",
|
2065
|
+
auto_delete=True,
|
2066
|
+
boot=True,
|
2067
|
+
)],
|
2068
|
+
metadata={
|
2069
|
+
"startup-script": \"\"\"#! /bin/bash
|
2070
|
+
set -euo pipefail
|
2071
|
+
|
2072
|
+
export DEBIAN_FRONTEND=noninteractive
|
2073
|
+
apt-get update
|
2074
|
+
apt-get install -y nginx-light jq
|
2075
|
+
|
2076
|
+
NAME=$(curl -H "Metadata-Flavor: Google" "http://metadata.google.internal/computeMetadata/v1/instance/hostname")
|
2077
|
+
IP=$(curl -H "Metadata-Flavor: Google" "http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/ip")
|
2078
|
+
METADATA=$(curl -f -H "Metadata-Flavor: Google" "http://metadata.google.internal/computeMetadata/v1/instance/attributes/?recursive=True" | jq 'del(.["startup-script"])')
|
2079
|
+
|
2080
|
+
cat <<EOF > /var/www/html/index.html
|
2081
|
+
<pre>
|
2082
|
+
Name: $NAME
|
2083
|
+
IP: $IP
|
2084
|
+
Metadata: $METADATA
|
2085
|
+
</pre>
|
2086
|
+
EOF
|
2087
|
+
\"\"\",
|
2088
|
+
})
|
2089
|
+
# Regional MIG
|
2090
|
+
default_region_instance_group_manager = gcp.compute.RegionInstanceGroupManager("default",
|
2091
|
+
name="l7-ilb-mig1",
|
2092
|
+
region="europe-west1",
|
2093
|
+
versions=[gcp.compute.RegionInstanceGroupManagerVersionArgs(
|
2094
|
+
instance_template=default_instance_template.id,
|
2095
|
+
name="primary",
|
2096
|
+
)],
|
2097
|
+
named_ports=[gcp.compute.RegionInstanceGroupManagerNamedPortArgs(
|
2098
|
+
name="http-server",
|
2099
|
+
port=80,
|
2100
|
+
)],
|
2101
|
+
base_instance_name="vm",
|
2102
|
+
target_size=2)
|
2103
|
+
# Regional backend service
|
2104
|
+
default_region_backend_service = gcp.compute.RegionBackendService("default",
|
2105
|
+
name="l7-ilb-backend-service",
|
2106
|
+
region="europe-west1",
|
2107
|
+
protocol="HTTP",
|
2108
|
+
port_name="http-server",
|
2109
|
+
load_balancing_scheme="INTERNAL_MANAGED",
|
2110
|
+
timeout_sec=10,
|
2111
|
+
health_checks=default_region_health_check.id,
|
2112
|
+
backends=[gcp.compute.RegionBackendServiceBackendArgs(
|
2113
|
+
group=default_region_instance_group_manager.instance_group,
|
2114
|
+
balancing_mode="UTILIZATION",
|
2115
|
+
capacity_scaler=1,
|
2116
|
+
)])
|
2117
|
+
# Regional URL map
|
2118
|
+
https_lb = gcp.compute.RegionUrlMap("https_lb",
|
2119
|
+
name="l7-ilb-regional-url-map",
|
2120
|
+
region="europe-west1",
|
2121
|
+
default_service=default_region_backend_service.id)
|
2122
|
+
# Regional target HTTPS proxy
|
2123
|
+
default_region_target_https_proxy = gcp.compute.RegionTargetHttpsProxy("default",
|
2124
|
+
name="l7-ilb-target-https-proxy",
|
2125
|
+
region="europe-west1",
|
2126
|
+
url_map=https_lb.id,
|
2127
|
+
ssl_certificates=[default_region_ssl_certificate.self_link])
|
2128
|
+
# Regional forwarding rule
|
2129
|
+
default_forwarding_rule = gcp.compute.ForwardingRule("default",
|
2130
|
+
name="l7-ilb-forwarding-rule",
|
2131
|
+
region="europe-west1",
|
2132
|
+
ip_protocol="TCP",
|
2133
|
+
ip_address=default_address.id,
|
2134
|
+
load_balancing_scheme="INTERNAL_MANAGED",
|
2135
|
+
port_range="443",
|
2136
|
+
target=default_region_target_https_proxy.id,
|
2137
|
+
network=default.id,
|
2138
|
+
subnetwork=default_subnetwork.id,
|
2139
|
+
network_tier="PREMIUM")
|
2140
|
+
# Allow all access to health check ranges
|
2141
|
+
default_firewall = gcp.compute.Firewall("default",
|
2142
|
+
name="l7-ilb-fw-allow-hc",
|
2143
|
+
direction="INGRESS",
|
2144
|
+
network=default.id,
|
2145
|
+
source_ranges=[
|
2146
|
+
"130.211.0.0/22",
|
2147
|
+
"35.191.0.0/16",
|
2148
|
+
"35.235.240.0/20",
|
2149
|
+
],
|
2150
|
+
allows=[gcp.compute.FirewallAllowArgs(
|
2151
|
+
protocol="tcp",
|
2152
|
+
)])
|
2153
|
+
# Allow http from proxy subnet to backends
|
2154
|
+
backends = gcp.compute.Firewall("backends",
|
2155
|
+
name="l7-ilb-fw-allow-ilb-to-backends",
|
2156
|
+
direction="INGRESS",
|
2157
|
+
network=default.id,
|
2158
|
+
source_ranges=["10.0.0.0/24"],
|
2159
|
+
target_tags=["http-server"],
|
2160
|
+
allows=[gcp.compute.FirewallAllowArgs(
|
2161
|
+
protocol="tcp",
|
2162
|
+
ports=[
|
2163
|
+
"80",
|
2164
|
+
"443",
|
2165
|
+
"8080",
|
2166
|
+
],
|
2167
|
+
)])
|
2168
|
+
# Test instance
|
2169
|
+
default_instance = gcp.compute.Instance("default",
|
2170
|
+
name="l7-ilb-test-vm",
|
2171
|
+
zone="europe-west1-b",
|
2172
|
+
machine_type="e2-small",
|
2173
|
+
network_interfaces=[gcp.compute.InstanceNetworkInterfaceArgs(
|
2174
|
+
network=default.id,
|
2175
|
+
subnetwork=default_subnetwork.id,
|
2176
|
+
)],
|
2177
|
+
boot_disk=gcp.compute.InstanceBootDiskArgs(
|
2178
|
+
initialize_params=gcp.compute.InstanceBootDiskInitializeParamsArgs(
|
2179
|
+
image="debian-cloud/debian-10",
|
2180
|
+
),
|
2181
|
+
))
|
2182
|
+
### HTTP-to-HTTPS redirect ###
|
2183
|
+
# Regional URL map
|
2184
|
+
redirect_region_url_map = gcp.compute.RegionUrlMap("redirect",
|
2185
|
+
name="l7-ilb-redirect-url-map",
|
2186
|
+
region="europe-west1",
|
2187
|
+
default_service=default_region_backend_service.id,
|
2188
|
+
host_rules=[gcp.compute.RegionUrlMapHostRuleArgs(
|
2189
|
+
hosts=["*"],
|
2190
|
+
path_matcher="allpaths",
|
2191
|
+
)],
|
2192
|
+
path_matchers=[gcp.compute.RegionUrlMapPathMatcherArgs(
|
2193
|
+
name="allpaths",
|
2194
|
+
default_service=default_region_backend_service.id,
|
2195
|
+
path_rules=[gcp.compute.RegionUrlMapPathMatcherPathRuleArgs(
|
2196
|
+
paths=["/"],
|
2197
|
+
url_redirect=gcp.compute.RegionUrlMapPathMatcherPathRuleUrlRedirectArgs(
|
2198
|
+
https_redirect=True,
|
2199
|
+
host_redirect="10.0.1.5:443",
|
2200
|
+
redirect_response_code="PERMANENT_REDIRECT",
|
2201
|
+
strip_query=True,
|
2202
|
+
),
|
2203
|
+
)],
|
2204
|
+
)])
|
2205
|
+
# Regional HTTP proxy
|
2206
|
+
default_region_target_http_proxy = gcp.compute.RegionTargetHttpProxy("default",
|
2207
|
+
name="l7-ilb-target-http-proxy",
|
2208
|
+
region="europe-west1",
|
2209
|
+
url_map=redirect_region_url_map.id)
|
2210
|
+
# Regional forwarding rule
|
2211
|
+
redirect = gcp.compute.ForwardingRule("redirect",
|
2212
|
+
name="l7-ilb-redirect",
|
2213
|
+
region="europe-west1",
|
2214
|
+
ip_protocol="TCP",
|
2215
|
+
ip_address=default_address.id,
|
2216
|
+
load_balancing_scheme="INTERNAL_MANAGED",
|
2217
|
+
port_range="80",
|
2218
|
+
target=default_region_target_http_proxy.id,
|
2219
|
+
network=default.id,
|
2220
|
+
subnetwork=default_subnetwork.id,
|
2221
|
+
network_tier="PREMIUM")
|
2222
|
+
```
|
1753
2223
|
### Region Url Map Path Template Match
|
1754
2224
|
|
1755
2225
|
```python
|
@@ -330,6 +330,8 @@ class _AttachedClusterState:
|
|
330
330
|
:param pulumi.Input[str] description: A human readable description of this attached cluster. Cannot be longer than 255 UTF-8 encoded bytes.
|
331
331
|
:param pulumi.Input[str] distribution: The Kubernetes distribution of the underlying attached cluster. Supported values:
|
332
332
|
"eks", "aks".
|
333
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] effective_annotations: All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through
|
334
|
+
Terraform, other clients and services.
|
333
335
|
:param pulumi.Input[Sequence[pulumi.Input['AttachedClusterErrorArgs']]] errors: A set of errors found in the cluster.
|
334
336
|
Structure is documented below.
|
335
337
|
:param pulumi.Input['AttachedClusterFleetArgs'] fleet: Fleet configuration.
|
@@ -518,6 +520,10 @@ class _AttachedClusterState:
|
|
518
520
|
@property
|
519
521
|
@pulumi.getter(name="effectiveAnnotations")
|
520
522
|
def effective_annotations(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
|
523
|
+
"""
|
524
|
+
All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through
|
525
|
+
Terraform, other clients and services.
|
526
|
+
"""
|
521
527
|
return pulumi.get(self, "effective_annotations")
|
522
528
|
|
523
529
|
@effective_annotations.setter
|
@@ -1208,6 +1214,8 @@ class AttachedCluster(pulumi.CustomResource):
|
|
1208
1214
|
:param pulumi.Input[str] description: A human readable description of this attached cluster. Cannot be longer than 255 UTF-8 encoded bytes.
|
1209
1215
|
:param pulumi.Input[str] distribution: The Kubernetes distribution of the underlying attached cluster. Supported values:
|
1210
1216
|
"eks", "aks".
|
1217
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] effective_annotations: All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through
|
1218
|
+
Terraform, other clients and services.
|
1211
1219
|
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['AttachedClusterErrorArgs']]]] errors: A set of errors found in the cluster.
|
1212
1220
|
Structure is documented below.
|
1213
1221
|
:param pulumi.Input[pulumi.InputType['AttachedClusterFleetArgs']] fleet: Fleet configuration.
|
@@ -1344,6 +1352,10 @@ class AttachedCluster(pulumi.CustomResource):
|
|
1344
1352
|
@property
|
1345
1353
|
@pulumi.getter(name="effectiveAnnotations")
|
1346
1354
|
def effective_annotations(self) -> pulumi.Output[Mapping[str, str]]:
|
1355
|
+
"""
|
1356
|
+
All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through
|
1357
|
+
Terraform, other clients and services.
|
1358
|
+
"""
|
1347
1359
|
return pulumi.get(self, "effective_annotations")
|
1348
1360
|
|
1349
1361
|
@property
|
@@ -255,6 +255,8 @@ class _AwsClusterState:
|
|
255
255
|
:param pulumi.Input['AwsClusterControlPlaneArgs'] control_plane: Configuration related to the cluster control plane.
|
256
256
|
:param pulumi.Input[str] create_time: Output only. The time at which this cluster was created.
|
257
257
|
:param pulumi.Input[str] description: Optional. A human readable description of this cluster. Cannot be longer than 255 UTF-8 encoded bytes.
|
258
|
+
:param pulumi.Input[Mapping[str, Any]] effective_annotations: All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through
|
259
|
+
Terraform, other clients and services.
|
258
260
|
:param pulumi.Input[str] endpoint: Output only. The endpoint of the cluster's API server.
|
259
261
|
:param pulumi.Input[str] etag: Allows clients to perform consistent read-modify-writes through optimistic concurrency control. May be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
|
260
262
|
:param pulumi.Input['AwsClusterFleetArgs'] fleet: Fleet configuration.
|
@@ -404,6 +406,10 @@ class _AwsClusterState:
|
|
404
406
|
@property
|
405
407
|
@pulumi.getter(name="effectiveAnnotations")
|
406
408
|
def effective_annotations(self) -> Optional[pulumi.Input[Mapping[str, Any]]]:
|
409
|
+
"""
|
410
|
+
All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through
|
411
|
+
Terraform, other clients and services.
|
412
|
+
"""
|
407
413
|
return pulumi.get(self, "effective_annotations")
|
408
414
|
|
409
415
|
@effective_annotations.setter
|
@@ -1242,6 +1248,8 @@ class AwsCluster(pulumi.CustomResource):
|
|
1242
1248
|
:param pulumi.Input[pulumi.InputType['AwsClusterControlPlaneArgs']] control_plane: Configuration related to the cluster control plane.
|
1243
1249
|
:param pulumi.Input[str] create_time: Output only. The time at which this cluster was created.
|
1244
1250
|
:param pulumi.Input[str] description: Optional. A human readable description of this cluster. Cannot be longer than 255 UTF-8 encoded bytes.
|
1251
|
+
:param pulumi.Input[Mapping[str, Any]] effective_annotations: All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through
|
1252
|
+
Terraform, other clients and services.
|
1245
1253
|
:param pulumi.Input[str] endpoint: Output only. The endpoint of the cluster's API server.
|
1246
1254
|
:param pulumi.Input[str] etag: Allows clients to perform consistent read-modify-writes through optimistic concurrency control. May be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
|
1247
1255
|
:param pulumi.Input[pulumi.InputType['AwsClusterFleetArgs']] fleet: Fleet configuration.
|
@@ -1347,6 +1355,10 @@ class AwsCluster(pulumi.CustomResource):
|
|
1347
1355
|
@property
|
1348
1356
|
@pulumi.getter(name="effectiveAnnotations")
|
1349
1357
|
def effective_annotations(self) -> pulumi.Output[Mapping[str, Any]]:
|
1358
|
+
"""
|
1359
|
+
All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through
|
1360
|
+
Terraform, other clients and services.
|
1361
|
+
"""
|
1350
1362
|
return pulumi.get(self, "effective_annotations")
|
1351
1363
|
|
1352
1364
|
@property
|
@@ -250,6 +250,8 @@ class _AwsNodePoolState:
|
|
250
250
|
:param pulumi.Input[str] cluster: The awsCluster for the resource
|
251
251
|
:param pulumi.Input['AwsNodePoolConfigArgs'] config: The configuration of the node pool.
|
252
252
|
:param pulumi.Input[str] create_time: Output only. The time at which this node pool was created.
|
253
|
+
:param pulumi.Input[Mapping[str, Any]] effective_annotations: All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through
|
254
|
+
Terraform, other clients and services.
|
253
255
|
:param pulumi.Input[str] etag: Allows clients to perform consistent read-modify-writes through optimistic concurrency control. May be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
|
254
256
|
:param pulumi.Input[str] location: The location for the resource
|
255
257
|
:param pulumi.Input['AwsNodePoolManagementArgs'] management: The Management configuration for this node pool.
|
@@ -371,6 +373,10 @@ class _AwsNodePoolState:
|
|
371
373
|
@property
|
372
374
|
@pulumi.getter(name="effectiveAnnotations")
|
373
375
|
def effective_annotations(self) -> Optional[pulumi.Input[Mapping[str, Any]]]:
|
376
|
+
"""
|
377
|
+
All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through
|
378
|
+
Terraform, other clients and services.
|
379
|
+
"""
|
374
380
|
return pulumi.get(self, "effective_annotations")
|
375
381
|
|
376
382
|
@effective_annotations.setter
|
@@ -1485,6 +1491,8 @@ class AwsNodePool(pulumi.CustomResource):
|
|
1485
1491
|
:param pulumi.Input[str] cluster: The awsCluster for the resource
|
1486
1492
|
:param pulumi.Input[pulumi.InputType['AwsNodePoolConfigArgs']] config: The configuration of the node pool.
|
1487
1493
|
:param pulumi.Input[str] create_time: Output only. The time at which this node pool was created.
|
1494
|
+
:param pulumi.Input[Mapping[str, Any]] effective_annotations: All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through
|
1495
|
+
Terraform, other clients and services.
|
1488
1496
|
:param pulumi.Input[str] etag: Allows clients to perform consistent read-modify-writes through optimistic concurrency control. May be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
|
1489
1497
|
:param pulumi.Input[str] location: The location for the resource
|
1490
1498
|
:param pulumi.Input[pulumi.InputType['AwsNodePoolManagementArgs']] management: The Management configuration for this node pool.
|
@@ -1572,6 +1580,10 @@ class AwsNodePool(pulumi.CustomResource):
|
|
1572
1580
|
@property
|
1573
1581
|
@pulumi.getter(name="effectiveAnnotations")
|
1574
1582
|
def effective_annotations(self) -> pulumi.Output[Mapping[str, Any]]:
|
1583
|
+
"""
|
1584
|
+
All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through
|
1585
|
+
Terraform, other clients and services.
|
1586
|
+
"""
|
1575
1587
|
return pulumi.get(self, "effective_annotations")
|
1576
1588
|
|
1577
1589
|
@property
|
@@ -298,6 +298,8 @@ class _AzureClusterState:
|
|
298
298
|
:param pulumi.Input['AzureClusterControlPlaneArgs'] control_plane: Configuration related to the cluster control plane.
|
299
299
|
:param pulumi.Input[str] create_time: Output only. The time at which this cluster was created.
|
300
300
|
:param pulumi.Input[str] description: Optional. A human readable description of this cluster. Cannot be longer than 255 UTF-8 encoded bytes.
|
301
|
+
:param pulumi.Input[Mapping[str, Any]] effective_annotations: All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through
|
302
|
+
Terraform, other clients and services.
|
301
303
|
:param pulumi.Input[str] endpoint: Output only. The endpoint of the cluster's API server.
|
302
304
|
:param pulumi.Input[str] etag: Allows clients to perform consistent read-modify-writes through optimistic concurrency control. May be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
|
303
305
|
:param pulumi.Input['AzureClusterFleetArgs'] fleet: Fleet configuration.
|
@@ -467,6 +469,10 @@ class _AzureClusterState:
|
|
467
469
|
@property
|
468
470
|
@pulumi.getter(name="effectiveAnnotations")
|
469
471
|
def effective_annotations(self) -> Optional[pulumi.Input[Mapping[str, Any]]]:
|
472
|
+
"""
|
473
|
+
All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through
|
474
|
+
Terraform, other clients and services.
|
475
|
+
"""
|
470
476
|
return pulumi.get(self, "effective_annotations")
|
471
477
|
|
472
478
|
@effective_annotations.setter
|
@@ -1078,6 +1084,8 @@ class AzureCluster(pulumi.CustomResource):
|
|
1078
1084
|
:param pulumi.Input[pulumi.InputType['AzureClusterControlPlaneArgs']] control_plane: Configuration related to the cluster control plane.
|
1079
1085
|
:param pulumi.Input[str] create_time: Output only. The time at which this cluster was created.
|
1080
1086
|
:param pulumi.Input[str] description: Optional. A human readable description of this cluster. Cannot be longer than 255 UTF-8 encoded bytes.
|
1087
|
+
:param pulumi.Input[Mapping[str, Any]] effective_annotations: All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through
|
1088
|
+
Terraform, other clients and services.
|
1081
1089
|
:param pulumi.Input[str] endpoint: Output only. The endpoint of the cluster's API server.
|
1082
1090
|
:param pulumi.Input[str] etag: Allows clients to perform consistent read-modify-writes through optimistic concurrency control. May be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
|
1083
1091
|
:param pulumi.Input[pulumi.InputType['AzureClusterFleetArgs']] fleet: Fleet configuration.
|
@@ -1197,6 +1205,10 @@ class AzureCluster(pulumi.CustomResource):
|
|
1197
1205
|
@property
|
1198
1206
|
@pulumi.getter(name="effectiveAnnotations")
|
1199
1207
|
def effective_annotations(self) -> pulumi.Output[Mapping[str, Any]]:
|
1208
|
+
"""
|
1209
|
+
All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through
|
1210
|
+
Terraform, other clients and services.
|
1211
|
+
"""
|
1200
1212
|
return pulumi.get(self, "effective_annotations")
|
1201
1213
|
|
1202
1214
|
@property
|