This page documents the language specification for the gcp package. If you're looking for help working with the inputs, outputs, or functions of gcp resources in a Pulumi program, please see the resource documentation for examples and API reference.
compute¶
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-gcp repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-google repo.
- class
pulumi_gcp.compute.Address(resource_name, opts=None, address=None, address_type=None, description=None, labels=None, name=None, network_tier=None, project=None, purpose=None, region=None, subnetwork=None, __props__=None, __name__=None, __opts__=None)¶ Represents an Address resource.
Each virtual machine instance has an ephemeral internal IP address and, optionally, an external IP address. To communicate between instances on the same network, you can use an instance’s internal IP address. To communicate with the Internet and instances outside of the same network, you must specify the instance’s external IP address.
Internal IP addresses are ephemeral and only belong to an instance for the lifetime of the instance; if the instance is deleted and recreated, the instance is assigned a new internal IP address, either by Compute Engine or by you. External IP addresses can be either ephemeral or static.
To get more information about Address, see:
How-to Guides
import pulumi import pulumi_gcp as gcp ip_address = gcp.compute.Address("ipAddress")
import pulumi import pulumi_gcp as gcp default_network = gcp.compute.Network("defaultNetwork") default_subnetwork = gcp.compute.Subnetwork("defaultSubnetwork", ip_cidr_range="10.0.0.0/16", region="us-central1", network=default_network.id) internal_with_subnet_and_address = gcp.compute.Address("internalWithSubnetAndAddress", subnetwork=default_subnetwork.id, address_type="INTERNAL", address="10.0.42.42", region="us-central1")
import pulumi import pulumi_gcp as gcp internal_with_gce_endpoint = gcp.compute.Address("internalWithGceEndpoint", address_type="INTERNAL", purpose="GCE_ENDPOINT")
import pulumi import pulumi_gcp as gcp static = gcp.compute.Address("static") debian_image = gcp.compute.get_image(family="debian-9", project="debian-cloud") instance_with_ip = gcp.compute.Instance("instanceWithIp", machine_type="f1-micro", zone="us-central1-a", boot_disk={ "initialize_params": { "image": debian_image.self_link, }, }, network_interface=[{ "network": "default", "access_config": [{ "natIp": static.address, }], }])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
address (pulumi.Input[str]) – The static external IP address represented by this resource. Only IPv4 is supported. An address may only be specified for INTERNAL address types. The IP address must be inside the specified subnetwork, if any.
address_type (pulumi.Input[str]) – The type of address to reserve.
description (pulumi.Input[str]) – An optional description of this resource.
labels (pulumi.Input[dict]) – Labels to apply to this address. A list of key->value pairs.
name (pulumi.Input[str]) – Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.network_tier (pulumi.Input[str]) – The networking tier used for configuring this address. If this field is not specified, it is assumed to be PREMIUM.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
purpose (pulumi.Input[str]) – The purpose of this resource, which can be one of the following values:
- GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, internal load balancers, and similar resources. This should only be set when using an Internal address.
- Parameters
region (pulumi.Input[str]) – The Region in which the created address should reside. If it is not provided, the provider region is used.
subnetwork (pulumi.Input[str]) – The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork’s IP range. This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes.
address: pulumi.Output[str] = None¶The static external IP address represented by this resource. Only IPv4 is supported. An address may only be specified for INTERNAL address types. The IP address must be inside the specified subnetwork, if any.
address_type: pulumi.Output[str] = None¶The type of address to reserve.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional description of this resource.
label_fingerprint: pulumi.Output[str] = None¶The fingerprint used for optimistic locking of this resource. Used internally during updates.
labels: pulumi.Output[dict] = None¶Labels to apply to this address. A list of key->value pairs.
name: pulumi.Output[str] = None¶Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
network_tier: pulumi.Output[str] = None¶The networking tier used for configuring this address. If this field is not specified, it is assumed to be PREMIUM.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
purpose: pulumi.Output[str] = None¶The purpose of this resource, which can be one of the following values:
GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, internal load balancers, and similar resources. This should only be set when using an Internal address.
region: pulumi.Output[str] = None¶The Region in which the created address should reside. If it is not provided, the provider region is used.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
subnetwork: pulumi.Output[str] = None¶The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork’s IP range. This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes.
users: pulumi.Output[list] = None¶The URLs of the resources that are using this address.
- static
get(resource_name, id, opts=None, address=None, address_type=None, creation_timestamp=None, description=None, label_fingerprint=None, labels=None, name=None, network_tier=None, project=None, purpose=None, region=None, self_link=None, subnetwork=None, users=None)¶ Get an existing Address resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
address (pulumi.Input[str]) – The static external IP address represented by this resource. Only IPv4 is supported. An address may only be specified for INTERNAL address types. The IP address must be inside the specified subnetwork, if any.
address_type (pulumi.Input[str]) – The type of address to reserve.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional description of this resource.
label_fingerprint (pulumi.Input[str]) – The fingerprint used for optimistic locking of this resource. Used internally during updates.
labels (pulumi.Input[dict]) – Labels to apply to this address. A list of key->value pairs.
name (pulumi.Input[str]) – Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.network_tier (pulumi.Input[str]) – The networking tier used for configuring this address. If this field is not specified, it is assumed to be PREMIUM.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
purpose (pulumi.Input[str]) – The purpose of this resource, which can be one of the following values:
- GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, internal load balancers, and similar resources. This should only be set when using an Internal address.
- Parameters
region (pulumi.Input[str]) – The Region in which the created address should reside. If it is not provided, the provider region is used.
self_link (pulumi.Input[str]) – The URI of the created resource.
subnetwork (pulumi.Input[str]) – The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork’s IP range. This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes.
users (pulumi.Input[list]) – The URLs of the resources that are using this address.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.AttachedDisk(resource_name, opts=None, device_name=None, disk=None, instance=None, mode=None, project=None, zone=None, __props__=None, __name__=None, __opts__=None)¶ Persistent disks can be attached to a compute instance using the
attached_disksection within the compute instance configuration. However there may be situations where managing the attached disks via the compute instance config isn’t preferable or possible, such as attaching dynamic numbers of disks using thecountvariable.To get more information about attaching disks, see:
How-to Guides
Note: When using
compute.AttachedDiskyou must uselifecycle.ignore_changes = ["attached_disk"]on thecompute.Instanceresource that has the disks attached. Otherwise the two resources will fight for control of the attached disk block.import pulumi import pulumi_gcp as gcp default_instance = gcp.compute.Instance("defaultInstance", machine_type="n1-standard-1", zone="us-west1-a", boot_disk={ "initialize_params": { "image": "debian-cloud/debian-9", }, }, network_interface=[{ "network": "default", }]) default_attached_disk = gcp.compute.AttachedDisk("defaultAttachedDisk", disk=google_compute_disk["default"]["id"], instance=default_instance.id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
device_name (pulumi.Input[str]) – Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
disk (pulumi.Input[str]) –
nameorself_linkof the disk that will be attached.instance (pulumi.Input[str]) –
nameorself_linkof the compute instance that the disk will be attached to. If theself_linkis provided thenzoneandprojectare extracted from the self link. If only the name is used thenzoneandprojectmust be defined as properties on the resource or provider.mode (pulumi.Input[str]) – The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
project (pulumi.Input[str]) – The project that the referenced compute instance is a part of. If
instanceis referenced by itsself_linkthe project defined in the link will take precedence.zone (pulumi.Input[str]) – The zone that the referenced compute instance is located within. If
instanceis referenced by itsself_linkthe zone defined in the link will take precedence.
device_name: pulumi.Output[str] = None¶Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
disk: pulumi.Output[str] = None¶nameorself_linkof the disk that will be attached.
instance: pulumi.Output[str] = None¶nameorself_linkof the compute instance that the disk will be attached to. If theself_linkis provided thenzoneandprojectare extracted from the self link. If only the name is used thenzoneandprojectmust be defined as properties on the resource or provider.
mode: pulumi.Output[str] = None¶The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
project: pulumi.Output[str] = None¶The project that the referenced compute instance is a part of. If
instanceis referenced by itsself_linkthe project defined in the link will take precedence.
zone: pulumi.Output[str] = None¶The zone that the referenced compute instance is located within. If
instanceis referenced by itsself_linkthe zone defined in the link will take precedence.
- static
get(resource_name, id, opts=None, device_name=None, disk=None, instance=None, mode=None, project=None, zone=None)¶ Get an existing AttachedDisk resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
device_name (pulumi.Input[str]) – Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
disk (pulumi.Input[str]) –
nameorself_linkof the disk that will be attached.instance (pulumi.Input[str]) –
nameorself_linkof the compute instance that the disk will be attached to. If theself_linkis provided thenzoneandprojectare extracted from the self link. If only the name is used thenzoneandprojectmust be defined as properties on the resource or provider.mode (pulumi.Input[str]) – The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
project (pulumi.Input[str]) – The project that the referenced compute instance is a part of. If
instanceis referenced by itsself_linkthe project defined in the link will take precedence.zone (pulumi.Input[str]) – The zone that the referenced compute instance is located within. If
instanceis referenced by itsself_linkthe zone defined in the link will take precedence.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.Autoscalar(resource_name, opts=None, autoscaling_policy=None, description=None, name=None, project=None, target=None, zone=None, __props__=None, __name__=None, __opts__=None)¶ Represents an Autoscaler resource.
Autoscalers allow you to automatically scale virtual machine instances in managed instance groups according to an autoscaling policy that you define.
To get more information about Autoscaler, see:
How-to Guides
import pulumi import pulumi_gcp as gcp debian9 = gcp.compute.get_image(family="debian-9", project="debian-cloud") default_instance_template = gcp.compute.InstanceTemplate("defaultInstanceTemplate", machine_type="n1-standard-1", can_ip_forward=False, tags=[ "foo", "bar", ], disk=[{ "sourceImage": debian9.self_link, }], network_interface=[{ "network": "default", }], metadata={ "foo": "bar", }, service_account={ "scopes": [ "userinfo-email", "compute-ro", "storage-ro", ], }) default_target_pool = gcp.compute.TargetPool("defaultTargetPool") default_instance_group_manager = gcp.compute.InstanceGroupManager("defaultInstanceGroupManager", zone="us-central1-f", version=[{ "instanceTemplate": default_instance_template.id, "name": "primary", }], target_pools=[default_target_pool.id], base_instance_name="autoscaler-sample") default_autoscaler = gcp.compute.Autoscaler("defaultAutoscaler", zone="us-central1-f", target=default_instance_group_manager.id, autoscaling_policy={ "maxReplicas": 5, "minReplicas": 1, "cooldownPeriod": 60, "metric": [{ "name": "pubsub.googleapis.com/subscription/num_undelivered_messages", "filter": "resource.type = pubsub_subscription AND resource.label.subscription_id = our-subscription", "singleInstanceAssignment": 65535, }], })
import pulumi import pulumi_gcp as gcp debian9 = gcp.compute.get_image(family="debian-9", project="debian-cloud") foobar_instance_template = gcp.compute.InstanceTemplate("foobarInstanceTemplate", machine_type="n1-standard-1", can_ip_forward=False, tags=[ "foo", "bar", ], disk=[{ "sourceImage": debian9.self_link, }], network_interface=[{ "network": "default", }], metadata={ "foo": "bar", }, service_account={ "scopes": [ "userinfo-email", "compute-ro", "storage-ro", ], }) foobar_target_pool = gcp.compute.TargetPool("foobarTargetPool") foobar_instance_group_manager = gcp.compute.InstanceGroupManager("foobarInstanceGroupManager", zone="us-central1-f", version=[{ "instanceTemplate": foobar_instance_template.id, "name": "primary", }], target_pools=[foobar_target_pool.id], base_instance_name="foobar") foobar_autoscaler = gcp.compute.Autoscaler("foobarAutoscaler", zone="us-central1-f", target=foobar_instance_group_manager.id, autoscaling_policy={ "maxReplicas": 5, "minReplicas": 1, "cooldownPeriod": 60, "cpu_utilization": { "target": 0.5, }, })
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
autoscaling_policy (pulumi.Input[dict]) – The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%. Structure is documented below.
description (pulumi.Input[str]) – An optional description of this resource.
name (pulumi.Input[str]) – The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
target (pulumi.Input[str]) – Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
zone (pulumi.Input[str]) – URL of the zone where the instance group resides.
The autoscaling_policy object supports the following:
cooldownPeriod(pulumi.Input[float]) - The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds. Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.cpuUtilization(pulumi.Input[dict]) - Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group. Structure is documented below.target(pulumi.Input[float]) - Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
loadBalancingUtilization(pulumi.Input[dict]) - Configuration parameters of autoscaling based on a load balancer. Structure is documented below.target(pulumi.Input[float]) - Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
maxReplicas(pulumi.Input[float]) - The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas.metrics(pulumi.Input[list]) - Configuration parameters of autoscaling based on a custom metric. Structure is documented below.filter(pulumi.Input[str]) - A filter string to be used as the filter string for a Stackdriver Monitoring TimeSeries.list API call. This filter is used to select a specific TimeSeries for the purpose of autoscaling and to determine whether the metric is exporting per-instance or per-group data. You can only use the AND operator for joining selectors. You can only use direct equality comparison operator (=) without any functions for each selector. You can specify the metric in both the filter string and in the metric field. However, if specified in both places, the metric must be identical. The monitored resource type determines what kind of values are expected for the metric. If it is a gce_instance, the autoscaler expects the metric to include a separate TimeSeries for each instance in a group. In such a case, you cannot filter on resource labels. If the resource type is any other value, the autoscaler expects this metric to contain values that apply to the entire autoscaled instance group and resource label filtering can be performed to point autoscaler at the correct TimeSeries to scale upon. This is called a per-group metric for the purpose of autoscaling. If not specified, the type defaults to gce_instance. You should provide a filter that is selective enough to pick just one TimeSeries for the autoscaled group or for each of the instances (if you are using gce_instance resource type). If multiple TimeSeries are returned upon the query execution, the autoscaler will sum their respective values to obtain its scaling value.name(pulumi.Input[str]) - The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.singleInstanceAssignment(pulumi.Input[float]) - If scaling is based on a per-group metric value that represents the total amount of work to be done or resource usage, set this value to an amount assigned for a single instance of the scaled group. The autoscaler will keep the number of instances proportional to the value of this metric, the metric itself should not change value due to group resizing. For example, a good metric to use with the target ispubsub.googleapis.com/subscription/num_undelivered_messagesor a custom metric exporting the total number of requests coming to your instances. A bad example would be a metric exporting an average or median latency, since this value can’t include a chunk assignable to a single instance, it could be better used with utilization_target instead.target(pulumi.Input[float]) - Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.type(pulumi.Input[str]) - Defines how target utilization value is expressed for a Stackdriver Monitoring metric.
minReplicas(pulumi.Input[float]) - The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed.
autoscaling_policy: pulumi.Output[dict] = None¶The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%. Structure is documented below.
cooldownPeriod(float) - The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds. Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.cpuUtilization(dict) - Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group. Structure is documented below.target(float) - Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
loadBalancingUtilization(dict) - Configuration parameters of autoscaling based on a load balancer. Structure is documented below.target(float) - Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
maxReplicas(float) - The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas.metrics(list) - Configuration parameters of autoscaling based on a custom metric. Structure is documented below.filter(str) - A filter string to be used as the filter string for a Stackdriver Monitoring TimeSeries.list API call. This filter is used to select a specific TimeSeries for the purpose of autoscaling and to determine whether the metric is exporting per-instance or per-group data. You can only use the AND operator for joining selectors. You can only use direct equality comparison operator (=) without any functions for each selector. You can specify the metric in both the filter string and in the metric field. However, if specified in both places, the metric must be identical. The monitored resource type determines what kind of values are expected for the metric. If it is a gce_instance, the autoscaler expects the metric to include a separate TimeSeries for each instance in a group. In such a case, you cannot filter on resource labels. If the resource type is any other value, the autoscaler expects this metric to contain values that apply to the entire autoscaled instance group and resource label filtering can be performed to point autoscaler at the correct TimeSeries to scale upon. This is called a per-group metric for the purpose of autoscaling. If not specified, the type defaults to gce_instance. You should provide a filter that is selective enough to pick just one TimeSeries for the autoscaled group or for each of the instances (if you are using gce_instance resource type). If multiple TimeSeries are returned upon the query execution, the autoscaler will sum their respective values to obtain its scaling value.name(str) - The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.singleInstanceAssignment(float) - If scaling is based on a per-group metric value that represents the total amount of work to be done or resource usage, set this value to an amount assigned for a single instance of the scaled group. The autoscaler will keep the number of instances proportional to the value of this metric, the metric itself should not change value due to group resizing. For example, a good metric to use with the target ispubsub.googleapis.com/subscription/num_undelivered_messagesor a custom metric exporting the total number of requests coming to your instances. A bad example would be a metric exporting an average or median latency, since this value can’t include a chunk assignable to a single instance, it could be better used with utilization_target instead.target(float) - Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.type(str) - Defines how target utilization value is expressed for a Stackdriver Monitoring metric.
minReplicas(float) - The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional description of this resource.
name: pulumi.Output[str] = None¶The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
target: pulumi.Output[str] = None¶Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
zone: pulumi.Output[str] = None¶URL of the zone where the instance group resides.
- static
get(resource_name, id, opts=None, autoscaling_policy=None, creation_timestamp=None, description=None, name=None, project=None, self_link=None, target=None, zone=None)¶ Get an existing Autoscalar resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
autoscaling_policy (pulumi.Input[dict]) – The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%. Structure is documented below.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional description of this resource.
name (pulumi.Input[str]) – The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link (pulumi.Input[str]) – The URI of the created resource.
target (pulumi.Input[str]) – Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
zone (pulumi.Input[str]) – URL of the zone where the instance group resides.
The autoscaling_policy object supports the following:
cooldownPeriod(pulumi.Input[float]) - The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds. Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.cpuUtilization(pulumi.Input[dict]) - Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group. Structure is documented below.target(pulumi.Input[float]) - Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
loadBalancingUtilization(pulumi.Input[dict]) - Configuration parameters of autoscaling based on a load balancer. Structure is documented below.target(pulumi.Input[float]) - Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
maxReplicas(pulumi.Input[float]) - The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas.metrics(pulumi.Input[list]) - Configuration parameters of autoscaling based on a custom metric. Structure is documented below.filter(pulumi.Input[str]) - A filter string to be used as the filter string for a Stackdriver Monitoring TimeSeries.list API call. This filter is used to select a specific TimeSeries for the purpose of autoscaling and to determine whether the metric is exporting per-instance or per-group data. You can only use the AND operator for joining selectors. You can only use direct equality comparison operator (=) without any functions for each selector. You can specify the metric in both the filter string and in the metric field. However, if specified in both places, the metric must be identical. The monitored resource type determines what kind of values are expected for the metric. If it is a gce_instance, the autoscaler expects the metric to include a separate TimeSeries for each instance in a group. In such a case, you cannot filter on resource labels. If the resource type is any other value, the autoscaler expects this metric to contain values that apply to the entire autoscaled instance group and resource label filtering can be performed to point autoscaler at the correct TimeSeries to scale upon. This is called a per-group metric for the purpose of autoscaling. If not specified, the type defaults to gce_instance. You should provide a filter that is selective enough to pick just one TimeSeries for the autoscaled group or for each of the instances (if you are using gce_instance resource type). If multiple TimeSeries are returned upon the query execution, the autoscaler will sum their respective values to obtain its scaling value.name(pulumi.Input[str]) - The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.singleInstanceAssignment(pulumi.Input[float]) - If scaling is based on a per-group metric value that represents the total amount of work to be done or resource usage, set this value to an amount assigned for a single instance of the scaled group. The autoscaler will keep the number of instances proportional to the value of this metric, the metric itself should not change value due to group resizing. For example, a good metric to use with the target ispubsub.googleapis.com/subscription/num_undelivered_messagesor a custom metric exporting the total number of requests coming to your instances. A bad example would be a metric exporting an average or median latency, since this value can’t include a chunk assignable to a single instance, it could be better used with utilization_target instead.target(pulumi.Input[float]) - Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.type(pulumi.Input[str]) - Defines how target utilization value is expressed for a Stackdriver Monitoring metric.
minReplicas(pulumi.Input[float]) - The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.Autoscaler(resource_name, opts=None, autoscaling_policy=None, description=None, name=None, project=None, target=None, zone=None, __props__=None, __name__=None, __opts__=None)¶ Represents an Autoscaler resource.
Autoscalers allow you to automatically scale virtual machine instances in managed instance groups according to an autoscaling policy that you define.
To get more information about Autoscaler, see:
How-to Guides
import pulumi import pulumi_gcp as gcp debian9 = gcp.compute.get_image(family="debian-9", project="debian-cloud") default_instance_template = gcp.compute.InstanceTemplate("defaultInstanceTemplate", machine_type="n1-standard-1", can_ip_forward=False, tags=[ "foo", "bar", ], disk=[{ "sourceImage": debian9.self_link, }], network_interface=[{ "network": "default", }], metadata={ "foo": "bar", }, service_account={ "scopes": [ "userinfo-email", "compute-ro", "storage-ro", ], }) default_target_pool = gcp.compute.TargetPool("defaultTargetPool") default_instance_group_manager = gcp.compute.InstanceGroupManager("defaultInstanceGroupManager", zone="us-central1-f", version=[{ "instanceTemplate": default_instance_template.id, "name": "primary", }], target_pools=[default_target_pool.id], base_instance_name="autoscaler-sample") default_autoscaler = gcp.compute.Autoscaler("defaultAutoscaler", zone="us-central1-f", target=default_instance_group_manager.id, autoscaling_policy={ "maxReplicas": 5, "minReplicas": 1, "cooldownPeriod": 60, "metric": [{ "name": "pubsub.googleapis.com/subscription/num_undelivered_messages", "filter": "resource.type = pubsub_subscription AND resource.label.subscription_id = our-subscription", "singleInstanceAssignment": 65535, }], })
import pulumi import pulumi_gcp as gcp debian9 = gcp.compute.get_image(family="debian-9", project="debian-cloud") foobar_instance_template = gcp.compute.InstanceTemplate("foobarInstanceTemplate", machine_type="n1-standard-1", can_ip_forward=False, tags=[ "foo", "bar", ], disk=[{ "sourceImage": debian9.self_link, }], network_interface=[{ "network": "default", }], metadata={ "foo": "bar", }, service_account={ "scopes": [ "userinfo-email", "compute-ro", "storage-ro", ], }) foobar_target_pool = gcp.compute.TargetPool("foobarTargetPool") foobar_instance_group_manager = gcp.compute.InstanceGroupManager("foobarInstanceGroupManager", zone="us-central1-f", version=[{ "instanceTemplate": foobar_instance_template.id, "name": "primary", }], target_pools=[foobar_target_pool.id], base_instance_name="foobar") foobar_autoscaler = gcp.compute.Autoscaler("foobarAutoscaler", zone="us-central1-f", target=foobar_instance_group_manager.id, autoscaling_policy={ "maxReplicas": 5, "minReplicas": 1, "cooldownPeriod": 60, "cpu_utilization": { "target": 0.5, }, })
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
autoscaling_policy (pulumi.Input[dict]) – The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%. Structure is documented below.
description (pulumi.Input[str]) – An optional description of this resource.
name (pulumi.Input[str]) – The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
target (pulumi.Input[str]) – Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
zone (pulumi.Input[str]) – URL of the zone where the instance group resides.
The autoscaling_policy object supports the following:
cooldownPeriod(pulumi.Input[float]) - The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds. Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.cpuUtilization(pulumi.Input[dict]) - Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group. Structure is documented below.target(pulumi.Input[float]) - Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
loadBalancingUtilization(pulumi.Input[dict]) - Configuration parameters of autoscaling based on a load balancer. Structure is documented below.target(pulumi.Input[float]) - Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
maxReplicas(pulumi.Input[float]) - The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas.metrics(pulumi.Input[list]) - Configuration parameters of autoscaling based on a custom metric. Structure is documented below.filter(pulumi.Input[str]) - A filter string to be used as the filter string for a Stackdriver Monitoring TimeSeries.list API call. This filter is used to select a specific TimeSeries for the purpose of autoscaling and to determine whether the metric is exporting per-instance or per-group data. You can only use the AND operator for joining selectors. You can only use direct equality comparison operator (=) without any functions for each selector. You can specify the metric in both the filter string and in the metric field. However, if specified in both places, the metric must be identical. The monitored resource type determines what kind of values are expected for the metric. If it is a gce_instance, the autoscaler expects the metric to include a separate TimeSeries for each instance in a group. In such a case, you cannot filter on resource labels. If the resource type is any other value, the autoscaler expects this metric to contain values that apply to the entire autoscaled instance group and resource label filtering can be performed to point autoscaler at the correct TimeSeries to scale upon. This is called a per-group metric for the purpose of autoscaling. If not specified, the type defaults to gce_instance. You should provide a filter that is selective enough to pick just one TimeSeries for the autoscaled group or for each of the instances (if you are using gce_instance resource type). If multiple TimeSeries are returned upon the query execution, the autoscaler will sum their respective values to obtain its scaling value.name(pulumi.Input[str]) - The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.singleInstanceAssignment(pulumi.Input[float]) - If scaling is based on a per-group metric value that represents the total amount of work to be done or resource usage, set this value to an amount assigned for a single instance of the scaled group. The autoscaler will keep the number of instances proportional to the value of this metric, the metric itself should not change value due to group resizing. For example, a good metric to use with the target ispubsub.googleapis.com/subscription/num_undelivered_messagesor a custom metric exporting the total number of requests coming to your instances. A bad example would be a metric exporting an average or median latency, since this value can’t include a chunk assignable to a single instance, it could be better used with utilization_target instead.target(pulumi.Input[float]) - Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.type(pulumi.Input[str]) - Defines how target utilization value is expressed for a Stackdriver Monitoring metric.
minReplicas(pulumi.Input[float]) - The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed.
autoscaling_policy: pulumi.Output[dict] = None¶The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%. Structure is documented below.
cooldownPeriod(float) - The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds. Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.cpuUtilization(dict) - Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group. Structure is documented below.target(float) - Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
loadBalancingUtilization(dict) - Configuration parameters of autoscaling based on a load balancer. Structure is documented below.target(float) - Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
maxReplicas(float) - The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas.metrics(list) - Configuration parameters of autoscaling based on a custom metric. Structure is documented below.filter(str) - A filter string to be used as the filter string for a Stackdriver Monitoring TimeSeries.list API call. This filter is used to select a specific TimeSeries for the purpose of autoscaling and to determine whether the metric is exporting per-instance or per-group data. You can only use the AND operator for joining selectors. You can only use direct equality comparison operator (=) without any functions for each selector. You can specify the metric in both the filter string and in the metric field. However, if specified in both places, the metric must be identical. The monitored resource type determines what kind of values are expected for the metric. If it is a gce_instance, the autoscaler expects the metric to include a separate TimeSeries for each instance in a group. In such a case, you cannot filter on resource labels. If the resource type is any other value, the autoscaler expects this metric to contain values that apply to the entire autoscaled instance group and resource label filtering can be performed to point autoscaler at the correct TimeSeries to scale upon. This is called a per-group metric for the purpose of autoscaling. If not specified, the type defaults to gce_instance. You should provide a filter that is selective enough to pick just one TimeSeries for the autoscaled group or for each of the instances (if you are using gce_instance resource type). If multiple TimeSeries are returned upon the query execution, the autoscaler will sum their respective values to obtain its scaling value.name(str) - The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.singleInstanceAssignment(float) - If scaling is based on a per-group metric value that represents the total amount of work to be done or resource usage, set this value to an amount assigned for a single instance of the scaled group. The autoscaler will keep the number of instances proportional to the value of this metric, the metric itself should not change value due to group resizing. For example, a good metric to use with the target ispubsub.googleapis.com/subscription/num_undelivered_messagesor a custom metric exporting the total number of requests coming to your instances. A bad example would be a metric exporting an average or median latency, since this value can’t include a chunk assignable to a single instance, it could be better used with utilization_target instead.target(float) - Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.type(str) - Defines how target utilization value is expressed for a Stackdriver Monitoring metric.
minReplicas(float) - The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional description of this resource.
name: pulumi.Output[str] = None¶The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
target: pulumi.Output[str] = None¶Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
zone: pulumi.Output[str] = None¶URL of the zone where the instance group resides.
- static
get(resource_name, id, opts=None, autoscaling_policy=None, creation_timestamp=None, description=None, name=None, project=None, self_link=None, target=None, zone=None)¶ Get an existing Autoscaler resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
autoscaling_policy (pulumi.Input[dict]) – The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%. Structure is documented below.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional description of this resource.
name (pulumi.Input[str]) – The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link (pulumi.Input[str]) – The URI of the created resource.
target (pulumi.Input[str]) – Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
zone (pulumi.Input[str]) – URL of the zone where the instance group resides.
The autoscaling_policy object supports the following:
cooldownPeriod(pulumi.Input[float]) - The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds. Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.cpuUtilization(pulumi.Input[dict]) - Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group. Structure is documented below.target(pulumi.Input[float]) - Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
loadBalancingUtilization(pulumi.Input[dict]) - Configuration parameters of autoscaling based on a load balancer. Structure is documented below.target(pulumi.Input[float]) - Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
maxReplicas(pulumi.Input[float]) - The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas.metrics(pulumi.Input[list]) - Configuration parameters of autoscaling based on a custom metric. Structure is documented below.filter(pulumi.Input[str]) - A filter string to be used as the filter string for a Stackdriver Monitoring TimeSeries.list API call. This filter is used to select a specific TimeSeries for the purpose of autoscaling and to determine whether the metric is exporting per-instance or per-group data. You can only use the AND operator for joining selectors. You can only use direct equality comparison operator (=) without any functions for each selector. You can specify the metric in both the filter string and in the metric field. However, if specified in both places, the metric must be identical. The monitored resource type determines what kind of values are expected for the metric. If it is a gce_instance, the autoscaler expects the metric to include a separate TimeSeries for each instance in a group. In such a case, you cannot filter on resource labels. If the resource type is any other value, the autoscaler expects this metric to contain values that apply to the entire autoscaled instance group and resource label filtering can be performed to point autoscaler at the correct TimeSeries to scale upon. This is called a per-group metric for the purpose of autoscaling. If not specified, the type defaults to gce_instance. You should provide a filter that is selective enough to pick just one TimeSeries for the autoscaled group or for each of the instances (if you are using gce_instance resource type). If multiple TimeSeries are returned upon the query execution, the autoscaler will sum their respective values to obtain its scaling value.name(pulumi.Input[str]) - The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.singleInstanceAssignment(pulumi.Input[float]) - If scaling is based on a per-group metric value that represents the total amount of work to be done or resource usage, set this value to an amount assigned for a single instance of the scaled group. The autoscaler will keep the number of instances proportional to the value of this metric, the metric itself should not change value due to group resizing. For example, a good metric to use with the target ispubsub.googleapis.com/subscription/num_undelivered_messagesor a custom metric exporting the total number of requests coming to your instances. A bad example would be a metric exporting an average or median latency, since this value can’t include a chunk assignable to a single instance, it could be better used with utilization_target instead.target(pulumi.Input[float]) - Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.type(pulumi.Input[str]) - Defines how target utilization value is expressed for a Stackdriver Monitoring metric.
minReplicas(pulumi.Input[float]) - The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.AwaitableGetAddressResult(address=None, id=None, name=None, project=None, region=None, self_link=None, status=None)¶
- class
pulumi_gcp.compute.AwaitableGetBackendBucketResult(bucket_name=None, cdn_policies=None, creation_timestamp=None, description=None, enable_cdn=None, id=None, name=None, project=None, self_link=None)¶
- class
pulumi_gcp.compute.AwaitableGetBackendServiceResult(affinity_cookie_ttl_sec=None, backends=None, cdn_policies=None, circuit_breakers=None, connection_draining_timeout_sec=None, consistent_hash=None, creation_timestamp=None, custom_request_headers=None, description=None, enable_cdn=None, fingerprint=None, health_checks=None, iaps=None, id=None, load_balancing_scheme=None, locality_lb_policy=None, log_configs=None, name=None, outlier_detections=None, port_name=None, project=None, protocol=None, security_policy=None, self_link=None, session_affinity=None, timeout_sec=None)¶
- class
pulumi_gcp.compute.AwaitableGetCertificateResult(certificate=None, certificate_id=None, creation_timestamp=None, description=None, id=None, name=None, name_prefix=None, private_key=None, project=None, self_link=None)¶
- class
pulumi_gcp.compute.AwaitableGetDefaultServiceAccountResult(display_name=None, email=None, id=None, name=None, project=None, unique_id=None)¶
- class
pulumi_gcp.compute.AwaitableGetForwardingRuleResult(backend_service=None, description=None, id=None, ip_address=None, ip_protocol=None, load_balancing_scheme=None, name=None, network=None, port_range=None, ports=None, project=None, region=None, self_link=None, subnetwork=None, target=None)¶
- class
pulumi_gcp.compute.AwaitableGetGlobalAddressResult(address=None, id=None, name=None, project=None, self_link=None, status=None)¶
- class
pulumi_gcp.compute.AwaitableGetImageResult(archive_size_bytes=None, creation_timestamp=None, description=None, disk_size_gb=None, family=None, id=None, image_encryption_key_sha256=None, image_id=None, label_fingerprint=None, labels=None, licenses=None, name=None, project=None, self_link=None, source_disk=None, source_disk_encryption_key_sha256=None, source_disk_id=None, source_image_id=None, status=None)¶
- class
pulumi_gcp.compute.AwaitableGetInstanceGroupResult(description=None, id=None, instances=None, name=None, named_ports=None, network=None, project=None, self_link=None, size=None, zone=None)¶
- class
pulumi_gcp.compute.AwaitableGetInstanceResult(allow_stopping_for_update=None, attached_disks=None, boot_disks=None, can_ip_forward=None, cpu_platform=None, current_status=None, deletion_protection=None, description=None, desired_status=None, enable_display=None, guest_accelerators=None, hostname=None, id=None, instance_id=None, label_fingerprint=None, labels=None, machine_type=None, metadata=None, metadata_fingerprint=None, metadata_startup_script=None, min_cpu_platform=None, name=None, network_interfaces=None, project=None, resource_policies=None, schedulings=None, scratch_disks=None, self_link=None, service_accounts=None, shielded_instance_configs=None, tags=None, tags_fingerprint=None, zone=None)¶
- class
pulumi_gcp.compute.AwaitableGetInstanceSerialPortResult(contents=None, id=None, instance=None, port=None, project=None, zone=None)¶
- class
pulumi_gcp.compute.AwaitableGetLBIPRangesResult(http_ssl_tcp_internals=None, id=None, networks=None)¶
- class
pulumi_gcp.compute.AwaitableGetNetblockIPRangesResult(cidr_blocks=None, cidr_blocks_ipv4s=None, cidr_blocks_ipv6s=None, id=None, range_type=None)¶
- class
pulumi_gcp.compute.AwaitableGetNetworkEndpointGroupResult(default_port=None, description=None, id=None, name=None, network=None, network_endpoint_type=None, project=None, self_link=None, size=None, subnetwork=None, zone=None)¶
- class
pulumi_gcp.compute.AwaitableGetNetworkResult(description=None, gateway_ipv4=None, id=None, name=None, project=None, self_link=None, subnetworks_self_links=None)¶
- class
pulumi_gcp.compute.AwaitableGetNodeTypesResult(id=None, names=None, project=None, zone=None)¶
- class
pulumi_gcp.compute.AwaitableGetRegionInstanceGroupResult(id=None, instances=None, name=None, project=None, region=None, self_link=None, size=None)¶
- class
pulumi_gcp.compute.AwaitableGetRegionsResult(id=None, names=None, project=None, status=None)¶
- class
pulumi_gcp.compute.AwaitableGetResourcePolicyResult(description=None, id=None, name=None, project=None, region=None, self_link=None)¶
- class
pulumi_gcp.compute.AwaitableGetRouterResult(bgps=None, creation_timestamp=None, description=None, id=None, name=None, network=None, project=None, region=None, self_link=None)¶
- class
pulumi_gcp.compute.AwaitableGetSSLPolicyResult(creation_timestamp=None, custom_features=None, description=None, enabled_features=None, fingerprint=None, id=None, min_tls_version=None, name=None, profile=None, project=None, self_link=None)¶
- class
pulumi_gcp.compute.AwaitableGetSubnetworkResult(description=None, gateway_address=None, id=None, ip_cidr_range=None, name=None, network=None, private_ip_google_access=None, project=None, region=None, secondary_ip_ranges=None, self_link=None)¶
- class
pulumi_gcp.compute.AwaitableGetVPNGatewayResult(description=None, id=None, name=None, network=None, project=None, region=None, self_link=None)¶
- class
pulumi_gcp.compute.AwaitableGetZonesResult(id=None, names=None, project=None, region=None, status=None)¶
- class
pulumi_gcp.compute.BackendBucket(resource_name, opts=None, bucket_name=None, cdn_policy=None, description=None, enable_cdn=None, name=None, project=None, __props__=None, __name__=None, __opts__=None)¶ Backend buckets allow you to use Google Cloud Storage buckets with HTTP(S) load balancing.
An HTTP(S) load balancer can direct traffic to specified URLs to a backend bucket rather than a backend service. It can send requests for static content to a Cloud Storage bucket and requests for dynamic content to a virtual machine instance.
To get more information about BackendBucket, see:
import pulumi import pulumi_gcp as gcp image_bucket = gcp.storage.Bucket("imageBucket", location="EU") image_backend = gcp.compute.BackendBucket("imageBackend", description="Contains beautiful images", bucket_name=image_bucket.name, enable_cdn=True)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
bucket_name (pulumi.Input[str]) – Cloud Storage bucket name.
cdn_policy (pulumi.Input[dict]) – Cloud CDN configuration for this Backend Bucket. Structure is documented below.
description (pulumi.Input[str]) – An optional textual description of the resource; provided by the client when the resource is created.
enable_cdn (pulumi.Input[bool]) – If true, enable Cloud CDN for this BackendBucket.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
The cdn_policy object supports the following:
signedUrlCacheMaxAgeSec(pulumi.Input[float]) - Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a “Cache-Control: public, max-age=[TTL]” header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.
bucket_name: pulumi.Output[str] = None¶Cloud Storage bucket name.
cdn_policy: pulumi.Output[dict] = None¶Cloud CDN configuration for this Backend Bucket. Structure is documented below.
signedUrlCacheMaxAgeSec(float) - Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a “Cache-Control: public, max-age=[TTL]” header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional textual description of the resource; provided by the client when the resource is created.
enable_cdn: pulumi.Output[bool] = None¶If true, enable Cloud CDN for this BackendBucket.
name: pulumi.Output[str] = None¶Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
- static
get(resource_name, id, opts=None, bucket_name=None, cdn_policy=None, creation_timestamp=None, description=None, enable_cdn=None, name=None, project=None, self_link=None)¶ Get an existing BackendBucket resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
bucket_name (pulumi.Input[str]) – Cloud Storage bucket name.
cdn_policy (pulumi.Input[dict]) – Cloud CDN configuration for this Backend Bucket. Structure is documented below.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional textual description of the resource; provided by the client when the resource is created.
enable_cdn (pulumi.Input[bool]) – If true, enable Cloud CDN for this BackendBucket.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link (pulumi.Input[str]) – The URI of the created resource.
The cdn_policy object supports the following:
signedUrlCacheMaxAgeSec(pulumi.Input[float]) - Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a “Cache-Control: public, max-age=[TTL]” header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.BackendBucketSignedUrlKey(resource_name, opts=None, backend_bucket=None, key_value=None, name=None, project=None, __props__=None, __name__=None, __opts__=None)¶ A key for signing Cloud CDN signed URLs for BackendBuckets.
To get more information about BackendBucketSignedUrlKey, see:
How-to Guides
Warning: All arguments including
key_valuewill be stored in the raw state as plain-text.import pulumi import pulumi_gcp as gcp bucket = gcp.storage.Bucket("bucket", location="EU") test_backend = gcp.compute.BackendBucket("testBackend", description="Contains beautiful images", bucket_name=bucket.name, enable_cdn=True) backend_key = gcp.compute.BackendBucketSignedUrlKey("backendKey", key_value="pPsVemX8GM46QVeezid6Rw==", backend_bucket=test_backend.name)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
backend_bucket (pulumi.Input[str]) – The backend bucket this signed URL key belongs.
key_value (pulumi.Input[str]) – 128-bit key value used for signing the URL. The key value must be a valid RFC 4648 Section 5 base64url encoded string. Note: This property is sensitive and will not be displayed in the plan.
name (pulumi.Input[str]) – Name of the signed URL key.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
backend_bucket: pulumi.Output[str] = None¶The backend bucket this signed URL key belongs.
key_value: pulumi.Output[str] = None¶128-bit key value used for signing the URL. The key value must be a valid RFC 4648 Section 5 base64url encoded string. Note: This property is sensitive and will not be displayed in the plan.
name: pulumi.Output[str] = None¶Name of the signed URL key.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- static
get(resource_name, id, opts=None, backend_bucket=None, key_value=None, name=None, project=None)¶ Get an existing BackendBucketSignedUrlKey resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
backend_bucket (pulumi.Input[str]) – The backend bucket this signed URL key belongs.
key_value (pulumi.Input[str]) – 128-bit key value used for signing the URL. The key value must be a valid RFC 4648 Section 5 base64url encoded string. Note: This property is sensitive and will not be displayed in the plan.
name (pulumi.Input[str]) – Name of the signed URL key.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.BackendService(resource_name, opts=None, affinity_cookie_ttl_sec=None, backends=None, cdn_policy=None, circuit_breakers=None, connection_draining_timeout_sec=None, consistent_hash=None, custom_request_headers=None, description=None, enable_cdn=None, health_checks=None, iap=None, load_balancing_scheme=None, locality_lb_policy=None, log_config=None, name=None, outlier_detection=None, port_name=None, project=None, protocol=None, security_policy=None, session_affinity=None, timeout_sec=None, __props__=None, __name__=None, __opts__=None)¶ A Backend Service defines a group of virtual machines that will serve traffic for load balancing. This resource is a global backend service, appropriate for external load balancing or self-managed internal load balancing. For managed internal load balancing, use a regional backend service instead.
Currently self-managed internal load balancing is only available in beta.
To get more information about BackendService, see:
How-to Guides
import pulumi import pulumi_gcp as gcp default_http_health_check = gcp.compute.HttpHealthCheck("defaultHttpHealthCheck", request_path="/", check_interval_sec=1, timeout_sec=1) default_backend_service = gcp.compute.BackendService("defaultBackendService", health_checks=[default_http_health_check.id])
import pulumi import pulumi_gcp as gcp health_check = gcp.compute.HealthCheck("healthCheck", http_health_check={ "port": 80, }) default = gcp.compute.BackendService("default", health_checks=[health_check.id], load_balancing_scheme="INTERNAL_SELF_MANAGED", locality_lb_policy="ROUND_ROBIN")
import pulumi import pulumi_gcp as gcp health_check = gcp.compute.HealthCheck("healthCheck", http_health_check={ "port": 80, }) default = gcp.compute.BackendService("default", health_checks=[health_check.id], load_balancing_scheme="INTERNAL_SELF_MANAGED", locality_lb_policy="RING_HASH", session_affinity="HTTP_COOKIE", circuit_breakers={ "maxConnections": 10, }, consistent_hash={ "http_cookie": { "ttl": { "seconds": 11, "nanos": 1111, }, "name": "mycookie", }, }, outlier_detection={ "consecutiveErrors": 2, })
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
affinity_cookie_ttl_sec (pulumi.Input[float]) – Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day. When the load balancing scheme is INTERNAL, this field is not used.
backends (pulumi.Input[list]) – The set of backends that serve this BackendService. Structure is documented below.
cdn_policy (pulumi.Input[dict]) – Cloud CDN configuration for this BackendService. Structure is documented below.
circuit_breakers (pulumi.Input[dict]) – Settings controlling the volume of connections to a backend service. This field is applicable only when the load_balancing_scheme is set to INTERNAL_SELF_MANAGED. Structure is documented below.
connection_draining_timeout_sec (pulumi.Input[float]) – Time for which instance will be drained (not accept new connections, but still work to finish started).
consistent_hash (pulumi.Input[dict]) – Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field only applies if the load_balancing_scheme is set to INTERNAL_SELF_MANAGED. This field is only applicable when locality_lb_policy is set to MAGLEV or RING_HASH. Structure is documented below.
custom_request_headers (pulumi.Input[list]) – Headers that the HTTP/S load balancer should add to proxied requests.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource.
enable_cdn (pulumi.Input[bool]) – If true, enable Cloud CDN for this BackendService.
health_checks (pulumi.Input[str]) – The set of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified, and a health check is required. For internal load balancing, a URL to a HealthCheck resource must be specified instead.
iap (pulumi.Input[dict]) – Settings for enabling Cloud Identity Aware Proxy Structure is documented below.
load_balancing_scheme (pulumi.Input[str]) – Indicates whether the backend service will be used with internal or external load balancing. A backend service created for one type of load balancing cannot be used with the other.
locality_lb_policy (pulumi.Input[str]) – The load balancing algorithm used within the scope of the locality. The possible values are - ROUND_ROBIN - This is a simple policy in which each healthy backend is selected in round robin order. LEAST_REQUEST - An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. RING_HASH - The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. RANDOM - The load balancer selects a random healthy host. ORIGINAL_DESTINATION - Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. MAGLEV - used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, refer to https://ai.google/research/pubs/pub44824 This field is applicable only when the load_balancing_scheme is set to INTERNAL_SELF_MANAGED.
log_config (pulumi.Input[dict]) – This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver. Structure is documented below.
name (pulumi.Input[str]) – Name of the cookie.
outlier_detection (pulumi.Input[dict]) – Settings controlling eviction of unhealthy hosts from the load balancing pool. This field is applicable only when the load_balancing_scheme is set to INTERNAL_SELF_MANAGED. Structure is documented below.
port_name (pulumi.Input[str]) – Name of backend port. The same name should appear in the instance groups referenced by this service. Required when the load balancing scheme is EXTERNAL.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
protocol (pulumi.Input[str]) – The protocol this BackendService uses to communicate with backends. The default is HTTP. NOTE: HTTP2 is only valid for beta HTTP/2 load balancer types and may result in errors if used with the GA API.
security_policy (pulumi.Input[str]) – The security policy associated with this backend service.
session_affinity (pulumi.Input[str]) – Type of session affinity to use. The default is NONE. Session affinity is not applicable if the protocol is UDP.
timeout_sec (pulumi.Input[float]) – How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds. Valid range is [1, 86400].
The backends object supports the following:
balancingMode(pulumi.Input[str]) - Specifies the balancing mode for this backend. For global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP/SSL).capacityScaler(pulumi.Input[float]) - A multiplier applied to the group’s maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). Default value is 1, which means the group will serve up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available Capacity. Valid range is [0.0,1.0].description(pulumi.Input[str]) - An optional description of this resource. Provide this property when you create the resource.group(pulumi.Input[str]) - The fully-qualified URL of an Instance Group or Network Endpoint Group resource. In case of instance group this defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource. For Network Endpoint Groups this defines list of endpoints. All endpoints of Network Endpoint Group must be hosted on instances located in the same zone as the Network Endpoint Group. Backend services cannot mix Instance Group and Network Endpoint Group backends. Note that you must specify an Instance Group or Network Endpoint Group resource using the fully-qualified URL, rather than a partial URL.maxConnections(pulumi.Input[float]) - The maximum number of connections to the backend cluster. Defaults to 1024.maxConnectionsPerEndpoint(pulumi.Input[float]) - The max number of simultaneous connections that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint must be set.maxConnectionsPerInstance(pulumi.Input[float]) - The max number of simultaneous connections that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.maxRate(pulumi.Input[float]) - The max requests per second (RPS) of the group. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. For RATE mode, either maxRate or one of maxRatePerInstance or maxRatePerEndpoint, as appropriate for group type, must be set.maxRatePerEndpoint(pulumi.Input[float]) - The max requests per second (RPS) that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint must be set.maxRatePerInstance(pulumi.Input[float]) - The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.maxUtilization(pulumi.Input[float]) - Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. The default is 0.8. Valid range is [0.0, 1.0].
The cdn_policy object supports the following:
cacheKeyPolicy(pulumi.Input[dict]) - The CacheKeyPolicy for this CdnPolicy. Structure is documented below.includeHost(pulumi.Input[bool]) - If true requests to different hosts will be cached separately.includeProtocol(pulumi.Input[bool]) - If true, http and https requests will be cached separately.includeQueryString(pulumi.Input[bool]) - If true, include query string parameters in the cache key according to query_string_whitelist and query_string_blacklist. If neither is set, the entire query string will be included. If false, the query string will be excluded from the cache key entirely.queryStringBlacklists(pulumi.Input[list]) - Names of query string parameters to exclude in cache keys. All other parameters will be included. Either specify query_string_whitelist or query_string_blacklist, not both. ‘&’ and ‘=’ will be percent encoded and not treated as delimiters.queryStringWhitelists(pulumi.Input[list]) - Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify query_string_whitelist or query_string_blacklist, not both. ‘&’ and ‘=’ will be percent encoded and not treated as delimiters.
signedUrlCacheMaxAgeSec(pulumi.Input[float]) - Maximum number of seconds the response to a signed URL request will be considered fresh, defaults to 1hr (3600s). After this time period, the response will be revalidated before being served. When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a “Cache-Control: public, max-age=[TTL]” header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.
The circuit_breakers object supports the following:
connectTimeout(pulumi.Input[dict]) - The timeout for new network connections to hosts. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[float]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
maxConnections(pulumi.Input[float]) - The maximum number of connections to the backend cluster. Defaults to 1024.maxPendingRequests(pulumi.Input[float]) - The maximum number of pending requests to the backend cluster. Defaults to 1024.maxRequests(pulumi.Input[float]) - The maximum number of parallel requests to the backend cluster. Defaults to 1024.maxRequestsPerConnection(pulumi.Input[float]) - Maximum requests for a single backend connection. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive.maxRetries(pulumi.Input[float]) - The maximum number of parallel retries to the backend cluster. Defaults to 3.
The consistent_hash object supports the following:
httpCookie(pulumi.Input[dict]) - Hash is based on HTTP Cookie. This field describes a HTTP cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity is set to HTTP_COOKIE. Structure is documented below.name(pulumi.Input[str]) - Name of the cookie.path(pulumi.Input[str]) - Path to set for the cookie.ttl(pulumi.Input[dict]) - Lifetime of the cookie. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[float]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
httpHeaderName(pulumi.Input[str]) - The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER_FIELD.minimumRingSize(pulumi.Input[float]) - The minimum number of virtual nodes to use for the hash ring. Larger ring sizes result in more granular load distributions. If the number of hosts in the load balancing pool is larger than the ring size, each host will be assigned a single virtual node. Defaults to 1024.
The iap object supports the following:
oauth2ClientId(pulumi.Input[str]) - OAuth2 Client ID for IAPoauth2ClientSecret(pulumi.Input[str]) - OAuth2 Client Secret for IAP Note: This property is sensitive and will not be displayed in the plan.oauth2ClientSecretSha256(pulumi.Input[str]) - - OAuth2 Client Secret SHA-256 for IAP Note: This property is sensitive and will not be displayed in the plan.
The log_config object supports the following:
enable(pulumi.Input[bool]) - Whether to enable logging for the load balancer traffic served by this backend service.sampleRate(pulumi.Input[float]) - This field can only be specified if logging is enabled for this backend service. The value of the field must be in [0, 1]. This configures the sampling rate of requests to the load balancer where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0.
The outlier_detection object supports the following:
baseEjectionTime(pulumi.Input[dict]) - The base time that a host is ejected for. The real time is equal to the base time multiplied by the number of times the host has been ejected. Defaults to 30000ms or 30s. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[float]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
consecutiveErrors(pulumi.Input[float]) - Number of errors before a host is ejected from the connection pool. When the backend host is accessed over HTTP, a 5xx return code qualifies as an error. Defaults to 5.consecutiveGatewayFailure(pulumi.Input[float]) - The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 5.enforcingConsecutiveErrors(pulumi.Input[float]) - The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.enforcingConsecutiveGatewayFailure(pulumi.Input[float]) - The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0.enforcingSuccessRate(pulumi.Input[float]) - The percentage chance that a host will be actually ejected when an outlier status is detected through success rate statistics. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.interval(pulumi.Input[dict]) - Time interval between ejection sweep analysis. This can result in both new ejections as well as hosts being returned to service. Defaults to 10 seconds. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[float]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
maxEjectionPercent(pulumi.Input[float]) - Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 10%.successRateMinimumHosts(pulumi.Input[float]) - The number of hosts in a cluster that must have enough request volume to detect success rate outliers. If the number of hosts is less than this setting, outlier detection via success rate statistics is not performed for any host in the cluster. Defaults to 5.successRateRequestVolume(pulumi.Input[float]) - The minimum number of total requests that must be collected in one interval (as defined by the interval duration above) to include this host in success rate based outlier detection. If the volume is lower than this setting, outlier detection via success rate statistics is not performed for that host. Defaults to 100.successRateStdevFactor(pulumi.Input[float]) - This factor is used to determine the ejection threshold for success rate outlier ejection. The ejection threshold is the difference between the mean success rate, and the product of this factor and the standard deviation of the mean success rate: mean - (stdev * success_rate_stdev_factor). This factor is divided by a thousand to get a double. That is, if the desired factor is 1.9, the runtime value should be 1900. Defaults to 1900.
Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day. When the load balancing scheme is INTERNAL, this field is not used.
backends: pulumi.Output[list] = None¶The set of backends that serve this BackendService. Structure is documented below.
balancingMode(str) - Specifies the balancing mode for this backend. For global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP/SSL).capacityScaler(float) - A multiplier applied to the group’s maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). Default value is 1, which means the group will serve up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available Capacity. Valid range is [0.0,1.0].description(str) - An optional description of this resource. Provide this property when you create the resource.group(str) - The fully-qualified URL of an Instance Group or Network Endpoint Group resource. In case of instance group this defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource. For Network Endpoint Groups this defines list of endpoints. All endpoints of Network Endpoint Group must be hosted on instances located in the same zone as the Network Endpoint Group. Backend services cannot mix Instance Group and Network Endpoint Group backends. Note that you must specify an Instance Group or Network Endpoint Group resource using the fully-qualified URL, rather than a partial URL.maxConnections(float) - The maximum number of connections to the backend cluster. Defaults to 1024.maxConnectionsPerEndpoint(float) - The max number of simultaneous connections that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint must be set.maxConnectionsPerInstance(float) - The max number of simultaneous connections that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.maxRate(float) - The max requests per second (RPS) of the group. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. For RATE mode, either maxRate or one of maxRatePerInstance or maxRatePerEndpoint, as appropriate for group type, must be set.maxRatePerEndpoint(float) - The max requests per second (RPS) that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint must be set.maxRatePerInstance(float) - The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.maxUtilization(float) - Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. The default is 0.8. Valid range is [0.0, 1.0].
cdn_policy: pulumi.Output[dict] = None¶Cloud CDN configuration for this BackendService. Structure is documented below.
cacheKeyPolicy(dict) - The CacheKeyPolicy for this CdnPolicy. Structure is documented below.includeHost(bool) - If true requests to different hosts will be cached separately.includeProtocol(bool) - If true, http and https requests will be cached separately.includeQueryString(bool) - If true, include query string parameters in the cache key according to query_string_whitelist and query_string_blacklist. If neither is set, the entire query string will be included. If false, the query string will be excluded from the cache key entirely.queryStringBlacklists(list) - Names of query string parameters to exclude in cache keys. All other parameters will be included. Either specify query_string_whitelist or query_string_blacklist, not both. ‘&’ and ‘=’ will be percent encoded and not treated as delimiters.queryStringWhitelists(list) - Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify query_string_whitelist or query_string_blacklist, not both. ‘&’ and ‘=’ will be percent encoded and not treated as delimiters.
signedUrlCacheMaxAgeSec(float) - Maximum number of seconds the response to a signed URL request will be considered fresh, defaults to 1hr (3600s). After this time period, the response will be revalidated before being served. When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a “Cache-Control: public, max-age=[TTL]” header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.
circuit_breakers: pulumi.Output[dict] = None¶Settings controlling the volume of connections to a backend service. This field is applicable only when the load_balancing_scheme is set to INTERNAL_SELF_MANAGED. Structure is documented below.
connectTimeout(dict) - The timeout for new network connections to hosts. Structure is documented below.nanos(float) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(float) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
maxConnections(float) - The maximum number of connections to the backend cluster. Defaults to 1024.maxPendingRequests(float) - The maximum number of pending requests to the backend cluster. Defaults to 1024.maxRequests(float) - The maximum number of parallel requests to the backend cluster. Defaults to 1024.maxRequestsPerConnection(float) - Maximum requests for a single backend connection. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive.maxRetries(float) - The maximum number of parallel retries to the backend cluster. Defaults to 3.
connection_draining_timeout_sec: pulumi.Output[float] = None¶Time for which instance will be drained (not accept new connections, but still work to finish started).
consistent_hash: pulumi.Output[dict] = None¶Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field only applies if the load_balancing_scheme is set to INTERNAL_SELF_MANAGED. This field is only applicable when locality_lb_policy is set to MAGLEV or RING_HASH. Structure is documented below.
httpCookie(dict) - Hash is based on HTTP Cookie. This field describes a HTTP cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity is set to HTTP_COOKIE. Structure is documented below.name(str) - Name of the cookie.path(str) - Path to set for the cookie.ttl(dict) - Lifetime of the cookie. Structure is documented below.nanos(float) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(float) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
httpHeaderName(str) - The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER_FIELD.minimumRingSize(float) - The minimum number of virtual nodes to use for the hash ring. Larger ring sizes result in more granular load distributions. If the number of hosts in the load balancing pool is larger than the ring size, each host will be assigned a single virtual node. Defaults to 1024.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
custom_request_headers: pulumi.Output[list] = None¶Headers that the HTTP/S load balancer should add to proxied requests.
description: pulumi.Output[str] = None¶An optional description of this resource. Provide this property when you create the resource.
enable_cdn: pulumi.Output[bool] = None¶If true, enable Cloud CDN for this BackendService.
fingerprint: pulumi.Output[str] = None¶Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking.
health_checks: pulumi.Output[str] = None¶The set of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified, and a health check is required. For internal load balancing, a URL to a HealthCheck resource must be specified instead.
iap: pulumi.Output[dict] = None¶Settings for enabling Cloud Identity Aware Proxy Structure is documented below.
oauth2ClientId(str) - OAuth2 Client ID for IAPoauth2ClientSecret(str) - OAuth2 Client Secret for IAP Note: This property is sensitive and will not be displayed in the plan.oauth2ClientSecretSha256(str) - - OAuth2 Client Secret SHA-256 for IAP Note: This property is sensitive and will not be displayed in the plan.
load_balancing_scheme: pulumi.Output[str] = None¶Indicates whether the backend service will be used with internal or external load balancing. A backend service created for one type of load balancing cannot be used with the other.
locality_lb_policy: pulumi.Output[str] = None¶The load balancing algorithm used within the scope of the locality. The possible values are - ROUND_ROBIN - This is a simple policy in which each healthy backend is selected in round robin order. LEAST_REQUEST - An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. RING_HASH - The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. RANDOM - The load balancer selects a random healthy host. ORIGINAL_DESTINATION - Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. MAGLEV - used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, refer to https://ai.google/research/pubs/pub44824 This field is applicable only when the load_balancing_scheme is set to INTERNAL_SELF_MANAGED.
log_config: pulumi.Output[dict] = None¶This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver. Structure is documented below.
enable(bool) - Whether to enable logging for the load balancer traffic served by this backend service.sampleRate(float) - This field can only be specified if logging is enabled for this backend service. The value of the field must be in [0, 1]. This configures the sampling rate of requests to the load balancer where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0.
name: pulumi.Output[str] = None¶Name of the cookie.
outlier_detection: pulumi.Output[dict] = None¶Settings controlling eviction of unhealthy hosts from the load balancing pool. This field is applicable only when the load_balancing_scheme is set to INTERNAL_SELF_MANAGED. Structure is documented below.
baseEjectionTime(dict) - The base time that a host is ejected for. The real time is equal to the base time multiplied by the number of times the host has been ejected. Defaults to 30000ms or 30s. Structure is documented below.nanos(float) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(float) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
consecutiveErrors(float) - Number of errors before a host is ejected from the connection pool. When the backend host is accessed over HTTP, a 5xx return code qualifies as an error. Defaults to 5.consecutiveGatewayFailure(float) - The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 5.enforcingConsecutiveErrors(float) - The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.enforcingConsecutiveGatewayFailure(float) - The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0.enforcingSuccessRate(float) - The percentage chance that a host will be actually ejected when an outlier status is detected through success rate statistics. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.interval(dict) - Time interval between ejection sweep analysis. This can result in both new ejections as well as hosts being returned to service. Defaults to 10 seconds. Structure is documented below.nanos(float) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(float) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
maxEjectionPercent(float) - Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 10%.successRateMinimumHosts(float) - The number of hosts in a cluster that must have enough request volume to detect success rate outliers. If the number of hosts is less than this setting, outlier detection via success rate statistics is not performed for any host in the cluster. Defaults to 5.successRateRequestVolume(float) - The minimum number of total requests that must be collected in one interval (as defined by the interval duration above) to include this host in success rate based outlier detection. If the volume is lower than this setting, outlier detection via success rate statistics is not performed for that host. Defaults to 100.successRateStdevFactor(float) - This factor is used to determine the ejection threshold for success rate outlier ejection. The ejection threshold is the difference between the mean success rate, and the product of this factor and the standard deviation of the mean success rate: mean - (stdev * success_rate_stdev_factor). This factor is divided by a thousand to get a double. That is, if the desired factor is 1.9, the runtime value should be 1900. Defaults to 1900.
port_name: pulumi.Output[str] = None¶Name of backend port. The same name should appear in the instance groups referenced by this service. Required when the load balancing scheme is EXTERNAL.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
protocol: pulumi.Output[str] = None¶The protocol this BackendService uses to communicate with backends. The default is HTTP. NOTE: HTTP2 is only valid for beta HTTP/2 load balancer types and may result in errors if used with the GA API.
security_policy: pulumi.Output[str] = None¶The security policy associated with this backend service.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
session_affinity: pulumi.Output[str] = None¶Type of session affinity to use. The default is NONE. Session affinity is not applicable if the protocol is UDP.
timeout_sec: pulumi.Output[float] = None¶How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds. Valid range is [1, 86400].
- static
get(resource_name, id, opts=None, affinity_cookie_ttl_sec=None, backends=None, cdn_policy=None, circuit_breakers=None, connection_draining_timeout_sec=None, consistent_hash=None, creation_timestamp=None, custom_request_headers=None, description=None, enable_cdn=None, fingerprint=None, health_checks=None, iap=None, load_balancing_scheme=None, locality_lb_policy=None, log_config=None, name=None, outlier_detection=None, port_name=None, project=None, protocol=None, security_policy=None, self_link=None, session_affinity=None, timeout_sec=None)¶ Get an existing BackendService resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
affinity_cookie_ttl_sec (pulumi.Input[float]) – Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day. When the load balancing scheme is INTERNAL, this field is not used.
backends (pulumi.Input[list]) – The set of backends that serve this BackendService. Structure is documented below.
cdn_policy (pulumi.Input[dict]) – Cloud CDN configuration for this BackendService. Structure is documented below.
circuit_breakers (pulumi.Input[dict]) – Settings controlling the volume of connections to a backend service. This field is applicable only when the load_balancing_scheme is set to INTERNAL_SELF_MANAGED. Structure is documented below.
connection_draining_timeout_sec (pulumi.Input[float]) – Time for which instance will be drained (not accept new connections, but still work to finish started).
consistent_hash (pulumi.Input[dict]) – Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field only applies if the load_balancing_scheme is set to INTERNAL_SELF_MANAGED. This field is only applicable when locality_lb_policy is set to MAGLEV or RING_HASH. Structure is documented below.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
custom_request_headers (pulumi.Input[list]) – Headers that the HTTP/S load balancer should add to proxied requests.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource.
enable_cdn (pulumi.Input[bool]) – If true, enable Cloud CDN for this BackendService.
fingerprint (pulumi.Input[str]) – Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking.
health_checks (pulumi.Input[str]) – The set of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified, and a health check is required. For internal load balancing, a URL to a HealthCheck resource must be specified instead.
iap (pulumi.Input[dict]) – Settings for enabling Cloud Identity Aware Proxy Structure is documented below.
load_balancing_scheme (pulumi.Input[str]) – Indicates whether the backend service will be used with internal or external load balancing. A backend service created for one type of load balancing cannot be used with the other.
locality_lb_policy (pulumi.Input[str]) – The load balancing algorithm used within the scope of the locality. The possible values are - ROUND_ROBIN - This is a simple policy in which each healthy backend is selected in round robin order. LEAST_REQUEST - An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. RING_HASH - The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. RANDOM - The load balancer selects a random healthy host. ORIGINAL_DESTINATION - Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. MAGLEV - used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, refer to https://ai.google/research/pubs/pub44824 This field is applicable only when the load_balancing_scheme is set to INTERNAL_SELF_MANAGED.
log_config (pulumi.Input[dict]) – This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver. Structure is documented below.
name (pulumi.Input[str]) – Name of the cookie.
outlier_detection (pulumi.Input[dict]) – Settings controlling eviction of unhealthy hosts from the load balancing pool. This field is applicable only when the load_balancing_scheme is set to INTERNAL_SELF_MANAGED. Structure is documented below.
port_name (pulumi.Input[str]) – Name of backend port. The same name should appear in the instance groups referenced by this service. Required when the load balancing scheme is EXTERNAL.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
protocol (pulumi.Input[str]) – The protocol this BackendService uses to communicate with backends. The default is HTTP. NOTE: HTTP2 is only valid for beta HTTP/2 load balancer types and may result in errors if used with the GA API.
security_policy (pulumi.Input[str]) – The security policy associated with this backend service.
self_link (pulumi.Input[str]) – The URI of the created resource.
session_affinity (pulumi.Input[str]) – Type of session affinity to use. The default is NONE. Session affinity is not applicable if the protocol is UDP.
timeout_sec (pulumi.Input[float]) – How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds. Valid range is [1, 86400].
The backends object supports the following:
balancingMode(pulumi.Input[str]) - Specifies the balancing mode for this backend. For global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP/SSL).capacityScaler(pulumi.Input[float]) - A multiplier applied to the group’s maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). Default value is 1, which means the group will serve up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available Capacity. Valid range is [0.0,1.0].description(pulumi.Input[str]) - An optional description of this resource. Provide this property when you create the resource.group(pulumi.Input[str]) - The fully-qualified URL of an Instance Group or Network Endpoint Group resource. In case of instance group this defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource. For Network Endpoint Groups this defines list of endpoints. All endpoints of Network Endpoint Group must be hosted on instances located in the same zone as the Network Endpoint Group. Backend services cannot mix Instance Group and Network Endpoint Group backends. Note that you must specify an Instance Group or Network Endpoint Group resource using the fully-qualified URL, rather than a partial URL.maxConnections(pulumi.Input[float]) - The maximum number of connections to the backend cluster. Defaults to 1024.maxConnectionsPerEndpoint(pulumi.Input[float]) - The max number of simultaneous connections that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint must be set.maxConnectionsPerInstance(pulumi.Input[float]) - The max number of simultaneous connections that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.maxRate(pulumi.Input[float]) - The max requests per second (RPS) of the group. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. For RATE mode, either maxRate or one of maxRatePerInstance or maxRatePerEndpoint, as appropriate for group type, must be set.maxRatePerEndpoint(pulumi.Input[float]) - The max requests per second (RPS) that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint must be set.maxRatePerInstance(pulumi.Input[float]) - The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.maxUtilization(pulumi.Input[float]) - Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. The default is 0.8. Valid range is [0.0, 1.0].
The cdn_policy object supports the following:
cacheKeyPolicy(pulumi.Input[dict]) - The CacheKeyPolicy for this CdnPolicy. Structure is documented below.includeHost(pulumi.Input[bool]) - If true requests to different hosts will be cached separately.includeProtocol(pulumi.Input[bool]) - If true, http and https requests will be cached separately.includeQueryString(pulumi.Input[bool]) - If true, include query string parameters in the cache key according to query_string_whitelist and query_string_blacklist. If neither is set, the entire query string will be included. If false, the query string will be excluded from the cache key entirely.queryStringBlacklists(pulumi.Input[list]) - Names of query string parameters to exclude in cache keys. All other parameters will be included. Either specify query_string_whitelist or query_string_blacklist, not both. ‘&’ and ‘=’ will be percent encoded and not treated as delimiters.queryStringWhitelists(pulumi.Input[list]) - Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify query_string_whitelist or query_string_blacklist, not both. ‘&’ and ‘=’ will be percent encoded and not treated as delimiters.
signedUrlCacheMaxAgeSec(pulumi.Input[float]) - Maximum number of seconds the response to a signed URL request will be considered fresh, defaults to 1hr (3600s). After this time period, the response will be revalidated before being served. When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a “Cache-Control: public, max-age=[TTL]” header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.
The circuit_breakers object supports the following:
connectTimeout(pulumi.Input[dict]) - The timeout for new network connections to hosts. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[float]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
maxConnections(pulumi.Input[float]) - The maximum number of connections to the backend cluster. Defaults to 1024.maxPendingRequests(pulumi.Input[float]) - The maximum number of pending requests to the backend cluster. Defaults to 1024.maxRequests(pulumi.Input[float]) - The maximum number of parallel requests to the backend cluster. Defaults to 1024.maxRequestsPerConnection(pulumi.Input[float]) - Maximum requests for a single backend connection. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive.maxRetries(pulumi.Input[float]) - The maximum number of parallel retries to the backend cluster. Defaults to 3.
The consistent_hash object supports the following:
httpCookie(pulumi.Input[dict]) - Hash is based on HTTP Cookie. This field describes a HTTP cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity is set to HTTP_COOKIE. Structure is documented below.name(pulumi.Input[str]) - Name of the cookie.path(pulumi.Input[str]) - Path to set for the cookie.ttl(pulumi.Input[dict]) - Lifetime of the cookie. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[float]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
httpHeaderName(pulumi.Input[str]) - The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER_FIELD.minimumRingSize(pulumi.Input[float]) - The minimum number of virtual nodes to use for the hash ring. Larger ring sizes result in more granular load distributions. If the number of hosts in the load balancing pool is larger than the ring size, each host will be assigned a single virtual node. Defaults to 1024.
The iap object supports the following:
oauth2ClientId(pulumi.Input[str]) - OAuth2 Client ID for IAPoauth2ClientSecret(pulumi.Input[str]) - OAuth2 Client Secret for IAP Note: This property is sensitive and will not be displayed in the plan.oauth2ClientSecretSha256(pulumi.Input[str]) - - OAuth2 Client Secret SHA-256 for IAP Note: This property is sensitive and will not be displayed in the plan.
The log_config object supports the following:
enable(pulumi.Input[bool]) - Whether to enable logging for the load balancer traffic served by this backend service.sampleRate(pulumi.Input[float]) - This field can only be specified if logging is enabled for this backend service. The value of the field must be in [0, 1]. This configures the sampling rate of requests to the load balancer where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0.
The outlier_detection object supports the following:
baseEjectionTime(pulumi.Input[dict]) - The base time that a host is ejected for. The real time is equal to the base time multiplied by the number of times the host has been ejected. Defaults to 30000ms or 30s. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[float]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
consecutiveErrors(pulumi.Input[float]) - Number of errors before a host is ejected from the connection pool. When the backend host is accessed over HTTP, a 5xx return code qualifies as an error. Defaults to 5.consecutiveGatewayFailure(pulumi.Input[float]) - The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 5.enforcingConsecutiveErrors(pulumi.Input[float]) - The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.enforcingConsecutiveGatewayFailure(pulumi.Input[float]) - The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0.enforcingSuccessRate(pulumi.Input[float]) - The percentage chance that a host will be actually ejected when an outlier status is detected through success rate statistics. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.interval(pulumi.Input[dict]) - Time interval between ejection sweep analysis. This can result in both new ejections as well as hosts being returned to service. Defaults to 10 seconds. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[float]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
maxEjectionPercent(pulumi.Input[float]) - Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 10%.successRateMinimumHosts(pulumi.Input[float]) - The number of hosts in a cluster that must have enough request volume to detect success rate outliers. If the number of hosts is less than this setting, outlier detection via success rate statistics is not performed for any host in the cluster. Defaults to 5.successRateRequestVolume(pulumi.Input[float]) - The minimum number of total requests that must be collected in one interval (as defined by the interval duration above) to include this host in success rate based outlier detection. If the volume is lower than this setting, outlier detection via success rate statistics is not performed for that host. Defaults to 100.successRateStdevFactor(pulumi.Input[float]) - This factor is used to determine the ejection threshold for success rate outlier ejection. The ejection threshold is the difference between the mean success rate, and the product of this factor and the standard deviation of the mean success rate: mean - (stdev * success_rate_stdev_factor). This factor is divided by a thousand to get a double. That is, if the desired factor is 1.9, the runtime value should be 1900. Defaults to 1900.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.BackendServiceSignedUrlKey(resource_name, opts=None, backend_service=None, key_value=None, name=None, project=None, __props__=None, __name__=None, __opts__=None)¶ A key for signing Cloud CDN signed URLs for Backend Services.
To get more information about BackendServiceSignedUrlKey, see:
How-to Guides
Warning: All arguments including
key_valuewill be stored in the raw state as plain-text.import pulumi import pulumi_gcp as gcp webserver = gcp.compute.InstanceTemplate("webserver", machine_type="n1-standard-1", network_interface=[{ "network": "default", }], disk=[{ "sourceImage": "debian-cloud/debian-9", "autoDelete": True, "boot": True, }]) webservers = gcp.compute.InstanceGroupManager("webservers", version=[{ "instanceTemplate": webserver.id, "name": "primary", }], base_instance_name="webserver", zone="us-central1-f", target_size=1) default = gcp.compute.HttpHealthCheck("default", request_path="/", check_interval_sec=1, timeout_sec=1) example_backend = gcp.compute.BackendService("exampleBackend", description="Our company website", port_name="http", protocol="HTTP", timeout_sec=10, enable_cdn=True, backend=[{ "group": webservers.instance_group, }], health_checks=[default.id]) backend_key = gcp.compute.BackendServiceSignedUrlKey("backendKey", key_value="pPsVemX8GM46QVeezid6Rw==", backend_service=example_backend.name)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
backend_service (pulumi.Input[str]) – The backend service this signed URL key belongs.
key_value (pulumi.Input[str]) – 128-bit key value used for signing the URL. The key value must be a valid RFC 4648 Section 5 base64url encoded string. Note: This property is sensitive and will not be displayed in the plan.
name (pulumi.Input[str]) – Name of the signed URL key.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
backend_service: pulumi.Output[str] = None¶The backend service this signed URL key belongs.
key_value: pulumi.Output[str] = None¶128-bit key value used for signing the URL. The key value must be a valid RFC 4648 Section 5 base64url encoded string. Note: This property is sensitive and will not be displayed in the plan.
name: pulumi.Output[str] = None¶Name of the signed URL key.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- static
get(resource_name, id, opts=None, backend_service=None, key_value=None, name=None, project=None)¶ Get an existing BackendServiceSignedUrlKey resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
backend_service (pulumi.Input[str]) – The backend service this signed URL key belongs.
key_value (pulumi.Input[str]) – 128-bit key value used for signing the URL. The key value must be a valid RFC 4648 Section 5 base64url encoded string. Note: This property is sensitive and will not be displayed in the plan.
name (pulumi.Input[str]) – Name of the signed URL key.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.Disk(resource_name, opts=None, description=None, disk_encryption_key=None, image=None, labels=None, name=None, physical_block_size_bytes=None, project=None, resource_policies=None, size=None, snapshot=None, source_image_encryption_key=None, source_snapshot_encryption_key=None, type=None, zone=None, __props__=None, __name__=None, __opts__=None)¶ Persistent disks are durable storage devices that function similarly to the physical disks in a desktop or a server. Compute Engine manages the hardware behind these devices to ensure data redundancy and optimize performance for you. Persistent disks are available as either standard hard disk drives (HDD) or solid-state drives (SSD).
Persistent disks are located independently from your virtual machine instances, so you can detach or move persistent disks to keep your data even after you delete your instances. Persistent disk performance scales automatically with size, so you can resize your existing persistent disks or add more persistent disks to an instance to meet your performance and storage space requirements.
Add a persistent disk to your instance when you need reliable and affordable storage with consistent performance characteristics.
To get more information about Disk, see:
How-to Guides
Warning: All arguments including
disk_encryption_key.raw_keywill be stored in the raw state as plain-text. Read more about secrets in state.import pulumi import pulumi_gcp as gcp default = gcp.compute.Disk("default", image="debian-8-jessie-v20170523", labels={ "environment": "dev", }, physical_block_size_bytes=4096, type="pd-ssd", zone="us-central1-a")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource.
disk_encryption_key (pulumi.Input[dict]) – Encrypts the disk using a customer-supplied encryption key. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. Structure is documented below.
image (pulumi.Input[str]) – The image from which to initialize this disk. This can be one of: the image’s
self_link,projects/{project}/global/images/{image},projects/{project}/global/images/family/{family},global/images/{image},global/images/family/{family},family/{family},{project}/{family},{project}/{image},{family}, or{image}. If referred by family, the images names must include the family name. If they don’t, use the compute.Image data source. For instance, the imagecentos-6-v20180104includes its family namecentos-6. These images can be referred by family name here.labels (pulumi.Input[dict]) – Labels to apply to this disk. A list of key->value pairs.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.physical_block_size_bytes (pulumi.Input[float]) – Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller’s project.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
resource_policies (pulumi.Input[list]) – Resource policies applied to this disk for automatic snapshot creations. ~>NOTE This value does not support updating the resource policy, as resource policies can not be updated more than one at a time. Use ‘google_compute_disk_resource_policy_attachment’ to allow for updating the resource policy attached to the disk.
size (pulumi.Input[float]) – Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the
imageorsnapshotparameter, or specify it alone to create an empty persistent disk. If you specify this field along withimageorsnapshot, the value must not be less than the size of the image or the size of the snapshot.snapshot (pulumi.Input[str]) – The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. If the snapshot is in another project than this disk, you must supply a full URL. For example, the following are valid values:
* `https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot` * `projects/project/global/snapshots/snapshot` * `global/snapshots/snapshot` * `snapshot`
- Parameters
source_image_encryption_key (pulumi.Input[dict]) – The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. Structure is documented below.
source_snapshot_encryption_key (pulumi.Input[dict]) – The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. Structure is documented below.
type (pulumi.Input[str]) – URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk.
zone (pulumi.Input[str]) – A reference to the zone where the disk resides.
The disk_encryption_key object supports the following:
kmsKeySelfLink(pulumi.Input[str]) - The self link of the encryption key used to encrypt the disk. Also called KmsKeyName in the cloud console. Your project’s Compute Engine System service account (service-{{PROJECT_NUMBER}}@compute-system.iam.gserviceaccount.com) must haveroles/cloudkms.cryptoKeyEncrypterDecrypterto use this feature. See https://cloud.google.com/compute/docs/disks/customer-managed-encryption#encrypt_a_new_persistent_disk_with_your_own_keysrawKey(pulumi.Input[str]) - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.sha256(pulumi.Input[str]) - - The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
The source_image_encryption_key object supports the following:
kmsKeySelfLink(pulumi.Input[str]) - The self link of the encryption key used to encrypt the disk. Also called KmsKeyName in the cloud console. Your project’s Compute Engine System service account (service-{{PROJECT_NUMBER}}@compute-system.iam.gserviceaccount.com) must haveroles/cloudkms.cryptoKeyEncrypterDecrypterto use this feature. See https://cloud.google.com/compute/docs/disks/customer-managed-encryption#encrypt_a_new_persistent_disk_with_your_own_keysrawKey(pulumi.Input[str]) - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.sha256(pulumi.Input[str]) - - The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
The source_snapshot_encryption_key object supports the following:
kmsKeySelfLink(pulumi.Input[str]) - The self link of the encryption key used to encrypt the disk. Also called KmsKeyName in the cloud console. Your project’s Compute Engine System service account (service-{{PROJECT_NUMBER}}@compute-system.iam.gserviceaccount.com) must haveroles/cloudkms.cryptoKeyEncrypterDecrypterto use this feature. See https://cloud.google.com/compute/docs/disks/customer-managed-encryption#encrypt_a_new_persistent_disk_with_your_own_keysrawKey(pulumi.Input[str]) - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.sha256(pulumi.Input[str]) - - The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional description of this resource. Provide this property when you create the resource.
disk_encryption_key: pulumi.Output[dict] = None¶Encrypts the disk using a customer-supplied encryption key. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. Structure is documented below.
kmsKeySelfLink(str) - The self link of the encryption key used to encrypt the disk. Also called KmsKeyName in the cloud console. Your project’s Compute Engine System service account (service-{{PROJECT_NUMBER}}@compute-system.iam.gserviceaccount.com) must haveroles/cloudkms.cryptoKeyEncrypterDecrypterto use this feature. See https://cloud.google.com/compute/docs/disks/customer-managed-encryption#encrypt_a_new_persistent_disk_with_your_own_keysrawKey(str) - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.sha256(str) - - The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
image: pulumi.Output[str] = None¶The image from which to initialize this disk. This can be one of: the image’s
self_link,projects/{project}/global/images/{image},projects/{project}/global/images/family/{family},global/images/{image},global/images/family/{family},family/{family},{project}/{family},{project}/{image},{family}, or{image}. If referred by family, the images names must include the family name. If they don’t, use the compute.Image data source. For instance, the imagecentos-6-v20180104includes its family namecentos-6. These images can be referred by family name here.
label_fingerprint: pulumi.Output[str] = None¶The fingerprint used for optimistic locking of this resource. Used internally during updates.
labels: pulumi.Output[dict] = None¶Labels to apply to this disk. A list of key->value pairs.
last_attach_timestamp: pulumi.Output[str] = None¶Last attach timestamp in RFC3339 text format.
last_detach_timestamp: pulumi.Output[str] = None¶Last detach timestamp in RFC3339 text format.
name: pulumi.Output[str] = None¶Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
physical_block_size_bytes: pulumi.Output[float] = None¶Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller’s project.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
resource_policies: pulumi.Output[list] = None¶Resource policies applied to this disk for automatic snapshot creations. ~>NOTE This value does not support updating the resource policy, as resource policies can not be updated more than one at a time. Use ‘google_compute_disk_resource_policy_attachment’ to allow for updating the resource policy attached to the disk.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
size: pulumi.Output[float] = None¶Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the
imageorsnapshotparameter, or specify it alone to create an empty persistent disk. If you specify this field along withimageorsnapshot, the value must not be less than the size of the image or the size of the snapshot.
snapshot: pulumi.Output[str] = None¶The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. If the snapshot is in another project than this disk, you must supply a full URL. For example, the following are valid values:
https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshotprojects/project/global/snapshots/snapshotglobal/snapshots/snapshotsnapshot
source_image_encryption_key: pulumi.Output[dict] = None¶The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. Structure is documented below.
kmsKeySelfLink(str) - The self link of the encryption key used to encrypt the disk. Also called KmsKeyName in the cloud console. Your project’s Compute Engine System service account (service-{{PROJECT_NUMBER}}@compute-system.iam.gserviceaccount.com) must haveroles/cloudkms.cryptoKeyEncrypterDecrypterto use this feature. See https://cloud.google.com/compute/docs/disks/customer-managed-encryption#encrypt_a_new_persistent_disk_with_your_own_keysrawKey(str) - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.sha256(str) - - The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
source_image_id: pulumi.Output[str] = None¶The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used.
source_snapshot_encryption_key: pulumi.Output[dict] = None¶The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. Structure is documented below.
kmsKeySelfLink(str) - The self link of the encryption key used to encrypt the disk. Also called KmsKeyName in the cloud console. Your project’s Compute Engine System service account (service-{{PROJECT_NUMBER}}@compute-system.iam.gserviceaccount.com) must haveroles/cloudkms.cryptoKeyEncrypterDecrypterto use this feature. See https://cloud.google.com/compute/docs/disks/customer-managed-encryption#encrypt_a_new_persistent_disk_with_your_own_keysrawKey(str) - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.sha256(str) - - The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
source_snapshot_id: pulumi.Output[str] = None¶The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used.
type: pulumi.Output[str] = None¶URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk.
users: pulumi.Output[list] = None¶Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
zone: pulumi.Output[str] = None¶A reference to the zone where the disk resides.
- static
get(resource_name, id, opts=None, creation_timestamp=None, description=None, disk_encryption_key=None, image=None, label_fingerprint=None, labels=None, last_attach_timestamp=None, last_detach_timestamp=None, name=None, physical_block_size_bytes=None, project=None, resource_policies=None, self_link=None, size=None, snapshot=None, source_image_encryption_key=None, source_image_id=None, source_snapshot_encryption_key=None, source_snapshot_id=None, type=None, users=None, zone=None)¶ Get an existing Disk resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource.
disk_encryption_key (pulumi.Input[dict]) – Encrypts the disk using a customer-supplied encryption key. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. Structure is documented below.
image (pulumi.Input[str]) –
The image from which to initialize this disk. This can be one of: the image’s
self_link,projects/{project}/global/images/{image},projects/{project}/global/images/family/{family},global/images/{image},global/images/family/{family},family/{family},{project}/{family},{project}/{image},{family}, or{image}. If referred by family, the images names must include the family name. If they don’t, use the compute.Image data source. For instance, the imagecentos-6-v20180104includes its family namecentos-6. These images can be referred by family name here.label_fingerprint (pulumi.Input[str]) – The fingerprint used for optimistic locking of this resource. Used internally during updates.
labels (pulumi.Input[dict]) – Labels to apply to this disk. A list of key->value pairs.
last_attach_timestamp (pulumi.Input[str]) – Last attach timestamp in RFC3339 text format.
last_detach_timestamp (pulumi.Input[str]) – Last detach timestamp in RFC3339 text format.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.physical_block_size_bytes (pulumi.Input[float]) – Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller’s project.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
resource_policies (pulumi.Input[list]) –
Resource policies applied to this disk for automatic snapshot creations. ~>NOTE This value does not support updating the resource policy, as resource policies can not be updated more than one at a time. Use ‘google_compute_disk_resource_policy_attachment’ to allow for updating the resource policy attached to the disk.
self_link (pulumi.Input[str]) – The URI of the created resource.
size (pulumi.Input[float]) – Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the
imageorsnapshotparameter, or specify it alone to create an empty persistent disk. If you specify this field along withimageorsnapshot, the value must not be less than the size of the image or the size of the snapshot.snapshot (pulumi.Input[str]) – The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. If the snapshot is in another project than this disk, you must supply a full URL. For example, the following are valid values:
* `https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot` * `projects/project/global/snapshots/snapshot` * `global/snapshots/snapshot` * `snapshot`
- Parameters
source_image_encryption_key (pulumi.Input[dict]) – The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. Structure is documented below.
source_image_id (pulumi.Input[str]) – The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used.
source_snapshot_encryption_key (pulumi.Input[dict]) – The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. Structure is documented below.
source_snapshot_id (pulumi.Input[str]) – The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used.
type (pulumi.Input[str]) – URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk.
users (pulumi.Input[list]) – Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
zone (pulumi.Input[str]) – A reference to the zone where the disk resides.
The disk_encryption_key object supports the following:
kmsKeySelfLink(pulumi.Input[str]) - The self link of the encryption key used to encrypt the disk. Also called KmsKeyName in the cloud console. Your project’s Compute Engine System service account (service-{{PROJECT_NUMBER}}@compute-system.iam.gserviceaccount.com) must haveroles/cloudkms.cryptoKeyEncrypterDecrypterto use this feature. See https://cloud.google.com/compute/docs/disks/customer-managed-encryption#encrypt_a_new_persistent_disk_with_your_own_keysrawKey(pulumi.Input[str]) - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.sha256(pulumi.Input[str]) - - The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
The source_image_encryption_key object supports the following:
kmsKeySelfLink(pulumi.Input[str]) - The self link of the encryption key used to encrypt the disk. Also called KmsKeyName in the cloud console. Your project’s Compute Engine System service account (service-{{PROJECT_NUMBER}}@compute-system.iam.gserviceaccount.com) must haveroles/cloudkms.cryptoKeyEncrypterDecrypterto use this feature. See https://cloud.google.com/compute/docs/disks/customer-managed-encryption#encrypt_a_new_persistent_disk_with_your_own_keysrawKey(pulumi.Input[str]) - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.sha256(pulumi.Input[str]) - - The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
The source_snapshot_encryption_key object supports the following:
kmsKeySelfLink(pulumi.Input[str]) - The self link of the encryption key used to encrypt the disk. Also called KmsKeyName in the cloud console. Your project’s Compute Engine System service account (service-{{PROJECT_NUMBER}}@compute-system.iam.gserviceaccount.com) must haveroles/cloudkms.cryptoKeyEncrypterDecrypterto use this feature. See https://cloud.google.com/compute/docs/disks/customer-managed-encryption#encrypt_a_new_persistent_disk_with_your_own_keysrawKey(pulumi.Input[str]) - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.sha256(pulumi.Input[str]) - - The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.DiskResourcePolicyAttachment(resource_name, opts=None, disk=None, name=None, project=None, zone=None, __props__=None, __name__=None, __opts__=None)¶ Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.
Note: This resource does not support regional disks (
compute.RegionDisk). For regional disks, please refer to thecompute.RegionDiskResourcePolicyAttachmentresource.import pulumi import pulumi_gcp as gcp my_image = gcp.compute.get_image(family="debian-9", project="debian-cloud") ssd = gcp.compute.Disk("ssd", image=my_image.self_link, size=50, type="pd-ssd", zone="us-central1-a") attachment = gcp.compute.DiskResourcePolicyAttachment("attachment", disk=ssd.name, zone="us-central1-a") policy = gcp.compute.ResourcePolicy("policy", region="us-central1", snapshot_schedule_policy={ "schedule": { "daily_schedule": { "daysInCycle": 1, "startTime": "04:00", }, }, })
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
disk (pulumi.Input[str]) – The name of the disk in which the resource policies are attached to.
name (pulumi.Input[str]) – The resource policy to be attached to the disk for scheduling snapshot creation. Do not specify the self link.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
zone (pulumi.Input[str]) – A reference to the zone where the disk resides.
disk: pulumi.Output[str] = None¶The name of the disk in which the resource policies are attached to.
name: pulumi.Output[str] = None¶The resource policy to be attached to the disk for scheduling snapshot creation. Do not specify the self link.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
zone: pulumi.Output[str] = None¶A reference to the zone where the disk resides.
- static
get(resource_name, id, opts=None, disk=None, name=None, project=None, zone=None)¶ Get an existing DiskResourcePolicyAttachment resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
disk (pulumi.Input[str]) – The name of the disk in which the resource policies are attached to.
name (pulumi.Input[str]) – The resource policy to be attached to the disk for scheduling snapshot creation. Do not specify the self link.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
zone (pulumi.Input[str]) – A reference to the zone where the disk resides.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.ExternalVpnGateway(resource_name, opts=None, description=None, interfaces=None, name=None, project=None, redundancy_type=None, __props__=None, __name__=None, __opts__=None)¶ Represents a VPN gateway managed outside of GCP.
To get more information about ExternalVpnGateway, see:
import pulumi import pulumi_gcp as gcp network = gcp.compute.Network("network", routing_mode="GLOBAL", auto_create_subnetworks=False) ha_gateway = gcp.compute.HaVpnGateway("haGateway", region="us-central1", network=network.id) external_gateway = gcp.compute.ExternalVpnGateway("externalGateway", redundancy_type="SINGLE_IP_INTERNALLY_REDUNDANT", description="An externally managed VPN gateway", interface=[{ "id": 0, "ip_address": "8.8.8.8", }]) network_subnet1 = gcp.compute.Subnetwork("networkSubnet1", ip_cidr_range="10.0.1.0/24", region="us-central1", network=network.id) network_subnet2 = gcp.compute.Subnetwork("networkSubnet2", ip_cidr_range="10.0.2.0/24", region="us-west1", network=network.id) router1 = gcp.compute.Router("router1", network=network.name, bgp={ "asn": 64514, }) tunnel1 = gcp.compute.VPNTunnel("tunnel1", region="us-central1", vpn_gateway=ha_gateway.id, peer_external_gateway=external_gateway.id, peer_external_gateway_interface=0, shared_secret="a secret message", router=router1.id, vpn_gateway_interface=0) tunnel2 = gcp.compute.VPNTunnel("tunnel2", region="us-central1", vpn_gateway=ha_gateway.id, peer_external_gateway=external_gateway.id, peer_external_gateway_interface=0, shared_secret="a secret message", router=router1.id.apply(lambda id: f" {id}"), vpn_gateway_interface=1) router1_interface1 = gcp.compute.RouterInterface("router1Interface1", router=router1.name, region="us-central1", ip_range="169.254.0.1/30", vpn_tunnel=tunnel1.name) router1_peer1 = gcp.compute.RouterPeer("router1Peer1", router=router1.name, region="us-central1", peer_ip_address="169.254.0.2", peer_asn=64515, advertised_route_priority=100, interface=router1_interface1.name) router1_interface2 = gcp.compute.RouterInterface("router1Interface2", router=router1.name, region="us-central1", ip_range="169.254.1.1/30", vpn_tunnel=tunnel2.name) router1_peer2 = gcp.compute.RouterPeer("router1Peer2", router=router1.name, region="us-central1", peer_ip_address="169.254.1.2", peer_asn=64515, advertised_route_priority=100, interface=router1_interface2.name)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – An optional description of this resource.
interfaces (pulumi.Input[list]) – A list of interfaces on this external VPN gateway. Structure is documented below.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
redundancy_type (pulumi.Input[str]) – Indicates the redundancy type of this external VPN gateway
The interfaces object supports the following:
id(pulumi.Input[float]) - The numberic ID for this interface. Allowed values are based on the redundancy type of this external VPN gateway0 - SINGLE_IP_INTERNALLY_REDUNDANT0, 1 - TWO_IPS_REDUNDANCY0, 1, 2, 3 - FOUR_IPS_REDUNDANCY
ip_address(pulumi.Input[str]) - IP address of the interface in the external VPN gateway. Only IPv4 is supported. This IP address can be either from your on-premise gateway or another Cloud provider’s VPN gateway, it cannot be an IP address from Google Compute Engine.
description: pulumi.Output[str] = None¶An optional description of this resource.
interfaces: pulumi.Output[list] = None¶A list of interfaces on this external VPN gateway. Structure is documented below.
id(float) - The numberic ID for this interface. Allowed values are based on the redundancy type of this external VPN gateway0 - SINGLE_IP_INTERNALLY_REDUNDANT0, 1 - TWO_IPS_REDUNDANCY0, 1, 2, 3 - FOUR_IPS_REDUNDANCY
ip_address(str) - IP address of the interface in the external VPN gateway. Only IPv4 is supported. This IP address can be either from your on-premise gateway or another Cloud provider’s VPN gateway, it cannot be an IP address from Google Compute Engine.
name: pulumi.Output[str] = None¶Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
redundancy_type: pulumi.Output[str] = None¶Indicates the redundancy type of this external VPN gateway
self_link: pulumi.Output[str] = None¶The URI of the created resource.
- static
get(resource_name, id, opts=None, description=None, interfaces=None, name=None, project=None, redundancy_type=None, self_link=None)¶ Get an existing ExternalVpnGateway resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – An optional description of this resource.
interfaces (pulumi.Input[list]) – A list of interfaces on this external VPN gateway. Structure is documented below.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
redundancy_type (pulumi.Input[str]) – Indicates the redundancy type of this external VPN gateway
self_link (pulumi.Input[str]) – The URI of the created resource.
The interfaces object supports the following:
id(pulumi.Input[float]) - The numberic ID for this interface. Allowed values are based on the redundancy type of this external VPN gateway0 - SINGLE_IP_INTERNALLY_REDUNDANT0, 1 - TWO_IPS_REDUNDANCY0, 1, 2, 3 - FOUR_IPS_REDUNDANCY
ip_address(pulumi.Input[str]) - IP address of the interface in the external VPN gateway. Only IPv4 is supported. This IP address can be either from your on-premise gateway or another Cloud provider’s VPN gateway, it cannot be an IP address from Google Compute Engine.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.Firewall(resource_name, opts=None, allows=None, denies=None, description=None, destination_ranges=None, direction=None, disabled=None, enable_logging=None, name=None, network=None, priority=None, project=None, source_ranges=None, source_service_accounts=None, source_tags=None, target_service_accounts=None, target_tags=None, __props__=None, __name__=None, __opts__=None)¶ Each network has its own firewall controlling access to and from the instances.
All traffic to instances, even from other instances, is blocked by the firewall unless firewall rules are created to allow it.
The default network has automatically created firewall rules that are shown in default firewall rules. No manually created network has automatically created firewall rules except for a default “allow” rule for outgoing traffic and a default “deny” for incoming traffic. For all networks except the default network, you must create any firewall rules you need.
To get more information about Firewall, see:
How-to Guides
import pulumi import pulumi_gcp as gcp default_network = gcp.compute.Network("defaultNetwork") default_firewall = gcp.compute.Firewall("defaultFirewall", network=default_network.name, allow=[ { "protocol": "icmp", }, { "protocol": "tcp", "ports": [ "80", "8080", "1000-2000", ], }, ], source_tags=["web"])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
allows (pulumi.Input[list]) – The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. Structure is documented below.
denies (pulumi.Input[list]) – The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. Structure is documented below.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource.
destination_ranges (pulumi.Input[list]) – If destination ranges are specified, the firewall will apply only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.
direction (pulumi.Input[str]) – Direction of traffic to which this firewall applies; default is INGRESS. Note: For INGRESS traffic, it is NOT supported to specify destinationRanges; For EGRESS traffic, it is NOT supported to specify sourceRanges OR sourceTags.
disabled (pulumi.Input[bool]) – Denotes whether the firewall rule is disabled, i.e not applied to the network it is associated with. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.
enable_logging (pulumi.Input[bool]) – This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.network (pulumi.Input[str]) – The name or self_link of the network to attach this firewall to.
priority (pulumi.Input[float]) – Priority for this rule. This is an integer between 0 and 65535, both inclusive. When not specified, the value assumed is 1000. Relative priorities determine precedence of conflicting rules. Lower value of priority implies higher precedence (eg, a rule with priority 0 has higher precedence than a rule with priority 1). DENY rules take precedence over ALLOW rules having equal priority.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
source_ranges (pulumi.Input[list]) – If source ranges are specified, the firewall will apply only to traffic that has source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported.
source_service_accounts (pulumi.Input[list]) – If source service accounts are specified, the firewall will apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance’s external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both properties for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.
source_tags (pulumi.Input[list]) – If source tags are specified, the firewall will apply only to traffic with source IP that belongs to a tag listed in source tags. Source tags cannot be used to control traffic to an instance’s external IP address. Because tags are associated with an instance, not an IP address. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply.
target_service_accounts (pulumi.Input[list]) – A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network.
target_tags (pulumi.Input[list]) – A list of instance tags indicating sets of instances located in the network that may make network connections as specified in allowed[]. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
The allows object supports the following:
ports(pulumi.Input[list]) - An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: [“22”], [“80”,”443”], and [“12345-12349”].protocol(pulumi.Input[str]) - The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, sctp, ipip), or the IP protocol number.
The denies object supports the following:
ports(pulumi.Input[list]) - An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: [“22”], [“80”,”443”], and [“12345-12349”].protocol(pulumi.Input[str]) - The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, sctp, ipip), or the IP protocol number.
allows: pulumi.Output[list] = None¶The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. Structure is documented below.
ports(list) - An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: [“22”], [“80”,”443”], and [“12345-12349”].protocol(str) - The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, sctp, ipip), or the IP protocol number.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
denies: pulumi.Output[list] = None¶The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. Structure is documented below.
ports(list) - An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: [“22”], [“80”,”443”], and [“12345-12349”].protocol(str) - The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, sctp, ipip), or the IP protocol number.
description: pulumi.Output[str] = None¶An optional description of this resource. Provide this property when you create the resource.
destination_ranges: pulumi.Output[list] = None¶If destination ranges are specified, the firewall will apply only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.
direction: pulumi.Output[str] = None¶Direction of traffic to which this firewall applies; default is INGRESS. Note: For INGRESS traffic, it is NOT supported to specify destinationRanges; For EGRESS traffic, it is NOT supported to specify sourceRanges OR sourceTags.
disabled: pulumi.Output[bool] = None¶Denotes whether the firewall rule is disabled, i.e not applied to the network it is associated with. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.
enable_logging: pulumi.Output[bool] = None¶This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver.
name: pulumi.Output[str] = None¶Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
network: pulumi.Output[str] = None¶The name or self_link of the network to attach this firewall to.
priority: pulumi.Output[float] = None¶Priority for this rule. This is an integer between 0 and 65535, both inclusive. When not specified, the value assumed is 1000. Relative priorities determine precedence of conflicting rules. Lower value of priority implies higher precedence (eg, a rule with priority 0 has higher precedence than a rule with priority 1). DENY rules take precedence over ALLOW rules having equal priority.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
source_ranges: pulumi.Output[list] = None¶If source ranges are specified, the firewall will apply only to traffic that has source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported.
source_service_accounts: pulumi.Output[list] = None¶If source service accounts are specified, the firewall will apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance’s external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both properties for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.
If source tags are specified, the firewall will apply only to traffic with source IP that belongs to a tag listed in source tags. Source tags cannot be used to control traffic to an instance’s external IP address. Because tags are associated with an instance, not an IP address. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply.
target_service_accounts: pulumi.Output[list] = None¶A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network.
A list of instance tags indicating sets of instances located in the network that may make network connections as specified in allowed[]. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
- static
get(resource_name, id, opts=None, allows=None, creation_timestamp=None, denies=None, description=None, destination_ranges=None, direction=None, disabled=None, enable_logging=None, name=None, network=None, priority=None, project=None, self_link=None, source_ranges=None, source_service_accounts=None, source_tags=None, target_service_accounts=None, target_tags=None)¶ Get an existing Firewall resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
allows (pulumi.Input[list]) – The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. Structure is documented below.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
denies (pulumi.Input[list]) – The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. Structure is documented below.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource.
destination_ranges (pulumi.Input[list]) – If destination ranges are specified, the firewall will apply only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.
direction (pulumi.Input[str]) – Direction of traffic to which this firewall applies; default is INGRESS. Note: For INGRESS traffic, it is NOT supported to specify destinationRanges; For EGRESS traffic, it is NOT supported to specify sourceRanges OR sourceTags.
disabled (pulumi.Input[bool]) – Denotes whether the firewall rule is disabled, i.e not applied to the network it is associated with. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.
enable_logging (pulumi.Input[bool]) – This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.network (pulumi.Input[str]) – The name or self_link of the network to attach this firewall to.
priority (pulumi.Input[float]) – Priority for this rule. This is an integer between 0 and 65535, both inclusive. When not specified, the value assumed is 1000. Relative priorities determine precedence of conflicting rules. Lower value of priority implies higher precedence (eg, a rule with priority 0 has higher precedence than a rule with priority 1). DENY rules take precedence over ALLOW rules having equal priority.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link (pulumi.Input[str]) – The URI of the created resource.
source_ranges (pulumi.Input[list]) – If source ranges are specified, the firewall will apply only to traffic that has source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported.
source_service_accounts (pulumi.Input[list]) – If source service accounts are specified, the firewall will apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance’s external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both properties for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.
source_tags (pulumi.Input[list]) – If source tags are specified, the firewall will apply only to traffic with source IP that belongs to a tag listed in source tags. Source tags cannot be used to control traffic to an instance’s external IP address. Because tags are associated with an instance, not an IP address. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply.
target_service_accounts (pulumi.Input[list]) – A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network.
target_tags (pulumi.Input[list]) – A list of instance tags indicating sets of instances located in the network that may make network connections as specified in allowed[]. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
The allows object supports the following:
ports(pulumi.Input[list]) - An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: [“22”], [“80”,”443”], and [“12345-12349”].protocol(pulumi.Input[str]) - The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, sctp, ipip), or the IP protocol number.
The denies object supports the following:
ports(pulumi.Input[list]) - An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: [“22”], [“80”,”443”], and [“12345-12349”].protocol(pulumi.Input[str]) - The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, sctp, ipip), or the IP protocol number.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.ForwardingRule(resource_name, opts=None, all_ports=None, allow_global_access=None, backend_service=None, description=None, ip_address=None, ip_protocol=None, is_mirroring_collector=None, labels=None, load_balancing_scheme=None, name=None, network=None, network_tier=None, port_range=None, ports=None, project=None, region=None, service_label=None, subnetwork=None, target=None, __props__=None, __name__=None, __opts__=None)¶ A ForwardingRule resource. A ForwardingRule resource specifies which pool of target virtual machines to forward a packet to if it matches the given [IPAddress, IPProtocol, portRange] tuple.
To get more information about ForwardingRule, see:
How-to Guides
import pulumi import pulumi_gcp as gcp hc = gcp.compute.HealthCheck("hc", check_interval_sec=1, timeout_sec=1, tcp_health_check={ "port": "80", }) backend = gcp.compute.RegionBackendService("backend", region="us-central1", health_checks=[hc.id]) default_network = gcp.compute.Network("defaultNetwork", auto_create_subnetworks=False) default_subnetwork = gcp.compute.Subnetwork("defaultSubnetwork", ip_cidr_range="10.0.0.0/16", region="us-central1", network=default_network.id) # Forwarding rule for Internal Load Balancing default_forwarding_rule = gcp.compute.ForwardingRule("defaultForwardingRule", region="us-central1", load_balancing_scheme="INTERNAL", backend_service=backend.id, all_ports=True, allow_global_access=True, network=default_network.name, subnetwork=default_subnetwork.name)
import pulumi import pulumi_gcp as gcp default_target_pool = gcp.compute.TargetPool("defaultTargetPool") default_forwarding_rule = gcp.compute.ForwardingRule("defaultForwardingRule", target=default_target_pool.id, port_range="80")
import pulumi import pulumi_gcp as gcp hc = gcp.compute.HealthCheck("hc", check_interval_sec=1, timeout_sec=1, tcp_health_check={ "port": "80", }) backend = gcp.compute.RegionBackendService("backend", region="us-central1", health_checks=[hc.id]) default_network = gcp.compute.Network("defaultNetwork", auto_create_subnetworks=False) default_subnetwork = gcp.compute.Subnetwork("defaultSubnetwork", ip_cidr_range="10.0.0.0/16", region="us-central1", network=default_network.id) # Forwarding rule for Internal Load Balancing default_forwarding_rule = gcp.compute.ForwardingRule("defaultForwardingRule", region="us-central1", load_balancing_scheme="INTERNAL", backend_service=backend.id, all_ports=True, network=default_network.name, subnetwork=default_subnetwork.name)
import pulumi import pulumi_gcp as gcp debian_image = gcp.compute.get_image(family="debian-9", project="debian-cloud") default_network = gcp.compute.Network("defaultNetwork", auto_create_subnetworks=False, routing_mode="REGIONAL") default_subnetwork = gcp.compute.Subnetwork("defaultSubnetwork", ip_cidr_range="10.1.2.0/24", region="us-central1", network=default_network.id) instance_template = gcp.compute.InstanceTemplate("instanceTemplate", machine_type="n1-standard-1", network_interface=[{ "network": default_network.id, "subnetwork": default_subnetwork.id, }], disk=[{ "sourceImage": debian_image.self_link, "autoDelete": True, "boot": True, }], tags=[ "allow-ssh", "load-balanced-backend", ]) rigm = gcp.compute.RegionInstanceGroupManager("rigm", region="us-central1", version=[{ "instanceTemplate": instance_template.id, "name": "primary", }], base_instance_name="internal-glb", target_size=1) fw1 = gcp.compute.Firewall("fw1", network=default_network.id, source_ranges=["10.1.2.0/24"], allow=[ { "protocol": "tcp", }, { "protocol": "udp", }, { "protocol": "icmp", }, ], direction="INGRESS") fw2 = gcp.compute.Firewall("fw2", network=default_network.id, source_ranges=["0.0.0.0/0"], allow=[{ "protocol": "tcp", "ports": ["22"], }], target_tags=["allow-ssh"], direction="INGRESS") fw3 = gcp.compute.Firewall("fw3", network=default_network.id, source_ranges=[ "130.211.0.0/22", "35.191.0.0/16", ], allow=[{ "protocol": "tcp", }], target_tags=["load-balanced-backend"], direction="INGRESS") fw4 = gcp.compute.Firewall("fw4", network=default_network.id, source_ranges=["10.129.0.0/26"], target_tags=["load-balanced-backend"], allow=[ { "protocol": "tcp", "ports": ["80"], }, { "protocol": "tcp", "ports": ["443"], }, { "protocol": "tcp", "ports": ["8000"], }, ], direction="INGRESS") default_region_health_check = gcp.compute.RegionHealthCheck("defaultRegionHealthCheck", region="us-central1", http_health_check={ "portSpecification": "USE_SERVING_PORT", }) default_region_backend_service = gcp.compute.RegionBackendService("defaultRegionBackendService", load_balancing_scheme="INTERNAL_MANAGED", backend=[{ "group": rigm.instance_group, "balancingMode": "UTILIZATION", "capacityScaler": 1, }], region="us-central1", protocol="HTTP", timeout_sec=10, health_checks=[default_region_health_check.id]) default_region_url_map = gcp.compute.RegionUrlMap("defaultRegionUrlMap", region="us-central1", default_service=default_region_backend_service.id) default_region_target_http_proxy = gcp.compute.RegionTargetHttpProxy("defaultRegionTargetHttpProxy", region="us-central1", url_map=default_region_url_map.id) proxy = gcp.compute.Subnetwork("proxy", ip_cidr_range="10.129.0.0/26", region="us-central1", network=default_network.id, purpose="INTERNAL_HTTPS_LOAD_BALANCER", role="ACTIVE") # Forwarding rule for Internal Load Balancing default_forwarding_rule = gcp.compute.ForwardingRule("defaultForwardingRule", region="us-central1", ip_protocol="TCP", load_balancing_scheme="INTERNAL_MANAGED", port_range="80", target=default_region_target_http_proxy.id, network=default_network.id, subnetwork=default_subnetwork.id, network_tier="PREMIUM")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
all_ports (pulumi.Input[bool]) – For internal TCP/UDP load balancing (i.e. load balancing scheme is INTERNAL and protocol is TCP/UDP), set this to true to allow packets addressed to any ports to be forwarded to the backends configured with this forwarding rule. Used with backend service. Cannot be set if port or portRange are set.
allow_global_access (pulumi.Input[bool]) – If true, clients can access ILB from all regions. Otherwise only allows from the local region the ILB is located at.
backend_service (pulumi.Input[str]) – A BackendService to receive the matched traffic. This is used only for INTERNAL load balancing.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource.
ip_address (pulumi.Input[str]) – The IP address that this forwarding rule is serving on behalf of. Addresses are restricted based on the forwarding rule’s load balancing scheme (EXTERNAL or INTERNAL) and scope (global or regional). When the load balancing scheme is EXTERNAL, for global forwarding rules, the address must be a global IP, and for regional forwarding rules, the address must live in the same region as the forwarding rule. If this field is empty, an ephemeral IPv4 address from the same scope (global or regional) will be assigned. A regional forwarding rule supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6. When the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnet configured for the forwarding rule. By default, if this field is empty, an ephemeral internal IP address will be automatically allocated from the IP range of the subnet or network configured for this forwarding rule. An address must be specified by a literal IP address. > NOTE: While the API allows you to specify various resource paths for an address resource instead, this provider requires this to specifically be an IP address to avoid needing to fetching the IP address from resource paths on refresh or unnecessary diffs.
ip_protocol (pulumi.Input[str]) – The IP protocol to which this rule applies. When the load balancing scheme is INTERNAL, only TCP and UDP are valid.
is_mirroring_collector (pulumi.Input[bool]) – Indicates whether or not this load balancer can be used as a collector for packet mirroring. To prevent mirroring loops, instances behind this load balancer will not have their traffic mirrored even if a PacketMirroring rule applies to them. This can only be set to true for load balancers that have their loadBalancingScheme set to INTERNAL.
labels (pulumi.Input[dict]) – Labels to apply to this forwarding rule. A list of key->value pairs.
load_balancing_scheme (pulumi.Input[str]) – This signifies what the ForwardingRule will be used for and can be EXTERNAL, INTERNAL, or INTERNAL_MANAGED. EXTERNAL is used for Classic Cloud VPN gateways, protocol forwarding to VMs from an external IP address, and HTTP(S), SSL Proxy, TCP Proxy, and Network TCP/UDP load balancers. INTERNAL is used for protocol forwarding to VMs from an internal IP address, and internal TCP/UDP load balancers. INTERNAL_MANAGED is used for internal HTTP(S) load balancers.
name (pulumi.Input[str]) – Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.network (pulumi.Input[str]) – For internal load balancing, this field identifies the network that the load balanced IP should belong to for this Forwarding Rule. If this field is not specified, the default network will be used. This field is only used for INTERNAL load balancing.
network_tier (pulumi.Input[str]) – The networking tier used for configuring this address. If this field is not specified, it is assumed to be PREMIUM.
port_range (pulumi.Input[str]) – This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance. Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges. Some types of forwarding target have constraints on the acceptable ports:
* TargetHttpProxy: 80, 8080 * TargetHttpsProxy: 443 * TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 * TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 * TargetVpnGateway: 500, 4500
- Parameters
ports (pulumi.Input[list]) – This field is used along with the backend_service field for internal load balancing. When the load balancing scheme is INTERNAL, a single port or a comma separated list of ports can be configured. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule. You may specify a maximum of up to 5 ports.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – A reference to the region where the regional forwarding rule resides. This field is not applicable to global forwarding rules.
service_label (pulumi.Input[str]) – An optional prefix to the service name for this Forwarding Rule. If specified, will be the first label of the fully qualified service name. The label must be 1-63 characters long, and comply with RFC1035. Specifically, the label must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. This field is only used for INTERNAL load balancing.subnetwork (pulumi.Input[str]) – The subnetwork that the load balanced IP should belong to for this Forwarding Rule. This field is only used for INTERNAL load balancing. If the network specified is in auto subnet mode, this field is optional. However, if the network is in custom subnet mode, a subnetwork must be specified.
target (pulumi.Input[str]) – The URL of the target resource to receive the matched traffic. The target must live in the same region as the forwarding rule. The forwarded traffic must be of a type appropriate to the target object.
all_ports: pulumi.Output[bool] = None¶For internal TCP/UDP load balancing (i.e. load balancing scheme is INTERNAL and protocol is TCP/UDP), set this to true to allow packets addressed to any ports to be forwarded to the backends configured with this forwarding rule. Used with backend service. Cannot be set if port or portRange are set.
allow_global_access: pulumi.Output[bool] = None¶If true, clients can access ILB from all regions. Otherwise only allows from the local region the ILB is located at.
backend_service: pulumi.Output[str] = None¶A BackendService to receive the matched traffic. This is used only for INTERNAL load balancing.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional description of this resource. Provide this property when you create the resource.
ip_address: pulumi.Output[str] = None¶The IP address that this forwarding rule is serving on behalf of. Addresses are restricted based on the forwarding rule’s load balancing scheme (EXTERNAL or INTERNAL) and scope (global or regional). When the load balancing scheme is EXTERNAL, for global forwarding rules, the address must be a global IP, and for regional forwarding rules, the address must live in the same region as the forwarding rule. If this field is empty, an ephemeral IPv4 address from the same scope (global or regional) will be assigned. A regional forwarding rule supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6. When the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnet configured for the forwarding rule. By default, if this field is empty, an ephemeral internal IP address will be automatically allocated from the IP range of the subnet or network configured for this forwarding rule. An address must be specified by a literal IP address. > NOTE: While the API allows you to specify various resource paths for an address resource instead, this provider requires this to specifically be an IP address to avoid needing to fetching the IP address from resource paths on refresh or unnecessary diffs.
ip_protocol: pulumi.Output[str] = None¶The IP protocol to which this rule applies. When the load balancing scheme is INTERNAL, only TCP and UDP are valid.
is_mirroring_collector: pulumi.Output[bool] = None¶Indicates whether or not this load balancer can be used as a collector for packet mirroring. To prevent mirroring loops, instances behind this load balancer will not have their traffic mirrored even if a PacketMirroring rule applies to them. This can only be set to true for load balancers that have their loadBalancingScheme set to INTERNAL.
label_fingerprint: pulumi.Output[str] = None¶The fingerprint used for optimistic locking of this resource. Used internally during updates.
labels: pulumi.Output[dict] = None¶Labels to apply to this forwarding rule. A list of key->value pairs.
load_balancing_scheme: pulumi.Output[str] = None¶This signifies what the ForwardingRule will be used for and can be EXTERNAL, INTERNAL, or INTERNAL_MANAGED. EXTERNAL is used for Classic Cloud VPN gateways, protocol forwarding to VMs from an external IP address, and HTTP(S), SSL Proxy, TCP Proxy, and Network TCP/UDP load balancers. INTERNAL is used for protocol forwarding to VMs from an internal IP address, and internal TCP/UDP load balancers. INTERNAL_MANAGED is used for internal HTTP(S) load balancers.
name: pulumi.Output[str] = None¶Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
network: pulumi.Output[str] = None¶For internal load balancing, this field identifies the network that the load balanced IP should belong to for this Forwarding Rule. If this field is not specified, the default network will be used. This field is only used for INTERNAL load balancing.
network_tier: pulumi.Output[str] = None¶The networking tier used for configuring this address. If this field is not specified, it is assumed to be PREMIUM.
port_range: pulumi.Output[str] = None¶This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance. Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges. Some types of forwarding target have constraints on the acceptable ports:
TargetHttpProxy: 80, 8080
TargetHttpsProxy: 443
TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222
TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222
TargetVpnGateway: 500, 4500
ports: pulumi.Output[list] = None¶This field is used along with the backend_service field for internal load balancing. When the load balancing scheme is INTERNAL, a single port or a comma separated list of ports can be configured. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule. You may specify a maximum of up to 5 ports.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region: pulumi.Output[str] = None¶A reference to the region where the regional forwarding rule resides. This field is not applicable to global forwarding rules.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
service_label: pulumi.Output[str] = None¶An optional prefix to the service name for this Forwarding Rule. If specified, will be the first label of the fully qualified service name. The label must be 1-63 characters long, and comply with RFC1035. Specifically, the label must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. This field is only used for INTERNAL load balancing.
service_name: pulumi.Output[str] = None¶The internal fully qualified service name for this Forwarding Rule. This field is only used for INTERNAL load balancing.
subnetwork: pulumi.Output[str] = None¶The subnetwork that the load balanced IP should belong to for this Forwarding Rule. This field is only used for INTERNAL load balancing. If the network specified is in auto subnet mode, this field is optional. However, if the network is in custom subnet mode, a subnetwork must be specified.
target: pulumi.Output[str] = None¶The URL of the target resource to receive the matched traffic. The target must live in the same region as the forwarding rule. The forwarded traffic must be of a type appropriate to the target object.
- static
get(resource_name, id, opts=None, all_ports=None, allow_global_access=None, backend_service=None, creation_timestamp=None, description=None, ip_address=None, ip_protocol=None, is_mirroring_collector=None, label_fingerprint=None, labels=None, load_balancing_scheme=None, name=None, network=None, network_tier=None, port_range=None, ports=None, project=None, region=None, self_link=None, service_label=None, service_name=None, subnetwork=None, target=None)¶ Get an existing ForwardingRule resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
all_ports (pulumi.Input[bool]) – For internal TCP/UDP load balancing (i.e. load balancing scheme is INTERNAL and protocol is TCP/UDP), set this to true to allow packets addressed to any ports to be forwarded to the backends configured with this forwarding rule. Used with backend service. Cannot be set if port or portRange are set.
allow_global_access (pulumi.Input[bool]) – If true, clients can access ILB from all regions. Otherwise only allows from the local region the ILB is located at.
backend_service (pulumi.Input[str]) – A BackendService to receive the matched traffic. This is used only for INTERNAL load balancing.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource.
ip_address (pulumi.Input[str]) – The IP address that this forwarding rule is serving on behalf of. Addresses are restricted based on the forwarding rule’s load balancing scheme (EXTERNAL or INTERNAL) and scope (global or regional). When the load balancing scheme is EXTERNAL, for global forwarding rules, the address must be a global IP, and for regional forwarding rules, the address must live in the same region as the forwarding rule. If this field is empty, an ephemeral IPv4 address from the same scope (global or regional) will be assigned. A regional forwarding rule supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6. When the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnet configured for the forwarding rule. By default, if this field is empty, an ephemeral internal IP address will be automatically allocated from the IP range of the subnet or network configured for this forwarding rule. An address must be specified by a literal IP address. > NOTE: While the API allows you to specify various resource paths for an address resource instead, this provider requires this to specifically be an IP address to avoid needing to fetching the IP address from resource paths on refresh or unnecessary diffs.
ip_protocol (pulumi.Input[str]) – The IP protocol to which this rule applies. When the load balancing scheme is INTERNAL, only TCP and UDP are valid.
is_mirroring_collector (pulumi.Input[bool]) – Indicates whether or not this load balancer can be used as a collector for packet mirroring. To prevent mirroring loops, instances behind this load balancer will not have their traffic mirrored even if a PacketMirroring rule applies to them. This can only be set to true for load balancers that have their loadBalancingScheme set to INTERNAL.
label_fingerprint (pulumi.Input[str]) – The fingerprint used for optimistic locking of this resource. Used internally during updates.
labels (pulumi.Input[dict]) – Labels to apply to this forwarding rule. A list of key->value pairs.
load_balancing_scheme (pulumi.Input[str]) – This signifies what the ForwardingRule will be used for and can be EXTERNAL, INTERNAL, or INTERNAL_MANAGED. EXTERNAL is used for Classic Cloud VPN gateways, protocol forwarding to VMs from an external IP address, and HTTP(S), SSL Proxy, TCP Proxy, and Network TCP/UDP load balancers. INTERNAL is used for protocol forwarding to VMs from an internal IP address, and internal TCP/UDP load balancers. INTERNAL_MANAGED is used for internal HTTP(S) load balancers.
name (pulumi.Input[str]) – Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.network (pulumi.Input[str]) – For internal load balancing, this field identifies the network that the load balanced IP should belong to for this Forwarding Rule. If this field is not specified, the default network will be used. This field is only used for INTERNAL load balancing.
network_tier (pulumi.Input[str]) – The networking tier used for configuring this address. If this field is not specified, it is assumed to be PREMIUM.
port_range (pulumi.Input[str]) – This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance. Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges. Some types of forwarding target have constraints on the acceptable ports:
* TargetHttpProxy: 80, 8080 * TargetHttpsProxy: 443 * TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 * TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 * TargetVpnGateway: 500, 4500
- Parameters
ports (pulumi.Input[list]) – This field is used along with the backend_service field for internal load balancing. When the load balancing scheme is INTERNAL, a single port or a comma separated list of ports can be configured. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule. You may specify a maximum of up to 5 ports.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – A reference to the region where the regional forwarding rule resides. This field is not applicable to global forwarding rules.
self_link (pulumi.Input[str]) – The URI of the created resource.
service_label (pulumi.Input[str]) – An optional prefix to the service name for this Forwarding Rule. If specified, will be the first label of the fully qualified service name. The label must be 1-63 characters long, and comply with RFC1035. Specifically, the label must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. This field is only used for INTERNAL load balancing.service_name (pulumi.Input[str]) – The internal fully qualified service name for this Forwarding Rule. This field is only used for INTERNAL load balancing.
subnetwork (pulumi.Input[str]) – The subnetwork that the load balanced IP should belong to for this Forwarding Rule. This field is only used for INTERNAL load balancing. If the network specified is in auto subnet mode, this field is optional. However, if the network is in custom subnet mode, a subnetwork must be specified.
target (pulumi.Input[str]) – The URL of the target resource to receive the matched traffic. The target must live in the same region as the forwarding rule. The forwarded traffic must be of a type appropriate to the target object.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.GetAddressResult(address=None, id=None, name=None, project=None, region=None, self_link=None, status=None)¶ A collection of values returned by getAddress.
address= None¶The IP of the created resource.
id= None¶The provider-assigned unique ID for this managed resource.
self_link= None¶The URI of the created resource.
status= None¶Indicates if the address is used. Possible values are: RESERVED or IN_USE.
- class
pulumi_gcp.compute.GetBackendBucketResult(bucket_name=None, cdn_policies=None, creation_timestamp=None, description=None, enable_cdn=None, id=None, name=None, project=None, self_link=None)¶ A collection of values returned by getBackendBucket.
bucket_name= None¶Cloud Storage bucket name.
cdn_policies= None¶Cloud CDN configuration for this Backend Bucket. Structure is documented below.
creation_timestamp= None¶Creation timestamp in RFC3339 text format.
description= None¶An optional textual description of the resource; provided by the client when the resource is created.
enable_cdn= None¶Whether Cloud CDN is enabled for this BackendBucket.
id= None¶The provider-assigned unique ID for this managed resource.
self_link= None¶The URI of the created resource.
- class
pulumi_gcp.compute.GetBackendServiceResult(affinity_cookie_ttl_sec=None, backends=None, cdn_policies=None, circuit_breakers=None, connection_draining_timeout_sec=None, consistent_hash=None, creation_timestamp=None, custom_request_headers=None, description=None, enable_cdn=None, fingerprint=None, health_checks=None, iaps=None, id=None, load_balancing_scheme=None, locality_lb_policy=None, log_configs=None, name=None, outlier_detections=None, port_name=None, project=None, protocol=None, security_policy=None, self_link=None, session_affinity=None, timeout_sec=None)¶ A collection of values returned by getBackendService.
backends= None¶The set of backends that serve this Backend Service.
connection_draining_timeout_sec= None¶Time for which instance will be drained (not accept new connections, but still work to finish started ones).
description= None¶Textual description for the Backend Service.
enable_cdn= None¶Whether or not Cloud CDN is enabled on the Backend Service.
fingerprint= None¶The fingerprint of the Backend Service.
health_checks= None¶The set of HTTP/HTTPS health checks used by the Backend Service.
id= None¶The provider-assigned unique ID for this managed resource.
port_name= None¶The name of a service that has been added to an instance group in this backend.
protocol= None¶The protocol for incoming requests.
self_link= None¶The URI of the Backend Service.
session_affinity= None¶The Backend Service session stickiness configuration.
timeout_sec= None¶The number of seconds to wait for a backend to respond to a request before considering the request failed.
- class
pulumi_gcp.compute.GetCertificateResult(certificate=None, certificate_id=None, creation_timestamp=None, description=None, id=None, name=None, name_prefix=None, private_key=None, project=None, self_link=None)¶ A collection of values returned by getCertificate.
id= None¶The provider-assigned unique ID for this managed resource.
- class
pulumi_gcp.compute.GetDefaultServiceAccountResult(display_name=None, email=None, id=None, name=None, project=None, unique_id=None)¶ A collection of values returned by getDefaultServiceAccount.
display_name= None¶The display name for the service account.
email= None¶Email address of the default service account used by VMs running in this project
id= None¶The provider-assigned unique ID for this managed resource.
name= None¶The fully-qualified name of the service account.
unique_id= None¶The unique id of the service account.
- class
pulumi_gcp.compute.GetForwardingRuleResult(backend_service=None, description=None, id=None, ip_address=None, ip_protocol=None, load_balancing_scheme=None, name=None, network=None, port_range=None, ports=None, project=None, region=None, self_link=None, subnetwork=None, target=None)¶ A collection of values returned by getForwardingRule.
backend_service= None¶Backend service, if this forwarding rule has one.
description= None¶Description of this forwarding rule.
id= None¶The provider-assigned unique ID for this managed resource.
ip_address= None¶IP address of this forwarding rule.
ip_protocol= None¶IP protocol of this forwarding rule.
load_balancing_scheme= None¶Type of load balancing of this forwarding rule.
network= None¶Network of this forwarding rule.
port_range= None¶Port range, if this forwarding rule has one.
ports= None¶List of ports to use for internal load balancing, if this forwarding rule has any.
region= None¶Region of this forwarding rule.
self_link= None¶The URI of the resource.
subnetwork= None¶Subnetwork of this forwarding rule.
target= None¶URL of the target pool, if this forwarding rule has one.
- class
pulumi_gcp.compute.GetGlobalAddressResult(address=None, id=None, name=None, project=None, self_link=None, status=None)¶ A collection of values returned by getGlobalAddress.
address= None¶The IP of the created resource.
id= None¶The provider-assigned unique ID for this managed resource.
self_link= None¶The URI of the created resource.
status= None¶Indicates if the address is used. Possible values are: RESERVED or IN_USE.
- class
pulumi_gcp.compute.GetImageResult(archive_size_bytes=None, creation_timestamp=None, description=None, disk_size_gb=None, family=None, id=None, image_encryption_key_sha256=None, image_id=None, label_fingerprint=None, labels=None, licenses=None, name=None, project=None, self_link=None, source_disk=None, source_disk_encryption_key_sha256=None, source_disk_id=None, source_image_id=None, status=None)¶ A collection of values returned by getImage.
archive_size_bytes= None¶The size of the image tar.gz archive stored in Google Cloud Storage in bytes.
creation_timestamp= None¶The creation timestamp in RFC3339 text format.
description= None¶An optional description of this image.
disk_size_gb= None¶The size of the image when restored onto a persistent disk in gigabytes.
family= None¶The family name of the image.
id= None¶The provider-assigned unique ID for this managed resource.
image_encryption_key_sha256= None¶The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this image.
image_id= None¶The unique identifier for the image.
label_fingerprint= None¶A fingerprint for the labels being applied to this image.
labels= None¶A map of labels applied to this image.
licenses= None¶A list of applicable license URI.
name= None¶The name of the image.
self_link= None¶The URI of the image.
source_disk= None¶The URL of the source disk used to create this image.
source_disk_encryption_key_sha256= None¶The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this image.
source_disk_id= None¶The ID value of the disk used to create this image.
source_image_id= None¶The ID value of the image used to create this image.
status= None¶The status of the image. Possible values are FAILED, PENDING, or READY.
- class
pulumi_gcp.compute.GetInstanceGroupResult(description=None, id=None, instances=None, name=None, named_ports=None, network=None, project=None, self_link=None, size=None, zone=None)¶ A collection of values returned by getInstanceGroup.
description= None¶Textual description of the instance group.
id= None¶The provider-assigned unique ID for this managed resource.
instances= None¶List of instances in the group.
named_ports= None¶List of named ports in the group.
network= None¶The URL of the network the instance group is in.
self_link= None¶The URI of the resource.
size= None¶The number of instances in the group.
- class
pulumi_gcp.compute.GetInstanceResult(allow_stopping_for_update=None, attached_disks=None, boot_disks=None, can_ip_forward=None, cpu_platform=None, current_status=None, deletion_protection=None, description=None, desired_status=None, enable_display=None, guest_accelerators=None, hostname=None, id=None, instance_id=None, label_fingerprint=None, labels=None, machine_type=None, metadata=None, metadata_fingerprint=None, metadata_startup_script=None, min_cpu_platform=None, name=None, network_interfaces=None, project=None, resource_policies=None, schedulings=None, scratch_disks=None, self_link=None, service_accounts=None, shielded_instance_configs=None, tags=None, tags_fingerprint=None, zone=None)¶ A collection of values returned by getInstance.
attached_disks= None¶List of disks attached to the instance. Structure is documented below.
boot_disks= None¶The boot disk for the instance. Structure is documented below.
can_ip_forward= None¶Whether sending and receiving of packets with non-matching source or destination IPs is allowed.
cpu_platform= None¶The CPU platform used by this instance.
deletion_protection= None¶Whether deletion protection is enabled on this instance.
description= None¶A brief description of the resource.
guest_accelerators= None¶List of the type and count of accelerator cards attached to the instance. Structure is documented below.
id= None¶The provider-assigned unique ID for this managed resource.
instance_id= None¶The server-assigned unique identifier of this instance.
label_fingerprint= None¶The unique fingerprint of the labels.
labels= None¶A set of key/value label pairs assigned to the instance.
machine_type= None¶The machine type to create.
metadata= None¶Metadata key/value pairs made available within the instance.
metadata_fingerprint= None¶The unique fingerprint of the metadata.
min_cpu_platform= None¶The minimum CPU platform specified for the VM instance.
network_interfaces= None¶The networks attached to the instance. Structure is documented below.
schedulings= None¶The scheduling strategy being used by the instance.
scratch_disks= None¶The scratch disks attached to the instance. Structure is documented below.
self_link= None¶The URI of the created resource.
service_accounts= None¶The service account to attach to the instance. Structure is documented below.
shielded_instance_configs= None¶The shielded vm config being used by the instance. Structure is documented below.
The list of tags attached to the instance.
The unique fingerprint of the tags.
- class
pulumi_gcp.compute.GetInstanceSerialPortResult(contents=None, id=None, instance=None, port=None, project=None, zone=None)¶ A collection of values returned by getInstanceSerialPort.
contents= None¶The output of the serial port. Serial port output is available only when the VM instance is running, and logs are limited to the most recent 1 MB of output per port.
id= None¶The provider-assigned unique ID for this managed resource.
- class
pulumi_gcp.compute.GetLBIPRangesResult(http_ssl_tcp_internals=None, id=None, networks=None)¶ A collection of values returned by getLBIPRanges.
http_ssl_tcp_internals= None¶The IP ranges used for health checks when HTTP(S), SSL proxy, TCP proxy, and Internal load balancing is used
id= None¶The provider-assigned unique ID for this managed resource.
networks= None¶The IP ranges used for health checks when Network load balancing is used
- class
pulumi_gcp.compute.GetNetblockIPRangesResult(cidr_blocks=None, cidr_blocks_ipv4s=None, cidr_blocks_ipv6s=None, id=None, range_type=None)¶ A collection of values returned by getNetblockIPRanges.
cidr_blocks= None¶Retrieve list of all CIDR blocks.
cidr_blocks_ipv4s= None¶Retrieve list of the IPv4 CIDR blocks
cidr_blocks_ipv6s= None¶Retrieve list of the IPv6 CIDR blocks, if available.
id= None¶The provider-assigned unique ID for this managed resource.
- class
pulumi_gcp.compute.GetNetworkEndpointGroupResult(default_port=None, description=None, id=None, name=None, network=None, network_endpoint_type=None, project=None, self_link=None, size=None, subnetwork=None, zone=None)¶ A collection of values returned by getNetworkEndpointGroup.
default_port= None¶The NEG default port.
description= None¶The NEG description.
id= None¶The provider-assigned unique ID for this managed resource.
network= None¶The network to which all network endpoints in the NEG belong.
network_endpoint_type= None¶Type of network endpoints in this network endpoint group.
size= None¶Number of network endpoints in the network endpoint group.
subnetwork= None¶subnetwork to which all network endpoints in the NEG belong.
- class
pulumi_gcp.compute.GetNetworkResult(description=None, gateway_ipv4=None, id=None, name=None, project=None, self_link=None, subnetworks_self_links=None)¶ A collection of values returned by getNetwork.
description= None¶Description of this network.
gateway_ipv4= None¶The IP address of the gateway.
id= None¶The provider-assigned unique ID for this managed resource.
self_link= None¶The URI of the resource.
subnetworks_self_links= None¶the list of subnetworks which belong to the network
- class
pulumi_gcp.compute.GetNodeTypesResult(id=None, names=None, project=None, zone=None)¶ A collection of values returned by getNodeTypes.
id= None¶The provider-assigned unique ID for this managed resource.
names= None¶A list of node types available in the given zone and project.
- class
pulumi_gcp.compute.GetRegionInstanceGroupResult(id=None, instances=None, name=None, project=None, region=None, self_link=None, size=None)¶ A collection of values returned by getRegionInstanceGroup.
id= None¶The provider-assigned unique ID for this managed resource.
instances= None¶List of instances in the group, as a list of resources, each containing:
name= None¶String port name
size= None¶The number of instances in the group.
- class
pulumi_gcp.compute.GetRegionsResult(id=None, names=None, project=None, status=None)¶ A collection of values returned by getRegions.
id= None¶The provider-assigned unique ID for this managed resource.
names= None¶A list of regions available in the given project
- class
pulumi_gcp.compute.GetResourcePolicyResult(description=None, id=None, name=None, project=None, region=None, self_link=None)¶ A collection of values returned by getResourcePolicy.
description= None¶Description of this Resource Policy.
id= None¶The provider-assigned unique ID for this managed resource.
self_link= None¶The URI of the resource.
- class
pulumi_gcp.compute.GetRouterResult(bgps=None, creation_timestamp=None, description=None, id=None, name=None, network=None, project=None, region=None, self_link=None)¶ A collection of values returned by getRouter.
id= None¶The provider-assigned unique ID for this managed resource.
- class
pulumi_gcp.compute.GetSSLPolicyResult(creation_timestamp=None, custom_features=None, description=None, enabled_features=None, fingerprint=None, id=None, min_tls_version=None, name=None, profile=None, project=None, self_link=None)¶ A collection of values returned by getSSLPolicy.
custom_features= None¶If the
profileisCUSTOM, these are the custom encryption ciphers supported by the profile. If theprofileis notCUSTOM, this attribute will be empty.
description= None¶Description of this SSL Policy.
enabled_features= None¶The set of enabled encryption ciphers as a result of the policy config
fingerprint= None¶Fingerprint of this resource.
id= None¶The provider-assigned unique ID for this managed resource.
min_tls_version= None¶The minimum supported TLS version of this policy.
profile= None¶The Google-curated or custom profile used by this policy.
self_link= None¶The URI of the created resource.
- class
pulumi_gcp.compute.GetSubnetworkResult(description=None, gateway_address=None, id=None, ip_cidr_range=None, name=None, network=None, private_ip_google_access=None, project=None, region=None, secondary_ip_ranges=None, self_link=None)¶ A collection of values returned by getSubnetwork.
description= None¶Description of this subnetwork.
gateway_address= None¶The IP address of the gateway.
id= None¶The provider-assigned unique ID for this managed resource.
ip_cidr_range= None¶The range of IP addresses belonging to this subnetwork secondary range.
network= None¶The network name or resource link to the parent network of this subnetwork.
private_ip_google_access= None¶Whether the VMs in this subnet can access Google services without assigned external IP addresses.
secondary_ip_ranges= None¶An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. Structure is documented below.
- class
pulumi_gcp.compute.GetVPNGatewayResult(description=None, id=None, name=None, network=None, project=None, region=None, self_link=None)¶ A collection of values returned by getVPNGateway.
description= None¶Description of this VPN gateway.
id= None¶The provider-assigned unique ID for this managed resource.
network= None¶The network of this VPN gateway.
region= None¶Region of this VPN gateway.
self_link= None¶The URI of the resource.
- class
pulumi_gcp.compute.GetZonesResult(id=None, names=None, project=None, region=None, status=None)¶ A collection of values returned by getZones.
id= None¶The provider-assigned unique ID for this managed resource.
names= None¶A list of zones available in the given region
- class
pulumi_gcp.compute.GlobalAddress(resource_name, opts=None, address=None, address_type=None, description=None, ip_version=None, labels=None, name=None, network=None, prefix_length=None, project=None, purpose=None, __props__=None, __name__=None, __opts__=None)¶ Represents a Global Address resource. Global addresses are used for HTTP(S) load balancing.
To get more information about GlobalAddress, see:
import pulumi import pulumi_gcp as gcp default = gcp.compute.GlobalAddress("default")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
address (pulumi.Input[str]) – The IP address or beginning of the address range represented by this resource. This can be supplied as an input to reserve a specific address or omitted to allow GCP to choose a valid one for you.
address_type (pulumi.Input[str]) – The type of the address to reserve.
* EXTERNAL indicates public/external single IP address. * INTERNAL indicates internal IP ranges belonging to some network.
- Parameters
description (pulumi.Input[str]) – An optional description of this resource.
ip_version (pulumi.Input[str]) – The IP Version that will be used by this address. The default value is
IPV4.labels (pulumi.Input[dict]) – Labels to apply to this address. A list of key->value pairs.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.network (pulumi.Input[str]) – The URL of the network in which to reserve the IP range. The IP range must be in RFC1918 space. The network cannot be deleted if there are any reserved IP ranges referring to it. This should only be set when using an Internal address.
prefix_length (pulumi.Input[float]) – The prefix length of the IP range. If not present, it means the address field is a single IP address. This field is not applicable to addresses with addressType=EXTERNAL.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
purpose (pulumi.Input[str]) – The purpose of the resource. For global internal addresses it can be
* VPC_PEERING - for peer networks This should only be set when using an Internal address.
address: pulumi.Output[str] = None¶The IP address or beginning of the address range represented by this resource. This can be supplied as an input to reserve a specific address or omitted to allow GCP to choose a valid one for you.
address_type: pulumi.Output[str] = None¶The type of the address to reserve.
EXTERNAL indicates public/external single IP address.
INTERNAL indicates internal IP ranges belonging to some network.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional description of this resource.
ip_version: pulumi.Output[str] = None¶The IP Version that will be used by this address. The default value is
IPV4.
label_fingerprint: pulumi.Output[str] = None¶The fingerprint used for optimistic locking of this resource. Used internally during updates.
labels: pulumi.Output[dict] = None¶Labels to apply to this address. A list of key->value pairs.
name: pulumi.Output[str] = None¶Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
network: pulumi.Output[str] = None¶The URL of the network in which to reserve the IP range. The IP range must be in RFC1918 space. The network cannot be deleted if there are any reserved IP ranges referring to it. This should only be set when using an Internal address.
prefix_length: pulumi.Output[float] = None¶The prefix length of the IP range. If not present, it means the address field is a single IP address. This field is not applicable to addresses with addressType=EXTERNAL.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
purpose: pulumi.Output[str] = None¶The purpose of the resource. For global internal addresses it can be
VPC_PEERING - for peer networks This should only be set when using an Internal address.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
- static
get(resource_name, id, opts=None, address=None, address_type=None, creation_timestamp=None, description=None, ip_version=None, label_fingerprint=None, labels=None, name=None, network=None, prefix_length=None, project=None, purpose=None, self_link=None)¶ Get an existing GlobalAddress resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
address (pulumi.Input[str]) – The IP address or beginning of the address range represented by this resource. This can be supplied as an input to reserve a specific address or omitted to allow GCP to choose a valid one for you.
address_type (pulumi.Input[str]) – The type of the address to reserve.
* EXTERNAL indicates public/external single IP address. * INTERNAL indicates internal IP ranges belonging to some network.
- Parameters
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional description of this resource.
ip_version (pulumi.Input[str]) – The IP Version that will be used by this address. The default value is
IPV4.label_fingerprint (pulumi.Input[str]) – The fingerprint used for optimistic locking of this resource. Used internally during updates.
labels (pulumi.Input[dict]) – Labels to apply to this address. A list of key->value pairs.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.network (pulumi.Input[str]) – The URL of the network in which to reserve the IP range. The IP range must be in RFC1918 space. The network cannot be deleted if there are any reserved IP ranges referring to it. This should only be set when using an Internal address.
prefix_length (pulumi.Input[float]) – The prefix length of the IP range. If not present, it means the address field is a single IP address. This field is not applicable to addresses with addressType=EXTERNAL.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
purpose (pulumi.Input[str]) – The purpose of the resource. For global internal addresses it can be
* VPC_PEERING - for peer networks This should only be set when using an Internal address.
- Parameters
self_link (pulumi.Input[str]) – The URI of the created resource.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.GlobalForwardingRule(resource_name, opts=None, description=None, ip_address=None, ip_protocol=None, ip_version=None, labels=None, load_balancing_scheme=None, metadata_filters=None, name=None, network=None, port_range=None, project=None, target=None, __props__=None, __name__=None, __opts__=None)¶ Represents a GlobalForwardingRule resource. Global forwarding rules are used to forward traffic to the correct load balancer for HTTP load balancing. Global forwarding rules can only be used for HTTP load balancing.
For more information, see https://cloud.google.com/compute/docs/load-balancing/http/
import pulumi import pulumi_gcp as gcp default_http_health_check = gcp.compute.HttpHealthCheck("defaultHttpHealthCheck", request_path="/", check_interval_sec=1, timeout_sec=1) default_backend_service = gcp.compute.BackendService("defaultBackendService", port_name="http", protocol="HTTP", timeout_sec=10, health_checks=[default_http_health_check.id]) default_url_map = gcp.compute.URLMap("defaultURLMap", description="a description", default_service=default_backend_service.id, host_rule=[{ "hosts": ["mysite.com"], "pathMatcher": "allpaths", }], path_matcher=[{ "name": "allpaths", "default_service": default_backend_service.id, "path_rule": [{ "paths": ["/*"], "service": default_backend_service.id, }], }]) default_target_http_proxy = gcp.compute.TargetHttpProxy("defaultTargetHttpProxy", description="a description", url_map=default_url_map.id) default_global_forwarding_rule = gcp.compute.GlobalForwardingRule("defaultGlobalForwardingRule", target=default_target_http_proxy.id, port_range="80")
import pulumi import pulumi_gcp as gcp debian_image = gcp.compute.get_image(family="debian-9", project="debian-cloud") instance_template = gcp.compute.InstanceTemplate("instanceTemplate", machine_type="n1-standard-1", network_interface=[{ "network": "default", }], disk=[{ "sourceImage": debian_image.self_link, "autoDelete": True, "boot": True, }]) igm = gcp.compute.InstanceGroupManager("igm", version=[{ "instanceTemplate": instance_template.id, "name": "primary", }], base_instance_name="internal-glb", zone="us-central1-f", target_size=1) default_health_check = gcp.compute.HealthCheck("defaultHealthCheck", check_interval_sec=1, timeout_sec=1, tcp_health_check={ "port": "80", }) default_backend_service = gcp.compute.BackendService("defaultBackendService", port_name="http", protocol="HTTP", timeout_sec=10, load_balancing_scheme="INTERNAL_SELF_MANAGED", backend=[{ "group": igm.instance_group, "balancingMode": "RATE", "capacityScaler": 0.4, "maxRatePerInstance": 50, }], health_checks=[default_health_check.id]) default_url_map = gcp.compute.URLMap("defaultURLMap", description="a description", default_service=default_backend_service.id, host_rule=[{ "hosts": ["mysite.com"], "pathMatcher": "allpaths", }], path_matcher=[{ "name": "allpaths", "default_service": default_backend_service.id, "path_rule": [{ "paths": ["/*"], "service": default_backend_service.id, }], }]) default_target_http_proxy = gcp.compute.TargetHttpProxy("defaultTargetHttpProxy", description="a description", url_map=default_url_map.id) default_global_forwarding_rule = gcp.compute.GlobalForwardingRule("defaultGlobalForwardingRule", target=default_target_http_proxy.id, port_range="80", load_balancing_scheme="INTERNAL_SELF_MANAGED", ip_address="0.0.0.0", metadata_filters=[{ "filterMatchCriteria": "MATCH_ANY", "filter_labels": [{ "name": "PLANET", "value": "MARS", }], }])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource.
ip_address (pulumi.Input[str]) – The IP address that this forwarding rule is serving on behalf of. Addresses are restricted based on the forwarding rule’s load balancing scheme (EXTERNAL or INTERNAL) and scope (global or regional). When the load balancing scheme is EXTERNAL, for global forwarding rules, the address must be a global IP, and for regional forwarding rules, the address must live in the same region as the forwarding rule. If this field is empty, an ephemeral IPv4 address from the same scope (global or regional) will be assigned. A regional forwarding rule supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6. When the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnet configured for the forwarding rule. By default, if this field is empty, an ephemeral internal IP address will be automatically allocated from the IP range of the subnet or network configured for this forwarding rule. An address must be specified by a literal IP address. > NOTE: While the API allows you to specify various resource paths for an address resource instead, this provider requires this to specifically be an IP address to avoid needing to fetching the IP address from resource paths on refresh or unnecessary diffs.
ip_protocol (pulumi.Input[str]) – The IP protocol to which this rule applies. When the load balancing scheme is INTERNAL_SELF_MANAGED, only TCP is valid.
ip_version (pulumi.Input[str]) – The IP Version that will be used by this global forwarding rule.
labels (pulumi.Input[dict]) – Labels to apply to this forwarding rule. A list of key->value pairs.
load_balancing_scheme (pulumi.Input[str]) – This signifies what the GlobalForwardingRule will be used for. The value of INTERNAL_SELF_MANAGED means that this will be used for Internal Global HTTP(S) LB. The value of EXTERNAL means that this will be used for External Global Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy) NOTE: Currently global forwarding rules cannot be used for INTERNAL load balancing.
metadata_filters (pulumi.Input[list]) – Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies. For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels in the provided metadata. metadataFilters specified here can be overridden by those specified in the UrlMap that this ForwardingRule references. metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED. Structure is documented below.
name (pulumi.Input[str]) – Name of the metadata label. The length must be between 1 and 1024 characters, inclusive.
network (pulumi.Input[str]) – This field is not used for external load balancing. For INTERNAL_SELF_MANAGED load balancing, this field identifies the network that the load balanced IP should belong to for this global forwarding rule. If this field is not specified, the default network will be used.
port_range (pulumi.Input[str]) – This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance. Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges. Some types of forwarding target have constraints on the acceptable ports:
* TargetHttpProxy: 80, 8080 * TargetHttpsProxy: 443 * TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 * TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 * TargetVpnGateway: 500, 4500
- Parameters
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
target (pulumi.Input[str]) – The URL of the target resource to receive the matched traffic. The forwarded traffic must be of a type appropriate to the target object. For INTERNAL_SELF_MANAGED load balancing, only HTTP and HTTPS targets are valid.
The metadata_filters object supports the following:
filterLabels(pulumi.Input[list]) - The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries. Structure is documented below.name(pulumi.Input[str]) - Name of the metadata label. The length must be between 1 and 1024 characters, inclusive.value(pulumi.Input[str]) - The value that the label must match. The value has a maximum length of 1024 characters.
filterMatchCriteria(pulumi.Input[str]) - Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match. MATCH_ANY - At least one of the filterLabels must have a matching label in the provided metadata. MATCH_ALL - All filterLabels must have matching labels in the provided metadata.
description: pulumi.Output[str] = None¶An optional description of this resource. Provide this property when you create the resource.
ip_address: pulumi.Output[str] = None¶The IP address that this forwarding rule is serving on behalf of. Addresses are restricted based on the forwarding rule’s load balancing scheme (EXTERNAL or INTERNAL) and scope (global or regional). When the load balancing scheme is EXTERNAL, for global forwarding rules, the address must be a global IP, and for regional forwarding rules, the address must live in the same region as the forwarding rule. If this field is empty, an ephemeral IPv4 address from the same scope (global or regional) will be assigned. A regional forwarding rule supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6. When the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnet configured for the forwarding rule. By default, if this field is empty, an ephemeral internal IP address will be automatically allocated from the IP range of the subnet or network configured for this forwarding rule. An address must be specified by a literal IP address. > NOTE: While the API allows you to specify various resource paths for an address resource instead, this provider requires this to specifically be an IP address to avoid needing to fetching the IP address from resource paths on refresh or unnecessary diffs.
ip_protocol: pulumi.Output[str] = None¶The IP protocol to which this rule applies. When the load balancing scheme is INTERNAL_SELF_MANAGED, only TCP is valid.
ip_version: pulumi.Output[str] = None¶The IP Version that will be used by this global forwarding rule.
label_fingerprint: pulumi.Output[str] = None¶The fingerprint used for optimistic locking of this resource. Used internally during updates.
labels: pulumi.Output[dict] = None¶Labels to apply to this forwarding rule. A list of key->value pairs.
load_balancing_scheme: pulumi.Output[str] = None¶This signifies what the GlobalForwardingRule will be used for. The value of INTERNAL_SELF_MANAGED means that this will be used for Internal Global HTTP(S) LB. The value of EXTERNAL means that this will be used for External Global Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy) NOTE: Currently global forwarding rules cannot be used for INTERNAL load balancing.
metadata_filters: pulumi.Output[list] = None¶Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies. For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels in the provided metadata. metadataFilters specified here can be overridden by those specified in the UrlMap that this ForwardingRule references. metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED. Structure is documented below.
filterLabels(list) - The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries. Structure is documented below.name(str) - Name of the metadata label. The length must be between 1 and 1024 characters, inclusive.value(str) - The value that the label must match. The value has a maximum length of 1024 characters.
filterMatchCriteria(str) - Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match. MATCH_ANY - At least one of the filterLabels must have a matching label in the provided metadata. MATCH_ALL - All filterLabels must have matching labels in the provided metadata.
name: pulumi.Output[str] = None¶Name of the metadata label. The length must be between 1 and 1024 characters, inclusive.
network: pulumi.Output[str] = None¶This field is not used for external load balancing. For INTERNAL_SELF_MANAGED load balancing, this field identifies the network that the load balanced IP should belong to for this global forwarding rule. If this field is not specified, the default network will be used.
port_range: pulumi.Output[str] = None¶This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance. Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges. Some types of forwarding target have constraints on the acceptable ports:
TargetHttpProxy: 80, 8080
TargetHttpsProxy: 443
TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222
TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222
TargetVpnGateway: 500, 4500
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
target: pulumi.Output[str] = None¶The URL of the target resource to receive the matched traffic. The forwarded traffic must be of a type appropriate to the target object. For INTERNAL_SELF_MANAGED load balancing, only HTTP and HTTPS targets are valid.
- static
get(resource_name, id, opts=None, description=None, ip_address=None, ip_protocol=None, ip_version=None, label_fingerprint=None, labels=None, load_balancing_scheme=None, metadata_filters=None, name=None, network=None, port_range=None, project=None, self_link=None, target=None)¶ Get an existing GlobalForwardingRule resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource.
ip_address (pulumi.Input[str]) – The IP address that this forwarding rule is serving on behalf of. Addresses are restricted based on the forwarding rule’s load balancing scheme (EXTERNAL or INTERNAL) and scope (global or regional). When the load balancing scheme is EXTERNAL, for global forwarding rules, the address must be a global IP, and for regional forwarding rules, the address must live in the same region as the forwarding rule. If this field is empty, an ephemeral IPv4 address from the same scope (global or regional) will be assigned. A regional forwarding rule supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6. When the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnet configured for the forwarding rule. By default, if this field is empty, an ephemeral internal IP address will be automatically allocated from the IP range of the subnet or network configured for this forwarding rule. An address must be specified by a literal IP address. > NOTE: While the API allows you to specify various resource paths for an address resource instead, this provider requires this to specifically be an IP address to avoid needing to fetching the IP address from resource paths on refresh or unnecessary diffs.
ip_protocol (pulumi.Input[str]) – The IP protocol to which this rule applies. When the load balancing scheme is INTERNAL_SELF_MANAGED, only TCP is valid.
ip_version (pulumi.Input[str]) – The IP Version that will be used by this global forwarding rule.
label_fingerprint (pulumi.Input[str]) – The fingerprint used for optimistic locking of this resource. Used internally during updates.
labels (pulumi.Input[dict]) – Labels to apply to this forwarding rule. A list of key->value pairs.
load_balancing_scheme (pulumi.Input[str]) – This signifies what the GlobalForwardingRule will be used for. The value of INTERNAL_SELF_MANAGED means that this will be used for Internal Global HTTP(S) LB. The value of EXTERNAL means that this will be used for External Global Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy) NOTE: Currently global forwarding rules cannot be used for INTERNAL load balancing.
metadata_filters (pulumi.Input[list]) – Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies. For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels in the provided metadata. metadataFilters specified here can be overridden by those specified in the UrlMap that this ForwardingRule references. metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED. Structure is documented below.
name (pulumi.Input[str]) – Name of the metadata label. The length must be between 1 and 1024 characters, inclusive.
network (pulumi.Input[str]) – This field is not used for external load balancing. For INTERNAL_SELF_MANAGED load balancing, this field identifies the network that the load balanced IP should belong to for this global forwarding rule. If this field is not specified, the default network will be used.
port_range (pulumi.Input[str]) – This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance. Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges. Some types of forwarding target have constraints on the acceptable ports:
* TargetHttpProxy: 80, 8080 * TargetHttpsProxy: 443 * TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 * TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 * TargetVpnGateway: 500, 4500
- Parameters
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link (pulumi.Input[str]) – The URI of the created resource.
target (pulumi.Input[str]) – The URL of the target resource to receive the matched traffic. The forwarded traffic must be of a type appropriate to the target object. For INTERNAL_SELF_MANAGED load balancing, only HTTP and HTTPS targets are valid.
The metadata_filters object supports the following:
filterLabels(pulumi.Input[list]) - The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries. Structure is documented below.name(pulumi.Input[str]) - Name of the metadata label. The length must be between 1 and 1024 characters, inclusive.value(pulumi.Input[str]) - The value that the label must match. The value has a maximum length of 1024 characters.
filterMatchCriteria(pulumi.Input[str]) - Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match. MATCH_ANY - At least one of the filterLabels must have a matching label in the provided metadata. MATCH_ALL - All filterLabels must have matching labels in the provided metadata.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.GlobalNetworkEndpoint(resource_name, opts=None, fqdn=None, global_network_endpoint_group=None, ip_address=None, port=None, project=None, __props__=None, __name__=None, __opts__=None)¶ A Global Network endpoint represents a IP address and port combination that exists outside of GCP. NOTE: Global network endpoints cannot be created outside of a global network endpoint group.
To get more information about GlobalNetworkEndpoint, see:
How-to Guides
import pulumi import pulumi_gcp as gcp default_endpoint = gcp.compute.GlobalNetworkEndpoint("default-endpoint", global_network_endpoint_group=google_compute_network_endpoint_group["neg"]["name"], fqdn="www.example.com", port=google_compute_network_endpoint_group["neg"]["default_port"], ip_address=google_compute_instance["endpoint-instance"]["network_interface"][0]["network_ip"]) default = gcp.compute.Network("default", auto_create_subnetworks=False) group = gcp.compute.GlobalNetworkEndpointGroup("group", network=default.id, default_port="90")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
fqdn (pulumi.Input[str]) – Fully qualified domain name of network endpoint. This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.
global_network_endpoint_group (pulumi.Input[str]) – The global network endpoint group this endpoint is part of.
ip_address (pulumi.Input[str]) – IPv4 address external endpoint.
port (pulumi.Input[float]) – Port number of the external endpoint.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
fqdn: pulumi.Output[str] = None¶Fully qualified domain name of network endpoint. This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.
global_network_endpoint_group: pulumi.Output[str] = None¶The global network endpoint group this endpoint is part of.
ip_address: pulumi.Output[str] = None¶IPv4 address external endpoint.
port: pulumi.Output[float] = None¶Port number of the external endpoint.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- static
get(resource_name, id, opts=None, fqdn=None, global_network_endpoint_group=None, ip_address=None, port=None, project=None)¶ Get an existing GlobalNetworkEndpoint resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
fqdn (pulumi.Input[str]) – Fully qualified domain name of network endpoint. This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.
global_network_endpoint_group (pulumi.Input[str]) – The global network endpoint group this endpoint is part of.
ip_address (pulumi.Input[str]) – IPv4 address external endpoint.
port (pulumi.Input[float]) – Port number of the external endpoint.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.GlobalNetworkEndpointGroup(resource_name, opts=None, default_port=None, description=None, name=None, network_endpoint_type=None, project=None, __props__=None, __name__=None, __opts__=None)¶ A global network endpoint group contains endpoints that reside outside of Google Cloud. Currently a global network endpoint group can only support a single endpoint.
To get more information about GlobalNetworkEndpointGroup, see:
How-to Guides
import pulumi import pulumi_gcp as gcp neg = gcp.compute.GlobalNetworkEndpointGroup("neg", default_port="90", network_endpoint_type="INTERNET_FQDN_PORT")
import pulumi import pulumi_gcp as gcp neg = gcp.compute.GlobalNetworkEndpointGroup("neg", default_port=90, network_endpoint_type="INTERNET_IP_PORT")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
default_port (pulumi.Input[float]) – The default port used if the port number is not specified in the network endpoint.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource.
name (pulumi.Input[str]) – Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.network_endpoint_type (pulumi.Input[str]) – Type of network endpoints in this network endpoint group.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
default_port: pulumi.Output[float] = None¶The default port used if the port number is not specified in the network endpoint.
description: pulumi.Output[str] = None¶An optional description of this resource. Provide this property when you create the resource.
name: pulumi.Output[str] = None¶Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
network_endpoint_type: pulumi.Output[str] = None¶Type of network endpoints in this network endpoint group.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
- static
get(resource_name, id, opts=None, default_port=None, description=None, name=None, network_endpoint_type=None, project=None, self_link=None)¶ Get an existing GlobalNetworkEndpointGroup resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
default_port (pulumi.Input[float]) – The default port used if the port number is not specified in the network endpoint.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource.
name (pulumi.Input[str]) – Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.network_endpoint_type (pulumi.Input[str]) – Type of network endpoints in this network endpoint group.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link (pulumi.Input[str]) – The URI of the created resource.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.HaVpnGateway(resource_name, opts=None, description=None, name=None, network=None, project=None, region=None, __props__=None, __name__=None, __opts__=None)¶ Represents a VPN gateway running in GCP. This virtual device is managed by Google, but used only by you. This type of VPN Gateway allows for the creation of VPN solutions with higher availability than classic Target VPN Gateways.
To get more information about HaVpnGateway, see:
How-to Guides
import pulumi import pulumi_gcp as gcp network1 = gcp.compute.Network("network1", auto_create_subnetworks=False) ha_gateway1 = gcp.compute.HaVpnGateway("haGateway1", region="us-central1", network=network1.id)
import pulumi import pulumi_gcp as gcp network1 = gcp.compute.Network("network1", routing_mode="GLOBAL", auto_create_subnetworks=False) ha_gateway1 = gcp.compute.HaVpnGateway("haGateway1", region="us-central1", network=network1.id) network2 = gcp.compute.Network("network2", routing_mode="GLOBAL", auto_create_subnetworks=False) ha_gateway2 = gcp.compute.HaVpnGateway("haGateway2", region="us-central1", network=network2.id) network1_subnet1 = gcp.compute.Subnetwork("network1Subnet1", ip_cidr_range="10.0.1.0/24", region="us-central1", network=network1.id) network1_subnet2 = gcp.compute.Subnetwork("network1Subnet2", ip_cidr_range="10.0.2.0/24", region="us-west1", network=network1.id) network2_subnet1 = gcp.compute.Subnetwork("network2Subnet1", ip_cidr_range="192.168.1.0/24", region="us-central1", network=network2.id) network2_subnet2 = gcp.compute.Subnetwork("network2Subnet2", ip_cidr_range="192.168.2.0/24", region="us-east1", network=network2.id) router1 = gcp.compute.Router("router1", network=network1.name, bgp={ "asn": 64514, }) router2 = gcp.compute.Router("router2", network=network2.name, bgp={ "asn": 64515, }) tunnel1 = gcp.compute.VPNTunnel("tunnel1", region="us-central1", vpn_gateway=ha_gateway1.id, peer_gcp_gateway=ha_gateway2.id, shared_secret="a secret message", router=router1.id, vpn_gateway_interface=0) tunnel2 = gcp.compute.VPNTunnel("tunnel2", region="us-central1", vpn_gateway=ha_gateway1.id, peer_gcp_gateway=ha_gateway2.id, shared_secret="a secret message", router=router1.id, vpn_gateway_interface=1) tunnel3 = gcp.compute.VPNTunnel("tunnel3", region="us-central1", vpn_gateway=ha_gateway2.id, peer_gcp_gateway=ha_gateway1.id, shared_secret="a secret message", router=router2.id, vpn_gateway_interface=0) tunnel4 = gcp.compute.VPNTunnel("tunnel4", region="us-central1", vpn_gateway=ha_gateway2.id, peer_gcp_gateway=ha_gateway1.id, shared_secret="a secret message", router=router2.id, vpn_gateway_interface=1) router1_interface1 = gcp.compute.RouterInterface("router1Interface1", router=router1.name, region="us-central1", ip_range="169.254.0.1/30", vpn_tunnel=tunnel1.name) router1_peer1 = gcp.compute.RouterPeer("router1Peer1", router=router1.name, region="us-central1", peer_ip_address="169.254.0.2", peer_asn=64515, advertised_route_priority=100, interface=router1_interface1.name) router1_interface2 = gcp.compute.RouterInterface("router1Interface2", router=router1.name, region="us-central1", ip_range="169.254.1.1/30", vpn_tunnel=tunnel2.name) router1_peer2 = gcp.compute.RouterPeer("router1Peer2", router=router1.name, region="us-central1", peer_ip_address="169.254.1.2", peer_asn=64515, advertised_route_priority=100, interface=router1_interface2.name) router2_interface1 = gcp.compute.RouterInterface("router2Interface1", router=router2.name, region="us-central1", ip_range="169.254.0.1/30", vpn_tunnel=tunnel3.name) router2_peer1 = gcp.compute.RouterPeer("router2Peer1", router=router2.name, region="us-central1", peer_ip_address="169.254.0.2", peer_asn=64514, advertised_route_priority=100, interface=router2_interface1.name) router2_interface2 = gcp.compute.RouterInterface("router2Interface2", router=router2.name, region="us-central1", ip_range="169.254.1.1/30", vpn_tunnel=tunnel4.name) router2_peer2 = gcp.compute.RouterPeer("router2Peer2", router=router2.name, region="us-central1", peer_ip_address="169.254.1.2", peer_asn=64514, advertised_route_priority=100, interface=router2_interface2.name)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – An optional description of this resource.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.network (pulumi.Input[str]) – The network this VPN gateway is accepting traffic for.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – The region this gateway should sit in.
description: pulumi.Output[str] = None¶An optional description of this resource.
name: pulumi.Output[str] = None¶Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
network: pulumi.Output[str] = None¶The network this VPN gateway is accepting traffic for.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region: pulumi.Output[str] = None¶The region this gateway should sit in.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
vpn_interfaces: pulumi.Output[list] = None¶A list of interfaces on this VPN gateway.
id(float) - an identifier for the resource with formatprojects/{{project}}/regions/{{region}}/vpnGateways/{{name}}ip_address(str)
- static
get(resource_name, id, opts=None, description=None, name=None, network=None, project=None, region=None, self_link=None, vpn_interfaces=None)¶ Get an existing HaVpnGateway resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – An optional description of this resource.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.network (pulumi.Input[str]) – The network this VPN gateway is accepting traffic for.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – The region this gateway should sit in.
self_link (pulumi.Input[str]) – The URI of the created resource.
vpn_interfaces (pulumi.Input[list]) – A list of interfaces on this VPN gateway.
The vpn_interfaces object supports the following:
id(pulumi.Input[float]) - an identifier for the resource with formatprojects/{{project}}/regions/{{region}}/vpnGateways/{{name}}ip_address(pulumi.Input[str])
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.HealthCheck(resource_name, opts=None, check_interval_sec=None, description=None, healthy_threshold=None, http2_health_check=None, http_health_check=None, https_health_check=None, log_config=None, name=None, project=None, ssl_health_check=None, tcp_health_check=None, timeout_sec=None, unhealthy_threshold=None, __props__=None, __name__=None, __opts__=None)¶ Health Checks determine whether instances are responsive and able to do work. They are an important part of a comprehensive load balancing configuration, as they enable monitoring instances behind load balancers.
Health Checks poll instances at a specified interval. Instances that do not respond successfully to some number of probes in a row are marked as unhealthy. No new connections are sent to unhealthy instances, though existing connections will continue. The health check will continue to poll unhealthy instances. If an instance later responds successfully to some number of consecutive probes, it is marked healthy again and can receive new connections.
To get more information about HealthCheck, see:
How-to Guides
import pulumi import pulumi_gcp as gcp tcp_health_check = gcp.compute.HealthCheck("tcp-health-check", check_interval_sec=1, tcp_health_check={ "port": "80", }, timeout_sec=1)
import pulumi import pulumi_gcp as gcp tcp_health_check = gcp.compute.HealthCheck("tcp-health-check", check_interval_sec=1, description="Health check via tcp", healthy_threshold=4, tcp_health_check={ "port_name": "health-check-port", "portSpecification": "USE_NAMED_PORT", "proxy_header": "NONE", "request": "ARE YOU HEALTHY?", "response": "I AM HEALTHY", }, timeout_sec=1, unhealthy_threshold=5)
import pulumi import pulumi_gcp as gcp ssl_health_check = gcp.compute.HealthCheck("ssl-health-check", check_interval_sec=1, ssl_health_check={ "port": "443", }, timeout_sec=1)
import pulumi import pulumi_gcp as gcp ssl_health_check = gcp.compute.HealthCheck("ssl-health-check", check_interval_sec=1, description="Health check via ssl", healthy_threshold=4, ssl_health_check={ "port_name": "health-check-port", "portSpecification": "USE_NAMED_PORT", "proxy_header": "NONE", "request": "ARE YOU HEALTHY?", "response": "I AM HEALTHY", }, timeout_sec=1, unhealthy_threshold=5)
import pulumi import pulumi_gcp as gcp http_health_check = gcp.compute.HealthCheck("http-health-check", check_interval_sec=1, http_health_check={ "port": 80, }, timeout_sec=1)
import pulumi import pulumi_gcp as gcp http_health_check = gcp.compute.HealthCheck("http-health-check", check_interval_sec=1, description="Health check via http", healthy_threshold=4, http_health_check={ "host": "1.2.3.4", "port_name": "health-check-port", "portSpecification": "USE_NAMED_PORT", "proxy_header": "NONE", "request_path": "/mypath", "response": "I AM HEALTHY", }, timeout_sec=1, unhealthy_threshold=5)
import pulumi import pulumi_gcp as gcp https_health_check = gcp.compute.HealthCheck("https-health-check", check_interval_sec=1, https_health_check={ "port": "443", }, timeout_sec=1)
import pulumi import pulumi_gcp as gcp https_health_check = gcp.compute.HealthCheck("https-health-check", check_interval_sec=1, description="Health check via https", healthy_threshold=4, https_health_check={ "host": "1.2.3.4", "port_name": "health-check-port", "portSpecification": "USE_NAMED_PORT", "proxy_header": "NONE", "request_path": "/mypath", "response": "I AM HEALTHY", }, timeout_sec=1, unhealthy_threshold=5)
import pulumi import pulumi_gcp as gcp http2_health_check = gcp.compute.HealthCheck("http2-health-check", check_interval_sec=1, http2_health_check={ "port": "443", }, timeout_sec=1)
import pulumi import pulumi_gcp as gcp http2_health_check = gcp.compute.HealthCheck("http2-health-check", check_interval_sec=1, description="Health check via http2", healthy_threshold=4, http2_health_check={ "host": "1.2.3.4", "port_name": "health-check-port", "portSpecification": "USE_NAMED_PORT", "proxy_header": "NONE", "request_path": "/mypath", "response": "I AM HEALTHY", }, timeout_sec=1, unhealthy_threshold=5)
import pulumi import pulumi_gcp as gcp health_check_with_logging = gcp.compute.HealthCheck("health-check-with-logging", timeout_sec=1, check_interval_sec=1, tcp_health_check={ "port": "22", }, log_config={ "enable": True, })
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
check_interval_sec (pulumi.Input[float]) – How often (in seconds) to send a health check. The default value is 5 seconds.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource.
healthy_threshold (pulumi.Input[float]) – A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.
http2_health_check (pulumi.Input[dict]) – A nested object resource Structure is documented below.
http_health_check (pulumi.Input[dict]) – A nested object resource Structure is documented below.
https_health_check (pulumi.Input[dict]) – A nested object resource Structure is documented below.
log_config (pulumi.Input[dict]) – Configure logging on this health check. Structure is documented below.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
ssl_health_check (pulumi.Input[dict]) – A nested object resource Structure is documented below.
tcp_health_check (pulumi.Input[dict]) – A nested object resource Structure is documented below.
timeout_sec (pulumi.Input[float]) – How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.
unhealthy_threshold (pulumi.Input[float]) – A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.
The http2_health_check object supports the following:
host(pulumi.Input[str]) - The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.port(pulumi.Input[float]) - The TCP port number for the HTTP2 health check request. The default value is 443.port_name(pulumi.Input[str]) - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.portSpecification(pulumi.Input[str]) - Specifies how port is selected for health checking, can be one of the following values:USE_FIXED_PORT: The port number inportis used for health checking.USE_NAMED_PORT: TheportNameis used for health checking.USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inportandportNamefields.
proxy_header(pulumi.Input[str]) - Specifies the type of proxy header to append before sending data to the backend.request_path(pulumi.Input[str]) - The request path of the HTTP2 health check request. The default value is /.response(pulumi.Input[str]) - The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
The http_health_check object supports the following:
host(pulumi.Input[str]) - The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.port(pulumi.Input[float]) - The TCP port number for the HTTP2 health check request. The default value is 443.port_name(pulumi.Input[str]) - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.portSpecification(pulumi.Input[str]) - Specifies how port is selected for health checking, can be one of the following values:USE_FIXED_PORT: The port number inportis used for health checking.USE_NAMED_PORT: TheportNameis used for health checking.USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inportandportNamefields.
proxy_header(pulumi.Input[str]) - Specifies the type of proxy header to append before sending data to the backend.request_path(pulumi.Input[str]) - The request path of the HTTP2 health check request. The default value is /.response(pulumi.Input[str]) - The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
The https_health_check object supports the following:
host(pulumi.Input[str]) - The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.port(pulumi.Input[float]) - The TCP port number for the HTTP2 health check request. The default value is 443.port_name(pulumi.Input[str]) - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.portSpecification(pulumi.Input[str]) - Specifies how port is selected for health checking, can be one of the following values:USE_FIXED_PORT: The port number inportis used for health checking.USE_NAMED_PORT: TheportNameis used for health checking.USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inportandportNamefields.
proxy_header(pulumi.Input[str]) - Specifies the type of proxy header to append before sending data to the backend.request_path(pulumi.Input[str]) - The request path of the HTTP2 health check request. The default value is /.response(pulumi.Input[str]) - The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
The log_config object supports the following:
enable(pulumi.Input[bool]) - Indicates whether or not to export logs. This is false by default, which means no health check logging will be done.
The ssl_health_check object supports the following:
port(pulumi.Input[float]) - The TCP port number for the HTTP2 health check request. The default value is 443.port_name(pulumi.Input[str]) - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.portSpecification(pulumi.Input[str]) - Specifies how port is selected for health checking, can be one of the following values:USE_FIXED_PORT: The port number inportis used for health checking.USE_NAMED_PORT: TheportNameis used for health checking.USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inportandportNamefields.
proxy_header(pulumi.Input[str]) - Specifies the type of proxy header to append before sending data to the backend.request(pulumi.Input[str]) - The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII.response(pulumi.Input[str]) - The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
The tcp_health_check object supports the following:
port(pulumi.Input[float]) - The TCP port number for the HTTP2 health check request. The default value is 443.port_name(pulumi.Input[str]) - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.portSpecification(pulumi.Input[str]) - Specifies how port is selected for health checking, can be one of the following values:USE_FIXED_PORT: The port number inportis used for health checking.USE_NAMED_PORT: TheportNameis used for health checking.USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inportandportNamefields.
proxy_header(pulumi.Input[str]) - Specifies the type of proxy header to append before sending data to the backend.request(pulumi.Input[str]) - The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII.response(pulumi.Input[str]) - The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
check_interval_sec: pulumi.Output[float] = None¶How often (in seconds) to send a health check. The default value is 5 seconds.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional description of this resource. Provide this property when you create the resource.
healthy_threshold: pulumi.Output[float] = None¶A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.
http2_health_check: pulumi.Output[dict] = None¶A nested object resource Structure is documented below.
host(str) - The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.port(float) - The TCP port number for the HTTP2 health check request. The default value is 443.port_name(str) - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.portSpecification(str) - Specifies how port is selected for health checking, can be one of the following values:USE_FIXED_PORT: The port number inportis used for health checking.USE_NAMED_PORT: TheportNameis used for health checking.USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inportandportNamefields.
proxy_header(str) - Specifies the type of proxy header to append before sending data to the backend.request_path(str) - The request path of the HTTP2 health check request. The default value is /.response(str) - The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
http_health_check: pulumi.Output[dict] = None¶A nested object resource Structure is documented below.
host(str) - The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.port(float) - The TCP port number for the HTTP2 health check request. The default value is 443.port_name(str) - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.portSpecification(str) - Specifies how port is selected for health checking, can be one of the following values:USE_FIXED_PORT: The port number inportis used for health checking.USE_NAMED_PORT: TheportNameis used for health checking.USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inportandportNamefields.
proxy_header(str) - Specifies the type of proxy header to append before sending data to the backend.request_path(str) - The request path of the HTTP2 health check request. The default value is /.response(str) - The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
https_health_check: pulumi.Output[dict] = None¶A nested object resource Structure is documented below.
host(str) - The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.port(float) - The TCP port number for the HTTP2 health check request. The default value is 443.port_name(str) - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.portSpecification(str) - Specifies how port is selected for health checking, can be one of the following values:USE_FIXED_PORT: The port number inportis used for health checking.USE_NAMED_PORT: TheportNameis used for health checking.USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inportandportNamefields.
proxy_header(str) - Specifies the type of proxy header to append before sending data to the backend.request_path(str) - The request path of the HTTP2 health check request. The default value is /.response(str) - The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
log_config: pulumi.Output[dict] = None¶Configure logging on this health check. Structure is documented below.
enable(bool) - Indicates whether or not to export logs. This is false by default, which means no health check logging will be done.
name: pulumi.Output[str] = None¶Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
ssl_health_check: pulumi.Output[dict] = None¶A nested object resource Structure is documented below.
port(float) - The TCP port number for the HTTP2 health check request. The default value is 443.port_name(str) - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.portSpecification(str) - Specifies how port is selected for health checking, can be one of the following values:USE_FIXED_PORT: The port number inportis used for health checking.USE_NAMED_PORT: TheportNameis used for health checking.USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inportandportNamefields.
proxy_header(str) - Specifies the type of proxy header to append before sending data to the backend.request(str) - The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII.response(str) - The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
tcp_health_check: pulumi.Output[dict] = None¶A nested object resource Structure is documented below.
port(float) - The TCP port number for the HTTP2 health check request. The default value is 443.port_name(str) - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.portSpecification(str) - Specifies how port is selected for health checking, can be one of the following values:USE_FIXED_PORT: The port number inportis used for health checking.USE_NAMED_PORT: TheportNameis used for health checking.USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inportandportNamefields.
proxy_header(str) - Specifies the type of proxy header to append before sending data to the backend.request(str) - The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII.response(str) - The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
timeout_sec: pulumi.Output[float] = None¶How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.
type: pulumi.Output[str] = None¶The type of the health check. One of HTTP, HTTPS, TCP, or SSL.
unhealthy_threshold: pulumi.Output[float] = None¶A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.
- static
get(resource_name, id, opts=None, check_interval_sec=None, creation_timestamp=None, description=None, healthy_threshold=None, http2_health_check=None, http_health_check=None, https_health_check=None, log_config=None, name=None, project=None, self_link=None, ssl_health_check=None, tcp_health_check=None, timeout_sec=None, type=None, unhealthy_threshold=None)¶ Get an existing HealthCheck resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
check_interval_sec (pulumi.Input[float]) – How often (in seconds) to send a health check. The default value is 5 seconds.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource.
healthy_threshold (pulumi.Input[float]) – A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.
http2_health_check (pulumi.Input[dict]) – A nested object resource Structure is documented below.
http_health_check (pulumi.Input[dict]) – A nested object resource Structure is documented below.
https_health_check (pulumi.Input[dict]) – A nested object resource Structure is documented below.
log_config (pulumi.Input[dict]) – Configure logging on this health check. Structure is documented below.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link (pulumi.Input[str]) – The URI of the created resource.
ssl_health_check (pulumi.Input[dict]) – A nested object resource Structure is documented below.
tcp_health_check (pulumi.Input[dict]) – A nested object resource Structure is documented below.
timeout_sec (pulumi.Input[float]) – How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.
type (pulumi.Input[str]) – The type of the health check. One of HTTP, HTTPS, TCP, or SSL.
unhealthy_threshold (pulumi.Input[float]) – A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.
The http2_health_check object supports the following:
host(pulumi.Input[str]) - The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.port(pulumi.Input[float]) - The TCP port number for the HTTP2 health check request. The default value is 443.port_name(pulumi.Input[str]) - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.portSpecification(pulumi.Input[str]) - Specifies how port is selected for health checking, can be one of the following values:USE_FIXED_PORT: The port number inportis used for health checking.USE_NAMED_PORT: TheportNameis used for health checking.USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inportandportNamefields.
proxy_header(pulumi.Input[str]) - Specifies the type of proxy header to append before sending data to the backend.request_path(pulumi.Input[str]) - The request path of the HTTP2 health check request. The default value is /.response(pulumi.Input[str]) - The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
The http_health_check object supports the following:
host(pulumi.Input[str]) - The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.port(pulumi.Input[float]) - The TCP port number for the HTTP2 health check request. The default value is 443.port_name(pulumi.Input[str]) - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.portSpecification(pulumi.Input[str]) - Specifies how port is selected for health checking, can be one of the following values:USE_FIXED_PORT: The port number inportis used for health checking.USE_NAMED_PORT: TheportNameis used for health checking.USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inportandportNamefields.
proxy_header(pulumi.Input[str]) - Specifies the type of proxy header to append before sending data to the backend.request_path(pulumi.Input[str]) - The request path of the HTTP2 health check request. The default value is /.response(pulumi.Input[str]) - The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
The https_health_check object supports the following:
host(pulumi.Input[str]) - The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.port(pulumi.Input[float]) - The TCP port number for the HTTP2 health check request. The default value is 443.port_name(pulumi.Input[str]) - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.portSpecification(pulumi.Input[str]) - Specifies how port is selected for health checking, can be one of the following values:USE_FIXED_PORT: The port number inportis used for health checking.USE_NAMED_PORT: TheportNameis used for health checking.USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inportandportNamefields.
proxy_header(pulumi.Input[str]) - Specifies the type of proxy header to append before sending data to the backend.request_path(pulumi.Input[str]) - The request path of the HTTP2 health check request. The default value is /.response(pulumi.Input[str]) - The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
The log_config object supports the following:
enable(pulumi.Input[bool]) - Indicates whether or not to export logs. This is false by default, which means no health check logging will be done.
The ssl_health_check object supports the following:
port(pulumi.Input[float]) - The TCP port number for the HTTP2 health check request. The default value is 443.port_name(pulumi.Input[str]) - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.portSpecification(pulumi.Input[str]) - Specifies how port is selected for health checking, can be one of the following values:USE_FIXED_PORT: The port number inportis used for health checking.USE_NAMED_PORT: TheportNameis used for health checking.USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inportandportNamefields.
proxy_header(pulumi.Input[str]) - Specifies the type of proxy header to append before sending data to the backend.request(pulumi.Input[str]) - The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII.response(pulumi.Input[str]) - The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
The tcp_health_check object supports the following:
port(pulumi.Input[float]) - The TCP port number for the HTTP2 health check request. The default value is 443.port_name(pulumi.Input[str]) - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.portSpecification(pulumi.Input[str]) - Specifies how port is selected for health checking, can be one of the following values:USE_FIXED_PORT: The port number inportis used for health checking.USE_NAMED_PORT: TheportNameis used for health checking.USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inportandportNamefields.
proxy_header(pulumi.Input[str]) - Specifies the type of proxy header to append before sending data to the backend.request(pulumi.Input[str]) - The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII.response(pulumi.Input[str]) - The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.HttpHealthCheck(resource_name, opts=None, check_interval_sec=None, description=None, healthy_threshold=None, host=None, name=None, port=None, project=None, request_path=None, timeout_sec=None, unhealthy_threshold=None, __props__=None, __name__=None, __opts__=None)¶ An HttpHealthCheck resource. This resource defines a template for how individual VMs should be checked for health, via HTTP.
Note: compute.HttpHealthCheck is a legacy health check. The newer compute.HealthCheck should be preferred for all uses except Network Load Balancers which still require the legacy version.
To get more information about HttpHealthCheck, see:
How-to Guides
import pulumi import pulumi_gcp as gcp default = gcp.compute.HttpHealthCheck("default", check_interval_sec=1, request_path="/health_check", timeout_sec=1)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
check_interval_sec (pulumi.Input[float]) – How often (in seconds) to send a health check. The default value is 5 seconds.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource.
healthy_threshold (pulumi.Input[float]) – A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.
host (pulumi.Input[str]) – The value of the host header in the HTTP health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.port (pulumi.Input[float]) – The TCP port number for the HTTP health check request. The default value is 80.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
request_path (pulumi.Input[str]) – The request path of the HTTP health check request. The default value is /.
timeout_sec (pulumi.Input[float]) – How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.
unhealthy_threshold (pulumi.Input[float]) – A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.
check_interval_sec: pulumi.Output[float] = None¶How often (in seconds) to send a health check. The default value is 5 seconds.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional description of this resource. Provide this property when you create the resource.
healthy_threshold: pulumi.Output[float] = None¶A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.
host: pulumi.Output[str] = None¶The value of the host header in the HTTP health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.
name: pulumi.Output[str] = None¶Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
port: pulumi.Output[float] = None¶The TCP port number for the HTTP health check request. The default value is 80.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
request_path: pulumi.Output[str] = None¶The request path of the HTTP health check request. The default value is /.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
timeout_sec: pulumi.Output[float] = None¶How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.
unhealthy_threshold: pulumi.Output[float] = None¶A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.
- static
get(resource_name, id, opts=None, check_interval_sec=None, creation_timestamp=None, description=None, healthy_threshold=None, host=None, name=None, port=None, project=None, request_path=None, self_link=None, timeout_sec=None, unhealthy_threshold=None)¶ Get an existing HttpHealthCheck resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
check_interval_sec (pulumi.Input[float]) – How often (in seconds) to send a health check. The default value is 5 seconds.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource.
healthy_threshold (pulumi.Input[float]) – A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.
host (pulumi.Input[str]) – The value of the host header in the HTTP health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.port (pulumi.Input[float]) – The TCP port number for the HTTP health check request. The default value is 80.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
request_path (pulumi.Input[str]) – The request path of the HTTP health check request. The default value is /.
self_link (pulumi.Input[str]) – The URI of the created resource.
timeout_sec (pulumi.Input[float]) – How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.
unhealthy_threshold (pulumi.Input[float]) – A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.HttpsHealthCheck(resource_name, opts=None, check_interval_sec=None, description=None, healthy_threshold=None, host=None, name=None, port=None, project=None, request_path=None, timeout_sec=None, unhealthy_threshold=None, __props__=None, __name__=None, __opts__=None)¶ An HttpsHealthCheck resource. This resource defines a template for how individual VMs should be checked for health, via HTTPS.
Note: compute.HttpsHealthCheck is a legacy health check. The newer compute.HealthCheck should be preferred for all uses except Network Load Balancers which still require the legacy version.
To get more information about HttpsHealthCheck, see:
How-to Guides
import pulumi import pulumi_gcp as gcp default = gcp.compute.HttpsHealthCheck("default", check_interval_sec=1, request_path="/health_check", timeout_sec=1)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
check_interval_sec (pulumi.Input[float]) – How often (in seconds) to send a health check. The default value is 5 seconds.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource.
healthy_threshold (pulumi.Input[float]) – A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.
host (pulumi.Input[str]) – The value of the host header in the HTTPS health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.port (pulumi.Input[float]) – The TCP port number for the HTTPS health check request. The default value is 80.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
request_path (pulumi.Input[str]) – The request path of the HTTPS health check request. The default value is /.
timeout_sec (pulumi.Input[float]) – How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.
unhealthy_threshold (pulumi.Input[float]) – A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.
check_interval_sec: pulumi.Output[float] = None¶How often (in seconds) to send a health check. The default value is 5 seconds.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional description of this resource. Provide this property when you create the resource.
healthy_threshold: pulumi.Output[float] = None¶A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.
host: pulumi.Output[str] = None¶The value of the host header in the HTTPS health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.
name: pulumi.Output[str] = None¶Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
port: pulumi.Output[float] = None¶The TCP port number for the HTTPS health check request. The default value is 80.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
request_path: pulumi.Output[str] = None¶The request path of the HTTPS health check request. The default value is /.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
timeout_sec: pulumi.Output[float] = None¶How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.
unhealthy_threshold: pulumi.Output[float] = None¶A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.
- static
get(resource_name, id, opts=None, check_interval_sec=None, creation_timestamp=None, description=None, healthy_threshold=None, host=None, name=None, port=None, project=None, request_path=None, self_link=None, timeout_sec=None, unhealthy_threshold=None)¶ Get an existing HttpsHealthCheck resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
check_interval_sec (pulumi.Input[float]) – How often (in seconds) to send a health check. The default value is 5 seconds.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource.
healthy_threshold (pulumi.Input[float]) – A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.
host (pulumi.Input[str]) – The value of the host header in the HTTPS health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.port (pulumi.Input[float]) – The TCP port number for the HTTPS health check request. The default value is 80.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
request_path (pulumi.Input[str]) – The request path of the HTTPS health check request. The default value is /.
self_link (pulumi.Input[str]) – The URI of the created resource.
timeout_sec (pulumi.Input[float]) – How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.
unhealthy_threshold (pulumi.Input[float]) – A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.Image(resource_name, opts=None, description=None, disk_size_gb=None, family=None, guest_os_features=None, labels=None, licenses=None, name=None, project=None, raw_disk=None, source_disk=None, __props__=None, __name__=None, __opts__=None)¶ Represents an Image resource.
Google Compute Engine uses operating system images to create the root persistent disks for your instances. You specify an image when you create an instance. Images contain a boot loader, an operating system, and a root file system. Linux operating system images are also capable of running containers on Compute Engine.
Images can be either public or custom.
Public images are provided and maintained by Google, open-source communities, and third-party vendors. By default, all projects have access to these images and can use them to create instances. Custom images are available only to your project. You can create a custom image from root persistent disks and other images. Then, use the custom image to create an instance.
To get more information about Image, see:
How-to Guides
import pulumi import pulumi_gcp as gcp example = gcp.compute.Image("example", raw_disk={ "source": "https://storage.googleapis.com/bosh-cpi-artifacts/bosh-stemcell-3262.4-google-kvm-ubuntu-trusty-go_agent-raw.tar.gz", })
import pulumi import pulumi_gcp as gcp example = gcp.compute.Image("example", guest_os_features=[ { "type": "SECURE_BOOT", }, { "type": "MULTI_IP_SUBNET", }, ], raw_disk={ "source": "https://storage.googleapis.com/bosh-cpi-artifacts/bosh-stemcell-3262.4-google-kvm-ubuntu-trusty-go_agent-raw.tar.gz", })
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource.
disk_size_gb (pulumi.Input[float]) – Size of the image when restored onto a persistent disk (in GB).
family (pulumi.Input[str]) – The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
guest_os_features (pulumi.Input[list]) – A list of features to enable on the guest operating system. Applicable only for bootable images. Structure is documented below.
labels (pulumi.Input[dict]) – Labels to apply to this Image.
licenses (pulumi.Input[list]) – Any applicable license URI.
name (pulumi.Input[str]) – Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
raw_disk (pulumi.Input[dict]) – The parameters of the raw disk image. Structure is documented below.
source_disk (pulumi.Input[str]) – The source disk to create this image based on. You must provide either this property or the rawDisk.source property but not both to create an image.
The guest_os_features object supports the following:
type(pulumi.Input[str]) - The type of supported feature. Read Enabling guest operating system features to see a list of available options.
The raw_disk object supports the following:
containerType(pulumi.Input[str]) - The format used to encode and transmit the block device, which should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created.sha1(pulumi.Input[str]) - An optional SHA1 checksum of the disk image before unpackaging. This is provided by the client when the disk image is created.source(pulumi.Input[str]) - The full Google Cloud Storage URL where disk storage is stored You must provide either this property or the sourceDisk property but not both.
archive_size_bytes: pulumi.Output[float] = None¶Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional description of this resource. Provide this property when you create the resource.
disk_size_gb: pulumi.Output[float] = None¶Size of the image when restored onto a persistent disk (in GB).
family: pulumi.Output[str] = None¶The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
guest_os_features: pulumi.Output[list] = None¶A list of features to enable on the guest operating system. Applicable only for bootable images. Structure is documented below.
type(str) - The type of supported feature. Read Enabling guest operating system features to see a list of available options.
label_fingerprint: pulumi.Output[str] = None¶The fingerprint used for optimistic locking of this resource. Used internally during updates.
labels: pulumi.Output[dict] = None¶Labels to apply to this Image.
licenses: pulumi.Output[list] = None¶Any applicable license URI.
name: pulumi.Output[str] = None¶Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
raw_disk: pulumi.Output[dict] = None¶The parameters of the raw disk image. Structure is documented below.
containerType(str) - The format used to encode and transmit the block device, which should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created.sha1(str) - An optional SHA1 checksum of the disk image before unpackaging. This is provided by the client when the disk image is created.source(str) - The full Google Cloud Storage URL where disk storage is stored You must provide either this property or the sourceDisk property but not both.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
source_disk: pulumi.Output[str] = None¶The source disk to create this image based on. You must provide either this property or the rawDisk.source property but not both to create an image.
- static
get(resource_name, id, opts=None, archive_size_bytes=None, creation_timestamp=None, description=None, disk_size_gb=None, family=None, guest_os_features=None, label_fingerprint=None, labels=None, licenses=None, name=None, project=None, raw_disk=None, self_link=None, source_disk=None)¶ Get an existing Image resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
archive_size_bytes (pulumi.Input[float]) – Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource.
disk_size_gb (pulumi.Input[float]) – Size of the image when restored onto a persistent disk (in GB).
family (pulumi.Input[str]) – The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
guest_os_features (pulumi.Input[list]) – A list of features to enable on the guest operating system. Applicable only for bootable images. Structure is documented below.
label_fingerprint (pulumi.Input[str]) – The fingerprint used for optimistic locking of this resource. Used internally during updates.
labels (pulumi.Input[dict]) – Labels to apply to this Image.
licenses (pulumi.Input[list]) – Any applicable license URI.
name (pulumi.Input[str]) – Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
raw_disk (pulumi.Input[dict]) – The parameters of the raw disk image. Structure is documented below.
self_link (pulumi.Input[str]) – The URI of the created resource.
source_disk (pulumi.Input[str]) – The source disk to create this image based on. You must provide either this property or the rawDisk.source property but not both to create an image.
The guest_os_features object supports the following:
type(pulumi.Input[str]) - The type of supported feature. Read Enabling guest operating system features to see a list of available options.
The raw_disk object supports the following:
containerType(pulumi.Input[str]) - The format used to encode and transmit the block device, which should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created.sha1(pulumi.Input[str]) - An optional SHA1 checksum of the disk image before unpackaging. This is provided by the client when the disk image is created.source(pulumi.Input[str]) - The full Google Cloud Storage URL where disk storage is stored You must provide either this property or the sourceDisk property but not both.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.Instance(resource_name, opts=None, allow_stopping_for_update=None, attached_disks=None, boot_disk=None, can_ip_forward=None, deletion_protection=None, description=None, desired_status=None, enable_display=None, guest_accelerators=None, hostname=None, labels=None, machine_type=None, metadata=None, metadata_startup_script=None, min_cpu_platform=None, name=None, network_interfaces=None, project=None, resource_policies=None, scheduling=None, scratch_disks=None, service_account=None, shielded_instance_config=None, tags=None, zone=None, __props__=None, __name__=None, __opts__=None)¶ Manages a VM instance resource within GCE. For more information see the official documentation and API.
import pulumi import pulumi_gcp as gcp default = gcp.compute.Instance("default", boot_disk={ "initializeParams": { "image": "debian-cloud/debian-9", }, }, machine_type="n1-standard-1", metadata={ "foo": "bar", }, metadata_startup_script="echo hi > /test.txt", network_interfaces=[{ "accessConfig": [{}], "network": "default", }], scratch_disks=[{ "interface": "SCSI", }], service_account={ "scopes": [ "userinfo-email", "compute-ro", "storage-ro", ], }, tags=[ "foo", "bar", ], zone="us-central1-a")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
allow_stopping_for_update (pulumi.Input[bool]) – If true, allows this prvider to stop the instance to update its properties. If you try to update a property that requires stopping the instance without setting this field, the update will fail.
attached_disks (pulumi.Input[list]) – Additional disks to attach to the instance. Can be repeated multiple times for multiple disks. Structure is documented below.
boot_disk (pulumi.Input[dict]) – The boot disk for the instance. Structure is documented below.
can_ip_forward (pulumi.Input[bool]) – Whether to allow sending and receiving of packets with non-matching source or destination IPs. This defaults to false.
deletion_protection (pulumi.Input[bool]) – Enable deletion protection on this instance. Defaults to false. Note: you must disable deletion protection before removing the resource (e.g., via
pulumi destroy), or the instance cannot be deleted and the provider run will not complete successfully.description (pulumi.Input[str]) – A brief description of this resource.
desired_status (pulumi.Input[str]) – Desired status of the instance. Either
"RUNNING"or"TERMINATED".enable_display (pulumi.Input[bool]) – Enable Virtual Displays on this instance. Note:
allow_stopping_for_updatemust be set to true or your instance must have adesired_statusofTERMINATEDin order to update this field.guest_accelerators (pulumi.Input[list]) – List of the type and count of accelerator cards attached to the instance. Structure documented below. Note: GPU accelerators can only be used with
on_host_maintenanceoption set to TERMINATE.hostname (pulumi.Input[str]) – A custom hostname for the instance. Must be a fully qualified DNS name and RFC-1035-valid. Valid format is a series of labels 1-63 characters long matching the regular expression
a-z, concatenated with periods. The entire hostname must not exceed 253 characters. Changing this forces a new resource to be created.labels (pulumi.Input[dict]) – A map of key/value label pairs to assign to the instance.
machine_type (pulumi.Input[str]) – The machine type to create.
metadata (pulumi.Input[dict]) – Metadata key/value pairs to make available from within the instance. Ssh keys attached in the Cloud Console will be removed. Add them to your config in order to keep them attached to your instance.
metadata_startup_script (pulumi.Input[str]) – An alternative to using the startup-script metadata key, except this one forces the instance to be recreated (thus re-running the script) if it is changed. This replaces the startup-script metadata key on the created instance and thus the two mechanisms are not allowed to be used simultaneously. Users are free to use either mechanism - the only distinction is that this separate attribute willl cause a recreate on modification. On import,
metadata_startup_scriptwill be set, butmetadata.startup-scriptwill not - if you choose to use the other mechanism, you will see a diff immediately after import, which will cause a destroy/recreate operation. You may want to modify your state file manually usingpulumi stackcommands, depending on your use case.min_cpu_platform (pulumi.Input[str]) – Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as
Intel HaswellorIntel Skylake. See the complete list here. Note:allow_stopping_for_updatemust be set to true or your instance must have adesired_statusofTERMINATEDin order to update this field.name (pulumi.Input[str]) – A unique name for the resource, required by GCE. Changing this forces a new resource to be created.
network_interfaces (pulumi.Input[list]) – Networks to attach to the instance. This can be specified multiple times. Structure is documented below.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
resource_policies (pulumi.Input[str]) – – A list of short names or self_links of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported.
scheduling (pulumi.Input[dict]) – The scheduling strategy to use. More details about this configuration option are detailed below.
scratch_disks (pulumi.Input[list]) – Scratch disks to attach to the instance. This can be specified multiple times for multiple scratch disks. Structure is documented below.
service_account (pulumi.Input[dict]) – Service account to attach to the instance. Structure is documented below. Note:
allow_stopping_for_updatemust be set to true or your instance must have adesired_statusofTERMINATEDin order to update this field.shielded_instance_config (pulumi.Input[dict]) –
Enable Shielded VM on this instance. Shielded VM provides verifiable integrity to prevent against malware and rootkits. Defaults to disabled. Structure is documented below. Note:
shielded_instance_configcan only be used with boot images with shielded vm support. See the complete list here.tags (pulumi.Input[list]) – A list of tags to attach to the instance.
zone (pulumi.Input[str]) – The zone that the machine should be created in.
The attached_disks object supports the following:
device_name(pulumi.Input[str]) - Name with which the attached disk will be accessible under/dev/disk/by-id/google-*diskEncryptionKeyRaw(pulumi.Input[str]) - A 256-bit [customer-supplied encryption key] (https://cloud.google.com/compute/docs/disks/customer-supplied-encryption), encoded in RFC 4648 base64 to encrypt this disk. Only one ofkms_key_self_linkanddisk_encryption_key_rawmay be set.diskEncryptionKeySha256(pulumi.Input[str])kmsKeySelfLink(pulumi.Input[str]) - The self_link of the encryption key that is stored in Google Cloud KMS to encrypt this disk. Only one ofkms_key_self_linkanddisk_encryption_key_rawmay be set.mode(pulumi.Input[str]) - Either “READ_ONLY” or “READ_WRITE”, defaults to “READ_WRITE” If you have a persistent disk with data that you want to share between multiple instances, detach it from any read-write instances and attach it to one or more instances in read-only mode.source(pulumi.Input[str]) - The name or self_link of the disk to attach to this instance.
The boot_disk object supports the following:
autoDelete(pulumi.Input[bool]) - Whether the disk will be auto-deleted when the instance is deleted. Defaults to true.device_name(pulumi.Input[str]) - Name with which the attached disk will be accessible under/dev/disk/by-id/google-*diskEncryptionKeyRaw(pulumi.Input[str]) - A 256-bit [customer-supplied encryption key] (https://cloud.google.com/compute/docs/disks/customer-supplied-encryption), encoded in RFC 4648 base64 to encrypt this disk. Only one ofkms_key_self_linkanddisk_encryption_key_rawmay be set.diskEncryptionKeySha256(pulumi.Input[str])initializeParams(pulumi.Input[dict]) - Parameters for a new disk that will be created alongside the new instance. Eitherinitialize_paramsorsourcemust be set. Structure is documented below.image(pulumi.Input[str]) - The image from which to initialize this disk. This can be one of: the image’sself_link,projects/{project}/global/images/{image},projects/{project}/global/images/family/{family},global/images/{image},global/images/family/{family},family/{family},{project}/{family},{project}/{image},{family}, or{image}. If referred by family, the images names must include the family name. If they don’t, use the compute.Image data source. For instance, the imagecentos-6-v20180104includes its family namecentos-6. These images can be referred by family name here.labels(pulumi.Input[dict]) - A map of key/value label pairs to assign to the instance.size(pulumi.Input[float]) - The size of the image in gigabytes. If not specified, it will inherit the size of its base image.type(pulumi.Input[str]) - The accelerator type resource to expose to this instance. E.g.nvidia-tesla-k80.
kmsKeySelfLink(pulumi.Input[str]) - The self_link of the encryption key that is stored in Google Cloud KMS to encrypt this disk. Only one ofkms_key_self_linkanddisk_encryption_key_rawmay be set.mode(pulumi.Input[str]) - Either “READ_ONLY” or “READ_WRITE”, defaults to “READ_WRITE” If you have a persistent disk with data that you want to share between multiple instances, detach it from any read-write instances and attach it to one or more instances in read-only mode.source(pulumi.Input[str]) - The name or self_link of the disk to attach to this instance.
The guest_accelerators object supports the following:
count(pulumi.Input[float]) - The number of the guest accelerator cards exposed to this instance.type(pulumi.Input[str]) - The accelerator type resource to expose to this instance. E.g.nvidia-tesla-k80.
The network_interfaces object supports the following:
accessConfigs(pulumi.Input[list]) - Access configurations, i.e. IPs via which this instance can be accessed via the Internet. Omit to ensure that the instance is not accessible from the Internet. If omitted, ssh will not work unless this provider can send traffic to the instance’s network (e.g. via tunnel or because it is running on another cloud instance on that network). This block can be repeated multiple times. Structure documented below.natIp(pulumi.Input[str]) - The IP address that will be 1:1 mapped to the instance’s network ip. If not given, one will be generated.network_tier(pulumi.Input[str]) - The [networking tier][network-tier] used for configuring this instance. This field can take the following values: PREMIUM or STANDARD. If this field is not specified, it is assumed to be PREMIUM.publicPtrDomainName(pulumi.Input[str]) - The DNS domain name for the public PTR record. To set this field on an instance, you must be verified as the owner of the domain. See the docs for how to become verified as a domain owner.
aliasIpRanges(pulumi.Input[list]) - An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks. Structure documented below.ip_cidr_range(pulumi.Input[str]) - The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 10.2.3.4), a netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24).subnetworkRangeName(pulumi.Input[str]) - The subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used.
name(pulumi.Input[str]) - A unique name for the resource, required by GCE. Changing this forces a new resource to be created.network(pulumi.Input[str]) - The name or self_link of the network to attach this interface to. Eithernetworkorsubnetworkmust be provided.networkIp(pulumi.Input[str]) - The private IP address to assign to the instance. If empty, the address will be automatically assigned.subnetwork(pulumi.Input[str]) - The name or self_link of the subnetwork to attach this interface to. The subnetwork must exist in the same region this instance will be created in. Eithernetworkorsubnetworkmust be provided.subnetworkProject(pulumi.Input[str]) - The project in which the subnetwork belongs. If thesubnetworkis a self_link, this field is ignored in favor of the project defined in the subnetwork self_link. If thesubnetworkis a name and this field is not provided, the provider project is used.
The scheduling object supports the following:
automaticRestart(pulumi.Input[bool]) - Specifies if the instance should be restarted if it was terminated by Compute Engine (not a user). Defaults to true.minNodeCpus(pulumi.Input[float])nodeAffinities(pulumi.Input[list]) - Specifies node affinities or anti-affinities to determine which sole-tenant nodes your instances and managed instance groups will use as host systems. Read more on sole-tenant node creation here. Structure documented below.key(pulumi.Input[str]) - The key for the node affinity label.operator(pulumi.Input[str]) - The operator. Can beINfor node-affinities orNOT_INfor anti-affinities.values(pulumi.Input[list])
onHostMaintenance(pulumi.Input[str]) - Describes maintenance behavior for the instance. Can be MIGRATE or TERMINATE, for more info, read here.preemptible(pulumi.Input[bool]) - Specifies if the instance is preemptible. If this field is set to true, thenautomatic_restartmust be set to false. Defaults to false.
The scratch_disks object supports the following:
interface(pulumi.Input[str]) - The disk interface to use for attaching this disk; either SCSI or NVME.
The service_account object supports the following:
email(pulumi.Input[str]) - The service account e-mail address. If not given, the default Google Compute Engine service account is used. Note:allow_stopping_for_updatemust be set to true or your instance must have adesired_statusofTERMINATEDin order to update this field.scopes(pulumi.Input[list]) - A list of service scopes. Both OAuth2 URLs and gcloud short names are supported. To allow full access to all Cloud APIs, use thecloud-platformscope. See a complete list of scopes here. Note:allow_stopping_for_updatemust be set to true or your instance must have adesired_statusofTERMINATEDin order to update this field.
The shielded_instance_config object supports the following:
enableIntegrityMonitoring(pulumi.Input[bool]) - – Compare the most recent boot measurements to the integrity policy baseline and return a pair of pass/fail results depending on whether they match or not. Defaults to true.enableSecureBoot(pulumi.Input[bool]) - – Verify the digital signature of all boot components, and halt the boot process if signature verification fails. Defaults to false.enableVtpm(pulumi.Input[bool]) - – Use a virtualized trusted platform module, which is a specialized computer chip you can use to encrypt objects like keys and certificates. Defaults to true.
allow_stopping_for_update: pulumi.Output[bool] = None¶If true, allows this prvider to stop the instance to update its properties. If you try to update a property that requires stopping the instance without setting this field, the update will fail.
attached_disks: pulumi.Output[list] = None¶Additional disks to attach to the instance. Can be repeated multiple times for multiple disks. Structure is documented below.
device_name(str) - Name with which the attached disk will be accessible under/dev/disk/by-id/google-*diskEncryptionKeyRaw(str) - A 256-bit [customer-supplied encryption key] (https://cloud.google.com/compute/docs/disks/customer-supplied-encryption), encoded in RFC 4648 base64 to encrypt this disk. Only one ofkms_key_self_linkanddisk_encryption_key_rawmay be set.diskEncryptionKeySha256(str)kmsKeySelfLink(str) - The self_link of the encryption key that is stored in Google Cloud KMS to encrypt this disk. Only one ofkms_key_self_linkanddisk_encryption_key_rawmay be set.mode(str) - Either “READ_ONLY” or “READ_WRITE”, defaults to “READ_WRITE” If you have a persistent disk with data that you want to share between multiple instances, detach it from any read-write instances and attach it to one or more instances in read-only mode.source(str) - The name or self_link of the disk to attach to this instance.
boot_disk: pulumi.Output[dict] = None¶The boot disk for the instance. Structure is documented below.
autoDelete(bool) - Whether the disk will be auto-deleted when the instance is deleted. Defaults to true.device_name(str) - Name with which the attached disk will be accessible under/dev/disk/by-id/google-*diskEncryptionKeyRaw(str) - A 256-bit [customer-supplied encryption key] (https://cloud.google.com/compute/docs/disks/customer-supplied-encryption), encoded in RFC 4648 base64 to encrypt this disk. Only one ofkms_key_self_linkanddisk_encryption_key_rawmay be set.diskEncryptionKeySha256(str)initializeParams(dict) - Parameters for a new disk that will be created alongside the new instance. Eitherinitialize_paramsorsourcemust be set. Structure is documented below.image(str) - The image from which to initialize this disk. This can be one of: the image’sself_link,projects/{project}/global/images/{image},projects/{project}/global/images/family/{family},global/images/{image},global/images/family/{family},family/{family},{project}/{family},{project}/{image},{family}, or{image}. If referred by family, the images names must include the family name. If they don’t, use the compute.Image data source. For instance, the imagecentos-6-v20180104includes its family namecentos-6. These images can be referred by family name here.labels(dict) - A map of key/value label pairs to assign to the instance.size(float) - The size of the image in gigabytes. If not specified, it will inherit the size of its base image.type(str) - The accelerator type resource to expose to this instance. E.g.nvidia-tesla-k80.
kmsKeySelfLink(str) - The self_link of the encryption key that is stored in Google Cloud KMS to encrypt this disk. Only one ofkms_key_self_linkanddisk_encryption_key_rawmay be set.mode(str) - Either “READ_ONLY” or “READ_WRITE”, defaults to “READ_WRITE” If you have a persistent disk with data that you want to share between multiple instances, detach it from any read-write instances and attach it to one or more instances in read-only mode.source(str) - The name or self_link of the disk to attach to this instance.
can_ip_forward: pulumi.Output[bool] = None¶Whether to allow sending and receiving of packets with non-matching source or destination IPs. This defaults to false.
cpu_platform: pulumi.Output[str] = None¶The CPU platform used by this instance.
deletion_protection: pulumi.Output[bool] = None¶Enable deletion protection on this instance. Defaults to false. Note: you must disable deletion protection before removing the resource (e.g., via
pulumi destroy), or the instance cannot be deleted and the provider run will not complete successfully.
description: pulumi.Output[str] = None¶A brief description of this resource.
desired_status: pulumi.Output[str] = None¶Desired status of the instance. Either
"RUNNING"or"TERMINATED".
enable_display: pulumi.Output[bool] = None¶Enable Virtual Displays on this instance. Note:
allow_stopping_for_updatemust be set to true or your instance must have adesired_statusofTERMINATEDin order to update this field.
guest_accelerators: pulumi.Output[list] = None¶List of the type and count of accelerator cards attached to the instance. Structure documented below. Note: GPU accelerators can only be used with
on_host_maintenanceoption set to TERMINATE.count(float) - The number of the guest accelerator cards exposed to this instance.type(str) - The accelerator type resource to expose to this instance. E.g.nvidia-tesla-k80.
hostname: pulumi.Output[str] = None¶A custom hostname for the instance. Must be a fully qualified DNS name and RFC-1035-valid. Valid format is a series of labels 1-63 characters long matching the regular expression
a-z, concatenated with periods. The entire hostname must not exceed 253 characters. Changing this forces a new resource to be created.
instance_id: pulumi.Output[str] = None¶The server-assigned unique identifier of this instance.
label_fingerprint: pulumi.Output[str] = None¶The unique fingerprint of the labels.
labels: pulumi.Output[dict] = None¶A map of key/value label pairs to assign to the instance.
machine_type: pulumi.Output[str] = None¶The machine type to create.
metadata: pulumi.Output[dict] = None¶Metadata key/value pairs to make available from within the instance. Ssh keys attached in the Cloud Console will be removed. Add them to your config in order to keep them attached to your instance.
metadata_fingerprint: pulumi.Output[str] = None¶The unique fingerprint of the metadata.
metadata_startup_script: pulumi.Output[str] = None¶An alternative to using the startup-script metadata key, except this one forces the instance to be recreated (thus re-running the script) if it is changed. This replaces the startup-script metadata key on the created instance and thus the two mechanisms are not allowed to be used simultaneously. Users are free to use either mechanism - the only distinction is that this separate attribute willl cause a recreate on modification. On import,
metadata_startup_scriptwill be set, butmetadata.startup-scriptwill not - if you choose to use the other mechanism, you will see a diff immediately after import, which will cause a destroy/recreate operation. You may want to modify your state file manually usingpulumi stackcommands, depending on your use case.
min_cpu_platform: pulumi.Output[str] = None¶Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as
Intel HaswellorIntel Skylake. See the complete list here. Note:allow_stopping_for_updatemust be set to true or your instance must have adesired_statusofTERMINATEDin order to update this field.
name: pulumi.Output[str] = None¶A unique name for the resource, required by GCE. Changing this forces a new resource to be created.
network_interfaces: pulumi.Output[list] = None¶Networks to attach to the instance. This can be specified multiple times. Structure is documented below.
accessConfigs(list) - Access configurations, i.e. IPs via which this instance can be accessed via the Internet. Omit to ensure that the instance is not accessible from the Internet. If omitted, ssh will not work unless this provider can send traffic to the instance’s network (e.g. via tunnel or because it is running on another cloud instance on that network). This block can be repeated multiple times. Structure documented below.natIp(str) - The IP address that will be 1:1 mapped to the instance’s network ip. If not given, one will be generated.network_tier(str) - The [networking tier][network-tier] used for configuring this instance. This field can take the following values: PREMIUM or STANDARD. If this field is not specified, it is assumed to be PREMIUM.publicPtrDomainName(str) - The DNS domain name for the public PTR record. To set this field on an instance, you must be verified as the owner of the domain. See the docs for how to become verified as a domain owner.
aliasIpRanges(list) - An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks. Structure documented below.ip_cidr_range(str) - The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 10.2.3.4), a netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24).subnetworkRangeName(str) - The subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used.
name(str) - A unique name for the resource, required by GCE. Changing this forces a new resource to be created.network(str) - The name or self_link of the network to attach this interface to. Eithernetworkorsubnetworkmust be provided.networkIp(str) - The private IP address to assign to the instance. If empty, the address will be automatically assigned.subnetwork(str) - The name or self_link of the subnetwork to attach this interface to. The subnetwork must exist in the same region this instance will be created in. Eithernetworkorsubnetworkmust be provided.subnetworkProject(str) - The project in which the subnetwork belongs. If thesubnetworkis a self_link, this field is ignored in favor of the project defined in the subnetwork self_link. If thesubnetworkis a name and this field is not provided, the provider project is used.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
resource_policies: pulumi.Output[str] = None¶– A list of short names or self_links of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported.
scheduling: pulumi.Output[dict] = None¶The scheduling strategy to use. More details about this configuration option are detailed below.
automaticRestart(bool) - Specifies if the instance should be restarted if it was terminated by Compute Engine (not a user). Defaults to true.minNodeCpus(float)nodeAffinities(list) - Specifies node affinities or anti-affinities to determine which sole-tenant nodes your instances and managed instance groups will use as host systems. Read more on sole-tenant node creation here. Structure documented below.key(str) - The key for the node affinity label.operator(str) - The operator. Can beINfor node-affinities orNOT_INfor anti-affinities.values(list)
onHostMaintenance(str) - Describes maintenance behavior for the instance. Can be MIGRATE or TERMINATE, for more info, read here.preemptible(bool) - Specifies if the instance is preemptible. If this field is set to true, thenautomatic_restartmust be set to false. Defaults to false.
scratch_disks: pulumi.Output[list] = None¶Scratch disks to attach to the instance. This can be specified multiple times for multiple scratch disks. Structure is documented below.
interface(str) - The disk interface to use for attaching this disk; either SCSI or NVME.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
service_account: pulumi.Output[dict] = None¶Service account to attach to the instance. Structure is documented below. Note:
allow_stopping_for_updatemust be set to true or your instance must have adesired_statusofTERMINATEDin order to update this field.email(str) - The service account e-mail address. If not given, the default Google Compute Engine service account is used. Note:allow_stopping_for_updatemust be set to true or your instance must have adesired_statusofTERMINATEDin order to update this field.scopes(list) - A list of service scopes. Both OAuth2 URLs and gcloud short names are supported. To allow full access to all Cloud APIs, use thecloud-platformscope. See a complete list of scopes here. Note:allow_stopping_for_updatemust be set to true or your instance must have adesired_statusofTERMINATEDin order to update this field.
shielded_instance_config: pulumi.Output[dict] = None¶Enable Shielded VM on this instance. Shielded VM provides verifiable integrity to prevent against malware and rootkits. Defaults to disabled. Structure is documented below. Note:
shielded_instance_configcan only be used with boot images with shielded vm support. See the complete list here.enableIntegrityMonitoring(bool) - – Compare the most recent boot measurements to the integrity policy baseline and return a pair of pass/fail results depending on whether they match or not. Defaults to true.enableSecureBoot(bool) - – Verify the digital signature of all boot components, and halt the boot process if signature verification fails. Defaults to false.enableVtpm(bool) - – Use a virtualized trusted platform module, which is a specialized computer chip you can use to encrypt objects like keys and certificates. Defaults to true.
A list of tags to attach to the instance.
The unique fingerprint of the tags.
zone: pulumi.Output[str] = None¶The zone that the machine should be created in.
- static
get(resource_name, id, opts=None, allow_stopping_for_update=None, attached_disks=None, boot_disk=None, can_ip_forward=None, cpu_platform=None, current_status=None, deletion_protection=None, description=None, desired_status=None, enable_display=None, guest_accelerators=None, hostname=None, instance_id=None, label_fingerprint=None, labels=None, machine_type=None, metadata=None, metadata_fingerprint=None, metadata_startup_script=None, min_cpu_platform=None, name=None, network_interfaces=None, project=None, resource_policies=None, scheduling=None, scratch_disks=None, self_link=None, service_account=None, shielded_instance_config=None, tags=None, tags_fingerprint=None, zone=None)¶ Get an existing Instance resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
allow_stopping_for_update (pulumi.Input[bool]) – If true, allows this prvider to stop the instance to update its properties. If you try to update a property that requires stopping the instance without setting this field, the update will fail.
attached_disks (pulumi.Input[list]) – Additional disks to attach to the instance. Can be repeated multiple times for multiple disks. Structure is documented below.
boot_disk (pulumi.Input[dict]) – The boot disk for the instance. Structure is documented below.
can_ip_forward (pulumi.Input[bool]) – Whether to allow sending and receiving of packets with non-matching source or destination IPs. This defaults to false.
cpu_platform (pulumi.Input[str]) – The CPU platform used by this instance.
deletion_protection (pulumi.Input[bool]) – Enable deletion protection on this instance. Defaults to false. Note: you must disable deletion protection before removing the resource (e.g., via
pulumi destroy), or the instance cannot be deleted and the provider run will not complete successfully.description (pulumi.Input[str]) – A brief description of this resource.
desired_status (pulumi.Input[str]) – Desired status of the instance. Either
"RUNNING"or"TERMINATED".enable_display (pulumi.Input[bool]) –
Enable Virtual Displays on this instance. Note:
allow_stopping_for_updatemust be set to true or your instance must have adesired_statusofTERMINATEDin order to update this field.guest_accelerators (pulumi.Input[list]) – List of the type and count of accelerator cards attached to the instance. Structure documented below. Note: GPU accelerators can only be used with
on_host_maintenanceoption set to TERMINATE.hostname (pulumi.Input[str]) – A custom hostname for the instance. Must be a fully qualified DNS name and RFC-1035-valid. Valid format is a series of labels 1-63 characters long matching the regular expression
a-z, concatenated with periods. The entire hostname must not exceed 253 characters. Changing this forces a new resource to be created.instance_id (pulumi.Input[str]) – The server-assigned unique identifier of this instance.
label_fingerprint (pulumi.Input[str]) – The unique fingerprint of the labels.
labels (pulumi.Input[dict]) – A map of key/value label pairs to assign to the instance.
machine_type (pulumi.Input[str]) – The machine type to create.
metadata (pulumi.Input[dict]) – Metadata key/value pairs to make available from within the instance. Ssh keys attached in the Cloud Console will be removed. Add them to your config in order to keep them attached to your instance.
metadata_fingerprint (pulumi.Input[str]) – The unique fingerprint of the metadata.
metadata_startup_script (pulumi.Input[str]) – An alternative to using the startup-script metadata key, except this one forces the instance to be recreated (thus re-running the script) if it is changed. This replaces the startup-script metadata key on the created instance and thus the two mechanisms are not allowed to be used simultaneously. Users are free to use either mechanism - the only distinction is that this separate attribute willl cause a recreate on modification. On import,
metadata_startup_scriptwill be set, butmetadata.startup-scriptwill not - if you choose to use the other mechanism, you will see a diff immediately after import, which will cause a destroy/recreate operation. You may want to modify your state file manually usingpulumi stackcommands, depending on your use case.min_cpu_platform (pulumi.Input[str]) –
Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as
Intel HaswellorIntel Skylake. See the complete list here. Note:allow_stopping_for_updatemust be set to true or your instance must have adesired_statusofTERMINATEDin order to update this field.name (pulumi.Input[str]) – A unique name for the resource, required by GCE. Changing this forces a new resource to be created.
network_interfaces (pulumi.Input[list]) – Networks to attach to the instance. This can be specified multiple times. Structure is documented below.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
resource_policies (pulumi.Input[str]) – – A list of short names or self_links of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported.
scheduling (pulumi.Input[dict]) – The scheduling strategy to use. More details about this configuration option are detailed below.
scratch_disks (pulumi.Input[list]) – Scratch disks to attach to the instance. This can be specified multiple times for multiple scratch disks. Structure is documented below.
self_link (pulumi.Input[str]) – The URI of the created resource.
service_account (pulumi.Input[dict]) – Service account to attach to the instance. Structure is documented below. Note:
allow_stopping_for_updatemust be set to true or your instance must have adesired_statusofTERMINATEDin order to update this field.shielded_instance_config (pulumi.Input[dict]) –
Enable Shielded VM on this instance. Shielded VM provides verifiable integrity to prevent against malware and rootkits. Defaults to disabled. Structure is documented below. Note:
shielded_instance_configcan only be used with boot images with shielded vm support. See the complete list here.tags (pulumi.Input[list]) – A list of tags to attach to the instance.
tags_fingerprint (pulumi.Input[str]) – The unique fingerprint of the tags.
zone (pulumi.Input[str]) – The zone that the machine should be created in.
The attached_disks object supports the following:
device_name(pulumi.Input[str]) - Name with which the attached disk will be accessible under/dev/disk/by-id/google-*diskEncryptionKeyRaw(pulumi.Input[str]) - A 256-bit [customer-supplied encryption key] (https://cloud.google.com/compute/docs/disks/customer-supplied-encryption), encoded in RFC 4648 base64 to encrypt this disk. Only one ofkms_key_self_linkanddisk_encryption_key_rawmay be set.diskEncryptionKeySha256(pulumi.Input[str])kmsKeySelfLink(pulumi.Input[str]) - The self_link of the encryption key that is stored in Google Cloud KMS to encrypt this disk. Only one ofkms_key_self_linkanddisk_encryption_key_rawmay be set.mode(pulumi.Input[str]) - Either “READ_ONLY” or “READ_WRITE”, defaults to “READ_WRITE” If you have a persistent disk with data that you want to share between multiple instances, detach it from any read-write instances and attach it to one or more instances in read-only mode.source(pulumi.Input[str]) - The name or self_link of the disk to attach to this instance.
The boot_disk object supports the following:
autoDelete(pulumi.Input[bool]) - Whether the disk will be auto-deleted when the instance is deleted. Defaults to true.device_name(pulumi.Input[str]) - Name with which the attached disk will be accessible under/dev/disk/by-id/google-*diskEncryptionKeyRaw(pulumi.Input[str]) - A 256-bit [customer-supplied encryption key] (https://cloud.google.com/compute/docs/disks/customer-supplied-encryption), encoded in RFC 4648 base64 to encrypt this disk. Only one ofkms_key_self_linkanddisk_encryption_key_rawmay be set.diskEncryptionKeySha256(pulumi.Input[str])initializeParams(pulumi.Input[dict]) - Parameters for a new disk that will be created alongside the new instance. Eitherinitialize_paramsorsourcemust be set. Structure is documented below.image(pulumi.Input[str]) - The image from which to initialize this disk. This can be one of: the image’sself_link,projects/{project}/global/images/{image},projects/{project}/global/images/family/{family},global/images/{image},global/images/family/{family},family/{family},{project}/{family},{project}/{image},{family}, or{image}. If referred by family, the images names must include the family name. If they don’t, use the compute.Image data source. For instance, the imagecentos-6-v20180104includes its family namecentos-6. These images can be referred by family name here.labels(pulumi.Input[dict]) - A map of key/value label pairs to assign to the instance.size(pulumi.Input[float]) - The size of the image in gigabytes. If not specified, it will inherit the size of its base image.type(pulumi.Input[str]) - The accelerator type resource to expose to this instance. E.g.nvidia-tesla-k80.
kmsKeySelfLink(pulumi.Input[str]) - The self_link of the encryption key that is stored in Google Cloud KMS to encrypt this disk. Only one ofkms_key_self_linkanddisk_encryption_key_rawmay be set.mode(pulumi.Input[str]) - Either “READ_ONLY” or “READ_WRITE”, defaults to “READ_WRITE” If you have a persistent disk with data that you want to share between multiple instances, detach it from any read-write instances and attach it to one or more instances in read-only mode.source(pulumi.Input[str]) - The name or self_link of the disk to attach to this instance.
The guest_accelerators object supports the following:
count(pulumi.Input[float]) - The number of the guest accelerator cards exposed to this instance.type(pulumi.Input[str]) - The accelerator type resource to expose to this instance. E.g.nvidia-tesla-k80.
The network_interfaces object supports the following:
accessConfigs(pulumi.Input[list]) - Access configurations, i.e. IPs via which this instance can be accessed via the Internet. Omit to ensure that the instance is not accessible from the Internet. If omitted, ssh will not work unless this provider can send traffic to the instance’s network (e.g. via tunnel or because it is running on another cloud instance on that network). This block can be repeated multiple times. Structure documented below.natIp(pulumi.Input[str]) - The IP address that will be 1:1 mapped to the instance’s network ip. If not given, one will be generated.network_tier(pulumi.Input[str]) - The [networking tier][network-tier] used for configuring this instance. This field can take the following values: PREMIUM or STANDARD. If this field is not specified, it is assumed to be PREMIUM.publicPtrDomainName(pulumi.Input[str]) - The DNS domain name for the public PTR record. To set this field on an instance, you must be verified as the owner of the domain. See the docs for how to become verified as a domain owner.
aliasIpRanges(pulumi.Input[list]) - An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks. Structure documented below.ip_cidr_range(pulumi.Input[str]) - The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 10.2.3.4), a netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24).subnetworkRangeName(pulumi.Input[str]) - The subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used.
name(pulumi.Input[str]) - A unique name for the resource, required by GCE. Changing this forces a new resource to be created.network(pulumi.Input[str]) - The name or self_link of the network to attach this interface to. Eithernetworkorsubnetworkmust be provided.networkIp(pulumi.Input[str]) - The private IP address to assign to the instance. If empty, the address will be automatically assigned.subnetwork(pulumi.Input[str]) - The name or self_link of the subnetwork to attach this interface to. The subnetwork must exist in the same region this instance will be created in. Eithernetworkorsubnetworkmust be provided.subnetworkProject(pulumi.Input[str]) - The project in which the subnetwork belongs. If thesubnetworkis a self_link, this field is ignored in favor of the project defined in the subnetwork self_link. If thesubnetworkis a name and this field is not provided, the provider project is used.
The scheduling object supports the following:
automaticRestart(pulumi.Input[bool]) - Specifies if the instance should be restarted if it was terminated by Compute Engine (not a user). Defaults to true.minNodeCpus(pulumi.Input[float])nodeAffinities(pulumi.Input[list]) - Specifies node affinities or anti-affinities to determine which sole-tenant nodes your instances and managed instance groups will use as host systems. Read more on sole-tenant node creation here. Structure documented below.key(pulumi.Input[str]) - The key for the node affinity label.operator(pulumi.Input[str]) - The operator. Can beINfor node-affinities orNOT_INfor anti-affinities.values(pulumi.Input[list])
onHostMaintenance(pulumi.Input[str]) - Describes maintenance behavior for the instance. Can be MIGRATE or TERMINATE, for more info, read here.preemptible(pulumi.Input[bool]) - Specifies if the instance is preemptible. If this field is set to true, thenautomatic_restartmust be set to false. Defaults to false.
The scratch_disks object supports the following:
interface(pulumi.Input[str]) - The disk interface to use for attaching this disk; either SCSI or NVME.
The service_account object supports the following:
email(pulumi.Input[str]) - The service account e-mail address. If not given, the default Google Compute Engine service account is used. Note:allow_stopping_for_updatemust be set to true or your instance must have adesired_statusofTERMINATEDin order to update this field.scopes(pulumi.Input[list]) - A list of service scopes. Both OAuth2 URLs and gcloud short names are supported. To allow full access to all Cloud APIs, use thecloud-platformscope. See a complete list of scopes here. Note:allow_stopping_for_updatemust be set to true or your instance must have adesired_statusofTERMINATEDin order to update this field.
The shielded_instance_config object supports the following:
enableIntegrityMonitoring(pulumi.Input[bool]) - – Compare the most recent boot measurements to the integrity policy baseline and return a pair of pass/fail results depending on whether they match or not. Defaults to true.enableSecureBoot(pulumi.Input[bool]) - – Verify the digital signature of all boot components, and halt the boot process if signature verification fails. Defaults to false.enableVtpm(pulumi.Input[bool]) - – Use a virtualized trusted platform module, which is a specialized computer chip you can use to encrypt objects like keys and certificates. Defaults to true.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.InstanceFromTemplate(resource_name, opts=None, allow_stopping_for_update=None, attached_disks=None, boot_disk=None, can_ip_forward=None, deletion_protection=None, description=None, desired_status=None, enable_display=None, guest_accelerators=None, hostname=None, labels=None, machine_type=None, metadata=None, metadata_startup_script=None, min_cpu_platform=None, name=None, network_interfaces=None, project=None, resource_policies=None, scheduling=None, scratch_disks=None, service_account=None, shielded_instance_config=None, source_instance_template=None, tags=None, zone=None, __props__=None, __name__=None, __opts__=None)¶ Manages a VM instance resource within GCE. For more information see the official documentation and API.
This resource is specifically to create a compute instance from a given
source_instance_template. To create an instance without a template, use thecompute.Instanceresource.import pulumi import pulumi_gcp as gcp tpl_instance_template = gcp.compute.InstanceTemplate("tplInstanceTemplate", machine_type="n1-standard-1", disk=[{ "sourceImage": "debian-cloud/debian-9", "autoDelete": True, "disk_size_gb": 100, "boot": True, }], network_interface=[{ "network": "default", }], metadata={ "foo": "bar", }, can_ip_forward=True) tpl_instance_from_template = gcp.compute.InstanceFromTemplate("tplInstanceFromTemplate", zone="us-central1-a", source_instance_template=tpl_instance_template.id, can_ip_forward=False, labels={ "my_key": "my_value", })
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
name (pulumi.Input[str]) – A unique name for the resource, required by GCE. Changing this forces a new resource to be created.
source_instance_template (pulumi.Input[str]) – Name or self link of an instance template to create the instance based on.
zone (pulumi.Input[str]) – The zone that the machine should be created in. If not set, the provider zone is used.
The attached_disks object supports the following:
device_name(pulumi.Input[str])diskEncryptionKeyRaw(pulumi.Input[str])diskEncryptionKeySha256(pulumi.Input[str])kmsKeySelfLink(pulumi.Input[str])mode(pulumi.Input[str])source(pulumi.Input[str])
The boot_disk object supports the following:
autoDelete(pulumi.Input[bool])device_name(pulumi.Input[str])diskEncryptionKeyRaw(pulumi.Input[str])diskEncryptionKeySha256(pulumi.Input[str])initializeParams(pulumi.Input[dict])image(pulumi.Input[str])labels(pulumi.Input[dict])size(pulumi.Input[float])type(pulumi.Input[str])
kmsKeySelfLink(pulumi.Input[str])mode(pulumi.Input[str])source(pulumi.Input[str])
The guest_accelerators object supports the following:
count(pulumi.Input[float])type(pulumi.Input[str])
The network_interfaces object supports the following:
accessConfigs(pulumi.Input[list])natIp(pulumi.Input[str])network_tier(pulumi.Input[str])publicPtrDomainName(pulumi.Input[str])
aliasIpRanges(pulumi.Input[list])ip_cidr_range(pulumi.Input[str])subnetworkRangeName(pulumi.Input[str])
name(pulumi.Input[str]) - A unique name for the resource, required by GCE. Changing this forces a new resource to be created.network(pulumi.Input[str])networkIp(pulumi.Input[str])subnetwork(pulumi.Input[str])subnetworkProject(pulumi.Input[str])
The scheduling object supports the following:
automaticRestart(pulumi.Input[bool])minNodeCpus(pulumi.Input[float])nodeAffinities(pulumi.Input[list])key(pulumi.Input[str])operator(pulumi.Input[str])values(pulumi.Input[list])
onHostMaintenance(pulumi.Input[str])preemptible(pulumi.Input[bool])
The scratch_disks object supports the following:
interface(pulumi.Input[str])
The service_account object supports the following:
email(pulumi.Input[str])scopes(pulumi.Input[list])
The shielded_instance_config object supports the following:
enableIntegrityMonitoring(pulumi.Input[bool])enableSecureBoot(pulumi.Input[bool])enableVtpm(pulumi.Input[bool])
name: pulumi.Output[str] = None¶A unique name for the resource, required by GCE. Changing this forces a new resource to be created.
source_instance_template: pulumi.Output[str] = None¶Name or self link of an instance template to create the instance based on.
zone: pulumi.Output[str] = None¶The zone that the machine should be created in. If not set, the provider zone is used.
- static
get(resource_name, id, opts=None, allow_stopping_for_update=None, attached_disks=None, boot_disk=None, can_ip_forward=None, cpu_platform=None, current_status=None, deletion_protection=None, description=None, desired_status=None, enable_display=None, guest_accelerators=None, hostname=None, instance_id=None, label_fingerprint=None, labels=None, machine_type=None, metadata=None, metadata_fingerprint=None, metadata_startup_script=None, min_cpu_platform=None, name=None, network_interfaces=None, project=None, resource_policies=None, scheduling=None, scratch_disks=None, self_link=None, service_account=None, shielded_instance_config=None, source_instance_template=None, tags=None, tags_fingerprint=None, zone=None)¶ Get an existing InstanceFromTemplate resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
name (pulumi.Input[str]) – A unique name for the resource, required by GCE. Changing this forces a new resource to be created.
source_instance_template (pulumi.Input[str]) – Name or self link of an instance template to create the instance based on.
zone (pulumi.Input[str]) – The zone that the machine should be created in. If not set, the provider zone is used.
The attached_disks object supports the following:
device_name(pulumi.Input[str])diskEncryptionKeyRaw(pulumi.Input[str])diskEncryptionKeySha256(pulumi.Input[str])kmsKeySelfLink(pulumi.Input[str])mode(pulumi.Input[str])source(pulumi.Input[str])
The boot_disk object supports the following:
autoDelete(pulumi.Input[bool])device_name(pulumi.Input[str])diskEncryptionKeyRaw(pulumi.Input[str])diskEncryptionKeySha256(pulumi.Input[str])initializeParams(pulumi.Input[dict])image(pulumi.Input[str])labels(pulumi.Input[dict])size(pulumi.Input[float])type(pulumi.Input[str])
kmsKeySelfLink(pulumi.Input[str])mode(pulumi.Input[str])source(pulumi.Input[str])
The guest_accelerators object supports the following:
count(pulumi.Input[float])type(pulumi.Input[str])
The network_interfaces object supports the following:
accessConfigs(pulumi.Input[list])natIp(pulumi.Input[str])network_tier(pulumi.Input[str])publicPtrDomainName(pulumi.Input[str])
aliasIpRanges(pulumi.Input[list])ip_cidr_range(pulumi.Input[str])subnetworkRangeName(pulumi.Input[str])
name(pulumi.Input[str]) - A unique name for the resource, required by GCE. Changing this forces a new resource to be created.network(pulumi.Input[str])networkIp(pulumi.Input[str])subnetwork(pulumi.Input[str])subnetworkProject(pulumi.Input[str])
The scheduling object supports the following:
automaticRestart(pulumi.Input[bool])minNodeCpus(pulumi.Input[float])nodeAffinities(pulumi.Input[list])key(pulumi.Input[str])operator(pulumi.Input[str])values(pulumi.Input[list])
onHostMaintenance(pulumi.Input[str])preemptible(pulumi.Input[bool])
The scratch_disks object supports the following:
interface(pulumi.Input[str])
The service_account object supports the following:
email(pulumi.Input[str])scopes(pulumi.Input[list])
The shielded_instance_config object supports the following:
enableIntegrityMonitoring(pulumi.Input[bool])enableSecureBoot(pulumi.Input[bool])enableVtpm(pulumi.Input[bool])
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.InstanceGroup(resource_name, opts=None, description=None, instances=None, name=None, named_ports=None, network=None, project=None, zone=None, __props__=None, __name__=None, __opts__=None)¶ Creates a group of dissimilar Compute Engine virtual machine instances. For more information, see the official documentation and API
import pulumi import pulumi_gcp as gcp test = gcp.compute.InstanceGroup("test", description="Test instance group", zone="us-central1-a", network=google_compute_network["default"]["id"])
import pulumi import pulumi_gcp as gcp webservers = gcp.compute.InstanceGroup("webservers", description="Test instance group", instances=[ google_compute_instance["test"]["id"], google_compute_instance["test2"]["id"], ], named_port=[ { "name": "http", "port": "8080", }, { "name": "https", "port": "8443", }, ], zone="us-central1-a")
import pulumi import pulumi_gcp as gcp debian_image = gcp.compute.get_image(family="debian-9", project="debian-cloud") staging_vm = gcp.compute.Instance("stagingVm", machine_type="n1-standard-1", zone="us-central1-c", boot_disk={ "initialize_params": { "image": debian_image.self_link, }, }, network_interface=[{ "network": "default", }]) staging_group = gcp.compute.InstanceGroup("stagingGroup", zone="us-central1-c", instances=[staging_vm.id], named_port=[ { "name": "http", "port": "8080", }, { "name": "https", "port": "8443", }, ]) staging_health = gcp.compute.HttpsHealthCheck("stagingHealth", request_path="/health_check") staging_service = gcp.compute.BackendService("stagingService", port_name="https", protocol="HTTPS", backend=[{ "group": staging_group.id, }], health_checks=[staging_health.id])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – An optional textual description of the instance group.
instances (pulumi.Input[list]) – List of instances in the group. They should be given as either self_link or id. When adding instances they must all be in the same network and zone as the instance group.
name (pulumi.Input[str]) – The name which the port will be mapped to.
named_ports (pulumi.Input[list]) – The named port configuration. See the section below for details on configuration.
network (pulumi.Input[str]) – The URL of the network the instance group is in. If this is different from the network where the instances are in, the creation fails. Defaults to the network where the instances are in (if neither
networknorinstancesis specified, this field will be blank).project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
zone (pulumi.Input[str]) – The zone that this instance group should be created in.
The named_ports object supports the following:
name(pulumi.Input[str]) - The name which the port will be mapped to.port(pulumi.Input[float]) - The port number to map the name to.
description: pulumi.Output[str] = None¶An optional textual description of the instance group.
instances: pulumi.Output[list] = None¶List of instances in the group. They should be given as either self_link or id. When adding instances they must all be in the same network and zone as the instance group.
name: pulumi.Output[str] = None¶The name which the port will be mapped to.
named_ports: pulumi.Output[list] = None¶The named port configuration. See the section below for details on configuration.
name(str) - The name which the port will be mapped to.port(float) - The port number to map the name to.
network: pulumi.Output[str] = None¶The URL of the network the instance group is in. If this is different from the network where the instances are in, the creation fails. Defaults to the network where the instances are in (if neither
networknorinstancesis specified, this field will be blank).
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
size: pulumi.Output[float] = None¶The number of instances in the group.
zone: pulumi.Output[str] = None¶The zone that this instance group should be created in.
- static
get(resource_name, id, opts=None, description=None, instances=None, name=None, named_ports=None, network=None, project=None, self_link=None, size=None, zone=None)¶ Get an existing InstanceGroup resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – An optional textual description of the instance group.
instances (pulumi.Input[list]) – List of instances in the group. They should be given as either self_link or id. When adding instances they must all be in the same network and zone as the instance group.
name (pulumi.Input[str]) – The name which the port will be mapped to.
named_ports (pulumi.Input[list]) – The named port configuration. See the section below for details on configuration.
network (pulumi.Input[str]) – The URL of the network the instance group is in. If this is different from the network where the instances are in, the creation fails. Defaults to the network where the instances are in (if neither
networknorinstancesis specified, this field will be blank).project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link (pulumi.Input[str]) – The URI of the created resource.
size (pulumi.Input[float]) – The number of instances in the group.
zone (pulumi.Input[str]) – The zone that this instance group should be created in.
The named_ports object supports the following:
name(pulumi.Input[str]) - The name which the port will be mapped to.port(pulumi.Input[float]) - The port number to map the name to.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.InstanceGroupManager(resource_name, opts=None, auto_healing_policies=None, base_instance_name=None, description=None, name=None, named_ports=None, project=None, stateful_disks=None, target_pools=None, target_size=None, update_policy=None, versions=None, wait_for_instances=None, zone=None, __props__=None, __name__=None, __opts__=None)¶ The Google Compute Engine Instance Group Manager API creates and manages pools of homogeneous Compute Engine virtual machine instances from a common instance template. For more information, see the official documentation and API
Note: Use compute.RegionInstanceGroupManager to create a regional (multi-zone) instance group manager.
import pulumi import pulumi_gcp as gcp autohealing = gcp.compute.HealthCheck("autohealing", check_interval_sec=5, timeout_sec=5, healthy_threshold=2, unhealthy_threshold=10, http_health_check={ "request_path": "/healthz", "port": "8080", }) appserver = gcp.compute.InstanceGroupManager("appserver", base_instance_name="app", zone="us-central1-a", version=[{ "instanceTemplate": google_compute_instance_template["appserver"]["id"], }], target_pools=[google_compute_target_pool["appserver"]["id"]], target_size=2, named_port=[{ "name": "customHTTP", "port": 8888, }], auto_healing_policies={ "healthCheck": autohealing.id, "initialDelaySec": 300, })
import pulumi import pulumi_gcp as gcp appserver = gcp.compute.InstanceGroupManager("appserver", base_instance_name="app", zone="us-central1-a", target_size=5, version=[ { "name": "appserver", "instanceTemplate": google_compute_instance_template["appserver"]["id"], }, { "name": "appserver-canary", "instanceTemplate": google_compute_instance_template["appserver-canary"]["id"], "target_size": { "fixed": 1, }, }, ])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
auto_healing_policies (pulumi.Input[dict]) –
The autohealing policies for this managed instance group. You can specify only one value. Structure is documented below. For more information, see the official documentation.
base_instance_name (pulumi.Input[str]) – The base instance name to use for instances in this group. The value must be a valid RFC1035 name. Supported characters are lowercase letters, numbers, and hyphens (-). Instances are named by appending a hyphen and a random four-character string to the base instance name.
description (pulumi.Input[str]) – An optional textual description of the instance group manager.
name (pulumi.Input[str]) –
Version name.
named_ports (pulumi.Input[list]) – The named port configuration. See the section below for details on configuration.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
stateful_disks (pulumi.Input[list]) –
Disks created on the instances that will be preserved on instance delete, update, etc. Structure is documented below. For more information see the official documentation.
target_pools (pulumi.Input[list]) – The full URL of all target pools to which new instances in the group are added. Updating the target pools attribute does not affect existing instances.
target_size (pulumi.Input[float]) –
The number of instances calculated as a fixed number or a percentage depending on the settings. Structure is documented below.
update_policy (pulumi.Input[dict]) –
The update policy for this managed instance group. Structure is documented below. For more information, see the official documentation and API
versions (pulumi.Input[list]) – Application versions managed by this instance group. Each version deals with a specific instance template, allowing canary release scenarios. Structure is documented below.
wait_for_instances (pulumi.Input[bool]) – Whether to wait for all instances to be created/updated before returning. Note that if this is set to true and the operation does not succeed, this provider will continue trying until it times out.
zone (pulumi.Input[str]) – The zone that instances in this group should be created in.
The auto_healing_policies object supports the following:
healthCheck(pulumi.Input[str]) - The health check resource that signals autohealing.initialDelaySec(pulumi.Input[float]) - The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. Between 0 and 3600.
The named_ports object supports the following:
name(pulumi.Input[str]) - - Version name.
The stateful_disks object supports the following:
deleteRule(pulumi.Input[str]) - , A value that prescribes what should happen to the stateful disk when the VM instance is deleted. The available options areNEVERandON_PERMANENT_INSTANCE_DELETION.NEVERdetatch the disk when the VM is deleted, but not delete the disk.ON_PERMANENT_INSTANCE_DELETIONwill delete the stateful disk when the VM is permanently deleted from the instance group. The default isNEVER.device_name(pulumi.Input[str]) - , The device name of the disk to be attached.
The update_policy object supports the following:
maxSurgeFixed(pulumi.Input[float]) - , The maximum number of instances that can be created above the specified targetSize during the update process. Conflicts withmax_surge_percent. If neither is set, defaults to 1maxSurgePercent(pulumi.Input[float]) - , The maximum number of instances(calculated as percentage) that can be created above the specified targetSize during the update process. Conflicts withmax_surge_fixed.maxUnavailableFixed(pulumi.Input[float]) - , The maximum number of instances that can be unavailable during the update process. Conflicts withmax_unavailable_percent. If neither is set, defaults to 1maxUnavailablePercent(pulumi.Input[float]) - , The maximum number of instances(calculated as percentage) that can be unavailable during the update process. Conflicts withmax_unavailable_fixed.minimal_action(pulumi.Input[str]) - - Minimal action to be taken on an instance. You can specify eitherRESTARTto restart existing instances orREPLACEto delete and create new instances from the target template. If you specify aRESTART, the Updater will attempt to perform that action only. However, if the Updater determines that the minimal action you specify is not enough to perform the update, it might perform a more disruptive action.type(pulumi.Input[str]) - - The type of update process. You can specify eitherPROACTIVEso that the instance group manager proactively executes actions in order to bring instances to their target versions orOPPORTUNISTICso that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls).
The versions object supports the following:
instanceTemplate(pulumi.Input[str]) - - The full URL to an instance template from which all new instances of this version will be created.name(pulumi.Input[str]) - - Version name.target_size(pulumi.Input[dict]) - - The number of instances calculated as a fixed number or a percentage depending on the settings. Structure is documented below.fixed(pulumi.Input[float]) - , The number of instances which are managed for this version. Conflicts withpercent.percent(pulumi.Input[float]) - , The number of instances (calculated as percentage) which are managed for this version. Conflicts withfixed. Note that when usingpercent, rounding will be in favor of explicitly settarget_sizevalues; a managed instance group with 2 instances and 2versions, one of which has atarget_size.percentof60will create 2 instances of thatversion.
auto_healing_policies: pulumi.Output[dict] = None¶The autohealing policies for this managed instance group. You can specify only one value. Structure is documented below. For more information, see the official documentation.
healthCheck(str) - The health check resource that signals autohealing.initialDelaySec(float) - The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. Between 0 and 3600.
base_instance_name: pulumi.Output[str] = None¶The base instance name to use for instances in this group. The value must be a valid RFC1035 name. Supported characters are lowercase letters, numbers, and hyphens (-). Instances are named by appending a hyphen and a random four-character string to the base instance name.
description: pulumi.Output[str] = None¶An optional textual description of the instance group manager.
fingerprint: pulumi.Output[str] = None¶The fingerprint of the instance group manager.
instance_group: pulumi.Output[str] = None¶The full URL of the instance group created by the manager.
name: pulumi.Output[str] = None¶Version name.
named_ports: pulumi.Output[list] = None¶The named port configuration. See the section below for details on configuration.
name(str) - - Version name.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link: pulumi.Output[str] = None¶The URL of the created resource.
stateful_disks: pulumi.Output[list] = None¶Disks created on the instances that will be preserved on instance delete, update, etc. Structure is documented below. For more information see the official documentation.
deleteRule(str) - , A value that prescribes what should happen to the stateful disk when the VM instance is deleted. The available options areNEVERandON_PERMANENT_INSTANCE_DELETION.NEVERdetatch the disk when the VM is deleted, but not delete the disk.ON_PERMANENT_INSTANCE_DELETIONwill delete the stateful disk when the VM is permanently deleted from the instance group. The default isNEVER.device_name(str) - , The device name of the disk to be attached.
target_pools: pulumi.Output[list] = None¶The full URL of all target pools to which new instances in the group are added. Updating the target pools attribute does not affect existing instances.
target_size: pulumi.Output[float] = None¶The number of instances calculated as a fixed number or a percentage depending on the settings. Structure is documented below.
update_policy: pulumi.Output[dict] = None¶The update policy for this managed instance group. Structure is documented below. For more information, see the official documentation and API
maxSurgeFixed(float) - , The maximum number of instances that can be created above the specified targetSize during the update process. Conflicts withmax_surge_percent. If neither is set, defaults to 1maxSurgePercent(float) - , The maximum number of instances(calculated as percentage) that can be created above the specified targetSize during the update process. Conflicts withmax_surge_fixed.maxUnavailableFixed(float) - , The maximum number of instances that can be unavailable during the update process. Conflicts withmax_unavailable_percent. If neither is set, defaults to 1maxUnavailablePercent(float) - , The maximum number of instances(calculated as percentage) that can be unavailable during the update process. Conflicts withmax_unavailable_fixed.minimal_action(str) - - Minimal action to be taken on an instance. You can specify eitherRESTARTto restart existing instances orREPLACEto delete and create new instances from the target template. If you specify aRESTART, the Updater will attempt to perform that action only. However, if the Updater determines that the minimal action you specify is not enough to perform the update, it might perform a more disruptive action.type(str) - - The type of update process. You can specify eitherPROACTIVEso that the instance group manager proactively executes actions in order to bring instances to their target versions orOPPORTUNISTICso that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls).
versions: pulumi.Output[list] = None¶Application versions managed by this instance group. Each version deals with a specific instance template, allowing canary release scenarios. Structure is documented below.
instanceTemplate(str) - - The full URL to an instance template from which all new instances of this version will be created.name(str) - - Version name.target_size(dict) - - The number of instances calculated as a fixed number or a percentage depending on the settings. Structure is documented below.fixed(float) - , The number of instances which are managed for this version. Conflicts withpercent.percent(float) - , The number of instances (calculated as percentage) which are managed for this version. Conflicts withfixed. Note that when usingpercent, rounding will be in favor of explicitly settarget_sizevalues; a managed instance group with 2 instances and 2versions, one of which has atarget_size.percentof60will create 2 instances of thatversion.
wait_for_instances: pulumi.Output[bool] = None¶Whether to wait for all instances to be created/updated before returning. Note that if this is set to true and the operation does not succeed, this provider will continue trying until it times out.
zone: pulumi.Output[str] = None¶The zone that instances in this group should be created in.
- static
get(resource_name, id, opts=None, auto_healing_policies=None, base_instance_name=None, description=None, fingerprint=None, instance_group=None, name=None, named_ports=None, project=None, self_link=None, stateful_disks=None, target_pools=None, target_size=None, update_policy=None, versions=None, wait_for_instances=None, zone=None)¶ Get an existing InstanceGroupManager resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
auto_healing_policies (pulumi.Input[dict]) –
The autohealing policies for this managed instance group. You can specify only one value. Structure is documented below. For more information, see the official documentation.
base_instance_name (pulumi.Input[str]) –
The base instance name to use for instances in this group. The value must be a valid RFC1035 name. Supported characters are lowercase letters, numbers, and hyphens (-). Instances are named by appending a hyphen and a random four-character string to the base instance name.
description (pulumi.Input[str]) – An optional textual description of the instance group manager.
fingerprint (pulumi.Input[str]) – The fingerprint of the instance group manager.
instance_group (pulumi.Input[str]) – The full URL of the instance group created by the manager.
name (pulumi.Input[str]) –
Version name.
named_ports (pulumi.Input[list]) – The named port configuration. See the section below for details on configuration.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link (pulumi.Input[str]) – The URL of the created resource.
stateful_disks (pulumi.Input[list]) –
Disks created on the instances that will be preserved on instance delete, update, etc. Structure is documented below. For more information see the official documentation.
target_pools (pulumi.Input[list]) – The full URL of all target pools to which new instances in the group are added. Updating the target pools attribute does not affect existing instances.
target_size (pulumi.Input[float]) –
The number of instances calculated as a fixed number or a percentage depending on the settings. Structure is documented below.
update_policy (pulumi.Input[dict]) –
The update policy for this managed instance group. Structure is documented below. For more information, see the official documentation and API
versions (pulumi.Input[list]) – Application versions managed by this instance group. Each version deals with a specific instance template, allowing canary release scenarios. Structure is documented below.
wait_for_instances (pulumi.Input[bool]) – Whether to wait for all instances to be created/updated before returning. Note that if this is set to true and the operation does not succeed, this provider will continue trying until it times out.
zone (pulumi.Input[str]) – The zone that instances in this group should be created in.
The auto_healing_policies object supports the following:
healthCheck(pulumi.Input[str]) - The health check resource that signals autohealing.initialDelaySec(pulumi.Input[float]) - The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. Between 0 and 3600.
The named_ports object supports the following:
name(pulumi.Input[str]) - - Version name.
The stateful_disks object supports the following:
deleteRule(pulumi.Input[str]) - , A value that prescribes what should happen to the stateful disk when the VM instance is deleted. The available options areNEVERandON_PERMANENT_INSTANCE_DELETION.NEVERdetatch the disk when the VM is deleted, but not delete the disk.ON_PERMANENT_INSTANCE_DELETIONwill delete the stateful disk when the VM is permanently deleted from the instance group. The default isNEVER.device_name(pulumi.Input[str]) - , The device name of the disk to be attached.
The update_policy object supports the following:
maxSurgeFixed(pulumi.Input[float]) - , The maximum number of instances that can be created above the specified targetSize during the update process. Conflicts withmax_surge_percent. If neither is set, defaults to 1maxSurgePercent(pulumi.Input[float]) - , The maximum number of instances(calculated as percentage) that can be created above the specified targetSize during the update process. Conflicts withmax_surge_fixed.maxUnavailableFixed(pulumi.Input[float]) - , The maximum number of instances that can be unavailable during the update process. Conflicts withmax_unavailable_percent. If neither is set, defaults to 1maxUnavailablePercent(pulumi.Input[float]) - , The maximum number of instances(calculated as percentage) that can be unavailable during the update process. Conflicts withmax_unavailable_fixed.minimal_action(pulumi.Input[str]) - - Minimal action to be taken on an instance. You can specify eitherRESTARTto restart existing instances orREPLACEto delete and create new instances from the target template. If you specify aRESTART, the Updater will attempt to perform that action only. However, if the Updater determines that the minimal action you specify is not enough to perform the update, it might perform a more disruptive action.type(pulumi.Input[str]) - - The type of update process. You can specify eitherPROACTIVEso that the instance group manager proactively executes actions in order to bring instances to their target versions orOPPORTUNISTICso that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls).
The versions object supports the following:
instanceTemplate(pulumi.Input[str]) - - The full URL to an instance template from which all new instances of this version will be created.name(pulumi.Input[str]) - - Version name.target_size(pulumi.Input[dict]) - - The number of instances calculated as a fixed number or a percentage depending on the settings. Structure is documented below.fixed(pulumi.Input[float]) - , The number of instances which are managed for this version. Conflicts withpercent.percent(pulumi.Input[float]) - , The number of instances (calculated as percentage) which are managed for this version. Conflicts withfixed. Note that when usingpercent, rounding will be in favor of explicitly settarget_sizevalues; a managed instance group with 2 instances and 2versions, one of which has atarget_size.percentof60will create 2 instances of thatversion.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.InstanceGroupNamedPort(resource_name, opts=None, group=None, name=None, port=None, project=None, zone=None, __props__=None, __name__=None, __opts__=None)¶ Mange the named ports setting for a managed instance group without managing the group as whole. This resource is primarily intended for use with GKE-generated groups that shouldn’t otherwise be managed by other tools.
To get more information about InstanceGroupNamedPort, see:
How-to Guides
import pulumi import pulumi_gcp as gcp container_network = gcp.compute.Network("containerNetwork", auto_create_subnetworks=False) container_subnetwork = gcp.compute.Subnetwork("containerSubnetwork", region="us-central1", network=container_network.name, ip_cidr_range="10.0.36.0/24") my_cluster = gcp.container.Cluster("myCluster", location="us-central1-a", initial_node_count=1, network=container_network.name, subnetwork=container_subnetwork.name, ip_allocation_policy={ "clusterIpv4CidrBlock": "/19", "servicesIpv4CidrBlock": "/22", }) my_port = gcp.compute.InstanceGroupNamedPort("myPort", group=my_cluster.instance_group_urls[0], zone="us-central1-a", port=8080) my_ports = gcp.compute.InstanceGroupNamedPort("myPorts", group=my_cluster.instance_group_urls[0], zone="us-central1-a", port=4443)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
group (pulumi.Input[str]) – The name of the instance group.
name (pulumi.Input[str]) – The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
port (pulumi.Input[float]) – The port number, which can be a value between 1 and 65535.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
zone (pulumi.Input[str]) – The zone of the instance group.
group: pulumi.Output[str] = None¶The name of the instance group.
name: pulumi.Output[str] = None¶The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
port: pulumi.Output[float] = None¶The port number, which can be a value between 1 and 65535.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
zone: pulumi.Output[str] = None¶The zone of the instance group.
- static
get(resource_name, id, opts=None, group=None, name=None, port=None, project=None, zone=None)¶ Get an existing InstanceGroupNamedPort resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
group (pulumi.Input[str]) – The name of the instance group.
name (pulumi.Input[str]) – The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
port (pulumi.Input[float]) – The port number, which can be a value between 1 and 65535.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
zone (pulumi.Input[str]) – The zone of the instance group.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.InstanceIAMBinding(resource_name, opts=None, condition=None, instance_name=None, members=None, project=None, role=None, zone=None, __props__=None, __name__=None, __opts__=None)¶ Three different resources help you manage your IAM policy for Compute Engine Instance. Each of these resources serves a different use case:
compute.InstanceIAMPolicy: Authoritative. Sets the IAM policy for the instance and replaces any existing policy already attached.compute.InstanceIAMBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the instance are preserved.compute.InstanceIAMMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the instance are preserved.
Note:
compute.InstanceIAMPolicycannot be used in conjunction withcompute.InstanceIAMBindingandcompute.InstanceIAMMemberor they will fight over what your policy should be.Note:
compute.InstanceIAMBindingresources can be used in conjunction withcompute.InstanceIAMMemberresources only if they do not grant privilege to the same role.import pulumi import pulumi_gcp as gcp admin = gcp.organizations.get_iam_policy(binding=[{ "role": "roles/compute.osLogin", "members": ["user:jane@example.com"], }]) policy = gcp.compute.InstanceIAMPolicy("policy", project=google_compute_instance["default"]["project"], zone=google_compute_instance["default"]["zone"], instance_name=google_compute_instance["default"]["name"], policy_data=admin.policy_data)
With IAM Conditions:
import pulumi import pulumi_gcp as gcp admin = gcp.organizations.get_iam_policy(binding=[{ "role": "roles/compute.osLogin", "members": ["user:jane@example.com"], "condition": { "title": "expires_after_2019_12_31", "description": "Expiring at midnight of 2019-12-31", "expression": "request.time < timestamp("2020-01-01T00:00:00Z")", }, }]) policy = gcp.compute.InstanceIAMPolicy("policy", project=google_compute_instance["default"]["project"], zone=google_compute_instance["default"]["zone"], instance_name=google_compute_instance["default"]["name"], policy_data=admin.policy_data)
import pulumi import pulumi_gcp as gcp binding = gcp.compute.InstanceIAMBinding("binding", project=google_compute_instance["default"]["project"], zone=google_compute_instance["default"]["zone"], instance_name=google_compute_instance["default"]["name"], role="roles/compute.osLogin", members=["user:jane@example.com"])
With IAM Conditions:
import pulumi import pulumi_gcp as gcp binding = gcp.compute.InstanceIAMBinding("binding", project=google_compute_instance["default"]["project"], zone=google_compute_instance["default"]["zone"], instance_name=google_compute_instance["default"]["name"], role="roles/compute.osLogin", members=["user:jane@example.com"], condition={ "title": "expires_after_2019_12_31", "description": "Expiring at midnight of 2019-12-31", "expression": "request.time < timestamp("2020-01-01T00:00:00Z")", })
import pulumi import pulumi_gcp as gcp member = gcp.compute.InstanceIAMMember("member", project=google_compute_instance["default"]["project"], zone=google_compute_instance["default"]["zone"], instance_name=google_compute_instance["default"]["name"], role="roles/compute.osLogin", member="user:jane@example.com")
With IAM Conditions:
import pulumi import pulumi_gcp as gcp member = gcp.compute.InstanceIAMMember("member", project=google_compute_instance["default"]["project"], zone=google_compute_instance["default"]["zone"], instance_name=google_compute_instance["default"]["name"], role="roles/compute.osLogin", member="user:jane@example.com", condition={ "title": "expires_after_2019_12_31", "description": "Expiring at midnight of 2019-12-31", "expression": "request.time < timestamp("2020-01-01T00:00:00Z")", })
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
condition (pulumi.Input[dict]) – ) An IAM Condition for a given binding. Structure is documented below.
instance_name (pulumi.Input[str]) – Used to find the parent resource to bind the IAM policy to
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. 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.
role (pulumi.Input[str]) – The role that should be applied. Only one
compute.InstanceIAMBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.zone (pulumi.Input[str]) – A reference to the zone where the machine resides. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no zone is provided in the parent identifier and no zone is specified, it is taken from the provider configuration.
The condition object supports the following:
description(pulumi.Input[str]) - An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.expression(pulumi.Input[str]) - Textual representation of an expression in Common Expression Language syntax.title(pulumi.Input[str]) - A title for the expression, i.e. a short string describing its purpose.
condition: pulumi.Output[dict] = None¶) An IAM Condition for a given binding. Structure is documented below.
description(str) - An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.expression(str) - Textual representation of an expression in Common Expression Language syntax.title(str) - A title for the expression, i.e. a short string describing its purpose.
etag: pulumi.Output[str] = None¶(Computed) The etag of the IAM policy.
instance_name: pulumi.Output[str] = None¶Used to find the parent resource to bind the IAM policy to
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. 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.
role: pulumi.Output[str] = None¶The role that should be applied. Only one
compute.InstanceIAMBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.
zone: pulumi.Output[str] = None¶A reference to the zone where the machine resides. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no zone is provided in the parent identifier and no zone is specified, it is taken from the provider configuration.
- static
get(resource_name, id, opts=None, condition=None, etag=None, instance_name=None, members=None, project=None, role=None, zone=None)¶ Get an existing InstanceIAMBinding resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
condition (pulumi.Input[dict]) –
) An IAM Condition for a given binding. Structure is documented below.
etag (pulumi.Input[str]) – (Computed) The etag of the IAM policy.
instance_name (pulumi.Input[str]) – Used to find the parent resource to bind the IAM policy to
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. 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.
role (pulumi.Input[str]) – The role that should be applied. Only one
compute.InstanceIAMBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.zone (pulumi.Input[str]) – A reference to the zone where the machine resides. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no zone is provided in the parent identifier and no zone is specified, it is taken from the provider configuration.
The condition object supports the following:
description(pulumi.Input[str]) - An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.expression(pulumi.Input[str]) - Textual representation of an expression in Common Expression Language syntax.title(pulumi.Input[str]) - A title for the expression, i.e. a short string describing its purpose.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.InstanceIAMMember(resource_name, opts=None, condition=None, instance_name=None, member=None, project=None, role=None, zone=None, __props__=None, __name__=None, __opts__=None)¶ Three different resources help you manage your IAM policy for Compute Engine Instance. Each of these resources serves a different use case:
compute.InstanceIAMPolicy: Authoritative. Sets the IAM policy for the instance and replaces any existing policy already attached.compute.InstanceIAMBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the instance are preserved.compute.InstanceIAMMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the instance are preserved.
Note:
compute.InstanceIAMPolicycannot be used in conjunction withcompute.InstanceIAMBindingandcompute.InstanceIAMMemberor they will fight over what your policy should be.Note:
compute.InstanceIAMBindingresources can be used in conjunction withcompute.InstanceIAMMemberresources only if they do not grant privilege to the same role.import pulumi import pulumi_gcp as gcp admin = gcp.organizations.get_iam_policy(binding=[{ "role": "roles/compute.osLogin", "members": ["user:jane@example.com"], }]) policy = gcp.compute.InstanceIAMPolicy("policy", project=google_compute_instance["default"]["project"], zone=google_compute_instance["default"]["zone"], instance_name=google_compute_instance["default"]["name"], policy_data=admin.policy_data)
With IAM Conditions:
import pulumi import pulumi_gcp as gcp admin = gcp.organizations.get_iam_policy(binding=[{ "role": "roles/compute.osLogin", "members": ["user:jane@example.com"], "condition": { "title": "expires_after_2019_12_31", "description": "Expiring at midnight of 2019-12-31", "expression": "request.time < timestamp("2020-01-01T00:00:00Z")", }, }]) policy = gcp.compute.InstanceIAMPolicy("policy", project=google_compute_instance["default"]["project"], zone=google_compute_instance["default"]["zone"], instance_name=google_compute_instance["default"]["name"], policy_data=admin.policy_data)
import pulumi import pulumi_gcp as gcp binding = gcp.compute.InstanceIAMBinding("binding", project=google_compute_instance["default"]["project"], zone=google_compute_instance["default"]["zone"], instance_name=google_compute_instance["default"]["name"], role="roles/compute.osLogin", members=["user:jane@example.com"])
With IAM Conditions:
import pulumi import pulumi_gcp as gcp binding = gcp.compute.InstanceIAMBinding("binding", project=google_compute_instance["default"]["project"], zone=google_compute_instance["default"]["zone"], instance_name=google_compute_instance["default"]["name"], role="roles/compute.osLogin", members=["user:jane@example.com"], condition={ "title": "expires_after_2019_12_31", "description": "Expiring at midnight of 2019-12-31", "expression": "request.time < timestamp("2020-01-01T00:00:00Z")", })
import pulumi import pulumi_gcp as gcp member = gcp.compute.InstanceIAMMember("member", project=google_compute_instance["default"]["project"], zone=google_compute_instance["default"]["zone"], instance_name=google_compute_instance["default"]["name"], role="roles/compute.osLogin", member="user:jane@example.com")
With IAM Conditions:
import pulumi import pulumi_gcp as gcp member = gcp.compute.InstanceIAMMember("member", project=google_compute_instance["default"]["project"], zone=google_compute_instance["default"]["zone"], instance_name=google_compute_instance["default"]["name"], role="roles/compute.osLogin", member="user:jane@example.com", condition={ "title": "expires_after_2019_12_31", "description": "Expiring at midnight of 2019-12-31", "expression": "request.time < timestamp("2020-01-01T00:00:00Z")", })
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
condition (pulumi.Input[dict]) –
) An IAM Condition for a given binding. Structure is documented below.
instance_name (pulumi.Input[str]) – Used to find the parent resource to bind the IAM policy to
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. 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.
role (pulumi.Input[str]) – The role that should be applied. Only one
compute.InstanceIAMBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.zone (pulumi.Input[str]) – A reference to the zone where the machine resides. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no zone is provided in the parent identifier and no zone is specified, it is taken from the provider configuration.
The condition object supports the following:
description(pulumi.Input[str]) - An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.expression(pulumi.Input[str]) - Textual representation of an expression in Common Expression Language syntax.title(pulumi.Input[str]) - A title for the expression, i.e. a short string describing its purpose.
condition: pulumi.Output[dict] = None¶) An IAM Condition for a given binding. Structure is documented below.
description(str) - An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.expression(str) - Textual representation of an expression in Common Expression Language syntax.title(str) - A title for the expression, i.e. a short string describing its purpose.
etag: pulumi.Output[str] = None¶(Computed) The etag of the IAM policy.
instance_name: pulumi.Output[str] = None¶Used to find the parent resource to bind the IAM policy to
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. 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.
role: pulumi.Output[str] = None¶The role that should be applied. Only one
compute.InstanceIAMBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.
zone: pulumi.Output[str] = None¶A reference to the zone where the machine resides. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no zone is provided in the parent identifier and no zone is specified, it is taken from the provider configuration.
- static
get(resource_name, id, opts=None, condition=None, etag=None, instance_name=None, member=None, project=None, role=None, zone=None)¶ Get an existing InstanceIAMMember resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
condition (pulumi.Input[dict]) –
) An IAM Condition for a given binding. Structure is documented below.
etag (pulumi.Input[str]) – (Computed) The etag of the IAM policy.
instance_name (pulumi.Input[str]) – Used to find the parent resource to bind the IAM policy to
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. 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.
role (pulumi.Input[str]) – The role that should be applied. Only one
compute.InstanceIAMBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.zone (pulumi.Input[str]) – A reference to the zone where the machine resides. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no zone is provided in the parent identifier and no zone is specified, it is taken from the provider configuration.
The condition object supports the following:
description(pulumi.Input[str]) - An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.expression(pulumi.Input[str]) - Textual representation of an expression in Common Expression Language syntax.title(pulumi.Input[str]) - A title for the expression, i.e. a short string describing its purpose.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.InstanceIAMPolicy(resource_name, opts=None, instance_name=None, policy_data=None, project=None, zone=None, __props__=None, __name__=None, __opts__=None)¶ Three different resources help you manage your IAM policy for Compute Engine Instance. Each of these resources serves a different use case:
compute.InstanceIAMPolicy: Authoritative. Sets the IAM policy for the instance and replaces any existing policy already attached.compute.InstanceIAMBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the instance are preserved.compute.InstanceIAMMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the instance are preserved.
Note:
compute.InstanceIAMPolicycannot be used in conjunction withcompute.InstanceIAMBindingandcompute.InstanceIAMMemberor they will fight over what your policy should be.Note:
compute.InstanceIAMBindingresources can be used in conjunction withcompute.InstanceIAMMemberresources only if they do not grant privilege to the same role.import pulumi import pulumi_gcp as gcp admin = gcp.organizations.get_iam_policy(binding=[{ "role": "roles/compute.osLogin", "members": ["user:jane@example.com"], }]) policy = gcp.compute.InstanceIAMPolicy("policy", project=google_compute_instance["default"]["project"], zone=google_compute_instance["default"]["zone"], instance_name=google_compute_instance["default"]["name"], policy_data=admin.policy_data)
With IAM Conditions:
import pulumi import pulumi_gcp as gcp admin = gcp.organizations.get_iam_policy(binding=[{ "role": "roles/compute.osLogin", "members": ["user:jane@example.com"], "condition": { "title": "expires_after_2019_12_31", "description": "Expiring at midnight of 2019-12-31", "expression": "request.time < timestamp("2020-01-01T00:00:00Z")", }, }]) policy = gcp.compute.InstanceIAMPolicy("policy", project=google_compute_instance["default"]["project"], zone=google_compute_instance["default"]["zone"], instance_name=google_compute_instance["default"]["name"], policy_data=admin.policy_data)
import pulumi import pulumi_gcp as gcp binding = gcp.compute.InstanceIAMBinding("binding", project=google_compute_instance["default"]["project"], zone=google_compute_instance["default"]["zone"], instance_name=google_compute_instance["default"]["name"], role="roles/compute.osLogin", members=["user:jane@example.com"])
With IAM Conditions:
import pulumi import pulumi_gcp as gcp binding = gcp.compute.InstanceIAMBinding("binding", project=google_compute_instance["default"]["project"], zone=google_compute_instance["default"]["zone"], instance_name=google_compute_instance["default"]["name"], role="roles/compute.osLogin", members=["user:jane@example.com"], condition={ "title": "expires_after_2019_12_31", "description": "Expiring at midnight of 2019-12-31", "expression": "request.time < timestamp("2020-01-01T00:00:00Z")", })
import pulumi import pulumi_gcp as gcp member = gcp.compute.InstanceIAMMember("member", project=google_compute_instance["default"]["project"], zone=google_compute_instance["default"]["zone"], instance_name=google_compute_instance["default"]["name"], role="roles/compute.osLogin", member="user:jane@example.com")
With IAM Conditions:
import pulumi import pulumi_gcp as gcp member = gcp.compute.InstanceIAMMember("member", project=google_compute_instance["default"]["project"], zone=google_compute_instance["default"]["zone"], instance_name=google_compute_instance["default"]["name"], role="roles/compute.osLogin", member="user:jane@example.com", condition={ "title": "expires_after_2019_12_31", "description": "Expiring at midnight of 2019-12-31", "expression": "request.time < timestamp("2020-01-01T00:00:00Z")", })
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
instance_name (pulumi.Input[str]) – Used to find the parent resource to bind the IAM policy to
policy_data (pulumi.Input[str]) – The policy data generated by a
organizations.getIAMPolicydata source.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. 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.
zone (pulumi.Input[str]) – A reference to the zone where the machine resides. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no zone is provided in the parent identifier and no zone is specified, it is taken from the provider configuration.
etag: pulumi.Output[str] = None¶(Computed) The etag of the IAM policy.
instance_name: pulumi.Output[str] = None¶Used to find the parent resource to bind the IAM policy to
policy_data: pulumi.Output[str] = None¶The policy data generated by a
organizations.getIAMPolicydata source.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. 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.
zone: pulumi.Output[str] = None¶A reference to the zone where the machine resides. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no zone is provided in the parent identifier and no zone is specified, it is taken from the provider configuration.
- static
get(resource_name, id, opts=None, etag=None, instance_name=None, policy_data=None, project=None, zone=None)¶ Get an existing InstanceIAMPolicy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
etag (pulumi.Input[str]) – (Computed) The etag of the IAM policy.
instance_name (pulumi.Input[str]) – Used to find the parent resource to bind the IAM policy to
policy_data (pulumi.Input[str]) – The policy data generated by a
organizations.getIAMPolicydata source.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. 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.
zone (pulumi.Input[str]) – A reference to the zone where the machine resides. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no zone is provided in the parent identifier and no zone is specified, it is taken from the provider configuration.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.InstanceTemplate(resource_name, opts=None, can_ip_forward=None, description=None, disks=None, enable_display=None, guest_accelerators=None, instance_description=None, labels=None, machine_type=None, metadata=None, metadata_startup_script=None, min_cpu_platform=None, name=None, name_prefix=None, network_interfaces=None, project=None, region=None, scheduling=None, service_account=None, shielded_instance_config=None, tags=None, __props__=None, __name__=None, __opts__=None)¶ Manages a VM instance template resource within GCE. For more information see the official documentation and API.
import pulumi import pulumi_gcp as gcp my_image = gcp.compute.get_image(family="debian-9", project="debian-cloud") foobar = gcp.compute.Disk("foobar", image=my_image.self_link, size=10, type="pd-ssd", zone="us-central1-a") default = gcp.compute.InstanceTemplate("default", description="This template is used to create app server instances.", tags=[ "foo", "bar", ], labels={ "environment": "dev", }, instance_description="description assigned to instances", machine_type="n1-standard-1", can_ip_forward=False, scheduling={ "automaticRestart": True, "onHostMaintenance": "MIGRATE", }, disk=[ { "sourceImage": "debian-cloud/debian-9", "autoDelete": True, "boot": True, }, { "source": foobar.name, "autoDelete": False, "boot": False, }, ], network_interface=[{ "network": "default", }], metadata={ "foo": "bar", }, service_account={ "scopes": [ "userinfo-email", "compute-ro", "storage-ro", ], })
Instance Templates cannot be updated after creation with the Google Cloud Platform API. In order to update an Instance Template, this provider will create a replacement. In order to effectively use an Instance Template resource with an Instance Group Manager resource. Either omit the Instance Template
nameattribute, or specify a partial name withname_prefix. Example:import pulumi import pulumi_gcp as gcp instance_template = gcp.compute.InstanceTemplate("instanceTemplate", name_prefix="instance-template-", machine_type="n1-standard-1", region="us-central1", disk=[{}], network_interface=[{}]) instance_group_manager = gcp.compute.InstanceGroupManager("instanceGroupManager", instance_template=instance_template.id, base_instance_name="instance-group-manager", zone="us-central1-f", target_size="1")
With this setup, this provider generates a unique name for your Instance Template and can then update the Instance Group manager without conflict before destroying the previous Instance Template.
A common way to use instance templates and managed instance groups is to deploy the latest image in a family, usually the latest build of your application. There are two ways to do this in the provider, and they have their pros and cons. The difference ends up being in how “latest” is interpreted. You can either deploy the latest image available when the provider runs, or you can have each instance check what the latest image is when it’s being created, either as part of a scaling event or being rebuilt by the instance group manager.
If you’re not sure, we recommend deploying the latest image available when the provider runs, because this means all the instances in your group will be based on the same image, always, and means that no upgrades or changes to your instances happen outside of a
pulumi up. You can achieve this by using thecompute.Imagedata source, which will retrieve the latest image on everypulumi apply, and will update the template to use that specific image:import pulumi import pulumi_gcp as gcp my_image = gcp.compute.get_image(family="debian-9", project="debian-cloud") instance_template = gcp.compute.InstanceTemplate("instanceTemplate", name_prefix="instance-template-", machine_type="n1-standard-1", region="us-central1", disk=[{ "sourceImage": google_compute_image["my_image"]["self_link"], }])
To have instances update to the latest on every scaling event or instance re-creation, use the family as the image for the disk, and it will use GCP’s default behavior, setting the image for the template to the family:
import pulumi import pulumi_gcp as gcp instance_template = gcp.compute.InstanceTemplate("instanceTemplate", disks=[{ "sourceImage": "debian-cloud/debian-9", }], machine_type="n1-standard-1", name_prefix="instance-template-", region="us-central1")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
can_ip_forward (pulumi.Input[bool]) – Whether to allow sending and receiving of packets with non-matching source or destination IPs. This defaults to false.
description (pulumi.Input[str]) – A brief description of this resource.
disks (pulumi.Input[list]) – Disks to attach to instances created from this template. This can be specified multiple times for multiple disks. Structure is documented below.
enable_display (pulumi.Input[bool]) –
Enable Virtual Displays on this instance. Note:
allow_stopping_for_updatemust be set to true in order to update this field.guest_accelerators (pulumi.Input[list]) – List of the type and count of accelerator cards attached to the instance. Structure documented below.
instance_description (pulumi.Input[str]) – A brief description to use for instances created from this template.
labels (pulumi.Input[dict]) – A set of key/value label pairs to assign to instances created from this template,
machine_type (pulumi.Input[str]) – The machine type to create.
metadata (pulumi.Input[dict]) – Metadata key/value pairs to make available from within instances created from this template.
metadata_startup_script (pulumi.Input[str]) – An alternative to using the startup-script metadata key, mostly to match the compute_instance resource. This replaces the startup-script metadata key on the created instance and thus the two mechanisms are not allowed to be used simultaneously.
min_cpu_platform (pulumi.Input[str]) –
Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as
Intel HaswellorIntel Skylake. See the complete list here.name (pulumi.Input[str]) – The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.
name_prefix (pulumi.Input[str]) – Creates a unique name beginning with the specified prefix. Conflicts with
name.network_interfaces (pulumi.Input[list]) – Networks to attach to instances created from this template. This can be specified multiple times for multiple networks. Structure is documented below.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – An instance template is a global resource that is not bound to a zone or a region. However, you can still specify some regional resources in an instance template, which restricts the template to the region where that resource resides. For example, a custom
subnetworkresource is tied to a specific region. Defaults to the region of the Provider if no value is given.scheduling (pulumi.Input[dict]) – The scheduling strategy to use. More details about this configuration option are detailed below.
service_account (pulumi.Input[dict]) – Service account to attach to the instance. Structure is documented below.
shielded_instance_config (pulumi.Input[dict]) –
Enable Shielded VM on this instance. Shielded VM provides verifiable integrity to prevent against malware and rootkits. Defaults to disabled. Structure is documented below. Note:
shielded_instance_configcan only be used with boot images with shielded vm support. See the complete list here.tags (pulumi.Input[list]) – Tags to attach to the instance.
The disks object supports the following:
autoDelete(pulumi.Input[bool]) - Whether or not the disk should be auto-deleted. This defaults to true.boot(pulumi.Input[bool]) - Indicates that this is a boot disk.device_name(pulumi.Input[str]) - A unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance. If not specified, the server chooses a default device name to apply to this disk.disk_encryption_key(pulumi.Input[dict]) - Encrypts or decrypts a disk using a customer-supplied encryption key.kmsKeySelfLink(pulumi.Input[str]) - The self link of the encryption key that is stored in Google Cloud KMS
diskName(pulumi.Input[str]) - Name of the disk. When not provided, this defaults to the name of the instance.disk_size_gb(pulumi.Input[float]) - The size of the image in gigabytes. If not specified, it will inherit the size of its base image. For SCRATCH disks, the size must be exactly 375GB.diskType(pulumi.Input[str]) - The GCE disk type. Can be either"pd-ssd","local-ssd", or"pd-standard".interface(pulumi.Input[str]) - Specifies the disk interface to use for attaching this disk.labels(pulumi.Input[dict]) - A set of key/value label pairs to assign to instances created from this template,mode(pulumi.Input[str]) - The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If you are attaching or creating a boot disk, this must read-write mode.source(pulumi.Input[str]) - The name (not self_link) of the disk (such as those managed bycompute.Disk) to attach. ..Note: Either
sourceorsource_imageis required when creating a new instance except for when creating a local SSD. Check the API docs for details.sourceImage(pulumi.Input[str]) - The image from which to initialize this disk. This can be one of: the image’sself_link,projects/{project}/global/images/{image},projects/{project}/global/images/family/{family},global/images/{image},global/images/family/{family},family/{family},{project}/{family},{project}/{image},{family}, or{image}. ..Note: Either
sourceorsource_imageis required when creating a new instance except for when creating a local SSD. Check the API docs for details.type(pulumi.Input[str]) - The accelerator type resource to expose to this instance. E.g.nvidia-tesla-k80.
The guest_accelerators object supports the following:
count(pulumi.Input[float]) - The number of the guest accelerator cards exposed to this instance.type(pulumi.Input[str]) - The accelerator type resource to expose to this instance. E.g.nvidia-tesla-k80.
The network_interfaces object supports the following:
accessConfigs(pulumi.Input[list]) - Access configurations, i.e. IPs via which this instance can be accessed via the Internet. Omit to ensure that the instance is not accessible from the Internet (this means that ssh provisioners will not work unless you can send traffic to the instance’s network (e.g. via tunnel or because it is running on another cloud instance on that network). This block can be repeated multiple times. Structure documented below.natIp(pulumi.Input[str]) - The IP address that will be 1:1 mapped to the instance’s network ip. If not given, one will be generated.network_tier(pulumi.Input[str]) - The [networking tier][network-tier] used for configuring this instance template. This field can take the following values: PREMIUM or STANDARD. If this field is not specified, it is assumed to be PREMIUM.publicPtrDomainName(pulumi.Input[str])
aliasIpRanges(pulumi.Input[list]) - An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks. Structure documented below.ip_cidr_range(pulumi.Input[str]) - The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. At the time of writing only a netmask (e.g. /24) may be supplied, with a CIDR format resulting in an API error.subnetworkRangeName(pulumi.Input[str]) - The subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used.
name(pulumi.Input[str]) - The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.network(pulumi.Input[str]) - The name or self_link of the network to attach this interface to. Usenetworkattribute for Legacy or Auto subnetted networks andsubnetworkfor custom subnetted networks.networkIp(pulumi.Input[str]) - The private IP address to assign to the instance. If empty, the address will be automatically assigned.subnetwork(pulumi.Input[str]) - the name of the subnetwork to attach this interface to. The subnetwork must exist in the sameregionthis instance will be created in. Eithernetworkorsubnetworkmust be provided.subnetworkProject(pulumi.Input[str]) - The ID of the project in which the subnetwork belongs. If it is not provided, the provider project is used.
The scheduling object supports the following:
automaticRestart(pulumi.Input[bool]) - Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). This defaults to true.minNodeCpus(pulumi.Input[float])nodeAffinities(pulumi.Input[list]) - Specifies node affinities or anti-affinities to determine which sole-tenant nodes your instances and managed instance groups will use as host systems. Read more on sole-tenant node creation here. Structure documented below.key(pulumi.Input[str]) - The key for the node affinity label.operator(pulumi.Input[str]) - The operator. Can beINfor node-affinities orNOT_INfor anti-affinities.values(pulumi.Input[list])
onHostMaintenance(pulumi.Input[str]) - Defines the maintenance behavior for this instance.preemptible(pulumi.Input[bool]) - Allows instance to be preempted. This defaults to false. Read more on this here.
The service_account object supports the following:
email(pulumi.Input[str]) - The service account e-mail address. If not given, the default Google Compute Engine service account is used.scopes(pulumi.Input[list]) - A list of service scopes. Both OAuth2 URLs and gcloud short names are supported. To allow full access to all Cloud APIs, use thecloud-platformscope. See a complete list of scopes here.
The shielded_instance_config object supports the following:
enableIntegrityMonitoring(pulumi.Input[bool]) - – Compare the most recent boot measurements to the integrity policy baseline and return a pair of pass/fail results depending on whether they match or not. Defaults to true.enableSecureBoot(pulumi.Input[bool]) - – Verify the digital signature of all boot components, and halt the boot process if signature verification fails. Defaults to false.enableVtpm(pulumi.Input[bool]) - – Use a virtualized trusted platform module, which is a specialized computer chip you can use to encrypt objects like keys and certificates. Defaults to true.
can_ip_forward: pulumi.Output[bool] = None¶Whether to allow sending and receiving of packets with non-matching source or destination IPs. This defaults to false.
description: pulumi.Output[str] = None¶A brief description of this resource.
disks: pulumi.Output[list] = None¶Disks to attach to instances created from this template. This can be specified multiple times for multiple disks. Structure is documented below.
autoDelete(bool) - Whether or not the disk should be auto-deleted. This defaults to true.boot(bool) - Indicates that this is a boot disk.device_name(str) - A unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance. If not specified, the server chooses a default device name to apply to this disk.disk_encryption_key(dict) - Encrypts or decrypts a disk using a customer-supplied encryption key.kmsKeySelfLink(str) - The self link of the encryption key that is stored in Google Cloud KMS
diskName(str) - Name of the disk. When not provided, this defaults to the name of the instance.disk_size_gb(float) - The size of the image in gigabytes. If not specified, it will inherit the size of its base image. For SCRATCH disks, the size must be exactly 375GB.diskType(str) - The GCE disk type. Can be either"pd-ssd","local-ssd", or"pd-standard".interface(str) - Specifies the disk interface to use for attaching this disk.labels(dict) - A set of key/value label pairs to assign to instances created from this template,mode(str) - The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If you are attaching or creating a boot disk, this must read-write mode.source(str) - The name (not self_link) of the disk (such as those managed bycompute.Disk) to attach. ..Note: Either
sourceorsource_imageis required when creating a new instance except for when creating a local SSD. Check the API docs for details.sourceImage(str) - The image from which to initialize this disk. This can be one of: the image’sself_link,projects/{project}/global/images/{image},projects/{project}/global/images/family/{family},global/images/{image},global/images/family/{family},family/{family},{project}/{family},{project}/{image},{family}, or{image}. ..Note: Either
sourceorsource_imageis required when creating a new instance except for when creating a local SSD. Check the API docs for details.type(str) - The accelerator type resource to expose to this instance. E.g.nvidia-tesla-k80.
enable_display: pulumi.Output[bool] = None¶Enable Virtual Displays on this instance. Note:
allow_stopping_for_updatemust be set to true in order to update this field.
guest_accelerators: pulumi.Output[list] = None¶List of the type and count of accelerator cards attached to the instance. Structure documented below.
count(float) - The number of the guest accelerator cards exposed to this instance.type(str) - The accelerator type resource to expose to this instance. E.g.nvidia-tesla-k80.
instance_description: pulumi.Output[str] = None¶A brief description to use for instances created from this template.
labels: pulumi.Output[dict] = None¶A set of key/value label pairs to assign to instances created from this template,
machine_type: pulumi.Output[str] = None¶The machine type to create.
metadata: pulumi.Output[dict] = None¶Metadata key/value pairs to make available from within instances created from this template.
metadata_fingerprint: pulumi.Output[str] = None¶The unique fingerprint of the metadata.
metadata_startup_script: pulumi.Output[str] = None¶An alternative to using the startup-script metadata key, mostly to match the compute_instance resource. This replaces the startup-script metadata key on the created instance and thus the two mechanisms are not allowed to be used simultaneously.
min_cpu_platform: pulumi.Output[str] = None¶Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as
Intel HaswellorIntel Skylake. See the complete list here.
name: pulumi.Output[str] = None¶The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.
name_prefix: pulumi.Output[str] = None¶Creates a unique name beginning with the specified prefix. Conflicts with
name.
network_interfaces: pulumi.Output[list] = None¶Networks to attach to instances created from this template. This can be specified multiple times for multiple networks. Structure is documented below.
accessConfigs(list) - Access configurations, i.e. IPs via which this instance can be accessed via the Internet. Omit to ensure that the instance is not accessible from the Internet (this means that ssh provisioners will not work unless you can send traffic to the instance’s network (e.g. via tunnel or because it is running on another cloud instance on that network). This block can be repeated multiple times. Structure documented below.natIp(str) - The IP address that will be 1:1 mapped to the instance’s network ip. If not given, one will be generated.network_tier(str) - The [networking tier][network-tier] used for configuring this instance template. This field can take the following values: PREMIUM or STANDARD. If this field is not specified, it is assumed to be PREMIUM.publicPtrDomainName(str)
aliasIpRanges(list) - An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks. Structure documented below.ip_cidr_range(str) - The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. At the time of writing only a netmask (e.g. /24) may be supplied, with a CIDR format resulting in an API error.subnetworkRangeName(str) - The subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used.
name(str) - The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.network(str) - The name or self_link of the network to attach this interface to. Usenetworkattribute for Legacy or Auto subnetted networks andsubnetworkfor custom subnetted networks.networkIp(str) - The private IP address to assign to the instance. If empty, the address will be automatically assigned.subnetwork(str) - the name of the subnetwork to attach this interface to. The subnetwork must exist in the sameregionthis instance will be created in. Eithernetworkorsubnetworkmust be provided.subnetworkProject(str) - The ID of the project in which the subnetwork belongs. If it is not provided, the provider project is used.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region: pulumi.Output[str] = None¶An instance template is a global resource that is not bound to a zone or a region. However, you can still specify some regional resources in an instance template, which restricts the template to the region where that resource resides. For example, a custom
subnetworkresource is tied to a specific region. Defaults to the region of the Provider if no value is given.
scheduling: pulumi.Output[dict] = None¶The scheduling strategy to use. More details about this configuration option are detailed below.
automaticRestart(bool) - Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). This defaults to true.minNodeCpus(float)nodeAffinities(list) - Specifies node affinities or anti-affinities to determine which sole-tenant nodes your instances and managed instance groups will use as host systems. Read more on sole-tenant node creation here. Structure documented below.key(str) - The key for the node affinity label.operator(str) - The operator. Can beINfor node-affinities orNOT_INfor anti-affinities.values(list)
onHostMaintenance(str) - Defines the maintenance behavior for this instance.preemptible(bool) - Allows instance to be preempted. This defaults to false. Read more on this here.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
service_account: pulumi.Output[dict] = None¶Service account to attach to the instance. Structure is documented below.
email(str) - The service account e-mail address. If not given, the default Google Compute Engine service account is used.scopes(list) - A list of service scopes. Both OAuth2 URLs and gcloud short names are supported. To allow full access to all Cloud APIs, use thecloud-platformscope. See a complete list of scopes here.
shielded_instance_config: pulumi.Output[dict] = None¶Enable Shielded VM on this instance. Shielded VM provides verifiable integrity to prevent against malware and rootkits. Defaults to disabled. Structure is documented below. Note:
shielded_instance_configcan only be used with boot images with shielded vm support. See the complete list here.enableIntegrityMonitoring(bool) - – Compare the most recent boot measurements to the integrity policy baseline and return a pair of pass/fail results depending on whether they match or not. Defaults to true.enableSecureBoot(bool) - – Verify the digital signature of all boot components, and halt the boot process if signature verification fails. Defaults to false.enableVtpm(bool) - – Use a virtualized trusted platform module, which is a specialized computer chip you can use to encrypt objects like keys and certificates. Defaults to true.
Tags to attach to the instance.
The unique fingerprint of the tags.
- static
get(resource_name, id, opts=None, can_ip_forward=None, description=None, disks=None, enable_display=None, guest_accelerators=None, instance_description=None, labels=None, machine_type=None, metadata=None, metadata_fingerprint=None, metadata_startup_script=None, min_cpu_platform=None, name=None, name_prefix=None, network_interfaces=None, project=None, region=None, scheduling=None, self_link=None, service_account=None, shielded_instance_config=None, tags=None, tags_fingerprint=None)¶ Get an existing InstanceTemplate resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
can_ip_forward (pulumi.Input[bool]) – Whether to allow sending and receiving of packets with non-matching source or destination IPs. This defaults to false.
description (pulumi.Input[str]) – A brief description of this resource.
disks (pulumi.Input[list]) – Disks to attach to instances created from this template. This can be specified multiple times for multiple disks. Structure is documented below.
enable_display (pulumi.Input[bool]) –
Enable Virtual Displays on this instance. Note:
allow_stopping_for_updatemust be set to true in order to update this field.guest_accelerators (pulumi.Input[list]) – List of the type and count of accelerator cards attached to the instance. Structure documented below.
instance_description (pulumi.Input[str]) – A brief description to use for instances created from this template.
labels (pulumi.Input[dict]) – A set of key/value label pairs to assign to instances created from this template,
machine_type (pulumi.Input[str]) – The machine type to create.
metadata (pulumi.Input[dict]) – Metadata key/value pairs to make available from within instances created from this template.
metadata_fingerprint (pulumi.Input[str]) – The unique fingerprint of the metadata.
metadata_startup_script (pulumi.Input[str]) – An alternative to using the startup-script metadata key, mostly to match the compute_instance resource. This replaces the startup-script metadata key on the created instance and thus the two mechanisms are not allowed to be used simultaneously.
min_cpu_platform (pulumi.Input[str]) –
Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as
Intel HaswellorIntel Skylake. See the complete list here.name (pulumi.Input[str]) – The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.
name_prefix (pulumi.Input[str]) – Creates a unique name beginning with the specified prefix. Conflicts with
name.network_interfaces (pulumi.Input[list]) – Networks to attach to instances created from this template. This can be specified multiple times for multiple networks. Structure is documented below.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – An instance template is a global resource that is not bound to a zone or a region. However, you can still specify some regional resources in an instance template, which restricts the template to the region where that resource resides. For example, a custom
subnetworkresource is tied to a specific region. Defaults to the region of the Provider if no value is given.scheduling (pulumi.Input[dict]) – The scheduling strategy to use. More details about this configuration option are detailed below.
self_link (pulumi.Input[str]) – The URI of the created resource.
service_account (pulumi.Input[dict]) – Service account to attach to the instance. Structure is documented below.
shielded_instance_config (pulumi.Input[dict]) –
Enable Shielded VM on this instance. Shielded VM provides verifiable integrity to prevent against malware and rootkits. Defaults to disabled. Structure is documented below. Note:
shielded_instance_configcan only be used with boot images with shielded vm support. See the complete list here.tags (pulumi.Input[list]) – Tags to attach to the instance.
tags_fingerprint (pulumi.Input[str]) – The unique fingerprint of the tags.
The disks object supports the following:
autoDelete(pulumi.Input[bool]) - Whether or not the disk should be auto-deleted. This defaults to true.boot(pulumi.Input[bool]) - Indicates that this is a boot disk.device_name(pulumi.Input[str]) - A unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance. If not specified, the server chooses a default device name to apply to this disk.disk_encryption_key(pulumi.Input[dict]) - Encrypts or decrypts a disk using a customer-supplied encryption key.kmsKeySelfLink(pulumi.Input[str]) - The self link of the encryption key that is stored in Google Cloud KMS
diskName(pulumi.Input[str]) - Name of the disk. When not provided, this defaults to the name of the instance.disk_size_gb(pulumi.Input[float]) - The size of the image in gigabytes. If not specified, it will inherit the size of its base image. For SCRATCH disks, the size must be exactly 375GB.diskType(pulumi.Input[str]) - The GCE disk type. Can be either"pd-ssd","local-ssd", or"pd-standard".interface(pulumi.Input[str]) - Specifies the disk interface to use for attaching this disk.labels(pulumi.Input[dict]) - A set of key/value label pairs to assign to instances created from this template,mode(pulumi.Input[str]) - The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If you are attaching or creating a boot disk, this must read-write mode.source(pulumi.Input[str]) - The name (not self_link) of the disk (such as those managed bycompute.Disk) to attach. ..Note: Either
sourceorsource_imageis required when creating a new instance except for when creating a local SSD. Check the API docs for details.sourceImage(pulumi.Input[str]) - The image from which to initialize this disk. This can be one of: the image’sself_link,projects/{project}/global/images/{image},projects/{project}/global/images/family/{family},global/images/{image},global/images/family/{family},family/{family},{project}/{family},{project}/{image},{family}, or{image}. ..Note: Either
sourceorsource_imageis required when creating a new instance except for when creating a local SSD. Check the API docs for details.type(pulumi.Input[str]) - The accelerator type resource to expose to this instance. E.g.nvidia-tesla-k80.
The guest_accelerators object supports the following:
count(pulumi.Input[float]) - The number of the guest accelerator cards exposed to this instance.type(pulumi.Input[str]) - The accelerator type resource to expose to this instance. E.g.nvidia-tesla-k80.
The network_interfaces object supports the following:
accessConfigs(pulumi.Input[list]) - Access configurations, i.e. IPs via which this instance can be accessed via the Internet. Omit to ensure that the instance is not accessible from the Internet (this means that ssh provisioners will not work unless you can send traffic to the instance’s network (e.g. via tunnel or because it is running on another cloud instance on that network). This block can be repeated multiple times. Structure documented below.natIp(pulumi.Input[str]) - The IP address that will be 1:1 mapped to the instance’s network ip. If not given, one will be generated.network_tier(pulumi.Input[str]) - The [networking tier][network-tier] used for configuring this instance template. This field can take the following values: PREMIUM or STANDARD. If this field is not specified, it is assumed to be PREMIUM.publicPtrDomainName(pulumi.Input[str])
aliasIpRanges(pulumi.Input[list]) - An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks. Structure documented below.ip_cidr_range(pulumi.Input[str]) - The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. At the time of writing only a netmask (e.g. /24) may be supplied, with a CIDR format resulting in an API error.subnetworkRangeName(pulumi.Input[str]) - The subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used.
name(pulumi.Input[str]) - The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.network(pulumi.Input[str]) - The name or self_link of the network to attach this interface to. Usenetworkattribute for Legacy or Auto subnetted networks andsubnetworkfor custom subnetted networks.networkIp(pulumi.Input[str]) - The private IP address to assign to the instance. If empty, the address will be automatically assigned.subnetwork(pulumi.Input[str]) - the name of the subnetwork to attach this interface to. The subnetwork must exist in the sameregionthis instance will be created in. Eithernetworkorsubnetworkmust be provided.subnetworkProject(pulumi.Input[str]) - The ID of the project in which the subnetwork belongs. If it is not provided, the provider project is used.
The scheduling object supports the following:
automaticRestart(pulumi.Input[bool]) - Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). This defaults to true.minNodeCpus(pulumi.Input[float])nodeAffinities(pulumi.Input[list]) - Specifies node affinities or anti-affinities to determine which sole-tenant nodes your instances and managed instance groups will use as host systems. Read more on sole-tenant node creation here. Structure documented below.key(pulumi.Input[str]) - The key for the node affinity label.operator(pulumi.Input[str]) - The operator. Can beINfor node-affinities orNOT_INfor anti-affinities.values(pulumi.Input[list])
onHostMaintenance(pulumi.Input[str]) - Defines the maintenance behavior for this instance.preemptible(pulumi.Input[bool]) - Allows instance to be preempted. This defaults to false. Read more on this here.
The service_account object supports the following:
email(pulumi.Input[str]) - The service account e-mail address. If not given, the default Google Compute Engine service account is used.scopes(pulumi.Input[list]) - A list of service scopes. Both OAuth2 URLs and gcloud short names are supported. To allow full access to all Cloud APIs, use thecloud-platformscope. See a complete list of scopes here.
The shielded_instance_config object supports the following:
enableIntegrityMonitoring(pulumi.Input[bool]) - – Compare the most recent boot measurements to the integrity policy baseline and return a pair of pass/fail results depending on whether they match or not. Defaults to true.enableSecureBoot(pulumi.Input[bool]) - – Verify the digital signature of all boot components, and halt the boot process if signature verification fails. Defaults to false.enableVtpm(pulumi.Input[bool]) - – Use a virtualized trusted platform module, which is a specialized computer chip you can use to encrypt objects like keys and certificates. Defaults to true.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.InterconnectAttachment(resource_name, opts=None, admin_enabled=None, bandwidth=None, candidate_subnets=None, description=None, edge_availability_domain=None, interconnect=None, name=None, project=None, region=None, router=None, type=None, vlan_tag8021q=None, __props__=None, __name__=None, __opts__=None)¶ Represents an InterconnectAttachment (VLAN attachment) resource. For more information, see Creating VLAN Attachments.
import pulumi import pulumi_gcp as gcp foobar = gcp.compute.Router("foobar", network=google_compute_network["foobar"]["name"]) on_prem = gcp.compute.InterconnectAttachment("onPrem", interconnect="my-interconnect-id", router=foobar.id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
admin_enabled (pulumi.Input[bool]) – Whether the VLAN attachment is enabled or disabled. When using PARTNER type this will Pre-Activate the interconnect attachment
bandwidth (pulumi.Input[str]) – Provisioned bandwidth capacity for the interconnect attachment. For attachments of type DEDICATED, the user can set the bandwidth. For attachments of type PARTNER, the Google Partner that is operating the interconnect must set the bandwidth. Output only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED, Defaults to BPS_10G
candidate_subnets (pulumi.Input[list]) – Up to 16 candidate prefixes that can be used to restrict the allocation of cloudRouterIpAddress and customerRouterIpAddress for this attachment. All prefixes must be within link-local address space (169.254.0.0/16) and must be /29 or shorter (/28, /27, etc). Google will attempt to select an unused /29 from the supplied candidate prefix(es). The request will fail if all possible /29s are in use on Google’s edge. If not supplied, Google will randomly select an unused /29 from all of link-local space.
description (pulumi.Input[str]) – An optional description of this resource.
edge_availability_domain (pulumi.Input[str]) – Desired availability domain for the attachment. Only available for type PARTNER, at creation time. For improved reliability, customers should configure a pair of attachments with one per availability domain. The selected availability domain will be provided to the Partner via the pairing key so that the provisioned circuit will lie in the specified domain. If not specified, the value will default to AVAILABILITY_DOMAIN_ANY.
interconnect (pulumi.Input[str]) – URL of the underlying Interconnect object that this attachment’s traffic will traverse through. Required if type is DEDICATED, must not be set if type is PARTNER.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – Region where the regional interconnect attachment resides.
router (pulumi.Input[str]) – URL of the cloud router to be used for dynamic routing. This router must be in the same region as this InterconnectAttachment. The InterconnectAttachment will automatically connect the Interconnect to the network & region within which the Cloud Router is configured.
type (pulumi.Input[str]) – The type of InterconnectAttachment you wish to create. Defaults to DEDICATED.
vlan_tag8021q (pulumi.Input[float]) – The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094. When using PARTNER type this will be managed upstream.
admin_enabled: pulumi.Output[bool] = None¶Whether the VLAN attachment is enabled or disabled. When using PARTNER type this will Pre-Activate the interconnect attachment
bandwidth: pulumi.Output[str] = None¶Provisioned bandwidth capacity for the interconnect attachment. For attachments of type DEDICATED, the user can set the bandwidth. For attachments of type PARTNER, the Google Partner that is operating the interconnect must set the bandwidth. Output only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED, Defaults to BPS_10G
candidate_subnets: pulumi.Output[list] = None¶Up to 16 candidate prefixes that can be used to restrict the allocation of cloudRouterIpAddress and customerRouterIpAddress for this attachment. All prefixes must be within link-local address space (169.254.0.0/16) and must be /29 or shorter (/28, /27, etc). Google will attempt to select an unused /29 from the supplied candidate prefix(es). The request will fail if all possible /29s are in use on Google’s edge. If not supplied, Google will randomly select an unused /29 from all of link-local space.
cloud_router_ip_address: pulumi.Output[str] = None¶IPv4 address + prefix length to be configured on Cloud Router Interface for this interconnect attachment.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
customer_router_ip_address: pulumi.Output[str] = None¶IPv4 address + prefix length to be configured on the customer router subinterface for this interconnect attachment.
description: pulumi.Output[str] = None¶An optional description of this resource.
edge_availability_domain: pulumi.Output[str] = None¶Desired availability domain for the attachment. Only available for type PARTNER, at creation time. For improved reliability, customers should configure a pair of attachments with one per availability domain. The selected availability domain will be provided to the Partner via the pairing key so that the provisioned circuit will lie in the specified domain. If not specified, the value will default to AVAILABILITY_DOMAIN_ANY.
google_reference_id: pulumi.Output[str] = None¶Google reference ID, to be used when raising support tickets with Google or otherwise to debug backend connectivity issues.
interconnect: pulumi.Output[str] = None¶URL of the underlying Interconnect object that this attachment’s traffic will traverse through. Required if type is DEDICATED, must not be set if type is PARTNER.
name: pulumi.Output[str] = None¶Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
pairing_key: pulumi.Output[str] = None¶[Output only for type PARTNER. Not present for DEDICATED]. The opaque identifier of an PARTNER attachment used to initiate provisioning with a selected partner. Of the form “XXXXX/region/domain”
partner_asn: pulumi.Output[str] = None¶[Output only for type PARTNER. Not present for DEDICATED]. Optional BGP ASN for the router that should be supplied by a layer 3 Partner if they configured BGP on behalf of the customer.
private_interconnect_info: pulumi.Output[dict] = None¶Information specific to an InterconnectAttachment. This property is populated if the interconnect that this is attached to is of type DEDICATED.
tag8021q(float)
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region: pulumi.Output[str] = None¶Region where the regional interconnect attachment resides.
router: pulumi.Output[str] = None¶URL of the cloud router to be used for dynamic routing. This router must be in the same region as this InterconnectAttachment. The InterconnectAttachment will automatically connect the Interconnect to the network & region within which the Cloud Router is configured.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
state: pulumi.Output[str] = None¶[Output Only] The current state of this attachment’s functionality.
type: pulumi.Output[str] = None¶The type of InterconnectAttachment you wish to create. Defaults to DEDICATED.
vlan_tag8021q: pulumi.Output[float] = None¶The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094. When using PARTNER type this will be managed upstream.
- static
get(resource_name, id, opts=None, admin_enabled=None, bandwidth=None, candidate_subnets=None, cloud_router_ip_address=None, creation_timestamp=None, customer_router_ip_address=None, description=None, edge_availability_domain=None, google_reference_id=None, interconnect=None, name=None, pairing_key=None, partner_asn=None, private_interconnect_info=None, project=None, region=None, router=None, self_link=None, state=None, type=None, vlan_tag8021q=None)¶ Get an existing InterconnectAttachment resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
admin_enabled (pulumi.Input[bool]) – Whether the VLAN attachment is enabled or disabled. When using PARTNER type this will Pre-Activate the interconnect attachment
bandwidth (pulumi.Input[str]) – Provisioned bandwidth capacity for the interconnect attachment. For attachments of type DEDICATED, the user can set the bandwidth. For attachments of type PARTNER, the Google Partner that is operating the interconnect must set the bandwidth. Output only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED, Defaults to BPS_10G
candidate_subnets (pulumi.Input[list]) – Up to 16 candidate prefixes that can be used to restrict the allocation of cloudRouterIpAddress and customerRouterIpAddress for this attachment. All prefixes must be within link-local address space (169.254.0.0/16) and must be /29 or shorter (/28, /27, etc). Google will attempt to select an unused /29 from the supplied candidate prefix(es). The request will fail if all possible /29s are in use on Google’s edge. If not supplied, Google will randomly select an unused /29 from all of link-local space.
cloud_router_ip_address (pulumi.Input[str]) – IPv4 address + prefix length to be configured on Cloud Router Interface for this interconnect attachment.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
customer_router_ip_address (pulumi.Input[str]) – IPv4 address + prefix length to be configured on the customer router subinterface for this interconnect attachment.
description (pulumi.Input[str]) – An optional description of this resource.
edge_availability_domain (pulumi.Input[str]) – Desired availability domain for the attachment. Only available for type PARTNER, at creation time. For improved reliability, customers should configure a pair of attachments with one per availability domain. The selected availability domain will be provided to the Partner via the pairing key so that the provisioned circuit will lie in the specified domain. If not specified, the value will default to AVAILABILITY_DOMAIN_ANY.
google_reference_id (pulumi.Input[str]) – Google reference ID, to be used when raising support tickets with Google or otherwise to debug backend connectivity issues.
interconnect (pulumi.Input[str]) – URL of the underlying Interconnect object that this attachment’s traffic will traverse through. Required if type is DEDICATED, must not be set if type is PARTNER.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.pairing_key (pulumi.Input[str]) – [Output only for type PARTNER. Not present for DEDICATED]. The opaque identifier of an PARTNER attachment used to initiate provisioning with a selected partner. Of the form “XXXXX/region/domain”
partner_asn (pulumi.Input[str]) – [Output only for type PARTNER. Not present for DEDICATED]. Optional BGP ASN for the router that should be supplied by a layer 3 Partner if they configured BGP on behalf of the customer.
private_interconnect_info (pulumi.Input[dict]) – Information specific to an InterconnectAttachment. This property is populated if the interconnect that this is attached to is of type DEDICATED.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – Region where the regional interconnect attachment resides.
router (pulumi.Input[str]) – URL of the cloud router to be used for dynamic routing. This router must be in the same region as this InterconnectAttachment. The InterconnectAttachment will automatically connect the Interconnect to the network & region within which the Cloud Router is configured.
self_link (pulumi.Input[str]) – The URI of the created resource.
state (pulumi.Input[str]) – [Output Only] The current state of this attachment’s functionality.
type (pulumi.Input[str]) – The type of InterconnectAttachment you wish to create. Defaults to DEDICATED.
vlan_tag8021q (pulumi.Input[float]) – The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094. When using PARTNER type this will be managed upstream.
The private_interconnect_info object supports the following:
tag8021q(pulumi.Input[float])
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.MachineImage(resource_name, opts=None, description=None, name=None, project=None, source_instance=None, __props__=None, __name__=None, __opts__=None)¶ Represents a MachineImage resource. Machine images store all the configuration, metadata, permissions, and data from one or more disks required to create a Virtual machine (VM) instance.
To get more information about MachineImage, see:
How-to Guides
import pulumi import pulumi_gcp as gcp vm = gcp.compute.Instance("vm", machine_type="n1-standard-1", boot_disk={ "initialize_params": { "image": "debian-cloud/debian-9", }, }, network_interface=[{ "network": "default", }]) image = gcp.compute.MachineImage("image", source_instance=vm.self_link)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – A text description of the resource.
name (pulumi.Input[str]) – Name of the resource.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
source_instance (pulumi.Input[str]) – The source instance used to create the machine image. You can provide this as a partial or full URL to the resource.
description: pulumi.Output[str] = None¶A text description of the resource.
name: pulumi.Output[str] = None¶Name of the resource.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
source_instance: pulumi.Output[str] = None¶The source instance used to create the machine image. You can provide this as a partial or full URL to the resource.
- static
get(resource_name, id, opts=None, description=None, name=None, project=None, self_link=None, source_instance=None)¶ Get an existing MachineImage resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – A text description of the resource.
name (pulumi.Input[str]) – Name of the resource.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link (pulumi.Input[str]) – The URI of the created resource.
source_instance (pulumi.Input[str]) – The source instance used to create the machine image. You can provide this as a partial or full URL to the resource.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.ManagedSslCertificate(resource_name, opts=None, certificate_id=None, description=None, managed=None, name=None, project=None, type=None, __props__=None, __name__=None, __opts__=None)¶ An SslCertificate resource, used for HTTPS load balancing. This resource represents a certificate for which the certificate secrets are created and managed by Google.
For a resource where you provide the key, see the SSL Certificate resource.
To get more information about ManagedSslCertificate, see:
How-to Guides
Warning: This resource should be used with extreme caution! Provisioning an SSL certificate is complex. Ensure that you understand the lifecycle of a certificate before attempting complex tasks like cert rotation automatically. This resource will “return” as soon as the certificate object is created, but post-creation the certificate object will go through a “provisioning” process. The provisioning process can complete only when the domain name for which the certificate is created points to a target pool which, itself, points at the certificate. Depending on your DNS provider, this may take some time, and migrating from self-managed certificates to Google-managed certificates may entail some downtime while the certificate provisions.
In conclusion: Be extremely cautious.
import pulumi import pulumi_gcp as gcp default_managed_ssl_certificate = gcp.compute.ManagedSslCertificate("defaultManagedSslCertificate", managed={ "domains": ["sslcert.tf-test.club."], }) default_http_health_check = gcp.compute.HttpHealthCheck("defaultHttpHealthCheck", request_path="/", check_interval_sec=1, timeout_sec=1) default_backend_service = gcp.compute.BackendService("defaultBackendService", port_name="http", protocol="HTTP", timeout_sec=10, health_checks=[default_http_health_check.id]) default_url_map = gcp.compute.URLMap("defaultURLMap", description="a description", default_service=default_backend_service.id, host_rule=[{ "hosts": ["sslcert.tf-test.club"], "pathMatcher": "allpaths", }], path_matcher=[{ "name": "allpaths", "default_service": default_backend_service.id, "path_rule": [{ "paths": ["/*"], "service": default_backend_service.id, }], }]) default_target_https_proxy = gcp.compute.TargetHttpsProxy("defaultTargetHttpsProxy", url_map=default_url_map.id, ssl_certificates=[default_managed_ssl_certificate.id]) zone = gcp.dns.ManagedZone("zone", dns_name="sslcert.tf-test.club.") default_global_forwarding_rule = gcp.compute.GlobalForwardingRule("defaultGlobalForwardingRule", target=default_target_https_proxy.id, port_range=443) set = gcp.dns.RecordSet("set", type="A", ttl=3600, managed_zone=zone.name, rrdatas=[default_global_forwarding_rule.ip_address])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
certificate_id (pulumi.Input[float]) – The unique identifier for the resource.
description (pulumi.Input[str]) – An optional description of this resource.
managed (pulumi.Input[dict]) – Properties relevant to a managed certificate. These will be used if the certificate is managed (as indicated by a value of
MANAGEDintype). Structure is documented below.name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
type (pulumi.Input[str]) – Enum field whose value is always
MANAGED- used to signal to the API which type this is.
The managed object supports the following:
domains(pulumi.Input[list]) - Domains for which a managed SSL certificate will be valid. Currently, there can be up to 100 domains in this list.
certificate_id: pulumi.Output[float] = None¶The unique identifier for the resource.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional description of this resource.
expire_time: pulumi.Output[str] = None¶Expire time of the certificate.
managed: pulumi.Output[dict] = None¶Properties relevant to a managed certificate. These will be used if the certificate is managed (as indicated by a value of
MANAGEDintype). Structure is documented below.domains(list) - Domains for which a managed SSL certificate will be valid. Currently, there can be up to 100 domains in this list.
name: pulumi.Output[str] = None¶Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
subject_alternative_names: pulumi.Output[list] = None¶Domains associated with the certificate via Subject Alternative Name.
type: pulumi.Output[str] = None¶Enum field whose value is always
MANAGED- used to signal to the API which type this is.
- static
get(resource_name, id, opts=None, certificate_id=None, creation_timestamp=None, description=None, expire_time=None, managed=None, name=None, project=None, self_link=None, subject_alternative_names=None, type=None)¶ Get an existing ManagedSslCertificate resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
certificate_id (pulumi.Input[float]) – The unique identifier for the resource.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional description of this resource.
expire_time (pulumi.Input[str]) – Expire time of the certificate.
managed (pulumi.Input[dict]) – Properties relevant to a managed certificate. These will be used if the certificate is managed (as indicated by a value of
MANAGEDintype). Structure is documented below.name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link (pulumi.Input[str]) – The URI of the created resource.
subject_alternative_names (pulumi.Input[list]) – Domains associated with the certificate via Subject Alternative Name.
type (pulumi.Input[str]) – Enum field whose value is always
MANAGED- used to signal to the API which type this is.
The managed object supports the following:
domains(pulumi.Input[list]) - Domains for which a managed SSL certificate will be valid. Currently, there can be up to 100 domains in this list.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.MangedSslCertificate(resource_name, opts=None, certificate_id=None, description=None, managed=None, name=None, project=None, type=None, __props__=None, __name__=None, __opts__=None)¶ Create a MangedSslCertificate resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[float] certificate_id: The unique identifier for the resource. :param pulumi.Input[str] description: An optional description of this resource. :param pulumi.Input[dict] managed: Properties relevant to a managed certificate. These will be used if the certificate is managed (as indicated by a value
of ‘MANAGED’ in ‘type’).
- Parameters
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ‘a-z?’ which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. These are in the same namespace as the managed SSL certificates.
type (pulumi.Input[str]) – Enum field whose value is always ‘MANAGED’ - used to signal to the API which type this is. Default value: “MANAGED” Possible values: [“MANAGED”]
The managed object supports the following:
domains(pulumi.Input[list])
certificate_id: pulumi.Output[float] = None¶The unique identifier for the resource.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional description of this resource.
expire_time: pulumi.Output[str] = None¶Expire time of the certificate.
managed: pulumi.Output[dict] = None¶Properties relevant to a managed certificate. These will be used if the certificate is managed (as indicated by a value of ‘MANAGED’ in ‘type’).
domains(list)
name: pulumi.Output[str] = None¶Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ‘a-z?’ which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. These are in the same namespace as the managed SSL certificates.
subject_alternative_names: pulumi.Output[list] = None¶Domains associated with the certificate via Subject Alternative Name.
type: pulumi.Output[str] = None¶Enum field whose value is always ‘MANAGED’ - used to signal to the API which type this is. Default value: “MANAGED” Possible values: [“MANAGED”]
- static
get(resource_name, id, opts=None, certificate_id=None, creation_timestamp=None, description=None, expire_time=None, managed=None, name=None, project=None, self_link=None, subject_alternative_names=None, type=None)¶ Get an existing MangedSslCertificate resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
certificate_id (pulumi.Input[float]) – The unique identifier for the resource.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional description of this resource.
expire_time (pulumi.Input[str]) – Expire time of the certificate.
managed (pulumi.Input[dict]) – Properties relevant to a managed certificate. These will be used if the certificate is managed (as indicated by a value of ‘MANAGED’ in ‘type’).
name (pulumi.Input[str]) –
Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression ‘a-z?’ which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. These are in the same namespace as the managed SSL certificates.
subject_alternative_names (pulumi.Input[list]) – Domains associated with the certificate via Subject Alternative Name.
type (pulumi.Input[str]) – Enum field whose value is always ‘MANAGED’ - used to signal to the API which type this is. Default value: “MANAGED” Possible values: [“MANAGED”]
The managed object supports the following:
domains(pulumi.Input[list])
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.Network(resource_name, opts=None, auto_create_subnetworks=None, delete_default_routes_on_create=None, description=None, name=None, project=None, routing_mode=None, __props__=None, __name__=None, __opts__=None)¶ Manages a VPC network or legacy network resource on GCP.
To get more information about Network, see:
How-to Guides
import pulumi import pulumi_gcp as gcp vpc_network = gcp.compute.Network("vpcNetwork")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
auto_create_subnetworks (pulumi.Input[bool]) – When set to
true, the network is created in “auto subnet mode” and it will create a subnet for each region automatically across the10.128.0.0/9address range. When set tofalse, the network is created in “custom subnet mode” so the user can explicitly connect subnetwork resources.delete_default_routes_on_create (pulumi.Input[bool]) – If set to
true, default routes (0.0.0.0/0) will be deleted immediately after network creation. Defaults tofalse.description (pulumi.Input[str]) – An optional description of this resource. The resource must be recreated to modify this field.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
routing_mode (pulumi.Input[str]) – The network-wide routing mode to use. If set to
REGIONAL, this network’s cloud routers will only advertise routes with subnetworks of this network in the same region as the router. If set toGLOBAL, this network’s cloud routers will advertise routes with all subnetworks of this network, across regions.
auto_create_subnetworks: pulumi.Output[bool] = None¶When set to
true, the network is created in “auto subnet mode” and it will create a subnet for each region automatically across the10.128.0.0/9address range. When set tofalse, the network is created in “custom subnet mode” so the user can explicitly connect subnetwork resources.
delete_default_routes_on_create: pulumi.Output[bool] = None¶If set to
true, default routes (0.0.0.0/0) will be deleted immediately after network creation. Defaults tofalse.
description: pulumi.Output[str] = None¶An optional description of this resource. The resource must be recreated to modify this field.
gateway_ipv4: pulumi.Output[str] = None¶The gateway address for default routing out of the network. This value is selected by GCP.
name: pulumi.Output[str] = None¶Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
routing_mode: pulumi.Output[str] = None¶The network-wide routing mode to use. If set to
REGIONAL, this network’s cloud routers will only advertise routes with subnetworks of this network in the same region as the router. If set toGLOBAL, this network’s cloud routers will advertise routes with all subnetworks of this network, across regions.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
- static
get(resource_name, id, opts=None, auto_create_subnetworks=None, delete_default_routes_on_create=None, description=None, gateway_ipv4=None, name=None, project=None, routing_mode=None, self_link=None)¶ Get an existing Network resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
auto_create_subnetworks (pulumi.Input[bool]) – When set to
true, the network is created in “auto subnet mode” and it will create a subnet for each region automatically across the10.128.0.0/9address range. When set tofalse, the network is created in “custom subnet mode” so the user can explicitly connect subnetwork resources.delete_default_routes_on_create (pulumi.Input[bool]) – If set to
true, default routes (0.0.0.0/0) will be deleted immediately after network creation. Defaults tofalse.description (pulumi.Input[str]) – An optional description of this resource. The resource must be recreated to modify this field.
gateway_ipv4 (pulumi.Input[str]) – The gateway address for default routing out of the network. This value is selected by GCP.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
routing_mode (pulumi.Input[str]) – The network-wide routing mode to use. If set to
REGIONAL, this network’s cloud routers will only advertise routes with subnetworks of this network in the same region as the router. If set toGLOBAL, this network’s cloud routers will advertise routes with all subnetworks of this network, across regions.self_link (pulumi.Input[str]) – The URI of the created resource.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.NetworkEndpoint(resource_name, opts=None, instance=None, ip_address=None, network_endpoint_group=None, port=None, project=None, zone=None, __props__=None, __name__=None, __opts__=None)¶ A Network endpoint represents a IP address and port combination that is part of a specific network endpoint group (NEG). NEGs are zonals collection of these endpoints for GCP resources within a single subnet. NOTE: Network endpoints cannot be created outside of a network endpoint group.
To get more information about NetworkEndpoint, see:
How-to Guides
import pulumi import pulumi_gcp as gcp my_image = gcp.compute.get_image(family="debian-9", project="debian-cloud") default_network = gcp.compute.Network("defaultNetwork", auto_create_subnetworks=False) default_subnetwork = gcp.compute.Subnetwork("defaultSubnetwork", ip_cidr_range="10.0.0.1/16", region="us-central1", network=default_network.id) endpoint_instance = gcp.compute.Instance("endpoint-instance", machine_type="n1-standard-1", boot_disk={ "initialize_params": { "image": my_image.self_link, }, }, network_interface=[{ "subnetwork": default_subnetwork.id, "access_config": [{}], }]) default_endpoint = gcp.compute.NetworkEndpoint("default-endpoint", network_endpoint_group=google_compute_network_endpoint_group["neg"]["name"], instance=endpoint_instance.name, port=google_compute_network_endpoint_group["neg"]["default_port"], ip_address=endpoint_instance.network_interfaces[0]["networkIp"]) group = gcp.compute.NetworkEndpointGroup("group", network=default_network.id, subnetwork=default_subnetwork.id, default_port="90", zone="us-central1-a")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
instance (pulumi.Input[str]) – The name for a specific VM instance that the IP address belongs to. This is required for network endpoints of type GCE_VM_IP_PORT. The instance must be in the same zone of network endpoint group.
ip_address (pulumi.Input[str]) – IPv4 address of network endpoint. The IP address must belong to a VM in GCE (either the primary IP or as part of an aliased IP range).
network_endpoint_group (pulumi.Input[str]) – The network endpoint group this endpoint is part of.
port (pulumi.Input[float]) – Port number of network endpoint.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
zone (pulumi.Input[str]) – Zone where the containing network endpoint group is located.
instance: pulumi.Output[str] = None¶The name for a specific VM instance that the IP address belongs to. This is required for network endpoints of type GCE_VM_IP_PORT. The instance must be in the same zone of network endpoint group.
ip_address: pulumi.Output[str] = None¶IPv4 address of network endpoint. The IP address must belong to a VM in GCE (either the primary IP or as part of an aliased IP range).
network_endpoint_group: pulumi.Output[str] = None¶The network endpoint group this endpoint is part of.
port: pulumi.Output[float] = None¶Port number of network endpoint.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
zone: pulumi.Output[str] = None¶Zone where the containing network endpoint group is located.
- static
get(resource_name, id, opts=None, instance=None, ip_address=None, network_endpoint_group=None, port=None, project=None, zone=None)¶ Get an existing NetworkEndpoint resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
instance (pulumi.Input[str]) – The name for a specific VM instance that the IP address belongs to. This is required for network endpoints of type GCE_VM_IP_PORT. The instance must be in the same zone of network endpoint group.
ip_address (pulumi.Input[str]) – IPv4 address of network endpoint. The IP address must belong to a VM in GCE (either the primary IP or as part of an aliased IP range).
network_endpoint_group (pulumi.Input[str]) – The network endpoint group this endpoint is part of.
port (pulumi.Input[float]) – Port number of network endpoint.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
zone (pulumi.Input[str]) – Zone where the containing network endpoint group is located.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.NetworkEndpointGroup(resource_name, opts=None, default_port=None, description=None, name=None, network=None, network_endpoint_type=None, project=None, subnetwork=None, zone=None, __props__=None, __name__=None, __opts__=None)¶ Network endpoint groups (NEGs) are zonal resources that represent collections of IP address and port combinations for GCP resources within a single subnet. Each IP address and port combination is called a network endpoint.
Network endpoint groups can be used as backends in backend services for HTTP(S), TCP proxy, and SSL proxy load balancers. You cannot use NEGs as a backend with internal load balancers. Because NEG backends allow you to specify IP addresses and ports, you can distribute traffic in a granular fashion among applications or containers running within VM instances.
To get more information about NetworkEndpointGroup, see:
How-to Guides
import pulumi import pulumi_gcp as gcp default_network = gcp.compute.Network("defaultNetwork", auto_create_subnetworks=False) default_subnetwork = gcp.compute.Subnetwork("defaultSubnetwork", ip_cidr_range="10.0.0.0/16", region="us-central1", network=default_network.id) neg = gcp.compute.NetworkEndpointGroup("neg", network=default_network.id, subnetwork=default_subnetwork.id, default_port="90", zone="us-central1-a")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
default_port (pulumi.Input[float]) – The default port used if the port number is not specified in the network endpoint.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource.
name (pulumi.Input[str]) – Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.network (pulumi.Input[str]) – The network to which all network endpoints in the NEG belong. Uses “default” project network if unspecified.
network_endpoint_type (pulumi.Input[str]) – Type of network endpoints in this network endpoint group.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
subnetwork (pulumi.Input[str]) – Optional subnetwork to which all network endpoints in the NEG belong.
zone (pulumi.Input[str]) – Zone where the network endpoint group is located.
default_port: pulumi.Output[float] = None¶The default port used if the port number is not specified in the network endpoint.
description: pulumi.Output[str] = None¶An optional description of this resource. Provide this property when you create the resource.
name: pulumi.Output[str] = None¶Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
network: pulumi.Output[str] = None¶The network to which all network endpoints in the NEG belong. Uses “default” project network if unspecified.
network_endpoint_type: pulumi.Output[str] = None¶Type of network endpoints in this network endpoint group.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
size: pulumi.Output[float] = None¶Number of network endpoints in the network endpoint group.
subnetwork: pulumi.Output[str] = None¶Optional subnetwork to which all network endpoints in the NEG belong.
zone: pulumi.Output[str] = None¶Zone where the network endpoint group is located.
- static
get(resource_name, id, opts=None, default_port=None, description=None, name=None, network=None, network_endpoint_type=None, project=None, self_link=None, size=None, subnetwork=None, zone=None)¶ Get an existing NetworkEndpointGroup resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
default_port (pulumi.Input[float]) – The default port used if the port number is not specified in the network endpoint.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource.
name (pulumi.Input[str]) – Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.network (pulumi.Input[str]) – The network to which all network endpoints in the NEG belong. Uses “default” project network if unspecified.
network_endpoint_type (pulumi.Input[str]) – Type of network endpoints in this network endpoint group.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link (pulumi.Input[str]) – The URI of the created resource.
size (pulumi.Input[float]) – Number of network endpoints in the network endpoint group.
subnetwork (pulumi.Input[str]) – Optional subnetwork to which all network endpoints in the NEG belong.
zone (pulumi.Input[str]) – Zone where the network endpoint group is located.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.NetworkPeering(resource_name, opts=None, export_custom_routes=None, export_subnet_routes_with_public_ip=None, import_custom_routes=None, import_subnet_routes_with_public_ip=None, name=None, network=None, peer_network=None, __props__=None, __name__=None, __opts__=None)¶ Manages a network peering within GCE. For more information see the official documentation and API.
Both network must create a peering with each other for the peering to be functional.
Subnets IP ranges across peered VPC networks cannot overlap.
import pulumi import pulumi_gcp as gcp default = gcp.compute.Network("default", auto_create_subnetworks="false") other = gcp.compute.Network("other", auto_create_subnetworks="false") peering1 = gcp.compute.NetworkPeering("peering1", network=default.id, peer_network=other.id) peering2 = gcp.compute.NetworkPeering("peering2", network=other.id, peer_network=default.id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
export_custom_routes (pulumi.Input[bool]) – Whether to export the custom routes to the peer network. Defaults to
false.export_subnet_routes_with_public_ip (pulumi.Input[bool]) – Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always exported to peers and are not controlled by this field.
import_custom_routes (pulumi.Input[bool]) – Whether to export the custom routes from the peer network. Defaults to
false.import_subnet_routes_with_public_ip (pulumi.Input[bool]) – Whether subnet routes with public IP range are imported. The default value is false. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always imported from peers and are not controlled by this field.
name (pulumi.Input[str]) – Name of the peering.
network (pulumi.Input[str]) – The primary network of the peering.
peer_network (pulumi.Input[str]) – The peer network in the peering. The peer network may belong to a different project.
export_custom_routes: pulumi.Output[bool] = None¶Whether to export the custom routes to the peer network. Defaults to
false.
export_subnet_routes_with_public_ip: pulumi.Output[bool] = None¶Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always exported to peers and are not controlled by this field.
import_custom_routes: pulumi.Output[bool] = None¶Whether to export the custom routes from the peer network. Defaults to
false.
import_subnet_routes_with_public_ip: pulumi.Output[bool] = None¶Whether subnet routes with public IP range are imported. The default value is false. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always imported from peers and are not controlled by this field.
name: pulumi.Output[str] = None¶Name of the peering.
network: pulumi.Output[str] = None¶The primary network of the peering.
peer_network: pulumi.Output[str] = None¶The peer network in the peering. The peer network may belong to a different project.
state: pulumi.Output[str] = None¶State for the peering, either
ACTIVEorINACTIVE. The peering isACTIVEwhen there’s a matching configuration in the peer network.
state_details: pulumi.Output[str] = None¶Details about the current state of the peering.
- static
get(resource_name, id, opts=None, export_custom_routes=None, export_subnet_routes_with_public_ip=None, import_custom_routes=None, import_subnet_routes_with_public_ip=None, name=None, network=None, peer_network=None, state=None, state_details=None)¶ Get an existing NetworkPeering resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
export_custom_routes (pulumi.Input[bool]) – Whether to export the custom routes to the peer network. Defaults to
false.export_subnet_routes_with_public_ip (pulumi.Input[bool]) – Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always exported to peers and are not controlled by this field.
import_custom_routes (pulumi.Input[bool]) – Whether to export the custom routes from the peer network. Defaults to
false.import_subnet_routes_with_public_ip (pulumi.Input[bool]) – Whether subnet routes with public IP range are imported. The default value is false. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always imported from peers and are not controlled by this field.
name (pulumi.Input[str]) – Name of the peering.
network (pulumi.Input[str]) – The primary network of the peering.
peer_network (pulumi.Input[str]) – The peer network in the peering. The peer network may belong to a different project.
state (pulumi.Input[str]) – State for the peering, either
ACTIVEorINACTIVE. The peering isACTIVEwhen there’s a matching configuration in the peer network.state_details (pulumi.Input[str]) – Details about the current state of the peering.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.NetworkPeeringRoutesConfig(resource_name, opts=None, export_custom_routes=None, import_custom_routes=None, network=None, peering=None, project=None, __props__=None, __name__=None, __opts__=None)¶ Manage a network peering’s route settings without managing the peering as a whole. This resource is primarily intended for use with GCP-generated peerings that shouldn’t otherwise be managed by other tools. Deleting this resource is a no-op and the peering will not be modified.
To get more information about NetworkPeeringRoutesConfig, see:
How-to Guides
import pulumi import pulumi_gcp as gcp network_primary = gcp.compute.Network("networkPrimary", auto_create_subnetworks="false") network_secondary = gcp.compute.Network("networkSecondary", auto_create_subnetworks="false") peering_primary = gcp.compute.NetworkPeering("peeringPrimary", network=network_primary.id, peer_network=network_secondary.id, import_custom_routes=True, export_custom_routes=True) peering_primary_routes = gcp.compute.NetworkPeeringRoutesConfig("peeringPrimaryRoutes", peering=peering_primary.name, network=network_primary.name, import_custom_routes=True, export_custom_routes=True) peering_secondary = gcp.compute.NetworkPeering("peeringSecondary", network=network_secondary.id, peer_network=network_primary.id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
export_custom_routes (pulumi.Input[bool]) – Whether to export the custom routes to the peer network.
import_custom_routes (pulumi.Input[bool]) – Whether to import the custom routes to the peer network.
network (pulumi.Input[str]) – The name of the primary network for the peering.
peering (pulumi.Input[str]) – Name of the peering.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
export_custom_routes: pulumi.Output[bool] = None¶Whether to export the custom routes to the peer network.
import_custom_routes: pulumi.Output[bool] = None¶Whether to import the custom routes to the peer network.
network: pulumi.Output[str] = None¶The name of the primary network for the peering.
peering: pulumi.Output[str] = None¶Name of the peering.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- static
get(resource_name, id, opts=None, export_custom_routes=None, import_custom_routes=None, network=None, peering=None, project=None)¶ Get an existing NetworkPeeringRoutesConfig resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
export_custom_routes (pulumi.Input[bool]) – Whether to export the custom routes to the peer network.
import_custom_routes (pulumi.Input[bool]) – Whether to import the custom routes to the peer network.
network (pulumi.Input[str]) – The name of the primary network for the peering.
peering (pulumi.Input[str]) – Name of the peering.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.NodeGroup(resource_name, opts=None, autoscaling_policy=None, description=None, name=None, node_template=None, project=None, size=None, zone=None, __props__=None, __name__=None, __opts__=None)¶ Represents a NodeGroup resource to manage a group of sole-tenant nodes.
To get more information about NodeGroup, see:
How-to Guides
Warning: Due to limitations of the API, this provider cannot update the number of nodes in a node group and changes to node group size either through provider config or through external changes will cause the provider to delete and recreate the node group.
import pulumi import pulumi_gcp as gcp soletenant_tmpl = gcp.compute.NodeTemplate("soletenant-tmpl", region="us-central1", node_type="n1-node-96-624") nodes = gcp.compute.NodeGroup("nodes", zone="us-central1-a", description="example google_compute_node_group for the Google Provider", size=1, node_template=soletenant_tmpl.id)
import pulumi import pulumi_gcp as gcp soletenant_tmpl = gcp.compute.NodeTemplate("soletenant-tmpl", region="us-central1", node_type="n1-node-96-624") nodes = gcp.compute.NodeGroup("nodes", zone="us-central1-a", description="example google_compute_node_group for the Google Provider", size=1, node_template=soletenant_tmpl.id, autoscaling_policy={ "mode": "ON", "minNodes": 1, "maxNodes": 10, })
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
autoscaling_policy (pulumi.Input[dict]) –
If you use sole-tenant nodes for your workloads, you can use the node group autoscaler to automatically manage the sizes of your node groups. Structure is documented below.
description (pulumi.Input[str]) – An optional textual description of the resource.
name (pulumi.Input[str]) – Name of the resource.
node_template (pulumi.Input[str]) – The URL of the node template to which this node group belongs.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
size (pulumi.Input[float]) – The total number of nodes in the node group.
zone (pulumi.Input[str]) – Zone where this node group is located
The autoscaling_policy object supports the following:
maxNodes(pulumi.Input[float]) - Maximum size of the node group. Set to a value less than or equal to 100 and greater than or equal to min-nodes.minNodes(pulumi.Input[float]) - Minimum size of the node group. Must be less than or equal to max-nodes. The default value is 0.mode(pulumi.Input[str]) - The autoscaling mode. Set to one of the following:OFF: Disables the autoscaler.
ON: Enables scaling in and scaling out.
ONLY_SCALE_OUT: Enables only scaling out. You must use this mode if your node groups are configured to restart their hosted VMs on minimal servers.
autoscaling_policy: pulumi.Output[dict] = None¶If you use sole-tenant nodes for your workloads, you can use the node group autoscaler to automatically manage the sizes of your node groups. Structure is documented below.
maxNodes(float) - Maximum size of the node group. Set to a value less than or equal to 100 and greater than or equal to min-nodes.minNodes(float) - Minimum size of the node group. Must be less than or equal to max-nodes. The default value is 0.mode(str) - The autoscaling mode. Set to one of the following:OFF: Disables the autoscaler.
ON: Enables scaling in and scaling out.
ONLY_SCALE_OUT: Enables only scaling out. You must use this mode if your node groups are configured to restart their hosted VMs on minimal servers.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional textual description of the resource.
name: pulumi.Output[str] = None¶Name of the resource.
node_template: pulumi.Output[str] = None¶The URL of the node template to which this node group belongs.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
size: pulumi.Output[float] = None¶The total number of nodes in the node group.
zone: pulumi.Output[str] = None¶Zone where this node group is located
- static
get(resource_name, id, opts=None, autoscaling_policy=None, creation_timestamp=None, description=None, name=None, node_template=None, project=None, self_link=None, size=None, zone=None)¶ Get an existing NodeGroup resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
autoscaling_policy (pulumi.Input[dict]) –
If you use sole-tenant nodes for your workloads, you can use the node group autoscaler to automatically manage the sizes of your node groups. Structure is documented below.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional textual description of the resource.
name (pulumi.Input[str]) – Name of the resource.
node_template (pulumi.Input[str]) – The URL of the node template to which this node group belongs.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link (pulumi.Input[str]) – The URI of the created resource.
size (pulumi.Input[float]) – The total number of nodes in the node group.
zone (pulumi.Input[str]) – Zone where this node group is located
The autoscaling_policy object supports the following:
maxNodes(pulumi.Input[float]) - Maximum size of the node group. Set to a value less than or equal to 100 and greater than or equal to min-nodes.minNodes(pulumi.Input[float]) - Minimum size of the node group. Must be less than or equal to max-nodes. The default value is 0.mode(pulumi.Input[str]) - The autoscaling mode. Set to one of the following:OFF: Disables the autoscaler.
ON: Enables scaling in and scaling out.
ONLY_SCALE_OUT: Enables only scaling out. You must use this mode if your node groups are configured to restart their hosted VMs on minimal servers.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.NodeTemplate(resource_name, opts=None, cpu_overcommit_type=None, description=None, name=None, node_affinity_labels=None, node_type=None, node_type_flexibility=None, project=None, region=None, server_binding=None, __props__=None, __name__=None, __opts__=None)¶ Represents a NodeTemplate resource. Node templates specify properties for creating sole-tenant nodes, such as node type, vCPU and memory requirements, node affinity labels, and region.
To get more information about NodeTemplate, see:
How-to Guides
import pulumi import pulumi_gcp as gcp template = gcp.compute.NodeTemplate("template", node_type="n1-node-96-624", region="us-central1")
import pulumi import pulumi_gcp as gcp central1a = gcp.compute.get_node_types(zone="us-central1-a") template = gcp.compute.NodeTemplate("template", region="us-central1", node_type="n1-node-96-624", node_affinity_labels={ "foo": "baz", }, server_binding={ "type": "RESTART_NODE_ON_MINIMAL_SERVERS", })
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
cpu_overcommit_type (pulumi.Input[str]) – CPU overcommit. Default value: “NONE” Possible values: [“ENABLED”, “NONE”]
description (pulumi.Input[str]) – An optional textual description of the resource.
name (pulumi.Input[str]) – Name of the resource.
node_affinity_labels (pulumi.Input[dict]) – Labels to use for node affinity, which will be used in instance scheduling.
node_type (pulumi.Input[str]) – Node type to use for nodes group that are created from this template. Only one of nodeTypeFlexibility and nodeType can be specified.
node_type_flexibility (pulumi.Input[dict]) – Flexible properties for the desired node type. Node groups that use this node template will create nodes of a type that matches these properties. Only one of nodeTypeFlexibility and nodeType can be specified. Structure is documented below.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – Region where nodes using the node template will be created. If it is not provided, the provider region is used.
server_binding (pulumi.Input[dict]) – The server binding policy for nodes using this template. Determines where the nodes should restart following a maintenance event. Structure is documented below.
The node_type_flexibility object supports the following:
cpus(pulumi.Input[str]) - Number of virtual CPUs to use.localSsd(pulumi.Input[str]) - - Use local SSDmemory(pulumi.Input[str]) - Physical memory available to the node, defined in MB.
The server_binding object supports the following:
type(pulumi.Input[str]) - Type of server binding policy. IfRESTART_NODE_ON_ANY_SERVER, nodes using this template will restart on any physical server following a maintenance event. IfRESTART_NODE_ON_MINIMAL_SERVER, nodes using this template will restart on the same physical server following a maintenance event, instead of being live migrated to or restarted on a new physical server. This option may be useful if you are using software licenses tied to the underlying server characteristics such as physical sockets or cores, to avoid the need for additional licenses when maintenance occurs. However, VMs on such nodes will experience outages while maintenance is applied.
cpu_overcommit_type: pulumi.Output[str] = None¶CPU overcommit. Default value: “NONE” Possible values: [“ENABLED”, “NONE”]
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional textual description of the resource.
name: pulumi.Output[str] = None¶Name of the resource.
node_affinity_labels: pulumi.Output[dict] = None¶Labels to use for node affinity, which will be used in instance scheduling.
node_type: pulumi.Output[str] = None¶Node type to use for nodes group that are created from this template. Only one of nodeTypeFlexibility and nodeType can be specified.
node_type_flexibility: pulumi.Output[dict] = None¶Flexible properties for the desired node type. Node groups that use this node template will create nodes of a type that matches these properties. Only one of nodeTypeFlexibility and nodeType can be specified. Structure is documented below.
cpus(str) - Number of virtual CPUs to use.localSsd(str) - - Use local SSDmemory(str) - Physical memory available to the node, defined in MB.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region: pulumi.Output[str] = None¶Region where nodes using the node template will be created. If it is not provided, the provider region is used.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
server_binding: pulumi.Output[dict] = None¶The server binding policy for nodes using this template. Determines where the nodes should restart following a maintenance event. Structure is documented below.
type(str) - Type of server binding policy. IfRESTART_NODE_ON_ANY_SERVER, nodes using this template will restart on any physical server following a maintenance event. IfRESTART_NODE_ON_MINIMAL_SERVER, nodes using this template will restart on the same physical server following a maintenance event, instead of being live migrated to or restarted on a new physical server. This option may be useful if you are using software licenses tied to the underlying server characteristics such as physical sockets or cores, to avoid the need for additional licenses when maintenance occurs. However, VMs on such nodes will experience outages while maintenance is applied.
- static
get(resource_name, id, opts=None, cpu_overcommit_type=None, creation_timestamp=None, description=None, name=None, node_affinity_labels=None, node_type=None, node_type_flexibility=None, project=None, region=None, self_link=None, server_binding=None)¶ Get an existing NodeTemplate resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
cpu_overcommit_type (pulumi.Input[str]) – CPU overcommit. Default value: “NONE” Possible values: [“ENABLED”, “NONE”]
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional textual description of the resource.
name (pulumi.Input[str]) – Name of the resource.
node_affinity_labels (pulumi.Input[dict]) – Labels to use for node affinity, which will be used in instance scheduling.
node_type (pulumi.Input[str]) – Node type to use for nodes group that are created from this template. Only one of nodeTypeFlexibility and nodeType can be specified.
node_type_flexibility (pulumi.Input[dict]) – Flexible properties for the desired node type. Node groups that use this node template will create nodes of a type that matches these properties. Only one of nodeTypeFlexibility and nodeType can be specified. Structure is documented below.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – Region where nodes using the node template will be created. If it is not provided, the provider region is used.
self_link (pulumi.Input[str]) – The URI of the created resource.
server_binding (pulumi.Input[dict]) – The server binding policy for nodes using this template. Determines where the nodes should restart following a maintenance event. Structure is documented below.
The node_type_flexibility object supports the following:
cpus(pulumi.Input[str]) - Number of virtual CPUs to use.localSsd(pulumi.Input[str]) - - Use local SSDmemory(pulumi.Input[str]) - Physical memory available to the node, defined in MB.
The server_binding object supports the following:
type(pulumi.Input[str]) - Type of server binding policy. IfRESTART_NODE_ON_ANY_SERVER, nodes using this template will restart on any physical server following a maintenance event. IfRESTART_NODE_ON_MINIMAL_SERVER, nodes using this template will restart on the same physical server following a maintenance event, instead of being live migrated to or restarted on a new physical server. This option may be useful if you are using software licenses tied to the underlying server characteristics such as physical sockets or cores, to avoid the need for additional licenses when maintenance occurs. However, VMs on such nodes will experience outages while maintenance is applied.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.PacketMirroring(resource_name, opts=None, collector_ilb=None, description=None, filter=None, mirrored_resources=None, name=None, network=None, priority=None, project=None, region=None, __props__=None, __name__=None, __opts__=None)¶ Packet Mirroring mirrors traffic to and from particular VM instances. You can use the collected traffic to help you detect security threats and monitor application performance.
To get more information about PacketMirroring, see:
How-to Guides
import pulumi import pulumi_gcp as gcp default_network = gcp.compute.Network("defaultNetwork") mirror = gcp.compute.Instance("mirror", machine_type="n1-standard-1", boot_disk={ "initialize_params": { "image": "debian-cloud/debian-9", }, }, network_interface=[{ "network": default_network.id, "access_config": [{}], }]) default_subnetwork = gcp.compute.Subnetwork("defaultSubnetwork", network=default_network.id, ip_cidr_range="10.2.0.0/16") default_health_check = gcp.compute.HealthCheck("defaultHealthCheck", check_interval_sec=1, timeout_sec=1, tcp_health_check={ "port": "80", }) default_region_backend_service = gcp.compute.RegionBackendService("defaultRegionBackendService", health_checks=[default_health_check.id]) default_forwarding_rule = gcp.compute.ForwardingRule("defaultForwardingRule", is_mirroring_collector=True, ip_protocol="TCP", load_balancing_scheme="INTERNAL", backend_service=default_region_backend_service.id, all_ports=True, network=default_network.id, subnetwork=default_subnetwork.id, network_tier="PREMIUM") foobar = gcp.compute.PacketMirroring("foobar", description="bar", network={ "url": default_network.id, }, collector_ilb={ "url": default_forwarding_rule.id, }, mirrored_resources={ "tags": ["foo"], "instances": [{ "url": mirror.id, }], }, filter={ "ipProtocols": ["tcp"], "cidrRanges": ["0.0.0.0/0"], })
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
collector_ilb (pulumi.Input[dict]) – The Forwarding Rule resource (of type load_balancing_scheme=INTERNAL) that will be used as collector for mirrored traffic. The specified forwarding rule must have is_mirroring_collector set to true. Structure is documented below.
description (pulumi.Input[str]) – A human-readable description of the rule.
filter (pulumi.Input[dict]) – A filter for mirrored traffic. If unset, all traffic is mirrored. Structure is documented below.
mirrored_resources (pulumi.Input[dict]) – A means of specifying which resources to mirror. Structure is documented below.
name (pulumi.Input[str]) – The name of the packet mirroring rule
network (pulumi.Input[dict]) – Specifies the mirrored VPC network. Only packets in this network will be mirrored. All mirrored VMs should have a NIC in the given network. All mirrored subnetworks should belong to the given network. Structure is documented below.
priority (pulumi.Input[float]) – Since only one rule can be active at a time, priority is used to break ties in the case of two rules that apply to the same instances.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – The Region in which the created address should reside. If it is not provided, the provider region is used.
The collector_ilb object supports the following:
url(pulumi.Input[str]) - The URL of the instances where this rule should be active.
The filter object supports the following:
cidrRanges(pulumi.Input[list]) - IP CIDR ranges that apply as a filter on the source (ingress) or destination (egress) IP in the IP header. Only IPv4 is supported.ipProtocols(pulumi.Input[list]) - Protocols that apply as a filter on mirrored traffic.
The mirrored_resources object supports the following:
instances(pulumi.Input[list]) - All the listed instances will be mirrored. Specify at most 50. Structure is documented below.url(pulumi.Input[str]) - The URL of the instances where this rule should be active.
subnetworks(pulumi.Input[list]) - All instances in one of these subnetworks will be mirrored. Structure is documented below.url(pulumi.Input[str]) - The URL of the instances where this rule should be active.
tags(pulumi.Input[list]) - All instances with these tags will be mirrored.
The network object supports the following:
url(pulumi.Input[str]) - The URL of the instances where this rule should be active.
collector_ilb: pulumi.Output[dict] = None¶The Forwarding Rule resource (of type load_balancing_scheme=INTERNAL) that will be used as collector for mirrored traffic. The specified forwarding rule must have is_mirroring_collector set to true. Structure is documented below.
url(str) - The URL of the instances where this rule should be active.
description: pulumi.Output[str] = None¶A human-readable description of the rule.
filter: pulumi.Output[dict] = None¶A filter for mirrored traffic. If unset, all traffic is mirrored. Structure is documented below.
cidrRanges(list) - IP CIDR ranges that apply as a filter on the source (ingress) or destination (egress) IP in the IP header. Only IPv4 is supported.ipProtocols(list) - Protocols that apply as a filter on mirrored traffic.
mirrored_resources: pulumi.Output[dict] = None¶A means of specifying which resources to mirror. Structure is documented below.
instances(list) - All the listed instances will be mirrored. Specify at most 50. Structure is documented below.url(str) - The URL of the instances where this rule should be active.
subnetworks(list) - All instances in one of these subnetworks will be mirrored. Structure is documented below.url(str) - The URL of the instances where this rule should be active.
tags(list) - All instances with these tags will be mirrored.
name: pulumi.Output[str] = None¶The name of the packet mirroring rule
network: pulumi.Output[dict] = None¶Specifies the mirrored VPC network. Only packets in this network will be mirrored. All mirrored VMs should have a NIC in the given network. All mirrored subnetworks should belong to the given network. Structure is documented below.
url(str) - The URL of the instances where this rule should be active.
priority: pulumi.Output[float] = None¶Since only one rule can be active at a time, priority is used to break ties in the case of two rules that apply to the same instances.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region: pulumi.Output[str] = None¶The Region in which the created address should reside. If it is not provided, the provider region is used.
- static
get(resource_name, id, opts=None, collector_ilb=None, description=None, filter=None, mirrored_resources=None, name=None, network=None, priority=None, project=None, region=None)¶ Get an existing PacketMirroring resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
collector_ilb (pulumi.Input[dict]) – The Forwarding Rule resource (of type load_balancing_scheme=INTERNAL) that will be used as collector for mirrored traffic. The specified forwarding rule must have is_mirroring_collector set to true. Structure is documented below.
description (pulumi.Input[str]) – A human-readable description of the rule.
filter (pulumi.Input[dict]) – A filter for mirrored traffic. If unset, all traffic is mirrored. Structure is documented below.
mirrored_resources (pulumi.Input[dict]) – A means of specifying which resources to mirror. Structure is documented below.
name (pulumi.Input[str]) – The name of the packet mirroring rule
network (pulumi.Input[dict]) – Specifies the mirrored VPC network. Only packets in this network will be mirrored. All mirrored VMs should have a NIC in the given network. All mirrored subnetworks should belong to the given network. Structure is documented below.
priority (pulumi.Input[float]) – Since only one rule can be active at a time, priority is used to break ties in the case of two rules that apply to the same instances.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – The Region in which the created address should reside. If it is not provided, the provider region is used.
The collector_ilb object supports the following:
url(pulumi.Input[str]) - The URL of the instances where this rule should be active.
The filter object supports the following:
cidrRanges(pulumi.Input[list]) - IP CIDR ranges that apply as a filter on the source (ingress) or destination (egress) IP in the IP header. Only IPv4 is supported.ipProtocols(pulumi.Input[list]) - Protocols that apply as a filter on mirrored traffic.
The mirrored_resources object supports the following:
instances(pulumi.Input[list]) - All the listed instances will be mirrored. Specify at most 50. Structure is documented below.url(pulumi.Input[str]) - The URL of the instances where this rule should be active.
subnetworks(pulumi.Input[list]) - All instances in one of these subnetworks will be mirrored. Structure is documented below.url(pulumi.Input[str]) - The URL of the instances where this rule should be active.
tags(pulumi.Input[list]) - All instances with these tags will be mirrored.
The network object supports the following:
url(pulumi.Input[str]) - The URL of the instances where this rule should be active.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.PerInstanceConfig(resource_name, opts=None, instance_group_manager=None, minimal_action=None, most_disruptive_allowed_action=None, name=None, preserved_state=None, project=None, remove_instance_state_on_destroy=None, zone=None, __props__=None, __name__=None, __opts__=None)¶ A config defined for a single managed instance that belongs to an instance group manager. It preserves the instance name across instance group manager operations and can define stateful disks or metadata that are unique to the instance.
To get more information about PerInstanceConfig, see:
How-to Guides
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
instance_group_manager (pulumi.Input[str]) – The instance group manager this instance config is part of.
minimal_action (pulumi.Input[str]) – The minimal action to perform on the instance during an update. Default is
NONE. Possible values are:
* REPLACE * RESTART * REFRESH * NONE
- Parameters
most_disruptive_allowed_action (pulumi.Input[str]) – The most disruptive action to perform on the instance during an update. Default is
REPLACE. Possible values are:
* REPLACE * RESTART * REFRESH * NONE
- Parameters
name (pulumi.Input[str]) – The name for this per-instance config and its corresponding instance.
preserved_state (pulumi.Input[dict]) – The preserved state for this instance. Structure is documented below.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
remove_instance_state_on_destroy (pulumi.Input[bool]) – When true, deleting this config will immediately remove any specified state from the underlying instance. When false, deleting this config will not immediately remove any state from the underlying instance. State will be removed on the next instance recreation or update.
zone (pulumi.Input[str]) – Zone where the containing instance group manager is located
The preserved_state object supports the following:
disks(pulumi.Input[list]) - Stateful disks for the instance. Structure is documented below.deleteRule(pulumi.Input[str]) - A value that prescribes what should happen to the stateful disk when the VM instance is deleted. The available options areNEVERandON_PERMANENT_INSTANCE_DELETION.NEVERdetatch the disk when the VM is deleted, but not delete the disk.ON_PERMANENT_INSTANCE_DELETIONwill delete the stateful disk when the VM is permanently deleted from the instance group.device_name(pulumi.Input[str]) - A unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance.mode(pulumi.Input[str]) - The mode of the disk.source(pulumi.Input[str]) - The URI of an existing persistent disk to attach under the specified device-name in the formatprojects/project-id/zones/zone/disks/disk-name.
metadata(pulumi.Input[dict]) - Preserved metadata defined for this instance. This is a list of key->value pairs.
instance_group_manager: pulumi.Output[str] = None¶The instance group manager this instance config is part of.
minimal_action: pulumi.Output[str] = None¶The minimal action to perform on the instance during an update. Default is
NONE. Possible values are:REPLACE
RESTART
REFRESH
NONE
most_disruptive_allowed_action: pulumi.Output[str] = None¶The most disruptive action to perform on the instance during an update. Default is
REPLACE. Possible values are:REPLACE
RESTART
REFRESH
NONE
name: pulumi.Output[str] = None¶The name for this per-instance config and its corresponding instance.
preserved_state: pulumi.Output[dict] = None¶The preserved state for this instance. Structure is documented below.
disks(list) - Stateful disks for the instance. Structure is documented below.deleteRule(str) - A value that prescribes what should happen to the stateful disk when the VM instance is deleted. The available options areNEVERandON_PERMANENT_INSTANCE_DELETION.NEVERdetatch the disk when the VM is deleted, but not delete the disk.ON_PERMANENT_INSTANCE_DELETIONwill delete the stateful disk when the VM is permanently deleted from the instance group.device_name(str) - A unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance.mode(str) - The mode of the disk.source(str) - The URI of an existing persistent disk to attach under the specified device-name in the formatprojects/project-id/zones/zone/disks/disk-name.
metadata(dict) - Preserved metadata defined for this instance. This is a list of key->value pairs.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
remove_instance_state_on_destroy: pulumi.Output[bool] = None¶When true, deleting this config will immediately remove any specified state from the underlying instance. When false, deleting this config will not immediately remove any state from the underlying instance. State will be removed on the next instance recreation or update.
zone: pulumi.Output[str] = None¶Zone where the containing instance group manager is located
- static
get(resource_name, id, opts=None, instance_group_manager=None, minimal_action=None, most_disruptive_allowed_action=None, name=None, preserved_state=None, project=None, remove_instance_state_on_destroy=None, zone=None)¶ Get an existing PerInstanceConfig resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
instance_group_manager (pulumi.Input[str]) – The instance group manager this instance config is part of.
minimal_action (pulumi.Input[str]) – The minimal action to perform on the instance during an update. Default is
NONE. Possible values are:
* REPLACE * RESTART * REFRESH * NONE
- Parameters
most_disruptive_allowed_action (pulumi.Input[str]) – The most disruptive action to perform on the instance during an update. Default is
REPLACE. Possible values are:
* REPLACE * RESTART * REFRESH * NONE
- Parameters
name (pulumi.Input[str]) – The name for this per-instance config and its corresponding instance.
preserved_state (pulumi.Input[dict]) – The preserved state for this instance. Structure is documented below.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
remove_instance_state_on_destroy (pulumi.Input[bool]) – When true, deleting this config will immediately remove any specified state from the underlying instance. When false, deleting this config will not immediately remove any state from the underlying instance. State will be removed on the next instance recreation or update.
zone (pulumi.Input[str]) – Zone where the containing instance group manager is located
The preserved_state object supports the following:
disks(pulumi.Input[list]) - Stateful disks for the instance. Structure is documented below.deleteRule(pulumi.Input[str]) - A value that prescribes what should happen to the stateful disk when the VM instance is deleted. The available options areNEVERandON_PERMANENT_INSTANCE_DELETION.NEVERdetatch the disk when the VM is deleted, but not delete the disk.ON_PERMANENT_INSTANCE_DELETIONwill delete the stateful disk when the VM is permanently deleted from the instance group.device_name(pulumi.Input[str]) - A unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance.mode(pulumi.Input[str]) - The mode of the disk.source(pulumi.Input[str]) - The URI of an existing persistent disk to attach under the specified device-name in the formatprojects/project-id/zones/zone/disks/disk-name.
metadata(pulumi.Input[dict]) - Preserved metadata defined for this instance. This is a list of key->value pairs.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.ProjectDefaultNetworkTier(resource_name, opts=None, network_tier=None, project=None, __props__=None, __name__=None, __opts__=None)¶ Configures the Google Compute Engine Default Network Tier for a project.
For more information, see, the Project API documentation.
import pulumi import pulumi_gcp as gcp default = gcp.compute.ProjectDefaultNetworkTier("default", network_tier="PREMIUM")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
network_tier (pulumi.Input[str]) – The default network tier to be configured for the project. This field can take the following values:
PREMIUMorSTANDARD.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
network_tier: pulumi.Output[str] = None¶The default network tier to be configured for the project. This field can take the following values:
PREMIUMorSTANDARD.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- static
get(resource_name, id, opts=None, network_tier=None, project=None)¶ Get an existing ProjectDefaultNetworkTier resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
network_tier (pulumi.Input[str]) – The default network tier to be configured for the project. This field can take the following values:
PREMIUMorSTANDARD.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.ProjectMetadata(resource_name, opts=None, metadata=None, project=None, __props__=None, __name__=None, __opts__=None)¶ Authoritatively manages metadata common to all instances for a project in GCE. For more information see the official documentation and API.
Note: This resource manages all project-level metadata including project-level ssh keys. Keys unset in config but set on the server will be removed. If you want to manage only single key/value pairs within the project metadata rather than the entire set, then use google_compute_project_metadata_item.
import pulumi import pulumi_gcp as gcp default = gcp.compute.ProjectMetadata("default", metadata={ "13": "42", "fizz": "buzz", "foo": "bar", })
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
metadata (pulumi.Input[dict]) – A series of key value pairs.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
metadata: pulumi.Output[dict] = None¶A series of key value pairs.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- static
get(resource_name, id, opts=None, metadata=None, project=None)¶ Get an existing ProjectMetadata resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
metadata (pulumi.Input[dict]) – A series of key value pairs.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.ProjectMetadataItem(resource_name, opts=None, key=None, project=None, value=None, __props__=None, __name__=None, __opts__=None)¶ Manages a single key/value pair on metadata common to all instances for a project in GCE. Using
compute.ProjectMetadataItemlets you manage a single key/value setting in the provider rather than the entire project metadata map.import pulumi import pulumi_gcp as gcp default = gcp.compute.ProjectMetadataItem("default", key="my_metadata", value="my_value")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
key (pulumi.Input[str]) – The metadata key to set.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
value (pulumi.Input[str]) – The value to set for the given metadata key.
key: pulumi.Output[str] = None¶The metadata key to set.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
value: pulumi.Output[str] = None¶The value to set for the given metadata key.
- static
get(resource_name, id, opts=None, key=None, project=None, value=None)¶ Get an existing ProjectMetadataItem resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
key (pulumi.Input[str]) – The metadata key to set.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
value (pulumi.Input[str]) – The value to set for the given metadata key.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.RegionAutoscaler(resource_name, opts=None, autoscaling_policy=None, description=None, name=None, project=None, region=None, target=None, __props__=None, __name__=None, __opts__=None)¶ Represents an Autoscaler resource.
Autoscalers allow you to automatically scale virtual machine instances in managed instance groups according to an autoscaling policy that you define.
To get more information about RegionAutoscaler, see:
How-to Guides
import pulumi import pulumi_gcp as gcp debian9 = gcp.compute.get_image(family="debian-9", project="debian-cloud") foobar_instance_template = gcp.compute.InstanceTemplate("foobarInstanceTemplate", machine_type="n1-standard-1", can_ip_forward=False, tags=[ "foo", "bar", ], disk=[{ "sourceImage": debian9.self_link, }], network_interface=[{ "network": "default", }], metadata={ "foo": "bar", }, service_account={ "scopes": [ "userinfo-email", "compute-ro", "storage-ro", ], }) foobar_target_pool = gcp.compute.TargetPool("foobarTargetPool") foobar_region_instance_group_manager = gcp.compute.RegionInstanceGroupManager("foobarRegionInstanceGroupManager", region="us-central1", version=[{ "instanceTemplate": foobar_instance_template.id, "name": "primary", }], target_pools=[foobar_target_pool.id], base_instance_name="foobar") foobar_region_autoscaler = gcp.compute.RegionAutoscaler("foobarRegionAutoscaler", region="us-central1", target=foobar_region_instance_group_manager.id, autoscaling_policy={ "maxReplicas": 5, "minReplicas": 1, "cooldownPeriod": 60, "cpu_utilization": { "target": 0.5, }, })
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
autoscaling_policy (pulumi.Input[dict]) – The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%. Structure is documented below.
description (pulumi.Input[str]) – An optional description of this resource.
name (pulumi.Input[str]) – The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – URL of the region where the instance group resides.
target (pulumi.Input[str]) – Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
The autoscaling_policy object supports the following:
cooldownPeriod(pulumi.Input[float]) - The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds. Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.cpuUtilization(pulumi.Input[dict]) - Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group. Structure is documented below.target(pulumi.Input[float]) - Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
loadBalancingUtilization(pulumi.Input[dict]) - Configuration parameters of autoscaling based on a load balancer. Structure is documented below.target(pulumi.Input[float]) - Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
maxReplicas(pulumi.Input[float]) - The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas.metrics(pulumi.Input[list]) - Configuration parameters of autoscaling based on a custom metric. Structure is documented below.filter(pulumi.Input[str]) - A filter string to be used as the filter string for a Stackdriver Monitoring TimeSeries.list API call. This filter is used to select a specific TimeSeries for the purpose of autoscaling and to determine whether the metric is exporting per-instance or per-group data. You can only use the AND operator for joining selectors. You can only use direct equality comparison operator (=) without any functions for each selector. You can specify the metric in both the filter string and in the metric field. However, if specified in both places, the metric must be identical. The monitored resource type determines what kind of values are expected for the metric. If it is a gce_instance, the autoscaler expects the metric to include a separate TimeSeries for each instance in a group. In such a case, you cannot filter on resource labels. If the resource type is any other value, the autoscaler expects this metric to contain values that apply to the entire autoscaled instance group and resource label filtering can be performed to point autoscaler at the correct TimeSeries to scale upon. This is called a per-group metric for the purpose of autoscaling. If not specified, the type defaults to gce_instance. You should provide a filter that is selective enough to pick just one TimeSeries for the autoscaled group or for each of the instances (if you are using gce_instance resource type). If multiple TimeSeries are returned upon the query execution, the autoscaler will sum their respective values to obtain its scaling value.name(pulumi.Input[str]) - The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.singleInstanceAssignment(pulumi.Input[float]) - If scaling is based on a per-group metric value that represents the total amount of work to be done or resource usage, set this value to an amount assigned for a single instance of the scaled group. The autoscaler will keep the number of instances proportional to the value of this metric, the metric itself should not change value due to group resizing. For example, a good metric to use with the target ispubsub.googleapis.com/subscription/num_undelivered_messagesor a custom metric exporting the total number of requests coming to your instances. A bad example would be a metric exporting an average or median latency, since this value can’t include a chunk assignable to a single instance, it could be better used with utilization_target instead.target(pulumi.Input[float]) - Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.type(pulumi.Input[str]) - Defines how target utilization value is expressed for a Stackdriver Monitoring metric.
minReplicas(pulumi.Input[float]) - The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed.
autoscaling_policy: pulumi.Output[dict] = None¶The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%. Structure is documented below.
cooldownPeriod(float) - The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds. Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.cpuUtilization(dict) - Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group. Structure is documented below.target(float) - Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
loadBalancingUtilization(dict) - Configuration parameters of autoscaling based on a load balancer. Structure is documented below.target(float) - Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
maxReplicas(float) - The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas.metrics(list) - Configuration parameters of autoscaling based on a custom metric. Structure is documented below.filter(str) - A filter string to be used as the filter string for a Stackdriver Monitoring TimeSeries.list API call. This filter is used to select a specific TimeSeries for the purpose of autoscaling and to determine whether the metric is exporting per-instance or per-group data. You can only use the AND operator for joining selectors. You can only use direct equality comparison operator (=) without any functions for each selector. You can specify the metric in both the filter string and in the metric field. However, if specified in both places, the metric must be identical. The monitored resource type determines what kind of values are expected for the metric. If it is a gce_instance, the autoscaler expects the metric to include a separate TimeSeries for each instance in a group. In such a case, you cannot filter on resource labels. If the resource type is any other value, the autoscaler expects this metric to contain values that apply to the entire autoscaled instance group and resource label filtering can be performed to point autoscaler at the correct TimeSeries to scale upon. This is called a per-group metric for the purpose of autoscaling. If not specified, the type defaults to gce_instance. You should provide a filter that is selective enough to pick just one TimeSeries for the autoscaled group or for each of the instances (if you are using gce_instance resource type). If multiple TimeSeries are returned upon the query execution, the autoscaler will sum their respective values to obtain its scaling value.name(str) - The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.singleInstanceAssignment(float) - If scaling is based on a per-group metric value that represents the total amount of work to be done or resource usage, set this value to an amount assigned for a single instance of the scaled group. The autoscaler will keep the number of instances proportional to the value of this metric, the metric itself should not change value due to group resizing. For example, a good metric to use with the target ispubsub.googleapis.com/subscription/num_undelivered_messagesor a custom metric exporting the total number of requests coming to your instances. A bad example would be a metric exporting an average or median latency, since this value can’t include a chunk assignable to a single instance, it could be better used with utilization_target instead.target(float) - Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.type(str) - Defines how target utilization value is expressed for a Stackdriver Monitoring metric.
minReplicas(float) - The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional description of this resource.
name: pulumi.Output[str] = None¶The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region: pulumi.Output[str] = None¶URL of the region where the instance group resides.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
target: pulumi.Output[str] = None¶Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
- static
get(resource_name, id, opts=None, autoscaling_policy=None, creation_timestamp=None, description=None, name=None, project=None, region=None, self_link=None, target=None)¶ Get an existing RegionAutoscaler resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
autoscaling_policy (pulumi.Input[dict]) – The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%. Structure is documented below.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional description of this resource.
name (pulumi.Input[str]) – The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – URL of the region where the instance group resides.
self_link (pulumi.Input[str]) – The URI of the created resource.
target (pulumi.Input[str]) – Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
The autoscaling_policy object supports the following:
cooldownPeriod(pulumi.Input[float]) - The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds. Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.cpuUtilization(pulumi.Input[dict]) - Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group. Structure is documented below.target(pulumi.Input[float]) - Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
loadBalancingUtilization(pulumi.Input[dict]) - Configuration parameters of autoscaling based on a load balancer. Structure is documented below.target(pulumi.Input[float]) - Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
maxReplicas(pulumi.Input[float]) - The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas.metrics(pulumi.Input[list]) - Configuration parameters of autoscaling based on a custom metric. Structure is documented below.filter(pulumi.Input[str]) - A filter string to be used as the filter string for a Stackdriver Monitoring TimeSeries.list API call. This filter is used to select a specific TimeSeries for the purpose of autoscaling and to determine whether the metric is exporting per-instance or per-group data. You can only use the AND operator for joining selectors. You can only use direct equality comparison operator (=) without any functions for each selector. You can specify the metric in both the filter string and in the metric field. However, if specified in both places, the metric must be identical. The monitored resource type determines what kind of values are expected for the metric. If it is a gce_instance, the autoscaler expects the metric to include a separate TimeSeries for each instance in a group. In such a case, you cannot filter on resource labels. If the resource type is any other value, the autoscaler expects this metric to contain values that apply to the entire autoscaled instance group and resource label filtering can be performed to point autoscaler at the correct TimeSeries to scale upon. This is called a per-group metric for the purpose of autoscaling. If not specified, the type defaults to gce_instance. You should provide a filter that is selective enough to pick just one TimeSeries for the autoscaled group or for each of the instances (if you are using gce_instance resource type). If multiple TimeSeries are returned upon the query execution, the autoscaler will sum their respective values to obtain its scaling value.name(pulumi.Input[str]) - The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.singleInstanceAssignment(pulumi.Input[float]) - If scaling is based on a per-group metric value that represents the total amount of work to be done or resource usage, set this value to an amount assigned for a single instance of the scaled group. The autoscaler will keep the number of instances proportional to the value of this metric, the metric itself should not change value due to group resizing. For example, a good metric to use with the target ispubsub.googleapis.com/subscription/num_undelivered_messagesor a custom metric exporting the total number of requests coming to your instances. A bad example would be a metric exporting an average or median latency, since this value can’t include a chunk assignable to a single instance, it could be better used with utilization_target instead.target(pulumi.Input[float]) - Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.type(pulumi.Input[str]) - Defines how target utilization value is expressed for a Stackdriver Monitoring metric.
minReplicas(pulumi.Input[float]) - The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.RegionBackendService(resource_name, opts=None, affinity_cookie_ttl_sec=None, backends=None, circuit_breakers=None, connection_draining_timeout_sec=None, consistent_hash=None, description=None, failover_policy=None, health_checks=None, load_balancing_scheme=None, locality_lb_policy=None, log_config=None, name=None, network=None, outlier_detection=None, port_name=None, project=None, protocol=None, region=None, session_affinity=None, timeout_sec=None, __props__=None, __name__=None, __opts__=None)¶ A Region Backend Service defines a regionally-scoped group of virtual machines that will serve traffic for load balancing.
To get more information about RegionBackendService, see:
How-to Guides
import pulumi import pulumi_gcp as gcp default_health_check = gcp.compute.HealthCheck("defaultHealthCheck", check_interval_sec=1, timeout_sec=1, tcp_health_check={ "port": "80", }) default_region_backend_service = gcp.compute.RegionBackendService("defaultRegionBackendService", region="us-central1", health_checks=[default_health_check.id], connection_draining_timeout_sec=10, session_affinity="CLIENT_IP")
import pulumi import pulumi_gcp as gcp health_check = gcp.compute.HealthCheck("healthCheck", http_health_check={ "port": 80, }) default = gcp.compute.RegionBackendService("default", region="us-central1", health_checks=[health_check.id], protocol="HTTP", load_balancing_scheme="INTERNAL_MANAGED", locality_lb_policy="ROUND_ROBIN")
import pulumi import pulumi_gcp as gcp health_check = gcp.compute.HealthCheck("healthCheck", http_health_check={ "port": 80, }) default = gcp.compute.RegionBackendService("default", region="us-central1", health_checks=[health_check.id], load_balancing_scheme="INTERNAL_MANAGED", locality_lb_policy="RING_HASH", session_affinity="HTTP_COOKIE", protocol="HTTP", circuit_breakers={ "maxConnections": 10, }, consistent_hash={ "http_cookie": { "ttl": { "seconds": 11, "nanos": 1111, }, "name": "mycookie", }, }, outlier_detection={ "consecutiveErrors": 2, })
import pulumi import pulumi_gcp as gcp debian_image = gcp.compute.get_image(family="debian-9", project="debian-cloud") default_network = gcp.compute.Network("defaultNetwork", auto_create_subnetworks=False, routing_mode="REGIONAL") default_subnetwork = gcp.compute.Subnetwork("defaultSubnetwork", ip_cidr_range="10.1.2.0/24", region="us-central1", network=default_network.id) instance_template = gcp.compute.InstanceTemplate("instanceTemplate", machine_type="n1-standard-1", network_interface=[{ "network": default_network.id, "subnetwork": default_subnetwork.id, }], disk=[{ "sourceImage": debian_image.self_link, "autoDelete": True, "boot": True, }], tags=[ "allow-ssh", "load-balanced-backend", ]) rigm = gcp.compute.RegionInstanceGroupManager("rigm", region="us-central1", version=[{ "instanceTemplate": instance_template.id, "name": "primary", }], base_instance_name="internal-glb", target_size=1) default_region_health_check = gcp.compute.RegionHealthCheck("defaultRegionHealthCheck", region="us-central1", http_health_check={ "portSpecification": "USE_SERVING_PORT", }) default_region_backend_service = gcp.compute.RegionBackendService("defaultRegionBackendService", load_balancing_scheme="INTERNAL_MANAGED", backend=[{ "group": rigm.instance_group, "balancingMode": "UTILIZATION", "capacityScaler": 1, }], region="us-central1", protocol="HTTP", timeout_sec=10, health_checks=[default_region_health_check.id])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
affinity_cookie_ttl_sec (pulumi.Input[float]) – Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day. When the load balancing scheme is INTERNAL, this field is not used.
backends (pulumi.Input[list]) – The set of backends that serve this RegionBackendService. Structure is documented below.
circuit_breakers (pulumi.Input[dict]) – Settings controlling the volume of connections to a backend service. This field is applicable only when the
load_balancing_schemeis set to INTERNAL_MANAGED and theprotocolis set to HTTP, HTTPS, or HTTP2. Structure is documented below.connection_draining_timeout_sec (pulumi.Input[float]) – Time for which instance will be drained (not accept new connections, but still work to finish started).
consistent_hash (pulumi.Input[dict]) – Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field only applies when all of the following are true -
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource.
failover_policy (pulumi.Input[dict]) – Policy for failovers. Structure is documented below.
health_checks (pulumi.Input[str]) – The set of URLs to HealthCheck resources for health checking this RegionBackendService. Currently at most one health check can be specified, and a health check is required.
load_balancing_scheme (pulumi.Input[str]) – Indicates what kind of load balancing this regional backend service will be used for. A backend service created for one type of load balancing cannot be used with the other(s).
locality_lb_policy (pulumi.Input[str]) – The load balancing algorithm used within the scope of the locality. The possible values are - ROUND_ROBIN - This is a simple policy in which each healthy backend is selected in round robin order. LEAST_REQUEST - An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. RING_HASH - The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. RANDOM - The load balancer selects a random healthy host. ORIGINAL_DESTINATION - Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. MAGLEV - used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, refer to https://ai.google/research/pubs/pub44824 This field is applicable only when the
load_balancing_schemeis set to INTERNAL_MANAGED and theprotocolis set to HTTP, HTTPS, or HTTP2.log_config (pulumi.Input[dict]) – This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver. Structure is documented below.
name (pulumi.Input[str]) – Name of the cookie.
network (pulumi.Input[str]) – The URL of the network to which this backend service belongs. This field can only be specified when the load balancing scheme is set to INTERNAL.
outlier_detection (pulumi.Input[dict]) – Settings controlling eviction of unhealthy hosts from the load balancing pool. This field is applicable only when the
load_balancing_schemeis set to INTERNAL_MANAGED and theprotocolis set to HTTP, HTTPS, or HTTP2. Structure is documented below.port_name (pulumi.Input[str]) – A named port on a backend instance group representing the port for communication to the backend VMs in that group. Required when the loadBalancingScheme is EXTERNAL, INTERNAL_MANAGED, or INTERNAL_SELF_MANAGED and the backends are instance groups. The named port must be defined on each backend instance group. This parameter has no meaning if the backends are NEGs. API sets a default of “http” if not given. Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
protocol (pulumi.Input[str]) – The protocol this RegionBackendService uses to communicate with backends. The default is HTTP. NOTE: HTTP2 is only valid for beta HTTP/2 load balancer types and may result in errors if used with the GA API.
region (pulumi.Input[str]) – The Region in which the created backend service should reside. If it is not provided, the provider region is used.
session_affinity (pulumi.Input[str]) – Type of session affinity to use. The default is NONE. Session affinity is not applicable if the protocol is UDP.
timeout_sec (pulumi.Input[float]) – How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds. Valid range is [1, 86400].
The backends object supports the following:
balancingMode(pulumi.Input[str]) - Specifies the balancing mode for this backend.capacityScaler(pulumi.Input[float]) - A multiplier applied to the group’s maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). ~>NOTE: This field cannot be set for INTERNAL region backend services (default loadBalancingScheme), but is required for non-INTERNAL backend service. The total capacity_scaler for all backends must be non-zero. A setting of 0 means the group is completely drained, offering 0% of its available Capacity. Valid range is [0.0,1.0].description(pulumi.Input[str]) - An optional description of this resource. Provide this property when you create the resource.failover(pulumi.Input[bool]) - This field designates whether this is a failover backend. More than one failover backend can be configured for a given RegionBackendService.group(pulumi.Input[str]) - The fully-qualified URL of an Instance Group or Network Endpoint Group resource. In case of instance group this defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource. For Network Endpoint Groups this defines list of endpoints. All endpoints of Network Endpoint Group must be hosted on instances located in the same zone as the Network Endpoint Group. Backend services cannot mix Instance Group and Network Endpoint Group backends. When theload_balancing_schemeis INTERNAL, only instance groups are supported. Note that you must specify an Instance Group or Network Endpoint Group resource using the fully-qualified URL, rather than a partial URL.maxConnections(pulumi.Input[float]) - The maximum number of connections to the backend cluster. Defaults to 1024.maxConnectionsPerEndpoint(pulumi.Input[float]) - The max number of simultaneous connections that a single backend network endpoint can handle. Cannot be set for INTERNAL backend services. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint must be set.maxConnectionsPerInstance(pulumi.Input[float]) - The max number of simultaneous connections that a single backend instance can handle. Cannot be set for INTERNAL backend services. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.maxRate(pulumi.Input[float]) - The max requests per second (RPS) of the group. Cannot be set for INTERNAL backend services. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. Either maxRate or one of maxRatePerInstance or maxRatePerEndpoint, as appropriate for group type, must be set.maxRatePerEndpoint(pulumi.Input[float]) - The max requests per second (RPS) that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint must be set. Cannot be set for INTERNAL backend services.maxRatePerInstance(pulumi.Input[float]) - The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set. Cannot be set for INTERNAL backend services.maxUtilization(pulumi.Input[float]) - Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. Valid range is [0.0, 1.0]. Cannot be set for INTERNAL backend services.
The circuit_breakers object supports the following:
connectTimeout(pulumi.Input[dict]) - The timeout for new network connections to hosts. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[float]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
maxConnections(pulumi.Input[float]) - The maximum number of connections to the backend cluster. Defaults to 1024.maxPendingRequests(pulumi.Input[float]) - The maximum number of pending requests to the backend cluster. Defaults to 1024.maxRequests(pulumi.Input[float]) - The maximum number of parallel requests to the backend cluster. Defaults to 1024.maxRequestsPerConnection(pulumi.Input[float]) - Maximum requests for a single backend connection. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive.maxRetries(pulumi.Input[float]) - The maximum number of parallel retries to the backend cluster. Defaults to 3.
The consistent_hash object supports the following:
httpCookie(pulumi.Input[dict]) - Hash is based on HTTP Cookie. This field describes a HTTP cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity is set to HTTP_COOKIE. Structure is documented below.name(pulumi.Input[str]) - Name of the cookie.path(pulumi.Input[str]) - Path to set for the cookie.ttl(pulumi.Input[dict]) - Lifetime of the cookie. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[float]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
httpHeaderName(pulumi.Input[str]) - The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER_FIELD.minimumRingSize(pulumi.Input[float]) - The minimum number of virtual nodes to use for the hash ring. Larger ring sizes result in more granular load distributions. If the number of hosts in the load balancing pool is larger than the ring size, each host will be assigned a single virtual node. Defaults to 1024.
The failover_policy object supports the following:
disableConnectionDrainOnFailover(pulumi.Input[bool]) - On failover or failback, this field indicates whether connection drain will be honored. Setting this to true has the following effect: connections to the old active pool are not drained. Connections to the new active pool use the timeout of 10 min (currently fixed). Setting to false has the following effect: both old and new connections will have a drain timeout of 10 min. This can be set to true only if the protocol is TCP. The default is false.dropTrafficIfUnhealthy(pulumi.Input[bool]) - This option is used only when no healthy VMs are detected in the primary and backup instance groups. When set to true, traffic is dropped. When set to false, new connections are sent across all VMs in the primary group. The default is false.failover_ratio(pulumi.Input[float]) - The value of the field must be in [0, 1]. If the ratio of the healthy VMs in the primary backend is at or below this number, traffic arriving at the load-balanced IP will be directed to the failover backend. In case where ‘failoverRatio’ is not set or all the VMs in the backup backend are unhealthy, the traffic will be directed back to the primary backend in the “force” mode, where traffic will be spread to the healthy VMs with the best effort, or to all VMs when no VM is healthy. This field is only used with l4 load balancing.
The log_config object supports the following:
enable(pulumi.Input[bool]) - Whether to enable logging for the load balancer traffic served by this backend service.sampleRate(pulumi.Input[float]) - This field can only be specified if logging is enabled for this backend service. The value of the field must be in [0, 1]. This configures the sampling rate of requests to the load balancer where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0.
The outlier_detection object supports the following:
baseEjectionTime(pulumi.Input[dict]) - The base time that a host is ejected for. The real time is equal to the base time multiplied by the number of times the host has been ejected. Defaults to 30000ms or 30s. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[float]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
consecutiveErrors(pulumi.Input[float]) - Number of errors before a host is ejected from the connection pool. When the backend host is accessed over HTTP, a 5xx return code qualifies as an error. Defaults to 5.consecutiveGatewayFailure(pulumi.Input[float]) - The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 5.enforcingConsecutiveErrors(pulumi.Input[float]) - The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.enforcingConsecutiveGatewayFailure(pulumi.Input[float]) - The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0.enforcingSuccessRate(pulumi.Input[float]) - The percentage chance that a host will be actually ejected when an outlier status is detected through success rate statistics. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.interval(pulumi.Input[dict]) - Time interval between ejection sweep analysis. This can result in both new ejections as well as hosts being returned to service. Defaults to 10 seconds. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[float]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
maxEjectionPercent(pulumi.Input[float]) - Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 10%.successRateMinimumHosts(pulumi.Input[float]) - The number of hosts in a cluster that must have enough request volume to detect success rate outliers. If the number of hosts is less than this setting, outlier detection via success rate statistics is not performed for any host in the cluster. Defaults to 5.successRateRequestVolume(pulumi.Input[float]) - The minimum number of total requests that must be collected in one interval (as defined by the interval duration above) to include this host in success rate based outlier detection. If the volume is lower than this setting, outlier detection via success rate statistics is not performed for that host. Defaults to 100.successRateStdevFactor(pulumi.Input[float]) - This factor is used to determine the ejection threshold for success rate outlier ejection. The ejection threshold is the difference between the mean success rate, and the product of this factor and the standard deviation of the mean success rate: mean - (stdev * success_rate_stdev_factor). This factor is divided by a thousand to get a double. That is, if the desired factor is 1.9, the runtime value should be 1900. Defaults to 1900.
Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day. When the load balancing scheme is INTERNAL, this field is not used.
backends: pulumi.Output[list] = None¶The set of backends that serve this RegionBackendService. Structure is documented below.
balancingMode(str) - Specifies the balancing mode for this backend.capacityScaler(float) - A multiplier applied to the group’s maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). ~>NOTE: This field cannot be set for INTERNAL region backend services (default loadBalancingScheme), but is required for non-INTERNAL backend service. The total capacity_scaler for all backends must be non-zero. A setting of 0 means the group is completely drained, offering 0% of its available Capacity. Valid range is [0.0,1.0].description(str) - An optional description of this resource. Provide this property when you create the resource.failover(bool) - This field designates whether this is a failover backend. More than one failover backend can be configured for a given RegionBackendService.group(str) - The fully-qualified URL of an Instance Group or Network Endpoint Group resource. In case of instance group this defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource. For Network Endpoint Groups this defines list of endpoints. All endpoints of Network Endpoint Group must be hosted on instances located in the same zone as the Network Endpoint Group. Backend services cannot mix Instance Group and Network Endpoint Group backends. When theload_balancing_schemeis INTERNAL, only instance groups are supported. Note that you must specify an Instance Group or Network Endpoint Group resource using the fully-qualified URL, rather than a partial URL.maxConnections(float) - The maximum number of connections to the backend cluster. Defaults to 1024.maxConnectionsPerEndpoint(float) - The max number of simultaneous connections that a single backend network endpoint can handle. Cannot be set for INTERNAL backend services. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint must be set.maxConnectionsPerInstance(float) - The max number of simultaneous connections that a single backend instance can handle. Cannot be set for INTERNAL backend services. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.maxRate(float) - The max requests per second (RPS) of the group. Cannot be set for INTERNAL backend services. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. Either maxRate or one of maxRatePerInstance or maxRatePerEndpoint, as appropriate for group type, must be set.maxRatePerEndpoint(float) - The max requests per second (RPS) that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint must be set. Cannot be set for INTERNAL backend services.maxRatePerInstance(float) - The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set. Cannot be set for INTERNAL backend services.maxUtilization(float) - Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. Valid range is [0.0, 1.0]. Cannot be set for INTERNAL backend services.
circuit_breakers: pulumi.Output[dict] = None¶Settings controlling the volume of connections to a backend service. This field is applicable only when the
load_balancing_schemeis set to INTERNAL_MANAGED and theprotocolis set to HTTP, HTTPS, or HTTP2. Structure is documented below.connectTimeout(dict) - The timeout for new network connections to hosts. Structure is documented below.nanos(float) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(float) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
maxConnections(float) - The maximum number of connections to the backend cluster. Defaults to 1024.maxPendingRequests(float) - The maximum number of pending requests to the backend cluster. Defaults to 1024.maxRequests(float) - The maximum number of parallel requests to the backend cluster. Defaults to 1024.maxRequestsPerConnection(float) - Maximum requests for a single backend connection. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive.maxRetries(float) - The maximum number of parallel retries to the backend cluster. Defaults to 3.
connection_draining_timeout_sec: pulumi.Output[float] = None¶Time for which instance will be drained (not accept new connections, but still work to finish started).
consistent_hash: pulumi.Output[dict] = None¶Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field only applies when all of the following are true -
httpCookie(dict) - Hash is based on HTTP Cookie. This field describes a HTTP cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity is set to HTTP_COOKIE. Structure is documented below.name(str) - Name of the cookie.path(str) - Path to set for the cookie.ttl(dict) - Lifetime of the cookie. Structure is documented below.nanos(float) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(float) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
httpHeaderName(str) - The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER_FIELD.minimumRingSize(float) - The minimum number of virtual nodes to use for the hash ring. Larger ring sizes result in more granular load distributions. If the number of hosts in the load balancing pool is larger than the ring size, each host will be assigned a single virtual node. Defaults to 1024.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional description of this resource. Provide this property when you create the resource.
failover_policy: pulumi.Output[dict] = None¶Policy for failovers. Structure is documented below.
disableConnectionDrainOnFailover(bool) - On failover or failback, this field indicates whether connection drain will be honored. Setting this to true has the following effect: connections to the old active pool are not drained. Connections to the new active pool use the timeout of 10 min (currently fixed). Setting to false has the following effect: both old and new connections will have a drain timeout of 10 min. This can be set to true only if the protocol is TCP. The default is false.dropTrafficIfUnhealthy(bool) - This option is used only when no healthy VMs are detected in the primary and backup instance groups. When set to true, traffic is dropped. When set to false, new connections are sent across all VMs in the primary group. The default is false.failover_ratio(float) - The value of the field must be in [0, 1]. If the ratio of the healthy VMs in the primary backend is at or below this number, traffic arriving at the load-balanced IP will be directed to the failover backend. In case where ‘failoverRatio’ is not set or all the VMs in the backup backend are unhealthy, the traffic will be directed back to the primary backend in the “force” mode, where traffic will be spread to the healthy VMs with the best effort, or to all VMs when no VM is healthy. This field is only used with l4 load balancing.
fingerprint: pulumi.Output[str] = None¶Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking.
health_checks: pulumi.Output[str] = None¶The set of URLs to HealthCheck resources for health checking this RegionBackendService. Currently at most one health check can be specified, and a health check is required.
load_balancing_scheme: pulumi.Output[str] = None¶Indicates what kind of load balancing this regional backend service will be used for. A backend service created for one type of load balancing cannot be used with the other(s).
locality_lb_policy: pulumi.Output[str] = None¶The load balancing algorithm used within the scope of the locality. The possible values are - ROUND_ROBIN - This is a simple policy in which each healthy backend is selected in round robin order. LEAST_REQUEST - An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. RING_HASH - The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. RANDOM - The load balancer selects a random healthy host. ORIGINAL_DESTINATION - Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. MAGLEV - used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, refer to https://ai.google/research/pubs/pub44824 This field is applicable only when the
load_balancing_schemeis set to INTERNAL_MANAGED and theprotocolis set to HTTP, HTTPS, or HTTP2.
log_config: pulumi.Output[dict] = None¶This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver. Structure is documented below.
enable(bool) - Whether to enable logging for the load balancer traffic served by this backend service.sampleRate(float) - This field can only be specified if logging is enabled for this backend service. The value of the field must be in [0, 1]. This configures the sampling rate of requests to the load balancer where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0.
name: pulumi.Output[str] = None¶Name of the cookie.
network: pulumi.Output[str] = None¶The URL of the network to which this backend service belongs. This field can only be specified when the load balancing scheme is set to INTERNAL.
outlier_detection: pulumi.Output[dict] = None¶Settings controlling eviction of unhealthy hosts from the load balancing pool. This field is applicable only when the
load_balancing_schemeis set to INTERNAL_MANAGED and theprotocolis set to HTTP, HTTPS, or HTTP2. Structure is documented below.baseEjectionTime(dict) - The base time that a host is ejected for. The real time is equal to the base time multiplied by the number of times the host has been ejected. Defaults to 30000ms or 30s. Structure is documented below.nanos(float) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(float) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
consecutiveErrors(float) - Number of errors before a host is ejected from the connection pool. When the backend host is accessed over HTTP, a 5xx return code qualifies as an error. Defaults to 5.consecutiveGatewayFailure(float) - The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 5.enforcingConsecutiveErrors(float) - The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.enforcingConsecutiveGatewayFailure(float) - The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0.enforcingSuccessRate(float) - The percentage chance that a host will be actually ejected when an outlier status is detected through success rate statistics. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.interval(dict) - Time interval between ejection sweep analysis. This can result in both new ejections as well as hosts being returned to service. Defaults to 10 seconds. Structure is documented below.nanos(float) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(float) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
maxEjectionPercent(float) - Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 10%.successRateMinimumHosts(float) - The number of hosts in a cluster that must have enough request volume to detect success rate outliers. If the number of hosts is less than this setting, outlier detection via success rate statistics is not performed for any host in the cluster. Defaults to 5.successRateRequestVolume(float) - The minimum number of total requests that must be collected in one interval (as defined by the interval duration above) to include this host in success rate based outlier detection. If the volume is lower than this setting, outlier detection via success rate statistics is not performed for that host. Defaults to 100.successRateStdevFactor(float) - This factor is used to determine the ejection threshold for success rate outlier ejection. The ejection threshold is the difference between the mean success rate, and the product of this factor and the standard deviation of the mean success rate: mean - (stdev * success_rate_stdev_factor). This factor is divided by a thousand to get a double. That is, if the desired factor is 1.9, the runtime value should be 1900. Defaults to 1900.
port_name: pulumi.Output[str] = None¶A named port on a backend instance group representing the port for communication to the backend VMs in that group. Required when the loadBalancingScheme is EXTERNAL, INTERNAL_MANAGED, or INTERNAL_SELF_MANAGED and the backends are instance groups. The named port must be defined on each backend instance group. This parameter has no meaning if the backends are NEGs. API sets a default of “http” if not given. Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
protocol: pulumi.Output[str] = None¶The protocol this RegionBackendService uses to communicate with backends. The default is HTTP. NOTE: HTTP2 is only valid for beta HTTP/2 load balancer types and may result in errors if used with the GA API.
region: pulumi.Output[str] = None¶The Region in which the created backend service should reside. If it is not provided, the provider region is used.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
session_affinity: pulumi.Output[str] = None¶Type of session affinity to use. The default is NONE. Session affinity is not applicable if the protocol is UDP.
timeout_sec: pulumi.Output[float] = None¶How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds. Valid range is [1, 86400].
- static
get(resource_name, id, opts=None, affinity_cookie_ttl_sec=None, backends=None, circuit_breakers=None, connection_draining_timeout_sec=None, consistent_hash=None, creation_timestamp=None, description=None, failover_policy=None, fingerprint=None, health_checks=None, load_balancing_scheme=None, locality_lb_policy=None, log_config=None, name=None, network=None, outlier_detection=None, port_name=None, project=None, protocol=None, region=None, self_link=None, session_affinity=None, timeout_sec=None)¶ Get an existing RegionBackendService resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
affinity_cookie_ttl_sec (pulumi.Input[float]) – Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day. When the load balancing scheme is INTERNAL, this field is not used.
backends (pulumi.Input[list]) – The set of backends that serve this RegionBackendService. Structure is documented below.
circuit_breakers (pulumi.Input[dict]) – Settings controlling the volume of connections to a backend service. This field is applicable only when the
load_balancing_schemeis set to INTERNAL_MANAGED and theprotocolis set to HTTP, HTTPS, or HTTP2. Structure is documented below.connection_draining_timeout_sec (pulumi.Input[float]) – Time for which instance will be drained (not accept new connections, but still work to finish started).
consistent_hash (pulumi.Input[dict]) – Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field only applies when all of the following are true -
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource.
failover_policy (pulumi.Input[dict]) – Policy for failovers. Structure is documented below.
fingerprint (pulumi.Input[str]) – Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking.
health_checks (pulumi.Input[str]) – The set of URLs to HealthCheck resources for health checking this RegionBackendService. Currently at most one health check can be specified, and a health check is required.
load_balancing_scheme (pulumi.Input[str]) – Indicates what kind of load balancing this regional backend service will be used for. A backend service created for one type of load balancing cannot be used with the other(s).
locality_lb_policy (pulumi.Input[str]) – The load balancing algorithm used within the scope of the locality. The possible values are - ROUND_ROBIN - This is a simple policy in which each healthy backend is selected in round robin order. LEAST_REQUEST - An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. RING_HASH - The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. RANDOM - The load balancer selects a random healthy host. ORIGINAL_DESTINATION - Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. MAGLEV - used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, refer to https://ai.google/research/pubs/pub44824 This field is applicable only when the
load_balancing_schemeis set to INTERNAL_MANAGED and theprotocolis set to HTTP, HTTPS, or HTTP2.log_config (pulumi.Input[dict]) – This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver. Structure is documented below.
name (pulumi.Input[str]) – Name of the cookie.
network (pulumi.Input[str]) – The URL of the network to which this backend service belongs. This field can only be specified when the load balancing scheme is set to INTERNAL.
outlier_detection (pulumi.Input[dict]) – Settings controlling eviction of unhealthy hosts from the load balancing pool. This field is applicable only when the
load_balancing_schemeis set to INTERNAL_MANAGED and theprotocolis set to HTTP, HTTPS, or HTTP2. Structure is documented below.port_name (pulumi.Input[str]) – A named port on a backend instance group representing the port for communication to the backend VMs in that group. Required when the loadBalancingScheme is EXTERNAL, INTERNAL_MANAGED, or INTERNAL_SELF_MANAGED and the backends are instance groups. The named port must be defined on each backend instance group. This parameter has no meaning if the backends are NEGs. API sets a default of “http” if not given. Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
protocol (pulumi.Input[str]) – The protocol this RegionBackendService uses to communicate with backends. The default is HTTP. NOTE: HTTP2 is only valid for beta HTTP/2 load balancer types and may result in errors if used with the GA API.
region (pulumi.Input[str]) – The Region in which the created backend service should reside. If it is not provided, the provider region is used.
self_link (pulumi.Input[str]) – The URI of the created resource.
session_affinity (pulumi.Input[str]) – Type of session affinity to use. The default is NONE. Session affinity is not applicable if the protocol is UDP.
timeout_sec (pulumi.Input[float]) – How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds. Valid range is [1, 86400].
The backends object supports the following:
balancingMode(pulumi.Input[str]) - Specifies the balancing mode for this backend.capacityScaler(pulumi.Input[float]) - A multiplier applied to the group’s maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). ~>NOTE: This field cannot be set for INTERNAL region backend services (default loadBalancingScheme), but is required for non-INTERNAL backend service. The total capacity_scaler for all backends must be non-zero. A setting of 0 means the group is completely drained, offering 0% of its available Capacity. Valid range is [0.0,1.0].description(pulumi.Input[str]) - An optional description of this resource. Provide this property when you create the resource.failover(pulumi.Input[bool]) - This field designates whether this is a failover backend. More than one failover backend can be configured for a given RegionBackendService.group(pulumi.Input[str]) - The fully-qualified URL of an Instance Group or Network Endpoint Group resource. In case of instance group this defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource. For Network Endpoint Groups this defines list of endpoints. All endpoints of Network Endpoint Group must be hosted on instances located in the same zone as the Network Endpoint Group. Backend services cannot mix Instance Group and Network Endpoint Group backends. When theload_balancing_schemeis INTERNAL, only instance groups are supported. Note that you must specify an Instance Group or Network Endpoint Group resource using the fully-qualified URL, rather than a partial URL.maxConnections(pulumi.Input[float]) - The maximum number of connections to the backend cluster. Defaults to 1024.maxConnectionsPerEndpoint(pulumi.Input[float]) - The max number of simultaneous connections that a single backend network endpoint can handle. Cannot be set for INTERNAL backend services. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint must be set.maxConnectionsPerInstance(pulumi.Input[float]) - The max number of simultaneous connections that a single backend instance can handle. Cannot be set for INTERNAL backend services. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.maxRate(pulumi.Input[float]) - The max requests per second (RPS) of the group. Cannot be set for INTERNAL backend services. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. Either maxRate or one of maxRatePerInstance or maxRatePerEndpoint, as appropriate for group type, must be set.maxRatePerEndpoint(pulumi.Input[float]) - The max requests per second (RPS) that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint must be set. Cannot be set for INTERNAL backend services.maxRatePerInstance(pulumi.Input[float]) - The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set. Cannot be set for INTERNAL backend services.maxUtilization(pulumi.Input[float]) - Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. Valid range is [0.0, 1.0]. Cannot be set for INTERNAL backend services.
The circuit_breakers object supports the following:
connectTimeout(pulumi.Input[dict]) - The timeout for new network connections to hosts. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[float]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
maxConnections(pulumi.Input[float]) - The maximum number of connections to the backend cluster. Defaults to 1024.maxPendingRequests(pulumi.Input[float]) - The maximum number of pending requests to the backend cluster. Defaults to 1024.maxRequests(pulumi.Input[float]) - The maximum number of parallel requests to the backend cluster. Defaults to 1024.maxRequestsPerConnection(pulumi.Input[float]) - Maximum requests for a single backend connection. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive.maxRetries(pulumi.Input[float]) - The maximum number of parallel retries to the backend cluster. Defaults to 3.
The consistent_hash object supports the following:
httpCookie(pulumi.Input[dict]) - Hash is based on HTTP Cookie. This field describes a HTTP cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity is set to HTTP_COOKIE. Structure is documented below.name(pulumi.Input[str]) - Name of the cookie.path(pulumi.Input[str]) - Path to set for the cookie.ttl(pulumi.Input[dict]) - Lifetime of the cookie. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[float]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
httpHeaderName(pulumi.Input[str]) - The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER_FIELD.minimumRingSize(pulumi.Input[float]) - The minimum number of virtual nodes to use for the hash ring. Larger ring sizes result in more granular load distributions. If the number of hosts in the load balancing pool is larger than the ring size, each host will be assigned a single virtual node. Defaults to 1024.
The failover_policy object supports the following:
disableConnectionDrainOnFailover(pulumi.Input[bool]) - On failover or failback, this field indicates whether connection drain will be honored. Setting this to true has the following effect: connections to the old active pool are not drained. Connections to the new active pool use the timeout of 10 min (currently fixed). Setting to false has the following effect: both old and new connections will have a drain timeout of 10 min. This can be set to true only if the protocol is TCP. The default is false.dropTrafficIfUnhealthy(pulumi.Input[bool]) - This option is used only when no healthy VMs are detected in the primary and backup instance groups. When set to true, traffic is dropped. When set to false, new connections are sent across all VMs in the primary group. The default is false.failover_ratio(pulumi.Input[float]) - The value of the field must be in [0, 1]. If the ratio of the healthy VMs in the primary backend is at or below this number, traffic arriving at the load-balanced IP will be directed to the failover backend. In case where ‘failoverRatio’ is not set or all the VMs in the backup backend are unhealthy, the traffic will be directed back to the primary backend in the “force” mode, where traffic will be spread to the healthy VMs with the best effort, or to all VMs when no VM is healthy. This field is only used with l4 load balancing.
The log_config object supports the following:
enable(pulumi.Input[bool]) - Whether to enable logging for the load balancer traffic served by this backend service.sampleRate(pulumi.Input[float]) - This field can only be specified if logging is enabled for this backend service. The value of the field must be in [0, 1]. This configures the sampling rate of requests to the load balancer where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0.
The outlier_detection object supports the following:
baseEjectionTime(pulumi.Input[dict]) - The base time that a host is ejected for. The real time is equal to the base time multiplied by the number of times the host has been ejected. Defaults to 30000ms or 30s. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[float]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
consecutiveErrors(pulumi.Input[float]) - Number of errors before a host is ejected from the connection pool. When the backend host is accessed over HTTP, a 5xx return code qualifies as an error. Defaults to 5.consecutiveGatewayFailure(pulumi.Input[float]) - The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 5.enforcingConsecutiveErrors(pulumi.Input[float]) - The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.enforcingConsecutiveGatewayFailure(pulumi.Input[float]) - The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0.enforcingSuccessRate(pulumi.Input[float]) - The percentage chance that a host will be actually ejected when an outlier status is detected through success rate statistics. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.interval(pulumi.Input[dict]) - Time interval between ejection sweep analysis. This can result in both new ejections as well as hosts being returned to service. Defaults to 10 seconds. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[float]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
maxEjectionPercent(pulumi.Input[float]) - Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 10%.successRateMinimumHosts(pulumi.Input[float]) - The number of hosts in a cluster that must have enough request volume to detect success rate outliers. If the number of hosts is less than this setting, outlier detection via success rate statistics is not performed for any host in the cluster. Defaults to 5.successRateRequestVolume(pulumi.Input[float]) - The minimum number of total requests that must be collected in one interval (as defined by the interval duration above) to include this host in success rate based outlier detection. If the volume is lower than this setting, outlier detection via success rate statistics is not performed for that host. Defaults to 100.successRateStdevFactor(pulumi.Input[float]) - This factor is used to determine the ejection threshold for success rate outlier ejection. The ejection threshold is the difference between the mean success rate, and the product of this factor and the standard deviation of the mean success rate: mean - (stdev * success_rate_stdev_factor). This factor is divided by a thousand to get a double. That is, if the desired factor is 1.9, the runtime value should be 1900. Defaults to 1900.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.RegionDisk(resource_name, opts=None, description=None, disk_encryption_key=None, labels=None, name=None, physical_block_size_bytes=None, project=None, region=None, replica_zones=None, size=None, snapshot=None, source_snapshot_encryption_key=None, type=None, __props__=None, __name__=None, __opts__=None)¶ Persistent disks are durable storage devices that function similarly to the physical disks in a desktop or a server. Compute Engine manages the hardware behind these devices to ensure data redundancy and optimize performance for you. Persistent disks are available as either standard hard disk drives (HDD) or solid-state drives (SSD).
Persistent disks are located independently from your virtual machine instances, so you can detach or move persistent disks to keep your data even after you delete your instances. Persistent disk performance scales automatically with size, so you can resize your existing persistent disks or add more persistent disks to an instance to meet your performance and storage space requirements.
Add a persistent disk to your instance when you need reliable and affordable storage with consistent performance characteristics.
To get more information about RegionDisk, see:
Warning: All arguments including
disk_encryption_key.raw_keywill be stored in the raw state as plain-text. Read more about secrets in state.import pulumi import pulumi_gcp as gcp disk = gcp.compute.Disk("disk", image="debian-cloud/debian-9", size=50, type="pd-ssd", zone="us-central1-a") snapdisk = gcp.compute.Snapshot("snapdisk", source_disk=disk.name, zone="us-central1-a") regiondisk = gcp.compute.RegionDisk("regiondisk", snapshot=snapdisk.id, type="pd-ssd", region="us-central1", physical_block_size_bytes=4096, replica_zones=[ "us-central1-a", "us-central1-f", ])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource.
disk_encryption_key (pulumi.Input[dict]) – Encrypts the disk using a customer-supplied encryption key. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. Structure is documented below.
labels (pulumi.Input[dict]) – Labels to apply to this disk. A list of key->value pairs.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.physical_block_size_bytes (pulumi.Input[float]) – Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller’s project.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – A reference to the region where the disk resides.
replica_zones (pulumi.Input[list]) – URLs of the zones where the disk should be replicated to.
size (pulumi.Input[float]) – Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk. If you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size of the snapshot.
snapshot (pulumi.Input[str]) – The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values:
* `https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot` * `projects/project/global/snapshots/snapshot` * `global/snapshots/snapshot` * `snapshot`
- Parameters
source_snapshot_encryption_key (pulumi.Input[dict]) – The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. Structure is documented below.
type (pulumi.Input[str]) – URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk.
The disk_encryption_key object supports the following:
kms_key_name(pulumi.Input[str]) - The name of the encryption key that is stored in Google Cloud KMS.rawKey(pulumi.Input[str]) - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.sha256(pulumi.Input[str]) - - The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
The source_snapshot_encryption_key object supports the following:
kms_key_name(pulumi.Input[str]) - The name of the encryption key that is stored in Google Cloud KMS.rawKey(pulumi.Input[str]) - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.sha256(pulumi.Input[str]) - - The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional description of this resource. Provide this property when you create the resource.
disk_encryption_key: pulumi.Output[dict] = None¶Encrypts the disk using a customer-supplied encryption key. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. Structure is documented below.
kms_key_name(str) - The name of the encryption key that is stored in Google Cloud KMS.rawKey(str) - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.sha256(str) - - The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
label_fingerprint: pulumi.Output[str] = None¶The fingerprint used for optimistic locking of this resource. Used internally during updates.
labels: pulumi.Output[dict] = None¶Labels to apply to this disk. A list of key->value pairs.
last_attach_timestamp: pulumi.Output[str] = None¶Last attach timestamp in RFC3339 text format.
last_detach_timestamp: pulumi.Output[str] = None¶Last detach timestamp in RFC3339 text format.
name: pulumi.Output[str] = None¶Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
physical_block_size_bytes: pulumi.Output[float] = None¶Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller’s project.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region: pulumi.Output[str] = None¶A reference to the region where the disk resides.
replica_zones: pulumi.Output[list] = None¶URLs of the zones where the disk should be replicated to.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
size: pulumi.Output[float] = None¶Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk. If you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size of the snapshot.
snapshot: pulumi.Output[str] = None¶The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values:
https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshotprojects/project/global/snapshots/snapshotglobal/snapshots/snapshotsnapshot
source_snapshot_encryption_key: pulumi.Output[dict] = None¶The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. Structure is documented below.
kms_key_name(str) - The name of the encryption key that is stored in Google Cloud KMS.rawKey(str) - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.sha256(str) - - The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
source_snapshot_id: pulumi.Output[str] = None¶The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used.
type: pulumi.Output[str] = None¶URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk.
users: pulumi.Output[list] = None¶Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
- static
get(resource_name, id, opts=None, creation_timestamp=None, description=None, disk_encryption_key=None, label_fingerprint=None, labels=None, last_attach_timestamp=None, last_detach_timestamp=None, name=None, physical_block_size_bytes=None, project=None, region=None, replica_zones=None, self_link=None, size=None, snapshot=None, source_snapshot_encryption_key=None, source_snapshot_id=None, type=None, users=None)¶ Get an existing RegionDisk resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource.
disk_encryption_key (pulumi.Input[dict]) – Encrypts the disk using a customer-supplied encryption key. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. Structure is documented below.
label_fingerprint (pulumi.Input[str]) – The fingerprint used for optimistic locking of this resource. Used internally during updates.
labels (pulumi.Input[dict]) – Labels to apply to this disk. A list of key->value pairs.
last_attach_timestamp (pulumi.Input[str]) – Last attach timestamp in RFC3339 text format.
last_detach_timestamp (pulumi.Input[str]) – Last detach timestamp in RFC3339 text format.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.physical_block_size_bytes (pulumi.Input[float]) – Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller’s project.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – A reference to the region where the disk resides.
replica_zones (pulumi.Input[list]) – URLs of the zones where the disk should be replicated to.
self_link (pulumi.Input[str]) – The URI of the created resource.
size (pulumi.Input[float]) – Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk. If you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size of the snapshot.
snapshot (pulumi.Input[str]) – The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values:
* `https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot` * `projects/project/global/snapshots/snapshot` * `global/snapshots/snapshot` * `snapshot`
- Parameters
source_snapshot_encryption_key (pulumi.Input[dict]) – The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. Structure is documented below.
source_snapshot_id (pulumi.Input[str]) – The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used.
type (pulumi.Input[str]) – URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk.
users (pulumi.Input[list]) – Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
The disk_encryption_key object supports the following:
kms_key_name(pulumi.Input[str]) - The name of the encryption key that is stored in Google Cloud KMS.rawKey(pulumi.Input[str]) - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.sha256(pulumi.Input[str]) - - The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
The source_snapshot_encryption_key object supports the following:
kms_key_name(pulumi.Input[str]) - The name of the encryption key that is stored in Google Cloud KMS.rawKey(pulumi.Input[str]) - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.sha256(pulumi.Input[str]) - - The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.RegionDiskResourcePolicyAttachment(resource_name, opts=None, disk=None, name=None, project=None, region=None, __props__=None, __name__=None, __opts__=None)¶ Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.
Note: This resource does not support zonal disks (
compute.Disk). For zonal disks, please refer to thecompute.DiskResourcePolicyAttachmentresource.import pulumi import pulumi_gcp as gcp disk = gcp.compute.Disk("disk", image="debian-cloud/debian-9", size=50, type="pd-ssd", zone="us-central1-a") snapdisk = gcp.compute.Snapshot("snapdisk", source_disk=disk.name, zone="us-central1-a") ssd = gcp.compute.RegionDisk("ssd", replica_zones=[ "us-central1-a", "us-central1-f", ], snapshot=snapdisk.id, size=50, type="pd-ssd", region="us-central1") attachment = gcp.compute.RegionDiskResourcePolicyAttachment("attachment", disk=ssd.name, region="us-central1") policy = gcp.compute.ResourcePolicy("policy", region="us-central1", snapshot_schedule_policy={ "schedule": { "daily_schedule": { "daysInCycle": 1, "startTime": "04:00", }, }, }) my_image = gcp.compute.get_image(family="debian-9", project="debian-cloud")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
disk (pulumi.Input[str]) – The name of the regional disk in which the resource policies are attached to.
name (pulumi.Input[str]) – The resource policy to be attached to the disk for scheduling snapshot creation. Do not specify the self link.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – A reference to the region where the disk resides.
disk: pulumi.Output[str] = None¶The name of the regional disk in which the resource policies are attached to.
name: pulumi.Output[str] = None¶The resource policy to be attached to the disk for scheduling snapshot creation. Do not specify the self link.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region: pulumi.Output[str] = None¶A reference to the region where the disk resides.
- static
get(resource_name, id, opts=None, disk=None, name=None, project=None, region=None)¶ Get an existing RegionDiskResourcePolicyAttachment resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
disk (pulumi.Input[str]) – The name of the regional disk in which the resource policies are attached to.
name (pulumi.Input[str]) – The resource policy to be attached to the disk for scheduling snapshot creation. Do not specify the self link.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – A reference to the region where the disk resides.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.RegionHealthCheck(resource_name, opts=None, check_interval_sec=None, description=None, healthy_threshold=None, http2_health_check=None, http_health_check=None, https_health_check=None, log_config=None, name=None, project=None, region=None, ssl_health_check=None, tcp_health_check=None, timeout_sec=None, unhealthy_threshold=None, __props__=None, __name__=None, __opts__=None)¶ Health Checks determine whether instances are responsive and able to do work. They are an important part of a comprehensive load balancing configuration, as they enable monitoring instances behind load balancers.
Health Checks poll instances at a specified interval. Instances that do not respond successfully to some number of probes in a row are marked as unhealthy. No new connections are sent to unhealthy instances, though existing connections will continue. The health check will continue to poll unhealthy instances. If an instance later responds successfully to some number of consecutive probes, it is marked healthy again and can receive new connections.
To get more information about RegionHealthCheck, see:
How-to Guides
import pulumi import pulumi_gcp as gcp tcp_region_health_check = gcp.compute.RegionHealthCheck("tcp-region-health-check", check_interval_sec=1, tcp_health_check={ "port": "80", }, timeout_sec=1)
import pulumi import pulumi_gcp as gcp tcp_region_health_check = gcp.compute.RegionHealthCheck("tcp-region-health-check", check_interval_sec=1, description="Health check via tcp", healthy_threshold=4, tcp_health_check={ "port_name": "health-check-port", "portSpecification": "USE_NAMED_PORT", "proxy_header": "NONE", "request": "ARE YOU HEALTHY?", "response": "I AM HEALTHY", }, timeout_sec=1, unhealthy_threshold=5)
import pulumi import pulumi_gcp as gcp ssl_region_health_check = gcp.compute.RegionHealthCheck("ssl-region-health-check", check_interval_sec=1, ssl_health_check={ "port": "443", }, timeout_sec=1)
import pulumi import pulumi_gcp as gcp ssl_region_health_check = gcp.compute.RegionHealthCheck("ssl-region-health-check", check_interval_sec=1, description="Health check via ssl", healthy_threshold=4, ssl_health_check={ "port_name": "health-check-port", "portSpecification": "USE_NAMED_PORT", "proxy_header": "NONE", "request": "ARE YOU HEALTHY?", "response": "I AM HEALTHY", }, timeout_sec=1, unhealthy_threshold=5)
import pulumi import pulumi_gcp as gcp http_region_health_check = gcp.compute.RegionHealthCheck("http-region-health-check", check_interval_sec=1, http_health_check={ "port": "80", }, timeout_sec=1)
import pulumi import pulumi_gcp as gcp http_region_health_check = gcp.compute.RegionHealthCheck("http-region-health-check", timeout_sec=1, check_interval_sec=1, http_health_check={ "port": "80", }, log_config={ "enable": True, })
import pulumi import pulumi_gcp as gcp http_region_health_check = gcp.compute.RegionHealthCheck("http-region-health-check", check_interval_sec=1, description="Health check via http", healthy_threshold=4, http_health_check={ "host": "1.2.3.4", "port_name": "health-check-port", "portSpecification": "USE_NAMED_PORT", "proxy_header": "NONE", "request_path": "/mypath", "response": "I AM HEALTHY", }, timeout_sec=1, unhealthy_threshold=5)
import pulumi import pulumi_gcp as gcp https_region_health_check = gcp.compute.RegionHealthCheck("https-region-health-check", check_interval_sec=1, https_health_check={ "port": "443", }, timeout_sec=1)
import pulumi import pulumi_gcp as gcp https_region_health_check = gcp.compute.RegionHealthCheck("https-region-health-check", check_interval_sec=1, description="Health check via https", healthy_threshold=4, https_health_check={ "host": "1.2.3.4", "port_name": "health-check-port", "portSpecification": "USE_NAMED_PORT", "proxy_header": "NONE", "request_path": "/mypath", "response": "I AM HEALTHY", }, timeout_sec=1, unhealthy_threshold=5)
import pulumi import pulumi_gcp as gcp http2_region_health_check = gcp.compute.RegionHealthCheck("http2-region-health-check", check_interval_sec=1, http2_health_check={ "port": "443", }, timeout_sec=1)
import pulumi import pulumi_gcp as gcp http2_region_health_check = gcp.compute.RegionHealthCheck("http2-region-health-check", check_interval_sec=1, description="Health check via http2", healthy_threshold=4, http2_health_check={ "host": "1.2.3.4", "port_name": "health-check-port", "portSpecification": "USE_NAMED_PORT", "proxy_header": "NONE", "request_path": "/mypath", "response": "I AM HEALTHY", }, timeout_sec=1, unhealthy_threshold=5)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
check_interval_sec (pulumi.Input[float]) – How often (in seconds) to send a health check. The default value is 5 seconds.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource.
healthy_threshold (pulumi.Input[float]) – A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.
http2_health_check (pulumi.Input[dict]) – A nested object resource Structure is documented below.
http_health_check (pulumi.Input[dict]) – A nested object resource Structure is documented below.
https_health_check (pulumi.Input[dict]) – A nested object resource Structure is documented below.
log_config (pulumi.Input[dict]) – Configure logging on this health check. Structure is documented below.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – The Region in which the created health check should reside. If it is not provided, the provider region is used.
ssl_health_check (pulumi.Input[dict]) – A nested object resource Structure is documented below.
tcp_health_check (pulumi.Input[dict]) – A nested object resource Structure is documented below.
timeout_sec (pulumi.Input[float]) – How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.
unhealthy_threshold (pulumi.Input[float]) – A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.
The http2_health_check object supports the following:
host(pulumi.Input[str]) - The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.port(pulumi.Input[float]) - The TCP port number for the HTTP2 health check request. The default value is 443.port_name(pulumi.Input[str]) - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.portSpecification(pulumi.Input[str]) - Specifies how port is selected for health checking, can be one of the following values:USE_FIXED_PORT: The port number inportis used for health checking.USE_NAMED_PORT: TheportNameis used for health checking.USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inportandportNamefields.
proxy_header(pulumi.Input[str]) - Specifies the type of proxy header to append before sending data to the backend.request_path(pulumi.Input[str]) - The request path of the HTTP2 health check request. The default value is /.response(pulumi.Input[str]) - The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
The http_health_check object supports the following:
host(pulumi.Input[str]) - The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.port(pulumi.Input[float]) - The TCP port number for the HTTP2 health check request. The default value is 443.port_name(pulumi.Input[str]) - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.portSpecification(pulumi.Input[str]) - Specifies how port is selected for health checking, can be one of the following values:USE_FIXED_PORT: The port number inportis used for health checking.USE_NAMED_PORT: TheportNameis used for health checking.USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inportandportNamefields.
proxy_header(pulumi.Input[str]) - Specifies the type of proxy header to append before sending data to the backend.request_path(pulumi.Input[str]) - The request path of the HTTP2 health check request. The default value is /.response(pulumi.Input[str]) - The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
The https_health_check object supports the following:
host(pulumi.Input[str]) - The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.port(pulumi.Input[float]) - The TCP port number for the HTTP2 health check request. The default value is 443.port_name(pulumi.Input[str]) - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.portSpecification(pulumi.Input[str]) - Specifies how port is selected for health checking, can be one of the following values:USE_FIXED_PORT: The port number inportis used for health checking.USE_NAMED_PORT: TheportNameis used for health checking.USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inportandportNamefields.
proxy_header(pulumi.Input[str]) - Specifies the type of proxy header to append before sending data to the backend.request_path(pulumi.Input[str]) - The request path of the HTTP2 health check request. The default value is /.response(pulumi.Input[str]) - The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
The log_config object supports the following:
enable(pulumi.Input[bool]) - Indicates whether or not to export logs. This is false by default, which means no health check logging will be done.
The ssl_health_check object supports the following:
port(pulumi.Input[float]) - The TCP port number for the HTTP2 health check request. The default value is 443.port_name(pulumi.Input[str]) - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.portSpecification(pulumi.Input[str]) - Specifies how port is selected for health checking, can be one of the following values:USE_FIXED_PORT: The port number inportis used for health checking.USE_NAMED_PORT: TheportNameis used for health checking.USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inportandportNamefields.
proxy_header(pulumi.Input[str]) - Specifies the type of proxy header to append before sending data to the backend.request(pulumi.Input[str]) - The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII.response(pulumi.Input[str]) - The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
The tcp_health_check object supports the following:
port(pulumi.Input[float]) - The TCP port number for the HTTP2 health check request. The default value is 443.port_name(pulumi.Input[str]) - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.portSpecification(pulumi.Input[str]) - Specifies how port is selected for health checking, can be one of the following values:USE_FIXED_PORT: The port number inportis used for health checking.USE_NAMED_PORT: TheportNameis used for health checking.USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inportandportNamefields.
proxy_header(pulumi.Input[str]) - Specifies the type of proxy header to append before sending data to the backend.request(pulumi.Input[str]) - The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII.response(pulumi.Input[str]) - The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
check_interval_sec: pulumi.Output[float] = None¶How often (in seconds) to send a health check. The default value is 5 seconds.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional description of this resource. Provide this property when you create the resource.
healthy_threshold: pulumi.Output[float] = None¶A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.
http2_health_check: pulumi.Output[dict] = None¶A nested object resource Structure is documented below.
host(str) - The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.port(float) - The TCP port number for the HTTP2 health check request. The default value is 443.port_name(str) - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.portSpecification(str) - Specifies how port is selected for health checking, can be one of the following values:USE_FIXED_PORT: The port number inportis used for health checking.USE_NAMED_PORT: TheportNameis used for health checking.USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inportandportNamefields.
proxy_header(str) - Specifies the type of proxy header to append before sending data to the backend.request_path(str) - The request path of the HTTP2 health check request. The default value is /.response(str) - The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
http_health_check: pulumi.Output[dict] = None¶A nested object resource Structure is documented below.
host(str) - The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.port(float) - The TCP port number for the HTTP2 health check request. The default value is 443.port_name(str) - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.portSpecification(str) - Specifies how port is selected for health checking, can be one of the following values:USE_FIXED_PORT: The port number inportis used for health checking.USE_NAMED_PORT: TheportNameis used for health checking.USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inportandportNamefields.
proxy_header(str) - Specifies the type of proxy header to append before sending data to the backend.request_path(str) - The request path of the HTTP2 health check request. The default value is /.response(str) - The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
https_health_check: pulumi.Output[dict] = None¶A nested object resource Structure is documented below.
host(str) - The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.port(float) - The TCP port number for the HTTP2 health check request. The default value is 443.port_name(str) - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.portSpecification(str) - Specifies how port is selected for health checking, can be one of the following values:USE_FIXED_PORT: The port number inportis used for health checking.USE_NAMED_PORT: TheportNameis used for health checking.USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inportandportNamefields.
proxy_header(str) - Specifies the type of proxy header to append before sending data to the backend.request_path(str) - The request path of the HTTP2 health check request. The default value is /.response(str) - The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
log_config: pulumi.Output[dict] = None¶Configure logging on this health check. Structure is documented below.
enable(bool) - Indicates whether or not to export logs. This is false by default, which means no health check logging will be done.
name: pulumi.Output[str] = None¶Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region: pulumi.Output[str] = None¶The Region in which the created health check should reside. If it is not provided, the provider region is used.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
ssl_health_check: pulumi.Output[dict] = None¶A nested object resource Structure is documented below.
port(float) - The TCP port number for the HTTP2 health check request. The default value is 443.port_name(str) - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.portSpecification(str) - Specifies how port is selected for health checking, can be one of the following values:USE_FIXED_PORT: The port number inportis used for health checking.USE_NAMED_PORT: TheportNameis used for health checking.USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inportandportNamefields.
proxy_header(str) - Specifies the type of proxy header to append before sending data to the backend.request(str) - The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII.response(str) - The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
tcp_health_check: pulumi.Output[dict] = None¶A nested object resource Structure is documented below.
port(float) - The TCP port number for the HTTP2 health check request. The default value is 443.port_name(str) - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.portSpecification(str) - Specifies how port is selected for health checking, can be one of the following values:USE_FIXED_PORT: The port number inportis used for health checking.USE_NAMED_PORT: TheportNameis used for health checking.USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inportandportNamefields.
proxy_header(str) - Specifies the type of proxy header to append before sending data to the backend.request(str) - The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII.response(str) - The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
timeout_sec: pulumi.Output[float] = None¶How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.
type: pulumi.Output[str] = None¶The type of the health check. One of HTTP, HTTP2, HTTPS, TCP, or SSL.
unhealthy_threshold: pulumi.Output[float] = None¶A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.
- static
get(resource_name, id, opts=None, check_interval_sec=None, creation_timestamp=None, description=None, healthy_threshold=None, http2_health_check=None, http_health_check=None, https_health_check=None, log_config=None, name=None, project=None, region=None, self_link=None, ssl_health_check=None, tcp_health_check=None, timeout_sec=None, type=None, unhealthy_threshold=None)¶ Get an existing RegionHealthCheck resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
check_interval_sec (pulumi.Input[float]) – How often (in seconds) to send a health check. The default value is 5 seconds.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource.
healthy_threshold (pulumi.Input[float]) – A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.
http2_health_check (pulumi.Input[dict]) – A nested object resource Structure is documented below.
http_health_check (pulumi.Input[dict]) – A nested object resource Structure is documented below.
https_health_check (pulumi.Input[dict]) – A nested object resource Structure is documented below.
log_config (pulumi.Input[dict]) – Configure logging on this health check. Structure is documented below.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – The Region in which the created health check should reside. If it is not provided, the provider region is used.
self_link (pulumi.Input[str]) – The URI of the created resource.
ssl_health_check (pulumi.Input[dict]) – A nested object resource Structure is documented below.
tcp_health_check (pulumi.Input[dict]) – A nested object resource Structure is documented below.
timeout_sec (pulumi.Input[float]) – How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.
type (pulumi.Input[str]) – The type of the health check. One of HTTP, HTTP2, HTTPS, TCP, or SSL.
unhealthy_threshold (pulumi.Input[float]) – A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.
The http2_health_check object supports the following:
host(pulumi.Input[str]) - The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.port(pulumi.Input[float]) - The TCP port number for the HTTP2 health check request. The default value is 443.port_name(pulumi.Input[str]) - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.portSpecification(pulumi.Input[str]) - Specifies how port is selected for health checking, can be one of the following values:USE_FIXED_PORT: The port number inportis used for health checking.USE_NAMED_PORT: TheportNameis used for health checking.USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inportandportNamefields.
proxy_header(pulumi.Input[str]) - Specifies the type of proxy header to append before sending data to the backend.request_path(pulumi.Input[str]) - The request path of the HTTP2 health check request. The default value is /.response(pulumi.Input[str]) - The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
The http_health_check object supports the following:
host(pulumi.Input[str]) - The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.port(pulumi.Input[float]) - The TCP port number for the HTTP2 health check request. The default value is 443.port_name(pulumi.Input[str]) - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.portSpecification(pulumi.Input[str]) - Specifies how port is selected for health checking, can be one of the following values:USE_FIXED_PORT: The port number inportis used for health checking.USE_NAMED_PORT: TheportNameis used for health checking.USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inportandportNamefields.
proxy_header(pulumi.Input[str]) - Specifies the type of proxy header to append before sending data to the backend.request_path(pulumi.Input[str]) - The request path of the HTTP2 health check request. The default value is /.response(pulumi.Input[str]) - The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
The https_health_check object supports the following:
host(pulumi.Input[str]) - The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.port(pulumi.Input[float]) - The TCP port number for the HTTP2 health check request. The default value is 443.port_name(pulumi.Input[str]) - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.portSpecification(pulumi.Input[str]) - Specifies how port is selected for health checking, can be one of the following values:USE_FIXED_PORT: The port number inportis used for health checking.USE_NAMED_PORT: TheportNameis used for health checking.USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inportandportNamefields.
proxy_header(pulumi.Input[str]) - Specifies the type of proxy header to append before sending data to the backend.request_path(pulumi.Input[str]) - The request path of the HTTP2 health check request. The default value is /.response(pulumi.Input[str]) - The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
The log_config object supports the following:
enable(pulumi.Input[bool]) - Indicates whether or not to export logs. This is false by default, which means no health check logging will be done.
The ssl_health_check object supports the following:
port(pulumi.Input[float]) - The TCP port number for the HTTP2 health check request. The default value is 443.port_name(pulumi.Input[str]) - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.portSpecification(pulumi.Input[str]) - Specifies how port is selected for health checking, can be one of the following values:USE_FIXED_PORT: The port number inportis used for health checking.USE_NAMED_PORT: TheportNameis used for health checking.USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inportandportNamefields.
proxy_header(pulumi.Input[str]) - Specifies the type of proxy header to append before sending data to the backend.request(pulumi.Input[str]) - The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII.response(pulumi.Input[str]) - The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
The tcp_health_check object supports the following:
port(pulumi.Input[float]) - The TCP port number for the HTTP2 health check request. The default value is 443.port_name(pulumi.Input[str]) - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.portSpecification(pulumi.Input[str]) - Specifies how port is selected for health checking, can be one of the following values:USE_FIXED_PORT: The port number inportis used for health checking.USE_NAMED_PORT: TheportNameis used for health checking.USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inportandportNamefields.
proxy_header(pulumi.Input[str]) - Specifies the type of proxy header to append before sending data to the backend.request(pulumi.Input[str]) - The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII.response(pulumi.Input[str]) - The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.RegionInstanceGroupManager(resource_name, opts=None, auto_healing_policies=None, base_instance_name=None, description=None, distribution_policy_zones=None, name=None, named_ports=None, project=None, region=None, stateful_disks=None, target_pools=None, target_size=None, update_policy=None, versions=None, wait_for_instances=None, __props__=None, __name__=None, __opts__=None)¶ The Google Compute Engine Regional Instance Group Manager API creates and manages pools of homogeneous Compute Engine virtual machine instances from a common instance template. For more information, see the official documentation and API
Note: Use compute.InstanceGroupManager to create a single-zone instance group manager.
import pulumi import pulumi_gcp as gcp autohealing = gcp.compute.HealthCheck("autohealing", check_interval_sec=5, timeout_sec=5, healthy_threshold=2, unhealthy_threshold=10, http_health_check={ "request_path": "/healthz", "port": "8080", }) appserver = gcp.compute.RegionInstanceGroupManager("appserver", base_instance_name="app", region="us-central1", distribution_policy_zones=[ "us-central1-a", "us-central1-f", ], version=[{ "instanceTemplate": google_compute_instance_template["appserver"]["id"], }], target_pools=[google_compute_target_pool["appserver"]["id"]], target_size=2, named_port=[{ "name": "custom", "port": 8888, }], auto_healing_policies={ "healthCheck": autohealing.id, "initialDelaySec": 300, })
import pulumi import pulumi_gcp as gcp appserver = gcp.compute.RegionInstanceGroupManager("appserver", base_instance_name="app", region="us-central1", target_size=5, version=[ { "instanceTemplate": google_compute_instance_template["appserver"]["id"], }, { "instanceTemplate": google_compute_instance_template["appserver-canary"]["id"], "target_size": { "fixed": 1, }, }, ])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
auto_healing_policies (pulumi.Input[dict]) –
The autohealing policies for this managed instance group. You can specify only one value. Structure is documented below. For more information, see the official documentation.
base_instance_name (pulumi.Input[str]) –
The base instance name to use for instances in this group. The value must be a valid RFC1035 name. Supported characters are lowercase letters, numbers, and hyphens (-). Instances are named by appending a hyphen and a random four-character string to the base instance name.
description (pulumi.Input[str]) – An optional textual description of the instance group manager.
distribution_policy_zones (pulumi.Input[list]) –
The distribution policy for this managed instance group. You can specify one or more values. For more information, see the official documentation.
name (pulumi.Input[str]) –
Version name.
named_ports (pulumi.Input[list]) – The named port configuration. See the section below for details on configuration.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – The region where the managed instance group resides.
stateful_disks (pulumi.Input[list]) –
Disks created on the instances that will be preserved on instance delete, update, etc. Structure is documented below. For more information see the official documentation. Proactive cross zone instance redistribution must be disabled before you can update stateful disks on existing instance group managers. This can be controlled via the
update_policy.target_pools (pulumi.Input[list]) – The full URL of all target pools to which new instances in the group are added. Updating the target pools attribute does not affect existing instances.
target_size (pulumi.Input[float]) –
The number of instances calculated as a fixed number or a percentage depending on the settings. Structure is documented below.
update_policy (pulumi.Input[dict]) –
The update policy for this managed instance group. Structure is documented below. For more information, see the official documentation and API
versions (pulumi.Input[list]) – Application versions managed by this instance group. Each version deals with a specific instance template, allowing canary release scenarios. Structure is documented below.
wait_for_instances (pulumi.Input[bool]) – Whether to wait for all instances to be created/updated before returning. Note that if this is set to true and the operation does not succeed, the provider will continue trying until it times out.
The auto_healing_policies object supports the following:
healthCheck(pulumi.Input[str]) - The health check resource that signals autohealing.initialDelaySec(pulumi.Input[float]) - The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. Between 0 and 3600.
The named_ports object supports the following:
name(pulumi.Input[str]) - - Version name.
The stateful_disks object supports the following:
deleteRule(pulumi.Input[str]) - , A value that prescribes what should happen to the stateful disk when the VM instance is deleted. The available options areNEVERandON_PERMANENT_INSTANCE_DELETION.NEVERdetatch the disk when the VM is deleted, but not delete the disk.ON_PERMANENT_INSTANCE_DELETIONwill delete the stateful disk when the VM is permanently deleted from the instance group. The default isNEVER.device_name(pulumi.Input[str]) - , The device name of the disk to be attached.
The update_policy object supports the following:
instanceRedistributionType(pulumi.Input[str]) - - The instance redistribution policy for regional managed instance groups. Valid values are:"PROACTIVE","NONE". IfPROACTIVE(default), the group attempts to maintain an even distribution of VM instances across zones in the region. IfNONE, proactive redistribution is disabled.maxSurgeFixed(pulumi.Input[float]) - , The maximum number of instances that can be created above the specified targetSize during the update process. Conflicts withmax_surge_percent. It has to be either 0 or at least equal to the number of zones. If fixed values are used, at least one ofmax_unavailable_fixedormax_surge_fixedmust be greater than 0.maxSurgePercent(pulumi.Input[float]) - , The maximum number of instances(calculated as percentage) that can be created above the specified targetSize during the update process. Conflicts withmax_surge_fixed. Percent value is only allowed for regional managed instance groups with size at least 10.maxUnavailableFixed(pulumi.Input[float]) - , The maximum number of instances that can be unavailable during the update process. Conflicts withmax_unavailable_percent. It has to be either 0 or at least equal to the number of zones. If fixed values are used, at least one ofmax_unavailable_fixedormax_surge_fixedmust be greater than 0.maxUnavailablePercent(pulumi.Input[float]) - , The maximum number of instances(calculated as percentage) that can be unavailable during the update process. Conflicts withmax_unavailable_fixed. Percent value is only allowed for regional managed instance groups with size at least 10.minimal_action(pulumi.Input[str]) - - Minimal action to be taken on an instance. You can specify eitherRESTARTto restart existing instances orREPLACEto delete and create new instances from the target template. If you specify aRESTART, the Updater will attempt to perform that action only. However, if the Updater determines that the minimal action you specify is not enough to perform the update, it might perform a more disruptive action.type(pulumi.Input[str]) - - The type of update process. You can specify eitherPROACTIVEso that the instance group manager proactively executes actions in order to bring instances to their target versions orOPPORTUNISTICso that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls).
The versions object supports the following:
instanceTemplate(pulumi.Input[str]) - - The full URL to an instance template from which all new instances of this version will be created.name(pulumi.Input[str]) - - Version name.target_size(pulumi.Input[dict]) - - The number of instances calculated as a fixed number or a percentage depending on the settings. Structure is documented below.fixed(pulumi.Input[float]) - , The number of instances which are managed for this version. Conflicts withpercent.percent(pulumi.Input[float]) - , The number of instances (calculated as percentage) which are managed for this version. Conflicts withfixed. Note that when usingpercent, rounding will be in favor of explicitly settarget_sizevalues; a managed instance group with 2 instances and 2versions, one of which has atarget_size.percentof60will create 2 instances of thatversion.
auto_healing_policies: pulumi.Output[dict] = None¶The autohealing policies for this managed instance group. You can specify only one value. Structure is documented below. For more information, see the official documentation.
healthCheck(str) - The health check resource that signals autohealing.initialDelaySec(float) - The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. Between 0 and 3600.
base_instance_name: pulumi.Output[str] = None¶The base instance name to use for instances in this group. The value must be a valid RFC1035 name. Supported characters are lowercase letters, numbers, and hyphens (-). Instances are named by appending a hyphen and a random four-character string to the base instance name.
description: pulumi.Output[str] = None¶An optional textual description of the instance group manager.
distribution_policy_zones: pulumi.Output[list] = None¶The distribution policy for this managed instance group. You can specify one or more values. For more information, see the official documentation.
fingerprint: pulumi.Output[str] = None¶The fingerprint of the instance group manager.
instance_group: pulumi.Output[str] = None¶The full URL of the instance group created by the manager.
name: pulumi.Output[str] = None¶Version name.
named_ports: pulumi.Output[list] = None¶The named port configuration. See the section below for details on configuration.
name(str) - - Version name.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region: pulumi.Output[str] = None¶The region where the managed instance group resides.
self_link: pulumi.Output[str] = None¶The URL of the created resource.
stateful_disks: pulumi.Output[list] = None¶Disks created on the instances that will be preserved on instance delete, update, etc. Structure is documented below. For more information see the official documentation. Proactive cross zone instance redistribution must be disabled before you can update stateful disks on existing instance group managers. This can be controlled via the
update_policy.deleteRule(str) - , A value that prescribes what should happen to the stateful disk when the VM instance is deleted. The available options areNEVERandON_PERMANENT_INSTANCE_DELETION.NEVERdetatch the disk when the VM is deleted, but not delete the disk.ON_PERMANENT_INSTANCE_DELETIONwill delete the stateful disk when the VM is permanently deleted from the instance group. The default isNEVER.device_name(str) - , The device name of the disk to be attached.
target_pools: pulumi.Output[list] = None¶The full URL of all target pools to which new instances in the group are added. Updating the target pools attribute does not affect existing instances.
target_size: pulumi.Output[float] = None¶The number of instances calculated as a fixed number or a percentage depending on the settings. Structure is documented below.
update_policy: pulumi.Output[dict] = None¶The update policy for this managed instance group. Structure is documented below. For more information, see the official documentation and API
instanceRedistributionType(str) - - The instance redistribution policy for regional managed instance groups. Valid values are:"PROACTIVE","NONE". IfPROACTIVE(default), the group attempts to maintain an even distribution of VM instances across zones in the region. IfNONE, proactive redistribution is disabled.maxSurgeFixed(float) - , The maximum number of instances that can be created above the specified targetSize during the update process. Conflicts withmax_surge_percent. It has to be either 0 or at least equal to the number of zones. If fixed values are used, at least one ofmax_unavailable_fixedormax_surge_fixedmust be greater than 0.maxSurgePercent(float) - , The maximum number of instances(calculated as percentage) that can be created above the specified targetSize during the update process. Conflicts withmax_surge_fixed. Percent value is only allowed for regional managed instance groups with size at least 10.maxUnavailableFixed(float) - , The maximum number of instances that can be unavailable during the update process. Conflicts withmax_unavailable_percent. It has to be either 0 or at least equal to the number of zones. If fixed values are used, at least one ofmax_unavailable_fixedormax_surge_fixedmust be greater than 0.maxUnavailablePercent(float) - , The maximum number of instances(calculated as percentage) that can be unavailable during the update process. Conflicts withmax_unavailable_fixed. Percent value is only allowed for regional managed instance groups with size at least 10.minimal_action(str) - - Minimal action to be taken on an instance. You can specify eitherRESTARTto restart existing instances orREPLACEto delete and create new instances from the target template. If you specify aRESTART, the Updater will attempt to perform that action only. However, if the Updater determines that the minimal action you specify is not enough to perform the update, it might perform a more disruptive action.type(str) - - The type of update process. You can specify eitherPROACTIVEso that the instance group manager proactively executes actions in order to bring instances to their target versions orOPPORTUNISTICso that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls).
versions: pulumi.Output[list] = None¶Application versions managed by this instance group. Each version deals with a specific instance template, allowing canary release scenarios. Structure is documented below.
instanceTemplate(str) - - The full URL to an instance template from which all new instances of this version will be created.name(str) - - Version name.target_size(dict) - - The number of instances calculated as a fixed number or a percentage depending on the settings. Structure is documented below.fixed(float) - , The number of instances which are managed for this version. Conflicts withpercent.percent(float) - , The number of instances (calculated as percentage) which are managed for this version. Conflicts withfixed. Note that when usingpercent, rounding will be in favor of explicitly settarget_sizevalues; a managed instance group with 2 instances and 2versions, one of which has atarget_size.percentof60will create 2 instances of thatversion.
wait_for_instances: pulumi.Output[bool] = None¶Whether to wait for all instances to be created/updated before returning. Note that if this is set to true and the operation does not succeed, the provider will continue trying until it times out.
- static
get(resource_name, id, opts=None, auto_healing_policies=None, base_instance_name=None, description=None, distribution_policy_zones=None, fingerprint=None, instance_group=None, name=None, named_ports=None, project=None, region=None, self_link=None, stateful_disks=None, target_pools=None, target_size=None, update_policy=None, versions=None, wait_for_instances=None)¶ Get an existing RegionInstanceGroupManager resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
auto_healing_policies (pulumi.Input[dict]) –
The autohealing policies for this managed instance group. You can specify only one value. Structure is documented below. For more information, see the official documentation.
base_instance_name (pulumi.Input[str]) –
The base instance name to use for instances in this group. The value must be a valid RFC1035 name. Supported characters are lowercase letters, numbers, and hyphens (-). Instances are named by appending a hyphen and a random four-character string to the base instance name.
description (pulumi.Input[str]) – An optional textual description of the instance group manager.
distribution_policy_zones (pulumi.Input[list]) –
The distribution policy for this managed instance group. You can specify one or more values. For more information, see the official documentation.
fingerprint (pulumi.Input[str]) – The fingerprint of the instance group manager.
instance_group (pulumi.Input[str]) – The full URL of the instance group created by the manager.
name (pulumi.Input[str]) –
Version name.
named_ports (pulumi.Input[list]) – The named port configuration. See the section below for details on configuration.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – The region where the managed instance group resides.
self_link (pulumi.Input[str]) – The URL of the created resource.
stateful_disks (pulumi.Input[list]) –
Disks created on the instances that will be preserved on instance delete, update, etc. Structure is documented below. For more information see the official documentation. Proactive cross zone instance redistribution must be disabled before you can update stateful disks on existing instance group managers. This can be controlled via the
update_policy.target_pools (pulumi.Input[list]) – The full URL of all target pools to which new instances in the group are added. Updating the target pools attribute does not affect existing instances.
target_size (pulumi.Input[float]) –
The number of instances calculated as a fixed number or a percentage depending on the settings. Structure is documented below.
update_policy (pulumi.Input[dict]) –
The update policy for this managed instance group. Structure is documented below. For more information, see the official documentation and API
versions (pulumi.Input[list]) – Application versions managed by this instance group. Each version deals with a specific instance template, allowing canary release scenarios. Structure is documented below.
wait_for_instances (pulumi.Input[bool]) – Whether to wait for all instances to be created/updated before returning. Note that if this is set to true and the operation does not succeed, the provider will continue trying until it times out.
The auto_healing_policies object supports the following:
healthCheck(pulumi.Input[str]) - The health check resource that signals autohealing.initialDelaySec(pulumi.Input[float]) - The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. Between 0 and 3600.
The named_ports object supports the following:
name(pulumi.Input[str]) - - Version name.
The stateful_disks object supports the following:
deleteRule(pulumi.Input[str]) - , A value that prescribes what should happen to the stateful disk when the VM instance is deleted. The available options areNEVERandON_PERMANENT_INSTANCE_DELETION.NEVERdetatch the disk when the VM is deleted, but not delete the disk.ON_PERMANENT_INSTANCE_DELETIONwill delete the stateful disk when the VM is permanently deleted from the instance group. The default isNEVER.device_name(pulumi.Input[str]) - , The device name of the disk to be attached.
The update_policy object supports the following:
instanceRedistributionType(pulumi.Input[str]) - - The instance redistribution policy for regional managed instance groups. Valid values are:"PROACTIVE","NONE". IfPROACTIVE(default), the group attempts to maintain an even distribution of VM instances across zones in the region. IfNONE, proactive redistribution is disabled.maxSurgeFixed(pulumi.Input[float]) - , The maximum number of instances that can be created above the specified targetSize during the update process. Conflicts withmax_surge_percent. It has to be either 0 or at least equal to the number of zones. If fixed values are used, at least one ofmax_unavailable_fixedormax_surge_fixedmust be greater than 0.maxSurgePercent(pulumi.Input[float]) - , The maximum number of instances(calculated as percentage) that can be created above the specified targetSize during the update process. Conflicts withmax_surge_fixed. Percent value is only allowed for regional managed instance groups with size at least 10.maxUnavailableFixed(pulumi.Input[float]) - , The maximum number of instances that can be unavailable during the update process. Conflicts withmax_unavailable_percent. It has to be either 0 or at least equal to the number of zones. If fixed values are used, at least one ofmax_unavailable_fixedormax_surge_fixedmust be greater than 0.maxUnavailablePercent(pulumi.Input[float]) - , The maximum number of instances(calculated as percentage) that can be unavailable during the update process. Conflicts withmax_unavailable_fixed. Percent value is only allowed for regional managed instance groups with size at least 10.minimal_action(pulumi.Input[str]) - - Minimal action to be taken on an instance. You can specify eitherRESTARTto restart existing instances orREPLACEto delete and create new instances from the target template. If you specify aRESTART, the Updater will attempt to perform that action only. However, if the Updater determines that the minimal action you specify is not enough to perform the update, it might perform a more disruptive action.type(pulumi.Input[str]) - - The type of update process. You can specify eitherPROACTIVEso that the instance group manager proactively executes actions in order to bring instances to their target versions orOPPORTUNISTICso that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls).
The versions object supports the following:
instanceTemplate(pulumi.Input[str]) - - The full URL to an instance template from which all new instances of this version will be created.name(pulumi.Input[str]) - - Version name.target_size(pulumi.Input[dict]) - - The number of instances calculated as a fixed number or a percentage depending on the settings. Structure is documented below.fixed(pulumi.Input[float]) - , The number of instances which are managed for this version. Conflicts withpercent.percent(pulumi.Input[float]) - , The number of instances (calculated as percentage) which are managed for this version. Conflicts withfixed. Note that when usingpercent, rounding will be in favor of explicitly settarget_sizevalues; a managed instance group with 2 instances and 2versions, one of which has atarget_size.percentof60will create 2 instances of thatversion.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.RegionPerInstanceConfig(resource_name, opts=None, minimal_action=None, most_disruptive_allowed_action=None, name=None, preserved_state=None, project=None, region=None, region_instance_group_manager=None, remove_instance_state_on_destroy=None, __props__=None, __name__=None, __opts__=None)¶ A config defined for a single managed instance that belongs to an instance group manager. It preserves the instance name across instance group manager operations and can define stateful disks or metadata that are unique to the instance. This resource works with regional instance group managers.
To get more information about RegionPerInstanceConfig, see:
How-to Guides
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
minimal_action (pulumi.Input[str]) – The minimal action to perform on the instance during an update. Default is
NONE. Possible values are:
* REPLACE * RESTART * REFRESH * NONE
- Parameters
most_disruptive_allowed_action (pulumi.Input[str]) – The most disruptive action to perform on the instance during an update. Default is
REPLACE. Possible values are:
* REPLACE * RESTART * REFRESH * NONE
- Parameters
name (pulumi.Input[str]) – The name for this per-instance config and its corresponding instance.
preserved_state (pulumi.Input[dict]) – The preserved state for this instance. Structure is documented below.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – Region where the containing instance group manager is located
region_instance_group_manager (pulumi.Input[str]) – The region instance group manager this instance config is part of.
remove_instance_state_on_destroy (pulumi.Input[bool]) – When true, deleting this config will immediately remove any specified state from the underlying instance. When false, deleting this config will not immediately remove any state from the underlying instance. State will be removed on the next instance recreation or update.
The preserved_state object supports the following:
disks(pulumi.Input[list]) - Stateful disks for the instance. Structure is documented below.deleteRule(pulumi.Input[str]) - A value that prescribes what should happen to the stateful disk when the VM instance is deleted. The available options areNEVERandON_PERMANENT_INSTANCE_DELETION.NEVERdetatch the disk when the VM is deleted, but not delete the disk.ON_PERMANENT_INSTANCE_DELETIONwill delete the stateful disk when the VM is permanently deleted from the instance group.device_name(pulumi.Input[str]) - A unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance.mode(pulumi.Input[str]) - The mode of the disk.source(pulumi.Input[str]) - The URI of an existing persistent disk to attach under the specified device-name in the formatprojects/project-id/zones/zone/disks/disk-name.
metadata(pulumi.Input[dict]) - Preserved metadata defined for this instance. This is a list of key->value pairs.
minimal_action: pulumi.Output[str] = None¶The minimal action to perform on the instance during an update. Default is
NONE. Possible values are:REPLACE
RESTART
REFRESH
NONE
most_disruptive_allowed_action: pulumi.Output[str] = None¶The most disruptive action to perform on the instance during an update. Default is
REPLACE. Possible values are:REPLACE
RESTART
REFRESH
NONE
name: pulumi.Output[str] = None¶The name for this per-instance config and its corresponding instance.
preserved_state: pulumi.Output[dict] = None¶The preserved state for this instance. Structure is documented below.
disks(list) - Stateful disks for the instance. Structure is documented below.deleteRule(str) - A value that prescribes what should happen to the stateful disk when the VM instance is deleted. The available options areNEVERandON_PERMANENT_INSTANCE_DELETION.NEVERdetatch the disk when the VM is deleted, but not delete the disk.ON_PERMANENT_INSTANCE_DELETIONwill delete the stateful disk when the VM is permanently deleted from the instance group.device_name(str) - A unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance.mode(str) - The mode of the disk.source(str) - The URI of an existing persistent disk to attach under the specified device-name in the formatprojects/project-id/zones/zone/disks/disk-name.
metadata(dict) - Preserved metadata defined for this instance. This is a list of key->value pairs.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region: pulumi.Output[str] = None¶Region where the containing instance group manager is located
region_instance_group_manager: pulumi.Output[str] = None¶The region instance group manager this instance config is part of.
remove_instance_state_on_destroy: pulumi.Output[bool] = None¶When true, deleting this config will immediately remove any specified state from the underlying instance. When false, deleting this config will not immediately remove any state from the underlying instance. State will be removed on the next instance recreation or update.
- static
get(resource_name, id, opts=None, minimal_action=None, most_disruptive_allowed_action=None, name=None, preserved_state=None, project=None, region=None, region_instance_group_manager=None, remove_instance_state_on_destroy=None)¶ Get an existing RegionPerInstanceConfig resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
minimal_action (pulumi.Input[str]) – The minimal action to perform on the instance during an update. Default is
NONE. Possible values are:
* REPLACE * RESTART * REFRESH * NONE
- Parameters
most_disruptive_allowed_action (pulumi.Input[str]) – The most disruptive action to perform on the instance during an update. Default is
REPLACE. Possible values are:
* REPLACE * RESTART * REFRESH * NONE
- Parameters
name (pulumi.Input[str]) – The name for this per-instance config and its corresponding instance.
preserved_state (pulumi.Input[dict]) – The preserved state for this instance. Structure is documented below.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – Region where the containing instance group manager is located
region_instance_group_manager (pulumi.Input[str]) – The region instance group manager this instance config is part of.
remove_instance_state_on_destroy (pulumi.Input[bool]) – When true, deleting this config will immediately remove any specified state from the underlying instance. When false, deleting this config will not immediately remove any state from the underlying instance. State will be removed on the next instance recreation or update.
The preserved_state object supports the following:
disks(pulumi.Input[list]) - Stateful disks for the instance. Structure is documented below.deleteRule(pulumi.Input[str]) - A value that prescribes what should happen to the stateful disk when the VM instance is deleted. The available options areNEVERandON_PERMANENT_INSTANCE_DELETION.NEVERdetatch the disk when the VM is deleted, but not delete the disk.ON_PERMANENT_INSTANCE_DELETIONwill delete the stateful disk when the VM is permanently deleted from the instance group.device_name(pulumi.Input[str]) - A unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance.mode(pulumi.Input[str]) - The mode of the disk.source(pulumi.Input[str]) - The URI of an existing persistent disk to attach under the specified device-name in the formatprojects/project-id/zones/zone/disks/disk-name.
metadata(pulumi.Input[dict]) - Preserved metadata defined for this instance. This is a list of key->value pairs.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.RegionSslCertificate(resource_name, opts=None, certificate=None, description=None, name=None, name_prefix=None, private_key=None, project=None, region=None, __props__=None, __name__=None, __opts__=None)¶ A RegionSslCertificate resource, used for HTTPS load balancing. This resource provides a mechanism to upload an SSL key and certificate to the load balancer to serve secure connections from the user.
To get more information about RegionSslCertificate, see:
How-to Guides
Warning: All arguments including
certificateandprivate_keywill be stored in the raw state as plain-text. Read more about secrets in state.import pulumi import pulumi_gcp as gcp default = gcp.compute.RegionSslCertificate("default", region="us-central1", name_prefix="my-certificate-", description="a description", private_key=(lambda path: open(path).read())("path/to/private.key"), certificate=(lambda path: open(path).read())("path/to/certificate.crt"))
import pulumi import pulumi_gcp as gcp # Using with Region Target HTTPS Proxies # # SSL certificates cannot be updated after creation. In order to apply # the specified configuration, the provider will destroy the existing # resource and create a replacement. To effectively use an SSL # certificate resource with a Target HTTPS Proxy resource, it's # recommended to specify create_before_destroy in a lifecycle block. # Either omit the Instance Template name attribute, specify a partial # name with name_prefix, or use random_id resource. Example: default_region_ssl_certificate = gcp.compute.RegionSslCertificate("defaultRegionSslCertificate", region="us-central1", name_prefix="my-certificate-", private_key=(lambda path: open(path).read())("path/to/private.key"), certificate=(lambda path: open(path).read())("path/to/certificate.crt")) default_region_health_check = gcp.compute.RegionHealthCheck("defaultRegionHealthCheck", region="us-central1", http_health_check={ "port": 80, }) default_region_backend_service = gcp.compute.RegionBackendService("defaultRegionBackendService", region="us-central1", protocol="HTTP", timeout_sec=10, health_checks=[default_region_health_check.id]) default_region_url_map = gcp.compute.RegionUrlMap("defaultRegionUrlMap", region="us-central1", description="a description", default_service=default_region_backend_service.id, host_rule=[{ "hosts": ["mysite.com"], "pathMatcher": "allpaths", }], path_matcher=[{ "name": "allpaths", "default_service": default_region_backend_service.id, "path_rule": [{ "paths": ["/*"], "service": default_region_backend_service.id, }], }]) default_region_target_https_proxy = gcp.compute.RegionTargetHttpsProxy("defaultRegionTargetHttpsProxy", region="us-central1", url_map=default_region_url_map.id, ssl_certificates=[default_region_ssl_certificate.id])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
certificate (pulumi.Input[str]) – The certificate in PEM format. The certificate chain must be no greater than 5 certs long. The chain must include at least one intermediate cert. Note: This property is sensitive and will not be displayed in the plan.
description (pulumi.Input[str]) – An optional description of this resource.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.name_prefix (pulumi.Input[str]) – Creates a unique name beginning with the specified prefix. Conflicts with
name.private_key (pulumi.Input[str]) – The write-only private key in PEM format. Note: This property is sensitive and will not be displayed in the plan.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – The Region in which the created regional ssl certificate should reside. If it is not provided, the provider region is used.
certificate: pulumi.Output[str] = None¶The certificate in PEM format. The certificate chain must be no greater than 5 certs long. The chain must include at least one intermediate cert. Note: This property is sensitive and will not be displayed in the plan.
certificate_id: pulumi.Output[float] = None¶The unique identifier for the resource.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional description of this resource.
name: pulumi.Output[str] = None¶Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
name_prefix: pulumi.Output[str] = None¶Creates a unique name beginning with the specified prefix. Conflicts with
name.
private_key: pulumi.Output[str] = None¶The write-only private key in PEM format. Note: This property is sensitive and will not be displayed in the plan.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region: pulumi.Output[str] = None¶The Region in which the created regional ssl certificate should reside. If it is not provided, the provider region is used.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
- static
get(resource_name, id, opts=None, certificate=None, certificate_id=None, creation_timestamp=None, description=None, name=None, name_prefix=None, private_key=None, project=None, region=None, self_link=None)¶ Get an existing RegionSslCertificate resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
certificate (pulumi.Input[str]) – The certificate in PEM format. The certificate chain must be no greater than 5 certs long. The chain must include at least one intermediate cert. Note: This property is sensitive and will not be displayed in the plan.
certificate_id (pulumi.Input[float]) – The unique identifier for the resource.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional description of this resource.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.name_prefix (pulumi.Input[str]) – Creates a unique name beginning with the specified prefix. Conflicts with
name.private_key (pulumi.Input[str]) – The write-only private key in PEM format. Note: This property is sensitive and will not be displayed in the plan.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – The Region in which the created regional ssl certificate should reside. If it is not provided, the provider region is used.
self_link (pulumi.Input[str]) – The URI of the created resource.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.RegionTargetHttpProxy(resource_name, opts=None, description=None, name=None, project=None, region=None, url_map=None, __props__=None, __name__=None, __opts__=None)¶ Represents a RegionTargetHttpProxy resource, which is used by one or more forwarding rules to route incoming HTTP requests to a URL map.
To get more information about RegionTargetHttpProxy, see:
How-to Guides
import pulumi import pulumi_gcp as gcp default_region_health_check = gcp.compute.RegionHealthCheck("defaultRegionHealthCheck", region="us-central1", http_health_check={ "port": 80, }) default_region_backend_service = gcp.compute.RegionBackendService("defaultRegionBackendService", region="us-central1", protocol="HTTP", timeout_sec=10, health_checks=[default_region_health_check.id]) default_region_url_map = gcp.compute.RegionUrlMap("defaultRegionUrlMap", region="us-central1", default_service=default_region_backend_service.id, host_rule=[{ "hosts": ["mysite.com"], "pathMatcher": "allpaths", }], path_matcher=[{ "name": "allpaths", "default_service": default_region_backend_service.id, "path_rule": [{ "paths": ["/*"], "service": default_region_backend_service.id, }], }]) default_region_target_http_proxy = gcp.compute.RegionTargetHttpProxy("defaultRegionTargetHttpProxy", region="us-central1", url_map=default_region_url_map.id)
import pulumi import pulumi_gcp as gcp default_region_url_map = gcp.compute.RegionUrlMap("defaultRegionUrlMap", region="us-central1", default_url_redirect={ "httpsRedirect": True, "stripQuery": False, }) default_region_target_http_proxy = gcp.compute.RegionTargetHttpProxy("defaultRegionTargetHttpProxy", region="us-central1", url_map=default_region_url_map.id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – An optional description of this resource.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – The Region in which the created target https proxy should reside. If it is not provided, the provider region is used.
url_map (pulumi.Input[str]) – A reference to the RegionUrlMap resource that defines the mapping from URL to the BackendService.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional description of this resource.
name: pulumi.Output[str] = None¶Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
proxy_id: pulumi.Output[float] = None¶The unique identifier for the resource.
region: pulumi.Output[str] = None¶The Region in which the created target https proxy should reside. If it is not provided, the provider region is used.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
url_map: pulumi.Output[str] = None¶A reference to the RegionUrlMap resource that defines the mapping from URL to the BackendService.
- static
get(resource_name, id, opts=None, creation_timestamp=None, description=None, name=None, project=None, proxy_id=None, region=None, self_link=None, url_map=None)¶ Get an existing RegionTargetHttpProxy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional description of this resource.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
proxy_id (pulumi.Input[float]) – The unique identifier for the resource.
region (pulumi.Input[str]) – The Region in which the created target https proxy should reside. If it is not provided, the provider region is used.
self_link (pulumi.Input[str]) – The URI of the created resource.
url_map (pulumi.Input[str]) – A reference to the RegionUrlMap resource that defines the mapping from URL to the BackendService.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.RegionTargetHttpsProxy(resource_name, opts=None, description=None, name=None, project=None, region=None, ssl_certificates=None, url_map=None, __props__=None, __name__=None, __opts__=None)¶ Represents a RegionTargetHttpsProxy resource, which is used by one or more forwarding rules to route incoming HTTPS requests to a URL map.
To get more information about RegionTargetHttpsProxy, see:
How-to Guides
import pulumi import pulumi_gcp as gcp default_region_ssl_certificate = gcp.compute.RegionSslCertificate("defaultRegionSslCertificate", region="us-central1", private_key=(lambda path: open(path).read())("path/to/private.key"), certificate=(lambda path: open(path).read())("path/to/certificate.crt")) default_region_health_check = gcp.compute.RegionHealthCheck("defaultRegionHealthCheck", region="us-central1", http_health_check={ "port": 80, }) default_region_backend_service = gcp.compute.RegionBackendService("defaultRegionBackendService", region="us-central1", protocol="HTTP", timeout_sec=10, health_checks=[default_region_health_check.id]) default_region_url_map = gcp.compute.RegionUrlMap("defaultRegionUrlMap", region="us-central1", description="a description", default_service=default_region_backend_service.id, host_rule=[{ "hosts": ["mysite.com"], "pathMatcher": "allpaths", }], path_matcher=[{ "name": "allpaths", "default_service": default_region_backend_service.id, "path_rule": [{ "paths": ["/*"], "service": default_region_backend_service.id, }], }]) default_region_target_https_proxy = gcp.compute.RegionTargetHttpsProxy("defaultRegionTargetHttpsProxy", region="us-central1", url_map=default_region_url_map.id, ssl_certificates=[default_region_ssl_certificate.id])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – An optional description of this resource.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – The Region in which the created target https proxy should reside. If it is not provided, the provider region is used.
ssl_certificates (pulumi.Input[list]) – A list of RegionSslCertificate resources that are used to authenticate connections between users and the load balancer. Currently, exactly one SSL certificate must be specified.
url_map (pulumi.Input[str]) – A reference to the RegionUrlMap resource that defines the mapping from URL to the RegionBackendService.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional description of this resource.
name: pulumi.Output[str] = None¶Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
proxy_id: pulumi.Output[float] = None¶The unique identifier for the resource.
region: pulumi.Output[str] = None¶The Region in which the created target https proxy should reside. If it is not provided, the provider region is used.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
ssl_certificates: pulumi.Output[list] = None¶A list of RegionSslCertificate resources that are used to authenticate connections between users and the load balancer. Currently, exactly one SSL certificate must be specified.
url_map: pulumi.Output[str] = None¶A reference to the RegionUrlMap resource that defines the mapping from URL to the RegionBackendService.
- static
get(resource_name, id, opts=None, creation_timestamp=None, description=None, name=None, project=None, proxy_id=None, region=None, self_link=None, ssl_certificates=None, url_map=None)¶ Get an existing RegionTargetHttpsProxy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional description of this resource.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
proxy_id (pulumi.Input[float]) – The unique identifier for the resource.
region (pulumi.Input[str]) – The Region in which the created target https proxy should reside. If it is not provided, the provider region is used.
self_link (pulumi.Input[str]) – The URI of the created resource.
ssl_certificates (pulumi.Input[list]) – A list of RegionSslCertificate resources that are used to authenticate connections between users and the load balancer. Currently, exactly one SSL certificate must be specified.
url_map (pulumi.Input[str]) – A reference to the RegionUrlMap resource that defines the mapping from URL to the RegionBackendService.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.RegionUrlMap(resource_name, opts=None, default_service=None, default_url_redirect=None, description=None, host_rules=None, name=None, path_matchers=None, project=None, region=None, tests=None, __props__=None, __name__=None, __opts__=None)¶ UrlMaps are used to route requests to a backend service based on rules that you define for the host and path of an incoming URL.
import pulumi import pulumi_gcp as gcp default = gcp.compute.RegionHealthCheck("default", region="us-central1", check_interval_sec=1, timeout_sec=1, http_health_check={ "port": 80, "request_path": "/", }) login = gcp.compute.RegionBackendService("login", region="us-central1", protocol="HTTP", timeout_sec=10, health_checks=[default.id]) home = gcp.compute.RegionBackendService("home", region="us-central1", protocol="HTTP", timeout_sec=10, health_checks=[default.id]) regionurlmap = gcp.compute.RegionUrlMap("regionurlmap", region="us-central1", description="a description", default_service=home.id, host_rule=[{ "hosts": ["mysite.com"], "pathMatcher": "allpaths", }], path_matcher=[{ "name": "allpaths", "default_service": home.id, "path_rule": [ { "paths": ["/home"], "service": home.id, }, { "paths": ["/login"], "service": login.id, }, ], }], test=[{ "service": home.id, "host": "hi.com", "path": "/home", }])
import pulumi import pulumi_gcp as gcp default = gcp.compute.RegionHealthCheck("default", http_health_check={ "port": 80, }) home = gcp.compute.RegionBackendService("home", protocol="HTTP", timeout_sec=10, health_checks=[default.id], load_balancing_scheme="INTERNAL_MANAGED") regionurlmap = gcp.compute.RegionUrlMap("regionurlmap", description="a description", default_service=home.id, host_rule=[{ "hosts": ["mysite.com"], "pathMatcher": "allpaths", }], path_matcher=[{ "name": "allpaths", "default_service": home.id, "path_rule": [{ "paths": ["/home"], "route_action": { "cors_policy": { "allowCredentials": True, "allowHeaders": ["Allowed content"], "allowMethods": ["GET"], "allowOrigins": ["Allowed origin"], "exposeHeaders": ["Exposed header"], "maxAge": 30, "disabled": False, }, "fault_injection_policy": { "abort": { "httpStatus": 234, "percentage": 5.6, }, "delay": { "fixed_delay": { "seconds": 0, "nanos": 50000, }, "percentage": 7.8, }, }, "request_mirror_policy": { "backend_service": home.id, }, "retry_policy": { "numRetries": 4, "per_try_timeout": { "seconds": 30, }, "retryConditions": [ "5xx", "deadline-exceeded", ], }, "timeout": { "seconds": 20, "nanos": 750000000, }, "url_rewrite": { "hostRewrite": "A replacement header", "pathPrefixRewrite": "A replacement path", }, "weighted_backend_services": [{ "backend_service": home.id, "weight": 400, "header_action": { "requestHeadersToRemoves": ["RemoveMe"], "request_headers_to_add": [{ "headerName": "AddMe", "headerValue": "MyValue", "replace": True, }], "responseHeadersToRemoves": ["RemoveMe"], "response_headers_to_add": [{ "headerName": "AddMe", "headerValue": "MyValue", "replace": False, }], }, }], }, }], }], test=[{ "service": home.id, "host": "hi.com", "path": "/home", }])
import pulumi import pulumi_gcp as gcp default = gcp.compute.RegionHealthCheck("default", http_health_check={ "port": 80, }) home = gcp.compute.RegionBackendService("home", protocol="HTTP", timeout_sec=10, health_checks=[default.id], load_balancing_scheme="INTERNAL_MANAGED") regionurlmap = gcp.compute.RegionUrlMap("regionurlmap", description="a description", default_service=home.id, host_rule=[{ "hosts": ["mysite.com"], "pathMatcher": "allpaths", }], path_matcher=[{ "name": "allpaths", "default_service": home.id, "path_rule": [{ "paths": ["/home"], "route_action": { "retry_policy": { "numRetries": 4, "per_try_timeout": { "seconds": 30, }, "retryConditions": [ "5xx", "deadline-exceeded", ], }, "timeout": { "seconds": 20, "nanos": 750000000, }, "url_rewrite": { "hostRewrite": "A replacement header", "pathPrefixRewrite": "A replacement path", }, "weighted_backend_services": [{ "backend_service": home.id, "weight": 400, "header_action": { "response_headers_to_add": [{ "headerName": "AddMe", "headerValue": "MyValue", "replace": False, }], }, }], }, }], }], test=[{ "service": home.id, "host": "hi.com", "path": "/home", }])
import pulumi import pulumi_gcp as gcp default = gcp.compute.RegionHealthCheck("default", http_health_check={ "port": 80, }) home = gcp.compute.RegionBackendService("home", protocol="HTTP", timeout_sec=10, health_checks=[default.id], load_balancing_scheme="INTERNAL_MANAGED") regionurlmap = gcp.compute.RegionUrlMap("regionurlmap", description="a description", default_service=home.id, host_rule=[{ "hosts": ["mysite.com"], "pathMatcher": "allpaths", }], path_matcher=[{ "name": "allpaths", "default_service": home.id, "route_rules": [{ "priority": 1, "header_action": { "requestHeadersToRemoves": ["RemoveMe2"], "request_headers_to_add": [{ "headerName": "AddSomethingElse", "headerValue": "MyOtherValue", "replace": True, }], "responseHeadersToRemoves": ["RemoveMe3"], "response_headers_to_add": [{ "headerName": "AddMe", "headerValue": "MyValue", "replace": False, }], }, "match_rules": [{ "fullPathMatch": "a full path", "header_matches": [{ "headerName": "someheader", "exactMatch": "match this exactly", "invertMatch": True, }], "ignoreCase": True, "metadata_filters": [{ "filterMatchCriteria": "MATCH_ANY", "filter_labels": [{ "name": "PLANET", "value": "MARS", }], }], "query_parameter_matches": [{ "name": "a query parameter", "presentMatch": True, }], }], "url_redirect": { "hostRedirect": "A host", "httpsRedirect": False, "pathRedirect": "some/path", "redirectResponseCode": "TEMPORARY_REDIRECT", "stripQuery": True, }, }], }], test=[{ "service": home.id, "host": "hi.com", "path": "/home", }])
import pulumi import pulumi_gcp as gcp default = gcp.compute.RegionHealthCheck("default", http_health_check={ "port": 80, }) home = gcp.compute.RegionBackendService("home", protocol="HTTP", timeout_sec=10, health_checks=[default.id], load_balancing_scheme="INTERNAL_MANAGED") regionurlmap = gcp.compute.RegionUrlMap("regionurlmap", description="a description", default_service=home.id, host_rule=[{ "hosts": ["mysite.com"], "pathMatcher": "allpaths", }], path_matcher=[{ "name": "allpaths", "default_service": home.id, "route_rules": [{ "priority": 1, "service": home.id, "header_action": { "requestHeadersToRemoves": ["RemoveMe2"], }, "match_rules": [{ "fullPathMatch": "a full path", "header_matches": [{ "headerName": "someheader", "exactMatch": "match this exactly", "invertMatch": True, }], "query_parameter_matches": [{ "name": "a query parameter", "presentMatch": True, }], }], }], }], test=[{ "service": home.id, "host": "hi.com", "path": "/home", }])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
default_service (pulumi.Input[str]) – A reference to a RegionBackendService resource. This will be used if none of the pathRules defined by this PathMatcher is matched by the URL’s path portion.
default_url_redirect (pulumi.Input[dict]) – When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. Structure is documented below.
description (pulumi.Input[str]) – Description of this test case.
host_rules (pulumi.Input[list]) – The list of HostRules to use against the URL. Structure is documented below.
name (pulumi.Input[str]) – The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.
path_matchers (pulumi.Input[list]) – The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL’s host portion.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – The Region in which the url map should reside. If it is not provided, the provider region is used.
tests (pulumi.Input[list]) – The list of expected URL mappings. Requests to update this UrlMap will succeed only if all of the test cases pass. Structure is documented below.
The default_url_redirect object supports the following:
hostRedirect(pulumi.Input[str]) - The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters.httpsRedirect(pulumi.Input[bool]) - If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false.pathRedirect(pulumi.Input[str]) - The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.prefixRedirect(pulumi.Input[str]) - The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.redirectResponseCode(pulumi.Input[str]) - The HTTP Status code to use for this RedirectAction. Supported values are:MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
FOUND, which corresponds to 302.
SEE_OTHER which corresponds to 303.
TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
stripQuery(pulumi.Input[bool]) - If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. This field is required to ensure an empty block is not set. The normal default value is false.
The host_rules object supports the following:
description(pulumi.Input[str]) - Description of this test case.hosts(pulumi.Input[list]) - The list of host patterns to match. They must be valid hostnames, except * will match any string of ([a-z0-9-.]*). In that case, * must be the first character and must be followed in the pattern by either - or ..pathMatcher(pulumi.Input[str]) - The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL’s host portion.
The path_matchers object supports the following:
default_service(pulumi.Input[str]) - A reference to a RegionBackendService resource. This will be used if none of the pathRules defined by this PathMatcher is matched by the URL’s path portion.default_url_redirect(pulumi.Input[dict]) - When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. Structure is documented below.hostRedirect(pulumi.Input[str]) - The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters.httpsRedirect(pulumi.Input[bool]) - If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false.pathRedirect(pulumi.Input[str]) - The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.prefixRedirect(pulumi.Input[str]) - The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.redirectResponseCode(pulumi.Input[str]) - The HTTP Status code to use for this RedirectAction. Supported values are:MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
FOUND, which corresponds to 302.
SEE_OTHER which corresponds to 303.
TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
stripQuery(pulumi.Input[bool]) - If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. This field is required to ensure an empty block is not set. The normal default value is false.
description(pulumi.Input[str]) - Description of this test case.name(pulumi.Input[str]) - The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.pathRules(pulumi.Input[list]) - The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that’s required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis. For example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list. Within a given pathMatcher, only one of pathRules or routeRules must be set. Structure is documented below.paths(pulumi.Input[list]) - The list of path patterns to match. Each must start with / and the only place ais allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here.
routeAction(pulumi.Input[dict]) - In response to a matching path, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. Structure is documented below.corsPolicy(pulumi.Input[dict]) - The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing Structure is documented below.allowCredentials(pulumi.Input[bool]) - In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access- Control-Allow-Credentials header. Defaults to false.allowHeaders(pulumi.Input[list]) - Specifies the content for the Access-Control-Allow-Headers header.allowMethods(pulumi.Input[list]) - Specifies the content for the Access-Control-Allow-Methods header.allowOriginRegexes(pulumi.Input[list]) - Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either allow_origins or allow_origin_regex.allowOrigins(pulumi.Input[list]) - Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either allow_origins or allow_origin_regex.disabled(pulumi.Input[bool]) - If true, specifies the CORS policy is disabled.exposeHeaders(pulumi.Input[list]) - Specifies the content for the Access-Control-Expose-Headers header.maxAge(pulumi.Input[float]) - Specifies how long the results of a preflight request can be cached. This translates to the content for the Access-Control-Max-Age header.
faultInjectionPolicy(pulumi.Input[dict]) - The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy. Structure is documented below.abort(pulumi.Input[dict]) - The specification for how client requests are aborted as part of fault injection. Structure is documented below.httpStatus(pulumi.Input[float]) - The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive.percentage(pulumi.Input[float]) - The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
delay(pulumi.Input[dict]) - The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. Structure is documented below.fixedDelay(pulumi.Input[dict]) - Specifies the value of the fixed delay interval. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
percentage(pulumi.Input[float]) - The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
requestMirrorPolicy(pulumi.Input[dict]) - Specifies the policy on how requests intended for the route’s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. Structure is documented below.backend_service(pulumi.Input[str]) - The default RegionBackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
retryPolicy(pulumi.Input[dict]) - Specifies the retry policy associated with this route. Structure is documented below.numRetries(pulumi.Input[float]) - Specifies the allowed number retries. This number must be > 0.perTryTimeout(pulumi.Input[dict]) - Specifies a non-zero timeout per retry attempt. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
retryConditions(pulumi.Input[list]) - Specifies one or more conditions when this retry rule applies. Valid values are:5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
refused-stream: Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled
deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
timeout(pulumi.Input[dict]) - Specifies the timeout for the selected route. Timeout is computed from the time the request is has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, the default value is 15 seconds. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
urlRewrite(pulumi.Input[dict]) - The spec to modify the URL of the request, prior to forwarding the request to the matched service Structure is documented below.hostRewrite(pulumi.Input[str]) - Prior to forwarding the request to the selected service, the request’s host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters.pathPrefixRewrite(pulumi.Input[str]) - Prior to forwarding the request to the selected backend service, the matching portion of the request’s path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters.
weightedBackendServices(pulumi.Input[list]) - A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. Structure is documented below.backend_service(pulumi.Input[str]) - The default RegionBackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.header_action(pulumi.Input[dict]) - Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. Structure is documented below.requestHeadersToAdds(pulumi.Input[list]) - Headers to add to a matching request prior to forwarding the request to the backendService. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
requestHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.responseHeadersToAdds(pulumi.Input[list]) - Headers to add the response prior to sending the response back to the client. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
responseHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
weight(pulumi.Input[float]) - Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user’s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService’s session affinity policy. The value must be between 0 and 1000
service(pulumi.Input[str]) - A reference to expected RegionBackendService resource the given URL should be mapped to.urlRedirect(pulumi.Input[dict]) - When a path pattern is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. Structure is documented below.hostRedirect(pulumi.Input[str]) - The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters.httpsRedirect(pulumi.Input[bool]) - If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false.pathRedirect(pulumi.Input[str]) - The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.prefixRedirect(pulumi.Input[str]) - The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.redirectResponseCode(pulumi.Input[str]) - The HTTP Status code to use for this RedirectAction. Supported values are:MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
FOUND, which corresponds to 302.
SEE_OTHER which corresponds to 303.
TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
stripQuery(pulumi.Input[bool]) - If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. This field is required to ensure an empty block is not set. The normal default value is false.
routeRules(pulumi.Input[list]) - The list of ordered HTTP route rules. Use this list instead of pathRules when advanced route matching and routing actions are desired. The order of specifying routeRules matters: the first rule that matches will cause its specified routing action to take effect. Within a given pathMatcher, only one of pathRules or routeRules must be set. routeRules are not supported in UrlMaps intended for External load balancers. Structure is documented below.header_action(pulumi.Input[dict]) - Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. Structure is documented below.requestHeadersToAdds(pulumi.Input[list]) - Headers to add to a matching request prior to forwarding the request to the backendService. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
requestHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.responseHeadersToAdds(pulumi.Input[list]) - Headers to add the response prior to sending the response back to the client. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
responseHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
matchRules(pulumi.Input[list]) - The rules for determining a match. Structure is documented below.fullPathMatch(pulumi.Input[str]) - For satifying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL. FullPathMatch must be between 1 and 1024 characters. Only one of prefixMatch, fullPathMatch or regexMatch must be specified.headerMatches(pulumi.Input[list]) - Specifies a list of header match criteria, all of which must match corresponding headers in the request. Structure is documented below.exactMatch(pulumi.Input[str]) - The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch. Only one of presentMatch, exactMatch and regexMatch must be set.headerName(pulumi.Input[str]) - The name of the header.invertMatch(pulumi.Input[bool]) - If set to false, the headerMatch is considered a match if the match criteria above are met. If set to true, the headerMatch is considered a match if the match criteria above are NOT met. Defaults to false.prefixMatch(pulumi.Input[str]) - The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.presentMatch(pulumi.Input[bool]) - Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not. Only one of presentMatch, exactMatch and regexMatch must be set.rangeMatch(pulumi.Input[dict]) - The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. Structure is documented below.rangeEnd(pulumi.Input[float]) - The end of the range (exclusive).rangeStart(pulumi.Input[float]) - The start of the range (inclusive).
regexMatch(pulumi.Input[str]) - The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript Only one of presentMatch, exactMatch and regexMatch must be set.suffixMatch(pulumi.Input[str]) - The value of the header must end with the contents of suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
ignoreCase(pulumi.Input[bool]) - Specifies that prefixMatch and fullPathMatch matches are case sensitive. Defaults to false.metadata_filters(pulumi.Input[list]) - Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies. For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels in the provided metadata. metadataFilters specified here can be overrides those specified in ForwardingRule that refers to this UrlMap. metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED. Structure is documented below.filterLabels(pulumi.Input[list]) - The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries. Structure is documented below.name(pulumi.Input[str]) - The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.value(pulumi.Input[str]) - The value of the label must match the specified value. value can have a maximum length of 1024 characters.
filterMatchCriteria(pulumi.Input[str]) - Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match. Supported values are:MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
prefixMatch(pulumi.Input[str]) - The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.queryParameterMatches(pulumi.Input[list]) - Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request. Structure is documented below.exactMatch(pulumi.Input[str]) - The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch. Only one of presentMatch, exactMatch and regexMatch must be set.name(pulumi.Input[str]) - The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.presentMatch(pulumi.Input[bool]) - Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not. Only one of presentMatch, exactMatch and regexMatch must be set.regexMatch(pulumi.Input[str]) - The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript Only one of presentMatch, exactMatch and regexMatch must be set.
regexMatch(pulumi.Input[str]) - The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript Only one of presentMatch, exactMatch and regexMatch must be set.
priority(pulumi.Input[float]) - For routeRules within a given pathMatcher, priority determines the order in which load balancer will interpret routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied. You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number between 0 and 2147483647 inclusive. Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules.routeAction(pulumi.Input[dict]) - In response to a matching path, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. Structure is documented below.corsPolicy(pulumi.Input[dict]) - The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing Structure is documented below.allowCredentials(pulumi.Input[bool]) - In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access- Control-Allow-Credentials header. Defaults to false.allowHeaders(pulumi.Input[list]) - Specifies the content for the Access-Control-Allow-Headers header.allowMethods(pulumi.Input[list]) - Specifies the content for the Access-Control-Allow-Methods header.allowOriginRegexes(pulumi.Input[list]) - Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either allow_origins or allow_origin_regex.allowOrigins(pulumi.Input[list]) - Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either allow_origins or allow_origin_regex.disabled(pulumi.Input[bool]) - If true, specifies the CORS policy is disabled.exposeHeaders(pulumi.Input[list]) - Specifies the content for the Access-Control-Expose-Headers header.maxAge(pulumi.Input[float]) - Specifies how long the results of a preflight request can be cached. This translates to the content for the Access-Control-Max-Age header.
faultInjectionPolicy(pulumi.Input[dict]) - The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy. Structure is documented below.abort(pulumi.Input[dict]) - The specification for how client requests are aborted as part of fault injection. Structure is documented below.httpStatus(pulumi.Input[float]) - The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive.percentage(pulumi.Input[float]) - The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
delay(pulumi.Input[dict]) - The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. Structure is documented below.fixedDelay(pulumi.Input[dict]) - Specifies the value of the fixed delay interval. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
percentage(pulumi.Input[float]) - The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
requestMirrorPolicy(pulumi.Input[dict]) - Specifies the policy on how requests intended for the route’s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. Structure is documented below.backend_service(pulumi.Input[str]) - The default RegionBackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
retryPolicy(pulumi.Input[dict]) - Specifies the retry policy associated with this route. Structure is documented below.numRetries(pulumi.Input[float]) - Specifies the allowed number retries. This number must be > 0.perTryTimeout(pulumi.Input[dict]) - Specifies a non-zero timeout per retry attempt. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
retryConditions(pulumi.Input[list]) - Specifies one or more conditions when this retry rule applies. Valid values are:5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
refused-stream: Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled
deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
timeout(pulumi.Input[dict]) - Specifies the timeout for the selected route. Timeout is computed from the time the request is has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, the default value is 15 seconds. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
urlRewrite(pulumi.Input[dict]) - The spec to modify the URL of the request, prior to forwarding the request to the matched service Structure is documented below.hostRewrite(pulumi.Input[str]) - Prior to forwarding the request to the selected service, the request’s host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters.pathPrefixRewrite(pulumi.Input[str]) - Prior to forwarding the request to the selected backend service, the matching portion of the request’s path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters.
weightedBackendServices(pulumi.Input[list]) - A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. Structure is documented below.backend_service(pulumi.Input[str]) - The default RegionBackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.header_action(pulumi.Input[dict]) - Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. Structure is documented below.requestHeadersToAdds(pulumi.Input[list]) - Headers to add to a matching request prior to forwarding the request to the backendService. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
requestHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.responseHeadersToAdds(pulumi.Input[list]) - Headers to add the response prior to sending the response back to the client. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
responseHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
weight(pulumi.Input[float]) - Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user’s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService’s session affinity policy. The value must be between 0 and 1000
service(pulumi.Input[str]) - A reference to expected RegionBackendService resource the given URL should be mapped to.urlRedirect(pulumi.Input[dict]) - When a path pattern is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. Structure is documented below.hostRedirect(pulumi.Input[str]) - The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters.httpsRedirect(pulumi.Input[bool]) - If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false.pathRedirect(pulumi.Input[str]) - The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.prefixRedirect(pulumi.Input[str]) - The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.redirectResponseCode(pulumi.Input[str]) - The HTTP Status code to use for this RedirectAction. Supported values are:MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
FOUND, which corresponds to 302.
SEE_OTHER which corresponds to 303.
TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
stripQuery(pulumi.Input[bool]) - If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. This field is required to ensure an empty block is not set. The normal default value is false.
The tests object supports the following:
description(pulumi.Input[str]) - Description of this test case.host(pulumi.Input[str]) - Host portion of the URL.path(pulumi.Input[str]) - Path portion of the URL.service(pulumi.Input[str]) - A reference to expected RegionBackendService resource the given URL should be mapped to.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
default_service: pulumi.Output[str] = None¶A reference to a RegionBackendService resource. This will be used if none of the pathRules defined by this PathMatcher is matched by the URL’s path portion.
default_url_redirect: pulumi.Output[dict] = None¶When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. Structure is documented below.
hostRedirect(str) - The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters.httpsRedirect(bool) - If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false.pathRedirect(str) - The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.prefixRedirect(str) - The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.redirectResponseCode(str) - The HTTP Status code to use for this RedirectAction. Supported values are:MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
FOUND, which corresponds to 302.
SEE_OTHER which corresponds to 303.
TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
stripQuery(bool) - If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. This field is required to ensure an empty block is not set. The normal default value is false.
description: pulumi.Output[str] = None¶Description of this test case.
fingerprint: pulumi.Output[str] = None¶Fingerprint of this resource. This field is used internally during updates of this resource.
host_rules: pulumi.Output[list] = None¶The list of HostRules to use against the URL. Structure is documented below.
description(str) - Description of this test case.hosts(list) - The list of host patterns to match. They must be valid hostnames, except * will match any string of ([a-z0-9-.]*). In that case, * must be the first character and must be followed in the pattern by either - or ..pathMatcher(str) - The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL’s host portion.
map_id: pulumi.Output[float] = None¶The unique identifier for the resource.
name: pulumi.Output[str] = None¶The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.
path_matchers: pulumi.Output[list] = None¶The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL’s host portion.
default_service(str) - A reference to a RegionBackendService resource. This will be used if none of the pathRules defined by this PathMatcher is matched by the URL’s path portion.default_url_redirect(dict) - When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. Structure is documented below.hostRedirect(str) - The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters.httpsRedirect(bool) - If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false.pathRedirect(str) - The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.prefixRedirect(str) - The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.redirectResponseCode(str) - The HTTP Status code to use for this RedirectAction. Supported values are:MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
FOUND, which corresponds to 302.
SEE_OTHER which corresponds to 303.
TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
stripQuery(bool) - If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. This field is required to ensure an empty block is not set. The normal default value is false.
description(str) - Description of this test case.name(str) - The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.pathRules(list) - The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that’s required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis. For example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list. Within a given pathMatcher, only one of pathRules or routeRules must be set. Structure is documented below.paths(list) - The list of path patterns to match. Each must start with / and the only place ais allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here.
routeAction(dict) - In response to a matching path, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. Structure is documented below.corsPolicy(dict) - The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing Structure is documented below.allowCredentials(bool) - In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access- Control-Allow-Credentials header. Defaults to false.allowHeaders(list) - Specifies the content for the Access-Control-Allow-Headers header.allowMethods(list) - Specifies the content for the Access-Control-Allow-Methods header.allowOriginRegexes(list) - Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either allow_origins or allow_origin_regex.allowOrigins(list) - Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either allow_origins or allow_origin_regex.disabled(bool) - If true, specifies the CORS policy is disabled.exposeHeaders(list) - Specifies the content for the Access-Control-Expose-Headers header.maxAge(float) - Specifies how long the results of a preflight request can be cached. This translates to the content for the Access-Control-Max-Age header.
faultInjectionPolicy(dict) - The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy. Structure is documented below.abort(dict) - The specification for how client requests are aborted as part of fault injection. Structure is documented below.httpStatus(float) - The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive.percentage(float) - The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
delay(dict) - The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. Structure is documented below.fixedDelay(dict) - Specifies the value of the fixed delay interval. Structure is documented below.nanos(float) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(str) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
percentage(float) - The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
requestMirrorPolicy(dict) - Specifies the policy on how requests intended for the route’s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. Structure is documented below.backend_service(str) - The default RegionBackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
retryPolicy(dict) - Specifies the retry policy associated with this route. Structure is documented below.numRetries(float) - Specifies the allowed number retries. This number must be > 0.perTryTimeout(dict) - Specifies a non-zero timeout per retry attempt. Structure is documented below.nanos(float) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(str) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
retryConditions(list) - Specifies one or more conditions when this retry rule applies. Valid values are:5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
refused-stream: Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled
deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
timeout(dict) - Specifies the timeout for the selected route. Timeout is computed from the time the request is has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, the default value is 15 seconds. Structure is documented below.nanos(float) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(str) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
urlRewrite(dict) - The spec to modify the URL of the request, prior to forwarding the request to the matched service Structure is documented below.hostRewrite(str) - Prior to forwarding the request to the selected service, the request’s host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters.pathPrefixRewrite(str) - Prior to forwarding the request to the selected backend service, the matching portion of the request’s path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters.
weightedBackendServices(list) - A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. Structure is documented below.backend_service(str) - The default RegionBackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.header_action(dict) - Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. Structure is documented below.requestHeadersToAdds(list) - Headers to add to a matching request prior to forwarding the request to the backendService. Structure is documented below.headerName(str) - The name of the header.headerValue(str) - The value of the header to add.replace(bool) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
requestHeadersToRemoves(list) - A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.responseHeadersToAdds(list) - Headers to add the response prior to sending the response back to the client. Structure is documented below.headerName(str) - The name of the header.headerValue(str) - The value of the header to add.replace(bool) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
responseHeadersToRemoves(list) - A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
weight(float) - Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user’s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService’s session affinity policy. The value must be between 0 and 1000
service(str) - A reference to expected RegionBackendService resource the given URL should be mapped to.urlRedirect(dict) - When a path pattern is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. Structure is documented below.hostRedirect(str) - The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters.httpsRedirect(bool) - If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false.pathRedirect(str) - The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.prefixRedirect(str) - The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.redirectResponseCode(str) - The HTTP Status code to use for this RedirectAction. Supported values are:MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
FOUND, which corresponds to 302.
SEE_OTHER which corresponds to 303.
TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
stripQuery(bool) - If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. This field is required to ensure an empty block is not set. The normal default value is false.
routeRules(list) - The list of ordered HTTP route rules. Use this list instead of pathRules when advanced route matching and routing actions are desired. The order of specifying routeRules matters: the first rule that matches will cause its specified routing action to take effect. Within a given pathMatcher, only one of pathRules or routeRules must be set. routeRules are not supported in UrlMaps intended for External load balancers. Structure is documented below.header_action(dict) - Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. Structure is documented below.requestHeadersToAdds(list) - Headers to add to a matching request prior to forwarding the request to the backendService. Structure is documented below.headerName(str) - The name of the header.headerValue(str) - The value of the header to add.replace(bool) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
requestHeadersToRemoves(list) - A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.responseHeadersToAdds(list) - Headers to add the response prior to sending the response back to the client. Structure is documented below.headerName(str) - The name of the header.headerValue(str) - The value of the header to add.replace(bool) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
responseHeadersToRemoves(list) - A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
matchRules(list) - The rules for determining a match. Structure is documented below.fullPathMatch(str) - For satifying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL. FullPathMatch must be between 1 and 1024 characters. Only one of prefixMatch, fullPathMatch or regexMatch must be specified.headerMatches(list) - Specifies a list of header match criteria, all of which must match corresponding headers in the request. Structure is documented below.exactMatch(str) - The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch. Only one of presentMatch, exactMatch and regexMatch must be set.headerName(str) - The name of the header.invertMatch(bool) - If set to false, the headerMatch is considered a match if the match criteria above are met. If set to true, the headerMatch is considered a match if the match criteria above are NOT met. Defaults to false.prefixMatch(str) - The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.presentMatch(bool) - Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not. Only one of presentMatch, exactMatch and regexMatch must be set.rangeMatch(dict) - The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. Structure is documented below.rangeEnd(float) - The end of the range (exclusive).rangeStart(float) - The start of the range (inclusive).
regexMatch(str) - The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript Only one of presentMatch, exactMatch and regexMatch must be set.suffixMatch(str) - The value of the header must end with the contents of suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
ignoreCase(bool) - Specifies that prefixMatch and fullPathMatch matches are case sensitive. Defaults to false.metadata_filters(list) - Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies. For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels in the provided metadata. metadataFilters specified here can be overrides those specified in ForwardingRule that refers to this UrlMap. metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED. Structure is documented below.filterLabels(list) - The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries. Structure is documented below.name(str) - The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.value(str) - The value of the label must match the specified value. value can have a maximum length of 1024 characters.
filterMatchCriteria(str) - Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match. Supported values are:MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
prefixMatch(str) - The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.queryParameterMatches(list) - Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request. Structure is documented below.exactMatch(str) - The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch. Only one of presentMatch, exactMatch and regexMatch must be set.name(str) - The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.presentMatch(bool) - Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not. Only one of presentMatch, exactMatch and regexMatch must be set.regexMatch(str) - The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript Only one of presentMatch, exactMatch and regexMatch must be set.
regexMatch(str) - The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript Only one of presentMatch, exactMatch and regexMatch must be set.
priority(float) - For routeRules within a given pathMatcher, priority determines the order in which load balancer will interpret routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied. You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number between 0 and 2147483647 inclusive. Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules.routeAction(dict) - In response to a matching path, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. Structure is documented below.corsPolicy(dict) - The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing Structure is documented below.allowCredentials(bool) - In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access- Control-Allow-Credentials header. Defaults to false.allowHeaders(list) - Specifies the content for the Access-Control-Allow-Headers header.allowMethods(list) - Specifies the content for the Access-Control-Allow-Methods header.allowOriginRegexes(list) - Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either allow_origins or allow_origin_regex.allowOrigins(list) - Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either allow_origins or allow_origin_regex.disabled(bool) - If true, specifies the CORS policy is disabled.exposeHeaders(list) - Specifies the content for the Access-Control-Expose-Headers header.maxAge(float) - Specifies how long the results of a preflight request can be cached. This translates to the content for the Access-Control-Max-Age header.
faultInjectionPolicy(dict) - The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy. Structure is documented below.abort(dict) - The specification for how client requests are aborted as part of fault injection. Structure is documented below.httpStatus(float) - The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive.percentage(float) - The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
delay(dict) - The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. Structure is documented below.fixedDelay(dict) - Specifies the value of the fixed delay interval. Structure is documented below.nanos(float) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(str) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
percentage(float) - The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
requestMirrorPolicy(dict) - Specifies the policy on how requests intended for the route’s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. Structure is documented below.backend_service(str) - The default RegionBackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
retryPolicy(dict) - Specifies the retry policy associated with this route. Structure is documented below.numRetries(float) - Specifies the allowed number retries. This number must be > 0.perTryTimeout(dict) - Specifies a non-zero timeout per retry attempt. Structure is documented below.nanos(float) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(str) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
retryConditions(list) - Specifies one or more conditions when this retry rule applies. Valid values are:5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
refused-stream: Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled
deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
timeout(dict) - Specifies the timeout for the selected route. Timeout is computed from the time the request is has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, the default value is 15 seconds. Structure is documented below.nanos(float) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(str) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
urlRewrite(dict) - The spec to modify the URL of the request, prior to forwarding the request to the matched service Structure is documented below.hostRewrite(str) - Prior to forwarding the request to the selected service, the request’s host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters.pathPrefixRewrite(str) - Prior to forwarding the request to the selected backend service, the matching portion of the request’s path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters.
weightedBackendServices(list) - A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. Structure is documented below.backend_service(str) - The default RegionBackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.header_action(dict) - Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. Structure is documented below.requestHeadersToAdds(list) - Headers to add to a matching request prior to forwarding the request to the backendService. Structure is documented below.headerName(str) - The name of the header.headerValue(str) - The value of the header to add.replace(bool) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
requestHeadersToRemoves(list) - A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.responseHeadersToAdds(list) - Headers to add the response prior to sending the response back to the client. Structure is documented below.headerName(str) - The name of the header.headerValue(str) - The value of the header to add.replace(bool) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
responseHeadersToRemoves(list) - A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
weight(float) - Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user’s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService’s session affinity policy. The value must be between 0 and 1000
service(str) - A reference to expected RegionBackendService resource the given URL should be mapped to.urlRedirect(dict) - When a path pattern is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. Structure is documented below.hostRedirect(str) - The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters.httpsRedirect(bool) - If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false.pathRedirect(str) - The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.prefixRedirect(str) - The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.redirectResponseCode(str) - The HTTP Status code to use for this RedirectAction. Supported values are:MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
FOUND, which corresponds to 302.
SEE_OTHER which corresponds to 303.
TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
stripQuery(bool) - If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. This field is required to ensure an empty block is not set. The normal default value is false.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region: pulumi.Output[str] = None¶The Region in which the url map should reside. If it is not provided, the provider region is used.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
tests: pulumi.Output[list] = None¶The list of expected URL mappings. Requests to update this UrlMap will succeed only if all of the test cases pass. Structure is documented below.
description(str) - Description of this test case.host(str) - Host portion of the URL.path(str) - Path portion of the URL.service(str) - A reference to expected RegionBackendService resource the given URL should be mapped to.
- static
get(resource_name, id, opts=None, creation_timestamp=None, default_service=None, default_url_redirect=None, description=None, fingerprint=None, host_rules=None, map_id=None, name=None, path_matchers=None, project=None, region=None, self_link=None, tests=None)¶ Get an existing RegionUrlMap resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
default_service (pulumi.Input[str]) – A reference to a RegionBackendService resource. This will be used if none of the pathRules defined by this PathMatcher is matched by the URL’s path portion.
default_url_redirect (pulumi.Input[dict]) – When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. Structure is documented below.
description (pulumi.Input[str]) – Description of this test case.
fingerprint (pulumi.Input[str]) – Fingerprint of this resource. This field is used internally during updates of this resource.
host_rules (pulumi.Input[list]) – The list of HostRules to use against the URL. Structure is documented below.
map_id (pulumi.Input[float]) – The unique identifier for the resource.
name (pulumi.Input[str]) – The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.
path_matchers (pulumi.Input[list]) – The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL’s host portion.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – The Region in which the url map should reside. If it is not provided, the provider region is used.
self_link (pulumi.Input[str]) – The URI of the created resource.
tests (pulumi.Input[list]) – The list of expected URL mappings. Requests to update this UrlMap will succeed only if all of the test cases pass. Structure is documented below.
The default_url_redirect object supports the following:
hostRedirect(pulumi.Input[str]) - The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters.httpsRedirect(pulumi.Input[bool]) - If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false.pathRedirect(pulumi.Input[str]) - The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.prefixRedirect(pulumi.Input[str]) - The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.redirectResponseCode(pulumi.Input[str]) - The HTTP Status code to use for this RedirectAction. Supported values are:MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
FOUND, which corresponds to 302.
SEE_OTHER which corresponds to 303.
TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
stripQuery(pulumi.Input[bool]) - If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. This field is required to ensure an empty block is not set. The normal default value is false.
The host_rules object supports the following:
description(pulumi.Input[str]) - Description of this test case.hosts(pulumi.Input[list]) - The list of host patterns to match. They must be valid hostnames, except * will match any string of ([a-z0-9-.]*). In that case, * must be the first character and must be followed in the pattern by either - or ..pathMatcher(pulumi.Input[str]) - The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL’s host portion.
The path_matchers object supports the following:
default_service(pulumi.Input[str]) - A reference to a RegionBackendService resource. This will be used if none of the pathRules defined by this PathMatcher is matched by the URL’s path portion.default_url_redirect(pulumi.Input[dict]) - When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. Structure is documented below.hostRedirect(pulumi.Input[str]) - The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters.httpsRedirect(pulumi.Input[bool]) - If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false.pathRedirect(pulumi.Input[str]) - The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.prefixRedirect(pulumi.Input[str]) - The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.redirectResponseCode(pulumi.Input[str]) - The HTTP Status code to use for this RedirectAction. Supported values are:MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
FOUND, which corresponds to 302.
SEE_OTHER which corresponds to 303.
TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
stripQuery(pulumi.Input[bool]) - If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. This field is required to ensure an empty block is not set. The normal default value is false.
description(pulumi.Input[str]) - Description of this test case.name(pulumi.Input[str]) - The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.pathRules(pulumi.Input[list]) - The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that’s required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis. For example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list. Within a given pathMatcher, only one of pathRules or routeRules must be set. Structure is documented below.paths(pulumi.Input[list]) - The list of path patterns to match. Each must start with / and the only place ais allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here.
routeAction(pulumi.Input[dict]) - In response to a matching path, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. Structure is documented below.corsPolicy(pulumi.Input[dict]) - The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing Structure is documented below.allowCredentials(pulumi.Input[bool]) - In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access- Control-Allow-Credentials header. Defaults to false.allowHeaders(pulumi.Input[list]) - Specifies the content for the Access-Control-Allow-Headers header.allowMethods(pulumi.Input[list]) - Specifies the content for the Access-Control-Allow-Methods header.allowOriginRegexes(pulumi.Input[list]) - Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either allow_origins or allow_origin_regex.allowOrigins(pulumi.Input[list]) - Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either allow_origins or allow_origin_regex.disabled(pulumi.Input[bool]) - If true, specifies the CORS policy is disabled.exposeHeaders(pulumi.Input[list]) - Specifies the content for the Access-Control-Expose-Headers header.maxAge(pulumi.Input[float]) - Specifies how long the results of a preflight request can be cached. This translates to the content for the Access-Control-Max-Age header.
faultInjectionPolicy(pulumi.Input[dict]) - The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy. Structure is documented below.abort(pulumi.Input[dict]) - The specification for how client requests are aborted as part of fault injection. Structure is documented below.httpStatus(pulumi.Input[float]) - The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive.percentage(pulumi.Input[float]) - The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
delay(pulumi.Input[dict]) - The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. Structure is documented below.fixedDelay(pulumi.Input[dict]) - Specifies the value of the fixed delay interval. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
percentage(pulumi.Input[float]) - The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
requestMirrorPolicy(pulumi.Input[dict]) - Specifies the policy on how requests intended for the route’s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. Structure is documented below.backend_service(pulumi.Input[str]) - The default RegionBackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
retryPolicy(pulumi.Input[dict]) - Specifies the retry policy associated with this route. Structure is documented below.numRetries(pulumi.Input[float]) - Specifies the allowed number retries. This number must be > 0.perTryTimeout(pulumi.Input[dict]) - Specifies a non-zero timeout per retry attempt. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
retryConditions(pulumi.Input[list]) - Specifies one or more conditions when this retry rule applies. Valid values are:5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
refused-stream: Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled
deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
timeout(pulumi.Input[dict]) - Specifies the timeout for the selected route. Timeout is computed from the time the request is has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, the default value is 15 seconds. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
urlRewrite(pulumi.Input[dict]) - The spec to modify the URL of the request, prior to forwarding the request to the matched service Structure is documented below.hostRewrite(pulumi.Input[str]) - Prior to forwarding the request to the selected service, the request’s host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters.pathPrefixRewrite(pulumi.Input[str]) - Prior to forwarding the request to the selected backend service, the matching portion of the request’s path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters.
weightedBackendServices(pulumi.Input[list]) - A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. Structure is documented below.backend_service(pulumi.Input[str]) - The default RegionBackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.header_action(pulumi.Input[dict]) - Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. Structure is documented below.requestHeadersToAdds(pulumi.Input[list]) - Headers to add to a matching request prior to forwarding the request to the backendService. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
requestHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.responseHeadersToAdds(pulumi.Input[list]) - Headers to add the response prior to sending the response back to the client. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
responseHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
weight(pulumi.Input[float]) - Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user’s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService’s session affinity policy. The value must be between 0 and 1000
service(pulumi.Input[str]) - A reference to expected RegionBackendService resource the given URL should be mapped to.urlRedirect(pulumi.Input[dict]) - When a path pattern is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. Structure is documented below.hostRedirect(pulumi.Input[str]) - The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters.httpsRedirect(pulumi.Input[bool]) - If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false.pathRedirect(pulumi.Input[str]) - The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.prefixRedirect(pulumi.Input[str]) - The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.redirectResponseCode(pulumi.Input[str]) - The HTTP Status code to use for this RedirectAction. Supported values are:MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
FOUND, which corresponds to 302.
SEE_OTHER which corresponds to 303.
TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
stripQuery(pulumi.Input[bool]) - If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. This field is required to ensure an empty block is not set. The normal default value is false.
routeRules(pulumi.Input[list]) - The list of ordered HTTP route rules. Use this list instead of pathRules when advanced route matching and routing actions are desired. The order of specifying routeRules matters: the first rule that matches will cause its specified routing action to take effect. Within a given pathMatcher, only one of pathRules or routeRules must be set. routeRules are not supported in UrlMaps intended for External load balancers. Structure is documented below.header_action(pulumi.Input[dict]) - Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. Structure is documented below.requestHeadersToAdds(pulumi.Input[list]) - Headers to add to a matching request prior to forwarding the request to the backendService. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
requestHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.responseHeadersToAdds(pulumi.Input[list]) - Headers to add the response prior to sending the response back to the client. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
responseHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
matchRules(pulumi.Input[list]) - The rules for determining a match. Structure is documented below.fullPathMatch(pulumi.Input[str]) - For satifying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL. FullPathMatch must be between 1 and 1024 characters. Only one of prefixMatch, fullPathMatch or regexMatch must be specified.headerMatches(pulumi.Input[list]) - Specifies a list of header match criteria, all of which must match corresponding headers in the request. Structure is documented below.exactMatch(pulumi.Input[str]) - The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch. Only one of presentMatch, exactMatch and regexMatch must be set.headerName(pulumi.Input[str]) - The name of the header.invertMatch(pulumi.Input[bool]) - If set to false, the headerMatch is considered a match if the match criteria above are met. If set to true, the headerMatch is considered a match if the match criteria above are NOT met. Defaults to false.prefixMatch(pulumi.Input[str]) - The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.presentMatch(pulumi.Input[bool]) - Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not. Only one of presentMatch, exactMatch and regexMatch must be set.rangeMatch(pulumi.Input[dict]) - The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. Structure is documented below.rangeEnd(pulumi.Input[float]) - The end of the range (exclusive).rangeStart(pulumi.Input[float]) - The start of the range (inclusive).
regexMatch(pulumi.Input[str]) - The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript Only one of presentMatch, exactMatch and regexMatch must be set.suffixMatch(pulumi.Input[str]) - The value of the header must end with the contents of suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
ignoreCase(pulumi.Input[bool]) - Specifies that prefixMatch and fullPathMatch matches are case sensitive. Defaults to false.metadata_filters(pulumi.Input[list]) - Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies. For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels in the provided metadata. metadataFilters specified here can be overrides those specified in ForwardingRule that refers to this UrlMap. metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED. Structure is documented below.filterLabels(pulumi.Input[list]) - The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries. Structure is documented below.name(pulumi.Input[str]) - The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.value(pulumi.Input[str]) - The value of the label must match the specified value. value can have a maximum length of 1024 characters.
filterMatchCriteria(pulumi.Input[str]) - Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match. Supported values are:MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
prefixMatch(pulumi.Input[str]) - The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.queryParameterMatches(pulumi.Input[list]) - Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request. Structure is documented below.exactMatch(pulumi.Input[str]) - The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch. Only one of presentMatch, exactMatch and regexMatch must be set.name(pulumi.Input[str]) - The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.presentMatch(pulumi.Input[bool]) - Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not. Only one of presentMatch, exactMatch and regexMatch must be set.regexMatch(pulumi.Input[str]) - The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript Only one of presentMatch, exactMatch and regexMatch must be set.
regexMatch(pulumi.Input[str]) - The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript Only one of presentMatch, exactMatch and regexMatch must be set.
priority(pulumi.Input[float]) - For routeRules within a given pathMatcher, priority determines the order in which load balancer will interpret routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied. You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number between 0 and 2147483647 inclusive. Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules.routeAction(pulumi.Input[dict]) - In response to a matching path, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. Structure is documented below.corsPolicy(pulumi.Input[dict]) - The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing Structure is documented below.allowCredentials(pulumi.Input[bool]) - In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access- Control-Allow-Credentials header. Defaults to false.allowHeaders(pulumi.Input[list]) - Specifies the content for the Access-Control-Allow-Headers header.allowMethods(pulumi.Input[list]) - Specifies the content for the Access-Control-Allow-Methods header.allowOriginRegexes(pulumi.Input[list]) - Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either allow_origins or allow_origin_regex.allowOrigins(pulumi.Input[list]) - Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either allow_origins or allow_origin_regex.disabled(pulumi.Input[bool]) - If true, specifies the CORS policy is disabled.exposeHeaders(pulumi.Input[list]) - Specifies the content for the Access-Control-Expose-Headers header.maxAge(pulumi.Input[float]) - Specifies how long the results of a preflight request can be cached. This translates to the content for the Access-Control-Max-Age header.
faultInjectionPolicy(pulumi.Input[dict]) - The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy. Structure is documented below.abort(pulumi.Input[dict]) - The specification for how client requests are aborted as part of fault injection. Structure is documented below.httpStatus(pulumi.Input[float]) - The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive.percentage(pulumi.Input[float]) - The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
delay(pulumi.Input[dict]) - The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. Structure is documented below.fixedDelay(pulumi.Input[dict]) - Specifies the value of the fixed delay interval. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
percentage(pulumi.Input[float]) - The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
requestMirrorPolicy(pulumi.Input[dict]) - Specifies the policy on how requests intended for the route’s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. Structure is documented below.backend_service(pulumi.Input[str]) - The default RegionBackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.
retryPolicy(pulumi.Input[dict]) - Specifies the retry policy associated with this route. Structure is documented below.numRetries(pulumi.Input[float]) - Specifies the allowed number retries. This number must be > 0.perTryTimeout(pulumi.Input[dict]) - Specifies a non-zero timeout per retry attempt. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
retryConditions(pulumi.Input[list]) - Specifies one or more conditions when this retry rule applies. Valid values are:5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams.
gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.
connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts.
retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409.
refused-stream: Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.
cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled
deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded
resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted
unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
timeout(pulumi.Input[dict]) - Specifies the timeout for the selected route. Timeout is computed from the time the request is has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, the default value is 15 seconds. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0secondsfield and a positivenanosfield. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive.
urlRewrite(pulumi.Input[dict]) - The spec to modify the URL of the request, prior to forwarding the request to the matched service Structure is documented below.hostRewrite(pulumi.Input[str]) - Prior to forwarding the request to the selected service, the request’s host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters.pathPrefixRewrite(pulumi.Input[str]) - Prior to forwarding the request to the selected backend service, the matching portion of the request’s path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters.
weightedBackendServices(pulumi.Input[list]) - A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. Structure is documented below.backend_service(pulumi.Input[str]) - The default RegionBackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.header_action(pulumi.Input[dict]) - Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. Structure is documented below.requestHeadersToAdds(pulumi.Input[list]) - Headers to add to a matching request prior to forwarding the request to the backendService. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
requestHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.responseHeadersToAdds(pulumi.Input[list]) - Headers to add the response prior to sending the response back to the client. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
responseHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
weight(pulumi.Input[float]) - Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user’s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService’s session affinity policy. The value must be between 0 and 1000
service(pulumi.Input[str]) - A reference to expected RegionBackendService resource the given URL should be mapped to.urlRedirect(pulumi.Input[dict]) - When a path pattern is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. Structure is documented below.hostRedirect(pulumi.Input[str]) - The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters.httpsRedirect(pulumi.Input[bool]) - If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false.pathRedirect(pulumi.Input[str]) - The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.prefixRedirect(pulumi.Input[str]) - The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.redirectResponseCode(pulumi.Input[str]) - The HTTP Status code to use for this RedirectAction. Supported values are:MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
FOUND, which corresponds to 302.
SEE_OTHER which corresponds to 303.
TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
stripQuery(pulumi.Input[bool]) - If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. This field is required to ensure an empty block is not set. The normal default value is false.
The tests object supports the following:
description(pulumi.Input[str]) - Description of this test case.host(pulumi.Input[str]) - Host portion of the URL.path(pulumi.Input[str]) - Path portion of the URL.service(pulumi.Input[str]) - A reference to expected RegionBackendService resource the given URL should be mapped to.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.Reservation(resource_name, opts=None, description=None, name=None, project=None, specific_reservation=None, specific_reservation_required=None, zone=None, __props__=None, __name__=None, __opts__=None)¶ Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running.
Reservations apply only to Compute Engine, Cloud Dataproc, and Google Kubernetes Engine VM usage.Reservations do not apply to
f1-microorg1-smallmachine types, preemptible VMs, sole tenant nodes, or other services not listed above like Cloud SQL and Dataflow.To get more information about Reservation, see:
How-to Guides
import pulumi import pulumi_gcp as gcp gce_reservation = gcp.compute.Reservation("gceReservation", specific_reservation={ "count": 1, "instanceProperties": { "machine_type": "n2-standard-2", "min_cpu_platform": "Intel Cascade Lake", }, }, zone="us-central1-a")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – An optional description of this resource.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
specific_reservation (pulumi.Input[dict]) – Reservation for instances with specific machine shapes. Structure is documented below.
specific_reservation_required (pulumi.Input[bool]) – When set to true, only VMs that target this reservation by name can consume this reservation. Otherwise, it can be consumed by VMs with affinity for any reservation. Defaults to false.
zone (pulumi.Input[str]) – The zone where the reservation is made.
The specific_reservation object supports the following:
count(pulumi.Input[float]) - The number of resources that are allocated.inUseCount(pulumi.Input[float]) - - How many instances are in use.instanceProperties(pulumi.Input[dict]) - The instance properties for the reservation. Structure is documented below.guest_accelerators(pulumi.Input[list]) - Guest accelerator type and count. Structure is documented below.acceleratorCount(pulumi.Input[float]) - The number of the guest accelerator cards exposed to this instance.accelerator_type(pulumi.Input[str]) - The full or partial URL of the accelerator type to attach to this instance. For example:projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100If you are creating an instance template, specify only the accelerator name.
localSsds(pulumi.Input[list]) - The amount of local ssd to reserve with each instance. This reserves disks of typelocal-ssd. Structure is documented below.disk_size_gb(pulumi.Input[float]) - The size of the disk in base-2 GB.interface(pulumi.Input[str]) - The disk interface to use for attaching this disk.
machine_type(pulumi.Input[str]) - The name of the machine type to reserve.min_cpu_platform(pulumi.Input[str]) - The minimum CPU platform for the reservation. For example,"Intel Skylake". See the CPU platform availability reference](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform#availablezones) for information on available CPU platforms.
commitment: pulumi.Output[str] = None¶Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional description of this resource.
name: pulumi.Output[str] = None¶Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
specific_reservation: pulumi.Output[dict] = None¶Reservation for instances with specific machine shapes. Structure is documented below.
count(float) - The number of resources that are allocated.inUseCount(float) - - How many instances are in use.instanceProperties(dict) - The instance properties for the reservation. Structure is documented below.guest_accelerators(list) - Guest accelerator type and count. Structure is documented below.acceleratorCount(float) - The number of the guest accelerator cards exposed to this instance.accelerator_type(str) - The full or partial URL of the accelerator type to attach to this instance. For example:projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100If you are creating an instance template, specify only the accelerator name.
localSsds(list) - The amount of local ssd to reserve with each instance. This reserves disks of typelocal-ssd. Structure is documented below.disk_size_gb(float) - The size of the disk in base-2 GB.interface(str) - The disk interface to use for attaching this disk.
machine_type(str) - The name of the machine type to reserve.min_cpu_platform(str) - The minimum CPU platform for the reservation. For example,"Intel Skylake". See the CPU platform availability reference](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform#availablezones) for information on available CPU platforms.
specific_reservation_required: pulumi.Output[bool] = None¶When set to true, only VMs that target this reservation by name can consume this reservation. Otherwise, it can be consumed by VMs with affinity for any reservation. Defaults to false.
status: pulumi.Output[str] = None¶The status of the reservation.
zone: pulumi.Output[str] = None¶The zone where the reservation is made.
- static
get(resource_name, id, opts=None, commitment=None, creation_timestamp=None, description=None, name=None, project=None, self_link=None, specific_reservation=None, specific_reservation_required=None, status=None, zone=None)¶ Get an existing Reservation resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
commitment (pulumi.Input[str]) – Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional description of this resource.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link (pulumi.Input[str]) – The URI of the created resource.
specific_reservation (pulumi.Input[dict]) – Reservation for instances with specific machine shapes. Structure is documented below.
specific_reservation_required (pulumi.Input[bool]) – When set to true, only VMs that target this reservation by name can consume this reservation. Otherwise, it can be consumed by VMs with affinity for any reservation. Defaults to false.
status (pulumi.Input[str]) – The status of the reservation.
zone (pulumi.Input[str]) – The zone where the reservation is made.
The specific_reservation object supports the following:
count(pulumi.Input[float]) - The number of resources that are allocated.inUseCount(pulumi.Input[float]) - - How many instances are in use.instanceProperties(pulumi.Input[dict]) - The instance properties for the reservation. Structure is documented below.guest_accelerators(pulumi.Input[list]) - Guest accelerator type and count. Structure is documented below.acceleratorCount(pulumi.Input[float]) - The number of the guest accelerator cards exposed to this instance.accelerator_type(pulumi.Input[str]) - The full or partial URL of the accelerator type to attach to this instance. For example:projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100If you are creating an instance template, specify only the accelerator name.
localSsds(pulumi.Input[list]) - The amount of local ssd to reserve with each instance. This reserves disks of typelocal-ssd. Structure is documented below.disk_size_gb(pulumi.Input[float]) - The size of the disk in base-2 GB.interface(pulumi.Input[str]) - The disk interface to use for attaching this disk.
machine_type(pulumi.Input[str]) - The name of the machine type to reserve.min_cpu_platform(pulumi.Input[str]) - The minimum CPU platform for the reservation. For example,"Intel Skylake". See the CPU platform availability reference](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform#availablezones) for information on available CPU platforms.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.ResourcePolicy(resource_name, opts=None, group_placement_policy=None, name=None, project=None, region=None, snapshot_schedule_policy=None, __props__=None, __name__=None, __opts__=None)¶ A policy that can be attached to a resource to specify or schedule actions on that resource.
import pulumi import pulumi_gcp as gcp foo = gcp.compute.ResourcePolicy("foo", region="us-central1", snapshot_schedule_policy={ "schedule": { "dailySchedule": { "daysInCycle": 1, "startTime": "04:00", }, }, })
import pulumi import pulumi_gcp as gcp bar = gcp.compute.ResourcePolicy("bar", region="us-central1", snapshot_schedule_policy={ "retention_policy": { "maxRetentionDays": 10, "onSourceDiskDelete": "KEEP_AUTO_SNAPSHOTS", }, "schedule": { "hourlySchedule": { "hoursInCycle": 20, "startTime": "23:00", }, }, "snapshotProperties": { "guestFlush": True, "labels": { "myLabel": "value", }, "storageLocations": "us", }, })
import pulumi import pulumi_gcp as gcp baz = gcp.compute.ResourcePolicy("baz", group_placement_policy={ "collocation": "COLLOCATED", "vmCount": 2, }, region="us-central1")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
group_placement_policy (pulumi.Input[dict]) – Policy for creating snapshots of persistent disks. Structure is documented below.
name (pulumi.Input[str]) – The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – Region where resource policy resides.
snapshot_schedule_policy (pulumi.Input[dict]) – Policy for creating snapshots of persistent disks. Structure is documented below.
The group_placement_policy object supports the following:
availabilityDomainCount(pulumi.Input[float]) - The number of availability domains instances will be spread across. If two instances are in different availability domain, they will not be put in the same low latency networkcollocation(pulumi.Input[str]) - Collocation specifies whether to place VMs inside the same availability domain on the same low-latency network. SpecifyCOLLOCATEDto enable collocation. Can only be specified withvm_count. If compute instances are created with a COLLOCATED policy, then exactlyvm_countinstances must be created at the same time with the resource policy attached.vmCount(pulumi.Input[float]) - Number of vms in this placement group.
The snapshot_schedule_policy object supports the following:
retention_policy(pulumi.Input[dict]) - Retention policy applied to snapshots created by this resource policy. Structure is documented below.maxRetentionDays(pulumi.Input[float]) - Maximum age of the snapshot that is allowed to be kept.onSourceDiskDelete(pulumi.Input[str]) - Specifies the behavior to apply to scheduled snapshots when the source disk is deleted.
schedule(pulumi.Input[dict]) - Contains one of anhourlySchedule,dailySchedule, orweeklySchedule. Structure is documented below.dailySchedule(pulumi.Input[dict]) - The policy will execute every nth day at the specified time. Structure is documented below.daysInCycle(pulumi.Input[float]) - The number of days between snapshots.startTime(pulumi.Input[str]) - Time within the window to start the operations. It must be in format “HH:MM”, where HH : [00-23] and MM : [00-00] GMT.
hourlySchedule(pulumi.Input[dict]) - The policy will execute every nth hour starting at the specified time. Structure is documented below.hoursInCycle(pulumi.Input[float]) - The number of hours between snapshots.startTime(pulumi.Input[str]) - Time within the window to start the operations. It must be in format “HH:MM”, where HH : [00-23] and MM : [00-00] GMT.
weeklySchedule(pulumi.Input[dict]) - Allows specifying a snapshot time for each day of the week. Structure is documented below.dayOfWeeks(pulumi.Input[list]) - May contain up to seven (one for each day of the week) snapshot times. Structure is documented below.day(pulumi.Input[str]) - The day of the week to create the snapshot. e.g. MONDAYstartTime(pulumi.Input[str]) - Time within the window to start the operations. It must be in format “HH:MM”, where HH : [00-23] and MM : [00-00] GMT.
snapshotProperties(pulumi.Input[dict]) - Properties with which the snapshots are created, such as labels. Structure is documented below.guestFlush(pulumi.Input[bool]) - Whether to perform a ‘guest aware’ snapshot.labels(pulumi.Input[dict]) - A set of key-value pairs.storageLocations(pulumi.Input[str]) - Cloud Storage bucket location to store the auto snapshot (regional or multi-regional)
group_placement_policy: pulumi.Output[dict] = None¶Policy for creating snapshots of persistent disks. Structure is documented below.
availabilityDomainCount(float) - The number of availability domains instances will be spread across. If two instances are in different availability domain, they will not be put in the same low latency networkcollocation(str) - Collocation specifies whether to place VMs inside the same availability domain on the same low-latency network. SpecifyCOLLOCATEDto enable collocation. Can only be specified withvm_count. If compute instances are created with a COLLOCATED policy, then exactlyvm_countinstances must be created at the same time with the resource policy attached.vmCount(float) - Number of vms in this placement group.
name: pulumi.Output[str] = None¶The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region: pulumi.Output[str] = None¶Region where resource policy resides.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
snapshot_schedule_policy: pulumi.Output[dict] = None¶Policy for creating snapshots of persistent disks. Structure is documented below.
retention_policy(dict) - Retention policy applied to snapshots created by this resource policy. Structure is documented below.maxRetentionDays(float) - Maximum age of the snapshot that is allowed to be kept.onSourceDiskDelete(str) - Specifies the behavior to apply to scheduled snapshots when the source disk is deleted.
schedule(dict) - Contains one of anhourlySchedule,dailySchedule, orweeklySchedule. Structure is documented below.dailySchedule(dict) - The policy will execute every nth day at the specified time. Structure is documented below.daysInCycle(float) - The number of days between snapshots.startTime(str) - Time within the window to start the operations. It must be in format “HH:MM”, where HH : [00-23] and MM : [00-00] GMT.
hourlySchedule(dict) - The policy will execute every nth hour starting at the specified time. Structure is documented below.hoursInCycle(float) - The number of hours between snapshots.startTime(str) - Time within the window to start the operations. It must be in format “HH:MM”, where HH : [00-23] and MM : [00-00] GMT.
weeklySchedule(dict) - Allows specifying a snapshot time for each day of the week. Structure is documented below.dayOfWeeks(list) - May contain up to seven (one for each day of the week) snapshot times. Structure is documented below.day(str) - The day of the week to create the snapshot. e.g. MONDAYstartTime(str) - Time within the window to start the operations. It must be in format “HH:MM”, where HH : [00-23] and MM : [00-00] GMT.
snapshotProperties(dict) - Properties with which the snapshots are created, such as labels. Structure is documented below.guestFlush(bool) - Whether to perform a ‘guest aware’ snapshot.labels(dict) - A set of key-value pairs.storageLocations(str) - Cloud Storage bucket location to store the auto snapshot (regional or multi-regional)
- static
get(resource_name, id, opts=None, group_placement_policy=None, name=None, project=None, region=None, self_link=None, snapshot_schedule_policy=None)¶ Get an existing ResourcePolicy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
group_placement_policy (pulumi.Input[dict]) – Policy for creating snapshots of persistent disks. Structure is documented below.
name (pulumi.Input[str]) – The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – Region where resource policy resides.
self_link (pulumi.Input[str]) – The URI of the created resource.
snapshot_schedule_policy (pulumi.Input[dict]) – Policy for creating snapshots of persistent disks. Structure is documented below.
The group_placement_policy object supports the following:
availabilityDomainCount(pulumi.Input[float]) - The number of availability domains instances will be spread across. If two instances are in different availability domain, they will not be put in the same low latency networkcollocation(pulumi.Input[str]) - Collocation specifies whether to place VMs inside the same availability domain on the same low-latency network. SpecifyCOLLOCATEDto enable collocation. Can only be specified withvm_count. If compute instances are created with a COLLOCATED policy, then exactlyvm_countinstances must be created at the same time with the resource policy attached.vmCount(pulumi.Input[float]) - Number of vms in this placement group.
The snapshot_schedule_policy object supports the following:
retention_policy(pulumi.Input[dict]) - Retention policy applied to snapshots created by this resource policy. Structure is documented below.maxRetentionDays(pulumi.Input[float]) - Maximum age of the snapshot that is allowed to be kept.onSourceDiskDelete(pulumi.Input[str]) - Specifies the behavior to apply to scheduled snapshots when the source disk is deleted.
schedule(pulumi.Input[dict]) - Contains one of anhourlySchedule,dailySchedule, orweeklySchedule. Structure is documented below.dailySchedule(pulumi.Input[dict]) - The policy will execute every nth day at the specified time. Structure is documented below.daysInCycle(pulumi.Input[float]) - The number of days between snapshots.startTime(pulumi.Input[str]) - Time within the window to start the operations. It must be in format “HH:MM”, where HH : [00-23] and MM : [00-00] GMT.
hourlySchedule(pulumi.Input[dict]) - The policy will execute every nth hour starting at the specified time. Structure is documented below.hoursInCycle(pulumi.Input[float]) - The number of hours between snapshots.startTime(pulumi.Input[str]) - Time within the window to start the operations. It must be in format “HH:MM”, where HH : [00-23] and MM : [00-00] GMT.
weeklySchedule(pulumi.Input[dict]) - Allows specifying a snapshot time for each day of the week. Structure is documented below.dayOfWeeks(pulumi.Input[list]) - May contain up to seven (one for each day of the week) snapshot times. Structure is documented below.day(pulumi.Input[str]) - The day of the week to create the snapshot. e.g. MONDAYstartTime(pulumi.Input[str]) - Time within the window to start the operations. It must be in format “HH:MM”, where HH : [00-23] and MM : [00-00] GMT.
snapshotProperties(pulumi.Input[dict]) - Properties with which the snapshots are created, such as labels. Structure is documented below.guestFlush(pulumi.Input[bool]) - Whether to perform a ‘guest aware’ snapshot.labels(pulumi.Input[dict]) - A set of key-value pairs.storageLocations(pulumi.Input[str]) - Cloud Storage bucket location to store the auto snapshot (regional or multi-regional)
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.Route(resource_name, opts=None, description=None, dest_range=None, name=None, network=None, next_hop_gateway=None, next_hop_ilb=None, next_hop_instance=None, next_hop_instance_zone=None, next_hop_ip=None, next_hop_vpn_tunnel=None, priority=None, project=None, tags=None, __props__=None, __name__=None, __opts__=None)¶ Represents a Route resource.
A route is a rule that specifies how certain packets should be handled by the virtual network. Routes are associated with virtual machines by tag, and the set of routes for a particular virtual machine is called its routing table. For each packet leaving a virtual machine, the system searches that virtual machine’s routing table for a single best matching route.
Routes match packets by destination IP address, preferring smaller or more specific ranges over larger ones. If there is a tie, the system selects the route with the smallest priority value. If there is still a tie, it uses the layer three and four packet headers to select just one of the remaining matching routes. The packet is then forwarded as specified by the next_hop field of the winning route – either to another virtual machine destination, a virtual machine gateway or a Compute Engine-operated gateway. Packets that do not match any route in the sending virtual machine’s routing table will be dropped.
A Route resource must have exactly one specification of either nextHopGateway, nextHopInstance, nextHopIp, nextHopVpnTunnel, or nextHopIlb.
To get more information about Route, see:
How-to Guides
import pulumi import pulumi_gcp as gcp default_network = gcp.compute.Network("defaultNetwork") default_route = gcp.compute.Route("defaultRoute", dest_range="15.0.0.0/24", network=default_network.name, next_hop_ip="10.132.1.5", priority=100)
import pulumi import pulumi_gcp as gcp default_network = gcp.compute.Network("defaultNetwork", auto_create_subnetworks=False) default_subnetwork = gcp.compute.Subnetwork("defaultSubnetwork", ip_cidr_range="10.0.1.0/24", region="us-central1", network=default_network.id) hc = gcp.compute.HealthCheck("hc", check_interval_sec=1, timeout_sec=1, tcp_health_check={ "port": "80", }) backend = gcp.compute.RegionBackendService("backend", region="us-central1", health_checks=[hc.id]) default_forwarding_rule = gcp.compute.ForwardingRule("defaultForwardingRule", region="us-central1", load_balancing_scheme="INTERNAL", backend_service=backend.id, all_ports=True, network=default_network.name, subnetwork=default_subnetwork.name) route_ilb = gcp.compute.Route("route-ilb", dest_range="0.0.0.0/0", network=default_network.name, next_hop_ilb=default_forwarding_rule.id, priority=2000)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource.
dest_range (pulumi.Input[str]) – The destination range of outgoing packets that this route applies to. Only IPv4 is supported.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.network (pulumi.Input[str]) – The network that this route applies to.
next_hop_gateway (pulumi.Input[str]) – URL to a gateway that should handle matching packets. Currently, you can only specify the internet gateway, using a full or partial valid URL:
* `https://www.googleapis.com/compute/v1/projects/project/global/gateways/default-internet-gateway` * `projects/project/global/gateways/default-internet-gateway` * `global/gateways/default-internet-gateway` * The string `default-internet-gateway`.
- Parameters
next_hop_ilb (pulumi.Input[str]) – The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets. You can only specify the forwarding rule as a partial or full URL. For example, the following are all valid URLs: https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule regions/region/forwardingRules/forwardingRule Note that this can only be used when the destinationRange is a public (non-RFC 1918) IP CIDR range.
next_hop_instance (pulumi.Input[str]) – URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example:
* `https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance` * `projects/project/zones/zone/instances/instance` * `zones/zone/instances/instance` * Just the instance name, with the zone in `next_hop_instance_zone`.
- Parameters
next_hop_instance_zone (pulumi.Input[str]) – (Optional when
next_hop_instanceis specified) The zone of the instance specified innext_hop_instance. Omit ifnext_hop_instanceis specified as a URL.next_hop_ip (pulumi.Input[str]) – Network IP address of an instance that should handle matching packets.
next_hop_vpn_tunnel (pulumi.Input[str]) – URL to a VpnTunnel that should handle matching packets.
priority (pulumi.Input[float]) – The priority of this route. Priority is used to break ties in cases where there is more than one matching route of equal prefix length. In the case of two routes with equal prefix length, the one with the lowest-numbered priority value wins. Default value is 1000. Valid range is 0 through 65535.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
tags (pulumi.Input[list]) – A list of instance tags to which this route applies.
description: pulumi.Output[str] = None¶An optional description of this resource. Provide this property when you create the resource.
dest_range: pulumi.Output[str] = None¶The destination range of outgoing packets that this route applies to. Only IPv4 is supported.
name: pulumi.Output[str] = None¶Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
network: pulumi.Output[str] = None¶The network that this route applies to.
next_hop_gateway: pulumi.Output[str] = None¶URL to a gateway that should handle matching packets. Currently, you can only specify the internet gateway, using a full or partial valid URL:
https://www.googleapis.com/compute/v1/projects/project/global/gateways/default-internet-gatewayprojects/project/global/gateways/default-internet-gatewayglobal/gateways/default-internet-gatewayThe string
default-internet-gateway.
next_hop_ilb: pulumi.Output[str] = None¶The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets. You can only specify the forwarding rule as a partial or full URL. For example, the following are all valid URLs: https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule regions/region/forwardingRules/forwardingRule Note that this can only be used when the destinationRange is a public (non-RFC 1918) IP CIDR range.
next_hop_instance: pulumi.Output[str] = None¶URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example:
https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instanceprojects/project/zones/zone/instances/instancezones/zone/instances/instanceJust the instance name, with the zone in
next_hop_instance_zone.
next_hop_instance_zone: pulumi.Output[str] = None¶(Optional when
next_hop_instanceis specified) The zone of the instance specified innext_hop_instance. Omit ifnext_hop_instanceis specified as a URL.
next_hop_ip: pulumi.Output[str] = None¶Network IP address of an instance that should handle matching packets.
next_hop_network: pulumi.Output[str] = None¶URL to a Network that should handle matching packets.
next_hop_vpn_tunnel: pulumi.Output[str] = None¶URL to a VpnTunnel that should handle matching packets.
priority: pulumi.Output[float] = None¶The priority of this route. Priority is used to break ties in cases where there is more than one matching route of equal prefix length. In the case of two routes with equal prefix length, the one with the lowest-numbered priority value wins. Default value is 1000. Valid range is 0 through 65535.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
A list of instance tags to which this route applies.
- static
get(resource_name, id, opts=None, description=None, dest_range=None, name=None, network=None, next_hop_gateway=None, next_hop_ilb=None, next_hop_instance=None, next_hop_instance_zone=None, next_hop_ip=None, next_hop_network=None, next_hop_vpn_tunnel=None, priority=None, project=None, self_link=None, tags=None)¶ Get an existing Route resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource.
dest_range (pulumi.Input[str]) – The destination range of outgoing packets that this route applies to. Only IPv4 is supported.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.network (pulumi.Input[str]) – The network that this route applies to.
next_hop_gateway (pulumi.Input[str]) – URL to a gateway that should handle matching packets. Currently, you can only specify the internet gateway, using a full or partial valid URL:
* `https://www.googleapis.com/compute/v1/projects/project/global/gateways/default-internet-gateway` * `projects/project/global/gateways/default-internet-gateway` * `global/gateways/default-internet-gateway` * The string `default-internet-gateway`.
- Parameters
next_hop_ilb (pulumi.Input[str]) – The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets. You can only specify the forwarding rule as a partial or full URL. For example, the following are all valid URLs: https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule regions/region/forwardingRules/forwardingRule Note that this can only be used when the destinationRange is a public (non-RFC 1918) IP CIDR range.
next_hop_instance (pulumi.Input[str]) – URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example:
* `https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance` * `projects/project/zones/zone/instances/instance` * `zones/zone/instances/instance` * Just the instance name, with the zone in `next_hop_instance_zone`.
- Parameters
next_hop_instance_zone (pulumi.Input[str]) – (Optional when
next_hop_instanceis specified) The zone of the instance specified innext_hop_instance. Omit ifnext_hop_instanceis specified as a URL.next_hop_ip (pulumi.Input[str]) – Network IP address of an instance that should handle matching packets.
next_hop_network (pulumi.Input[str]) – URL to a Network that should handle matching packets.
next_hop_vpn_tunnel (pulumi.Input[str]) – URL to a VpnTunnel that should handle matching packets.
priority (pulumi.Input[float]) – The priority of this route. Priority is used to break ties in cases where there is more than one matching route of equal prefix length. In the case of two routes with equal prefix length, the one with the lowest-numbered priority value wins. Default value is 1000. Valid range is 0 through 65535.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link (pulumi.Input[str]) – The URI of the created resource.
tags (pulumi.Input[list]) – A list of instance tags to which this route applies.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.Router(resource_name, opts=None, bgp=None, description=None, name=None, network=None, project=None, region=None, __props__=None, __name__=None, __opts__=None)¶ Represents a Router resource.
To get more information about Router, see:
How-to Guides
import pulumi import pulumi_gcp as gcp foobar_network = gcp.compute.Network("foobarNetwork", auto_create_subnetworks=False) foobar_router = gcp.compute.Router("foobarRouter", network=foobar_network.name, bgp={ "asn": 64514, "advertise_mode": "CUSTOM", "advertised_groups": ["ALL_SUBNETS"], "advertised_ip_ranges": [ { "range": "1.2.3.4", }, { "range": "6.7.0.0/16", }, ], })
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
bgp (pulumi.Input[dict]) – BGP information specific to this router. Structure is documented below.
description (pulumi.Input[str]) – User-specified description for the IP range.
name (pulumi.Input[str]) – Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.network (pulumi.Input[str]) – A reference to the network to which this router belongs.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – Region where the router resides.
The bgp object supports the following:
advertise_mode(pulumi.Input[str]) - User-specified flag to indicate which mode to use for advertisement.advertised_groups(pulumi.Input[list]) - User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertiseMode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. This enum field has the one valid value: ALL_SUBNETSadvertised_ip_ranges(pulumi.Input[list]) - User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertiseMode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. Structure is documented below.description(pulumi.Input[str]) - User-specified description for the IP range.range(pulumi.Input[str]) - The IP range to advertise. The value must be a CIDR-formatted string.
asn(pulumi.Input[float]) - Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
bgp: pulumi.Output[dict] = None¶BGP information specific to this router. Structure is documented below.
advertise_mode(str) - User-specified flag to indicate which mode to use for advertisement.advertised_groups(list) - User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertiseMode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. This enum field has the one valid value: ALL_SUBNETSadvertised_ip_ranges(list) - User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertiseMode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. Structure is documented below.description(str) - User-specified description for the IP range.range(str) - The IP range to advertise. The value must be a CIDR-formatted string.
asn(float) - Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶User-specified description for the IP range.
name: pulumi.Output[str] = None¶Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
network: pulumi.Output[str] = None¶A reference to the network to which this router belongs.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region: pulumi.Output[str] = None¶Region where the router resides.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
- static
get(resource_name, id, opts=None, bgp=None, creation_timestamp=None, description=None, name=None, network=None, project=None, region=None, self_link=None)¶ Get an existing Router resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
bgp (pulumi.Input[dict]) – BGP information specific to this router. Structure is documented below.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – User-specified description for the IP range.
name (pulumi.Input[str]) – Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.network (pulumi.Input[str]) – A reference to the network to which this router belongs.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – Region where the router resides.
self_link (pulumi.Input[str]) – The URI of the created resource.
The bgp object supports the following:
advertise_mode(pulumi.Input[str]) - User-specified flag to indicate which mode to use for advertisement.advertised_groups(pulumi.Input[list]) - User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertiseMode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. This enum field has the one valid value: ALL_SUBNETSadvertised_ip_ranges(pulumi.Input[list]) - User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertiseMode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. Structure is documented below.description(pulumi.Input[str]) - User-specified description for the IP range.range(pulumi.Input[str]) - The IP range to advertise. The value must be a CIDR-formatted string.
asn(pulumi.Input[float]) - Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.RouterInterface(resource_name, opts=None, interconnect_attachment=None, ip_range=None, name=None, project=None, region=None, router=None, vpn_tunnel=None, __props__=None, __name__=None, __opts__=None)¶ Manages a Cloud Router interface. For more information see the official documentation and API.
import pulumi import pulumi_gcp as gcp foobar = gcp.compute.RouterInterface("foobar", ip_range="169.254.1.1/30", region="us-central1", router="router-1", vpn_tunnel="tunnel-1")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
interconnect_attachment (pulumi.Input[str]) – The name or resource link to the VLAN interconnect for this interface. Changing this forces a new interface to be created. Only one of
vpn_tunnelandinterconnect_attachmentcan be specified.ip_range (pulumi.Input[str]) – IP address and range of the interface. The IP range must be in the RFC3927 link-local IP space. Changing this forces a new interface to be created.
name (pulumi.Input[str]) – A unique name for the interface, required by GCE. Changing this forces a new interface to be created.
project (pulumi.Input[str]) – The ID of the project in which this interface’s router belongs. If it is not provided, the provider project is used. Changing this forces a new interface to be created.
region (pulumi.Input[str]) – The region this interface’s router sits in. If not specified, the project region will be used. Changing this forces a new interface to be created.
router (pulumi.Input[str]) – The name of the router this interface will be attached to. Changing this forces a new interface to be created.
vpn_tunnel (pulumi.Input[str]) – The name or resource link to the VPN tunnel this interface will be linked to. Changing this forces a new interface to be created. Only one of
vpn_tunnelandinterconnect_attachmentcan be specified.
interconnect_attachment: pulumi.Output[str] = None¶The name or resource link to the VLAN interconnect for this interface. Changing this forces a new interface to be created. Only one of
vpn_tunnelandinterconnect_attachmentcan be specified.
ip_range: pulumi.Output[str] = None¶IP address and range of the interface. The IP range must be in the RFC3927 link-local IP space. Changing this forces a new interface to be created.
name: pulumi.Output[str] = None¶A unique name for the interface, required by GCE. Changing this forces a new interface to be created.
project: pulumi.Output[str] = None¶The ID of the project in which this interface’s router belongs. If it is not provided, the provider project is used. Changing this forces a new interface to be created.
region: pulumi.Output[str] = None¶The region this interface’s router sits in. If not specified, the project region will be used. Changing this forces a new interface to be created.
router: pulumi.Output[str] = None¶The name of the router this interface will be attached to. Changing this forces a new interface to be created.
vpn_tunnel: pulumi.Output[str] = None¶The name or resource link to the VPN tunnel this interface will be linked to. Changing this forces a new interface to be created. Only one of
vpn_tunnelandinterconnect_attachmentcan be specified.
- static
get(resource_name, id, opts=None, interconnect_attachment=None, ip_range=None, name=None, project=None, region=None, router=None, vpn_tunnel=None)¶ Get an existing RouterInterface resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
interconnect_attachment (pulumi.Input[str]) – The name or resource link to the VLAN interconnect for this interface. Changing this forces a new interface to be created. Only one of
vpn_tunnelandinterconnect_attachmentcan be specified.ip_range (pulumi.Input[str]) – IP address and range of the interface. The IP range must be in the RFC3927 link-local IP space. Changing this forces a new interface to be created.
name (pulumi.Input[str]) – A unique name for the interface, required by GCE. Changing this forces a new interface to be created.
project (pulumi.Input[str]) – The ID of the project in which this interface’s router belongs. If it is not provided, the provider project is used. Changing this forces a new interface to be created.
region (pulumi.Input[str]) – The region this interface’s router sits in. If not specified, the project region will be used. Changing this forces a new interface to be created.
router (pulumi.Input[str]) – The name of the router this interface will be attached to. Changing this forces a new interface to be created.
vpn_tunnel (pulumi.Input[str]) – The name or resource link to the VPN tunnel this interface will be linked to. Changing this forces a new interface to be created. Only one of
vpn_tunnelandinterconnect_attachmentcan be specified.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.RouterNat(resource_name, opts=None, drain_nat_ips=None, icmp_idle_timeout_sec=None, log_config=None, min_ports_per_vm=None, name=None, nat_ip_allocate_option=None, nat_ips=None, project=None, region=None, router=None, source_subnetwork_ip_ranges_to_nat=None, subnetworks=None, tcp_established_idle_timeout_sec=None, tcp_transitory_idle_timeout_sec=None, udp_idle_timeout_sec=None, __props__=None, __name__=None, __opts__=None)¶ A NAT service created in a router.
To get more information about RouterNat, see:
How-to Guides
import pulumi import pulumi_gcp as gcp net = gcp.compute.Network("net") subnet = gcp.compute.Subnetwork("subnet", network=net.id, ip_cidr_range="10.0.0.0/16", region="us-central1") router = gcp.compute.Router("router", region=subnet.region, network=net.id, bgp={ "asn": 64514, }) nat = gcp.compute.RouterNat("nat", router=router.name, region=router.region, nat_ip_allocate_option="AUTO_ONLY", source_subnetwork_ip_ranges_to_nat="ALL_SUBNETWORKS_ALL_IP_RANGES", log_config={ "enable": True, "filter": "ERRORS_ONLY", })
import pulumi import pulumi_gcp as gcp net = gcp.compute.Network("net") subnet = gcp.compute.Subnetwork("subnet", network=net.id, ip_cidr_range="10.0.0.0/16", region="us-central1") router = gcp.compute.Router("router", region=subnet.region, network=net.id) address = [] for range in [{"value": i} for i in range(0, 2)]: address.append(gcp.compute.Address(f"address-{range['value']}", region=subnet.region)) nat_manual = gcp.compute.RouterNat("natManual", router=router.name, region=router.region, nat_ip_allocate_option="MANUAL_ONLY", nat_ips=[__item.id for __item in address], source_subnetwork_ip_ranges_to_nat="LIST_OF_SUBNETWORKS", subnetwork=[{ "name": subnet.id, "sourceIpRangesToNats": ["ALL_IP_RANGES"], }])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
drain_nat_ips (pulumi.Input[list]) – A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT.
icmp_idle_timeout_sec (pulumi.Input[float]) – Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
log_config (pulumi.Input[dict]) – Configuration for logging on NAT Structure is documented below.
min_ports_per_vm (pulumi.Input[float]) – Minimum number of ports allocated to a VM from this NAT.
name (pulumi.Input[str]) – Self-link of subnetwork to NAT
nat_ip_allocate_option (pulumi.Input[str]) – How external IPs should be allocated for this NAT. Valid values are
AUTO_ONLYfor only allowing NAT IPs allocated by Google Cloud Platform, orMANUAL_ONLYfor only user-allocated NAT IP addresses.nat_ips (pulumi.Input[list]) – Self-links of NAT IPs. Only valid if natIpAllocateOption is set to MANUAL_ONLY.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – Region where the router and NAT reside.
router (pulumi.Input[str]) – The name of the Cloud Router in which this NAT will be configured.
source_subnetwork_ip_ranges_to_nat (pulumi.Input[str]) – How NAT should be configured per Subnetwork. If
ALL_SUBNETWORKS_ALL_IP_RANGES, all of the IP ranges in every Subnetwork are allowed to Nat. IfALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, all of the primary IP ranges in every Subnetwork are allowed to Nat.LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field subnetwork below). Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any other RouterNat section in any Router for this network in this region.subnetworks (pulumi.Input[list]) – One or more subnetwork NAT configurations. Only used if
source_subnetwork_ip_ranges_to_natis set toLIST_OF_SUBNETWORKSStructure is documented below.tcp_established_idle_timeout_sec (pulumi.Input[float]) – Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
tcp_transitory_idle_timeout_sec (pulumi.Input[float]) – Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
udp_idle_timeout_sec (pulumi.Input[float]) – Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
The log_config object supports the following:
enable(pulumi.Input[bool]) - Indicates whether or not to export logs.filter(pulumi.Input[str]) - Specifies the desired filtering of logs on this NAT.
The subnetworks object supports the following:
name(pulumi.Input[str]) - Self-link of subnetwork to NATsecondaryIpRangeNames(pulumi.Input[list]) - List of the secondary ranges of the subnetwork that are allowed to use NAT. This can be populated only ifLIST_OF_SECONDARY_IP_RANGESis one of the values in sourceIpRangesToNatsourceIpRangesToNats(pulumi.Input[list]) - List of options for which source IPs in the subnetwork should have NAT enabled. Supported values include:ALL_IP_RANGES,LIST_OF_SECONDARY_IP_RANGES,PRIMARY_IP_RANGE.
drain_nat_ips: pulumi.Output[list] = None¶A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT.
icmp_idle_timeout_sec: pulumi.Output[float] = None¶Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
log_config: pulumi.Output[dict] = None¶Configuration for logging on NAT Structure is documented below.
enable(bool) - Indicates whether or not to export logs.filter(str) - Specifies the desired filtering of logs on this NAT.
min_ports_per_vm: pulumi.Output[float] = None¶Minimum number of ports allocated to a VM from this NAT.
name: pulumi.Output[str] = None¶Self-link of subnetwork to NAT
nat_ip_allocate_option: pulumi.Output[str] = None¶How external IPs should be allocated for this NAT. Valid values are
AUTO_ONLYfor only allowing NAT IPs allocated by Google Cloud Platform, orMANUAL_ONLYfor only user-allocated NAT IP addresses.
nat_ips: pulumi.Output[list] = None¶Self-links of NAT IPs. Only valid if natIpAllocateOption is set to MANUAL_ONLY.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region: pulumi.Output[str] = None¶Region where the router and NAT reside.
router: pulumi.Output[str] = None¶The name of the Cloud Router in which this NAT will be configured.
source_subnetwork_ip_ranges_to_nat: pulumi.Output[str] = None¶How NAT should be configured per Subnetwork. If
ALL_SUBNETWORKS_ALL_IP_RANGES, all of the IP ranges in every Subnetwork are allowed to Nat. IfALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, all of the primary IP ranges in every Subnetwork are allowed to Nat.LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field subnetwork below). Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any other RouterNat section in any Router for this network in this region.
subnetworks: pulumi.Output[list] = None¶One or more subnetwork NAT configurations. Only used if
source_subnetwork_ip_ranges_to_natis set toLIST_OF_SUBNETWORKSStructure is documented below.name(str) - Self-link of subnetwork to NATsecondaryIpRangeNames(list) - List of the secondary ranges of the subnetwork that are allowed to use NAT. This can be populated only ifLIST_OF_SECONDARY_IP_RANGESis one of the values in sourceIpRangesToNatsourceIpRangesToNats(list) - List of options for which source IPs in the subnetwork should have NAT enabled. Supported values include:ALL_IP_RANGES,LIST_OF_SECONDARY_IP_RANGES,PRIMARY_IP_RANGE.
tcp_established_idle_timeout_sec: pulumi.Output[float] = None¶Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
tcp_transitory_idle_timeout_sec: pulumi.Output[float] = None¶Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
udp_idle_timeout_sec: pulumi.Output[float] = None¶Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
- static
get(resource_name, id, opts=None, drain_nat_ips=None, icmp_idle_timeout_sec=None, log_config=None, min_ports_per_vm=None, name=None, nat_ip_allocate_option=None, nat_ips=None, project=None, region=None, router=None, source_subnetwork_ip_ranges_to_nat=None, subnetworks=None, tcp_established_idle_timeout_sec=None, tcp_transitory_idle_timeout_sec=None, udp_idle_timeout_sec=None)¶ Get an existing RouterNat resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
drain_nat_ips (pulumi.Input[list]) – A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT.
icmp_idle_timeout_sec (pulumi.Input[float]) – Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
log_config (pulumi.Input[dict]) – Configuration for logging on NAT Structure is documented below.
min_ports_per_vm (pulumi.Input[float]) – Minimum number of ports allocated to a VM from this NAT.
name (pulumi.Input[str]) – Self-link of subnetwork to NAT
nat_ip_allocate_option (pulumi.Input[str]) – How external IPs should be allocated for this NAT. Valid values are
AUTO_ONLYfor only allowing NAT IPs allocated by Google Cloud Platform, orMANUAL_ONLYfor only user-allocated NAT IP addresses.nat_ips (pulumi.Input[list]) – Self-links of NAT IPs. Only valid if natIpAllocateOption is set to MANUAL_ONLY.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – Region where the router and NAT reside.
router (pulumi.Input[str]) – The name of the Cloud Router in which this NAT will be configured.
source_subnetwork_ip_ranges_to_nat (pulumi.Input[str]) – How NAT should be configured per Subnetwork. If
ALL_SUBNETWORKS_ALL_IP_RANGES, all of the IP ranges in every Subnetwork are allowed to Nat. IfALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, all of the primary IP ranges in every Subnetwork are allowed to Nat.LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field subnetwork below). Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any other RouterNat section in any Router for this network in this region.subnetworks (pulumi.Input[list]) – One or more subnetwork NAT configurations. Only used if
source_subnetwork_ip_ranges_to_natis set toLIST_OF_SUBNETWORKSStructure is documented below.tcp_established_idle_timeout_sec (pulumi.Input[float]) – Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set.
tcp_transitory_idle_timeout_sec (pulumi.Input[float]) – Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set.
udp_idle_timeout_sec (pulumi.Input[float]) – Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
The log_config object supports the following:
enable(pulumi.Input[bool]) - Indicates whether or not to export logs.filter(pulumi.Input[str]) - Specifies the desired filtering of logs on this NAT.
The subnetworks object supports the following:
name(pulumi.Input[str]) - Self-link of subnetwork to NATsecondaryIpRangeNames(pulumi.Input[list]) - List of the secondary ranges of the subnetwork that are allowed to use NAT. This can be populated only ifLIST_OF_SECONDARY_IP_RANGESis one of the values in sourceIpRangesToNatsourceIpRangesToNats(pulumi.Input[list]) - List of options for which source IPs in the subnetwork should have NAT enabled. Supported values include:ALL_IP_RANGES,LIST_OF_SECONDARY_IP_RANGES,PRIMARY_IP_RANGE.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.RouterPeer(resource_name, opts=None, advertise_mode=None, advertised_groups=None, advertised_ip_ranges=None, advertised_route_priority=None, interface=None, name=None, peer_asn=None, peer_ip_address=None, project=None, region=None, router=None, __props__=None, __name__=None, __opts__=None)¶ BGP information that must be configured into the routing stack to establish BGP peering. This information must specify the peer ASN and either the interface name, IP address, or peer IP address. Please refer to RFC4273.
To get more information about RouterBgpPeer, see:
How-to Guides
import pulumi import pulumi_gcp as gcp peer = gcp.compute.RouterPeer("peer", advertised_route_priority=100, interface="interface-1", peer_asn=65513, peer_ip_address="169.254.1.2", region="us-central1", router="my-router")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
advertise_mode (pulumi.Input[str]) – User-specified flag to indicate which mode to use for advertisement. Valid values of this enum field are:
DEFAULT,CUSTOMadvertised_groups (pulumi.Input[list]) – User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
* `ALL_SUBNETS`: Advertises all available subnets, including peer VPC subnets. * `ALL_VPC_SUBNETS`: Advertises the router's own VPC subnets. * `ALL_PEER_VPC_SUBNETS`: Advertises peer subnets of the router's VPC network.
- Parameters
advertised_ip_ranges (pulumi.Input[list]) – User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertiseMode is
CUSTOMand is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. Structure is documented below.advertised_route_priority (pulumi.Input[float]) – The priority of routes advertised to this BGP peer. Where there is more than one matching route of maximum length, the routes with the lowest priority value win.
interface (pulumi.Input[str]) – Name of the interface the BGP peer is associated with.
name (pulumi.Input[str]) – Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.peer_asn (pulumi.Input[float]) – Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
peer_ip_address (pulumi.Input[str]) – IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – Region where the router and BgpPeer reside. If it is not provided, the provider region is used.
router (pulumi.Input[str]) – The name of the Cloud Router in which this BgpPeer will be configured.
The advertised_ip_ranges object supports the following:
description(pulumi.Input[str]) - User-specified description for the IP range.range(pulumi.Input[str]) - The IP range to advertise. The value must be a CIDR-formatted string.
advertise_mode: pulumi.Output[str] = None¶User-specified flag to indicate which mode to use for advertisement. Valid values of this enum field are:
DEFAULT,CUSTOM
advertised_groups: pulumi.Output[list] = None¶User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets.ALL_VPC_SUBNETS: Advertises the router’s own VPC subnets.ALL_PEER_VPC_SUBNETS: Advertises peer subnets of the router’s VPC network.
advertised_ip_ranges: pulumi.Output[list] = None¶User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertiseMode is
CUSTOMand is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. Structure is documented below.description(str) - User-specified description for the IP range.range(str) - The IP range to advertise. The value must be a CIDR-formatted string.
advertised_route_priority: pulumi.Output[float] = None¶The priority of routes advertised to this BGP peer. Where there is more than one matching route of maximum length, the routes with the lowest priority value win.
interface: pulumi.Output[str] = None¶Name of the interface the BGP peer is associated with.
ip_address: pulumi.Output[str] = None¶IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
management_type: pulumi.Output[str] = None¶The resource that configures and manages this BGP peer. * ‘MANAGED_BY_USER’ is the default value and can be managed by you or other users * ‘MANAGED_BY_ATTACHMENT’ is a BGP peer that is configured and managed by Cloud Interconnect, specifically by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of BGP peer when the PARTNER InterconnectAttachment is created, updated, or deleted.
name: pulumi.Output[str] = None¶Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
peer_asn: pulumi.Output[float] = None¶Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
peer_ip_address: pulumi.Output[str] = None¶IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region: pulumi.Output[str] = None¶Region where the router and BgpPeer reside. If it is not provided, the provider region is used.
router: pulumi.Output[str] = None¶The name of the Cloud Router in which this BgpPeer will be configured.
- static
get(resource_name, id, opts=None, advertise_mode=None, advertised_groups=None, advertised_ip_ranges=None, advertised_route_priority=None, interface=None, ip_address=None, management_type=None, name=None, peer_asn=None, peer_ip_address=None, project=None, region=None, router=None)¶ Get an existing RouterPeer resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
advertise_mode (pulumi.Input[str]) – User-specified flag to indicate which mode to use for advertisement. Valid values of this enum field are:
DEFAULT,CUSTOMadvertised_groups (pulumi.Input[list]) – User-specified list of prefix groups to advertise in custom mode, which can take one of the following options:
* `ALL_SUBNETS`: Advertises all available subnets, including peer VPC subnets. * `ALL_VPC_SUBNETS`: Advertises the router's own VPC subnets. * `ALL_PEER_VPC_SUBNETS`: Advertises peer subnets of the router's VPC network.
- Parameters
advertised_ip_ranges (pulumi.Input[list]) – User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertiseMode is
CUSTOMand is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. Structure is documented below.advertised_route_priority (pulumi.Input[float]) – The priority of routes advertised to this BGP peer. Where there is more than one matching route of maximum length, the routes with the lowest priority value win.
interface (pulumi.Input[str]) – Name of the interface the BGP peer is associated with.
ip_address (pulumi.Input[str]) – IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
management_type (pulumi.Input[str]) – The resource that configures and manages this BGP peer. * ‘MANAGED_BY_USER’ is the default value and can be managed by you or other users * ‘MANAGED_BY_ATTACHMENT’ is a BGP peer that is configured and managed by Cloud Interconnect, specifically by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of BGP peer when the PARTNER InterconnectAttachment is created, updated, or deleted.
name (pulumi.Input[str]) – Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.peer_asn (pulumi.Input[float]) – Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
peer_ip_address (pulumi.Input[str]) – IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – Region where the router and BgpPeer reside. If it is not provided, the provider region is used.
router (pulumi.Input[str]) – The name of the Cloud Router in which this BgpPeer will be configured.
The advertised_ip_ranges object supports the following:
description(pulumi.Input[str]) - User-specified description for the IP range.range(pulumi.Input[str]) - The IP range to advertise. The value must be a CIDR-formatted string.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.SSLCertificate(resource_name, opts=None, certificate=None, description=None, name=None, name_prefix=None, private_key=None, project=None, __props__=None, __name__=None, __opts__=None)¶ An SslCertificate resource, used for HTTPS load balancing. This resource provides a mechanism to upload an SSL key and certificate to the load balancer to serve secure connections from the user.
To get more information about SslCertificate, see:
How-to Guides
Warning: All arguments including
certificateandprivate_keywill be stored in the raw state as plain-text. Read more about secrets in state.import pulumi import pulumi_gcp as gcp default = gcp.compute.SSLCertificate("default", name_prefix="my-certificate-", description="a description", private_key=(lambda path: open(path).read())("path/to/private.key"), certificate=(lambda path: open(path).read())("path/to/certificate.crt"))
import pulumi import pulumi_gcp as gcp # Using with Target HTTPS Proxies # # SSL certificates cannot be updated after creation. In order to apply # the specified configuration, the provider will destroy the existing # resource and create a replacement. Example: default_ssl_certificate = gcp.compute.SSLCertificate("defaultSSLCertificate", name_prefix="my-certificate-", private_key=(lambda path: open(path).read())("path/to/private.key"), certificate=(lambda path: open(path).read())("path/to/certificate.crt")) default_http_health_check = gcp.compute.HttpHealthCheck("defaultHttpHealthCheck", request_path="/", check_interval_sec=1, timeout_sec=1) default_backend_service = gcp.compute.BackendService("defaultBackendService", port_name="http", protocol="HTTP", timeout_sec=10, health_checks=[default_http_health_check.id]) default_url_map = gcp.compute.URLMap("defaultURLMap", description="a description", default_service=default_backend_service.id, host_rule=[{ "hosts": ["mysite.com"], "pathMatcher": "allpaths", }], path_matcher=[{ "name": "allpaths", "default_service": default_backend_service.id, "path_rule": [{ "paths": ["/*"], "service": default_backend_service.id, }], }]) default_target_https_proxy = gcp.compute.TargetHttpsProxy("defaultTargetHttpsProxy", url_map=default_url_map.id, ssl_certificates=[default_ssl_certificate.id])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
certificate (pulumi.Input[str]) – The certificate in PEM format. The certificate chain must be no greater than 5 certs long. The chain must include at least one intermediate cert. Note: This property is sensitive and will not be displayed in the plan.
description (pulumi.Input[str]) – An optional description of this resource.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.name_prefix (pulumi.Input[str]) – Creates a unique name beginning with the specified prefix. Conflicts with
name.private_key (pulumi.Input[str]) – The write-only private key in PEM format. Note: This property is sensitive and will not be displayed in the plan.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
certificate: pulumi.Output[str] = None¶The certificate in PEM format. The certificate chain must be no greater than 5 certs long. The chain must include at least one intermediate cert. Note: This property is sensitive and will not be displayed in the plan.
certificate_id: pulumi.Output[float] = None¶The unique identifier for the resource.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional description of this resource.
name: pulumi.Output[str] = None¶Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
name_prefix: pulumi.Output[str] = None¶Creates a unique name beginning with the specified prefix. Conflicts with
name.
private_key: pulumi.Output[str] = None¶The write-only private key in PEM format. Note: This property is sensitive and will not be displayed in the plan.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
- static
get(resource_name, id, opts=None, certificate=None, certificate_id=None, creation_timestamp=None, description=None, name=None, name_prefix=None, private_key=None, project=None, self_link=None)¶ Get an existing SSLCertificate resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
certificate (pulumi.Input[str]) – The certificate in PEM format. The certificate chain must be no greater than 5 certs long. The chain must include at least one intermediate cert. Note: This property is sensitive and will not be displayed in the plan.
certificate_id (pulumi.Input[float]) – The unique identifier for the resource.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional description of this resource.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.name_prefix (pulumi.Input[str]) – Creates a unique name beginning with the specified prefix. Conflicts with
name.private_key (pulumi.Input[str]) – The write-only private key in PEM format. Note: This property is sensitive and will not be displayed in the plan.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link (pulumi.Input[str]) – The URI of the created resource.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.SSLPolicy(resource_name, opts=None, custom_features=None, description=None, min_tls_version=None, name=None, profile=None, project=None, __props__=None, __name__=None, __opts__=None)¶ Represents a SSL policy. SSL policies give you the ability to control the features of SSL that your SSL proxy or HTTPS load balancer negotiates.
To get more information about SslPolicy, see:
How-to Guides
import pulumi import pulumi_gcp as gcp prod_ssl_policy = gcp.compute.SSLPolicy("prod-ssl-policy", profile="MODERN") nonprod_ssl_policy = gcp.compute.SSLPolicy("nonprod-ssl-policy", min_tls_version="TLS_1_2", profile="MODERN") custom_ssl_policy = gcp.compute.SSLPolicy("custom-ssl-policy", custom_features=[ "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", ], min_tls_version="TLS_1_2", profile="CUSTOM")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
custom_features (pulumi.Input[list]) –
Profile specifies the set of SSL features that can be used by the load balancer when negotiating SSL with clients. This can be one of
COMPATIBLE,MODERN,RESTRICTED, orCUSTOM. If usingCUSTOM, the set of SSL features to enable must be specified in thecustomFeaturesfield. See the official documentation for which ciphers are available to use. Note: this argument must be present when using theCUSTOMprofile. This argument must not be present when using any other profile.description (pulumi.Input[str]) – An optional description of this resource.
min_tls_version (pulumi.Input[str]) – The minimum version of SSL protocol that can be used by the clients to establish a connection with the load balancer.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.profile (pulumi.Input[str]) –
Profile specifies the set of SSL features that can be used by the load balancer when negotiating SSL with clients. If using
CUSTOM, the set of SSL features to enable must be specified in thecustomFeaturesfield. See the official documentation for information on what cipher suites each profile provides. IfCUSTOMis used, thecustom_featuresattribute must be set.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
custom_features: pulumi.Output[list] = None¶Profile specifies the set of SSL features that can be used by the load balancer when negotiating SSL with clients. This can be one of
COMPATIBLE,MODERN,RESTRICTED, orCUSTOM. If usingCUSTOM, the set of SSL features to enable must be specified in thecustomFeaturesfield. See the official documentation for which ciphers are available to use. Note: this argument must be present when using theCUSTOMprofile. This argument must not be present when using any other profile.
description: pulumi.Output[str] = None¶An optional description of this resource.
enabled_features: pulumi.Output[list] = None¶The list of features enabled in the SSL policy.
fingerprint: pulumi.Output[str] = None¶Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking.
min_tls_version: pulumi.Output[str] = None¶The minimum version of SSL protocol that can be used by the clients to establish a connection with the load balancer.
name: pulumi.Output[str] = None¶Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
profile: pulumi.Output[str] = None¶Profile specifies the set of SSL features that can be used by the load balancer when negotiating SSL with clients. If using
CUSTOM, the set of SSL features to enable must be specified in thecustomFeaturesfield. See the official documentation for information on what cipher suites each profile provides. IfCUSTOMis used, thecustom_featuresattribute must be set.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
- static
get(resource_name, id, opts=None, creation_timestamp=None, custom_features=None, description=None, enabled_features=None, fingerprint=None, min_tls_version=None, name=None, profile=None, project=None, self_link=None)¶ Get an existing SSLPolicy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
custom_features (pulumi.Input[list]) –
Profile specifies the set of SSL features that can be used by the load balancer when negotiating SSL with clients. This can be one of
COMPATIBLE,MODERN,RESTRICTED, orCUSTOM. If usingCUSTOM, the set of SSL features to enable must be specified in thecustomFeaturesfield. See the official documentation for which ciphers are available to use. Note: this argument must be present when using theCUSTOMprofile. This argument must not be present when using any other profile.description (pulumi.Input[str]) – An optional description of this resource.
enabled_features (pulumi.Input[list]) – The list of features enabled in the SSL policy.
fingerprint (pulumi.Input[str]) – Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking.
min_tls_version (pulumi.Input[str]) – The minimum version of SSL protocol that can be used by the clients to establish a connection with the load balancer.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.profile (pulumi.Input[str]) –
Profile specifies the set of SSL features that can be used by the load balancer when negotiating SSL with clients. If using
CUSTOM, the set of SSL features to enable must be specified in thecustomFeaturesfield. See the official documentation for information on what cipher suites each profile provides. IfCUSTOMis used, thecustom_featuresattribute must be set.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link (pulumi.Input[str]) – The URI of the created resource.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.SecurityPolicy(resource_name, opts=None, description=None, name=None, project=None, rules=None, __props__=None, __name__=None, __opts__=None)¶ A Security Policy defines an IP blacklist or whitelist that protects load balanced Google Cloud services by denying or permitting traffic from specified IP ranges. For more information see the official documentation and the API.
import pulumi import pulumi_gcp as gcp policy = gcp.compute.SecurityPolicy("policy", rules=[ { "action": "deny(403)", "description": "Deny access to IPs in 9.9.9.0/24", "match": { "config": { "srcIpRanges": ["9.9.9.0/24"], }, "versionedExpr": "SRC_IPS_V1", }, "priority": "1000", }, { "action": "allow", "description": "default rule", "match": { "config": { "srcIpRanges": ["*"], }, "versionedExpr": "SRC_IPS_V1", }, "priority": "2147483647", }, ])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – An optional description of this rule. Max size is 64.
name (pulumi.Input[str]) – The name of the security policy.
project (pulumi.Input[str]) – The project in which the resource belongs. If it is not provided, the provider project is used.
rules (pulumi.Input[list]) – The set of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match “*”). If no rules are provided when creating a security policy, a default rule with action “allow” will be added. Structure is documented below.
The rules object supports the following:
action(pulumi.Input[str]) - Action to take whenmatchmatches the request. Valid values:“allow” : allow access to target
“deny(status)” : deny access to target, returns the HTTP response code specified (valid values are 403, 404 and 502)
description(pulumi.Input[str]) - An optional description of this rule. Max size is 64.match(pulumi.Input[dict]) - A match condition that incoming traffic is evaluated against. If it evaluates to true, the correspondingactionis enforced. Structure is documented below.config(pulumi.Input[dict]) - The configuration options available when specifyingversioned_expr. This field must be specified ifversioned_expris specified and cannot be specified ifversioned_expris not specified. Structure is documented below.srcIpRanges(pulumi.Input[list]) - Set of IP addresses or ranges (IPV4 or IPV6) in CIDR notation to match against inbound traffic. There is a limit of 5 IP ranges per rule. A value of ‘*’ matches all IPs (can be used to override the default behavior).
expr(pulumi.Input[dict]) - User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header. Structure is documented below.expression(pulumi.Input[str]) - Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported.
versionedExpr(pulumi.Input[str]) - Predefined rule expression. If this field is specified,configmust also be specified. Available options:SRC_IPS_V1: Must specify the corresponding
src_ip_rangesfield inconfig.
preview(pulumi.Input[bool]) - When set to true, theactionspecified above is not enforced. Stackdriver logs for requests that trigger a preview action are annotated as such.priority(pulumi.Input[float]) - An unique positive integer indicating the priority of evaluation for a rule. Rules are evaluated from highest priority (lowest numerically) to lowest priority (highest numerically) in order.
description: pulumi.Output[str] = None¶An optional description of this rule. Max size is 64.
fingerprint: pulumi.Output[str] = None¶Fingerprint of this resource.
name: pulumi.Output[str] = None¶The name of the security policy.
project: pulumi.Output[str] = None¶The project in which the resource belongs. If it is not provided, the provider project is used.
rules: pulumi.Output[list] = None¶The set of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match “*”). If no rules are provided when creating a security policy, a default rule with action “allow” will be added. Structure is documented below.
action(str) - Action to take whenmatchmatches the request. Valid values:“allow” : allow access to target
“deny(status)” : deny access to target, returns the HTTP response code specified (valid values are 403, 404 and 502)
description(str) - An optional description of this rule. Max size is 64.match(dict) - A match condition that incoming traffic is evaluated against. If it evaluates to true, the correspondingactionis enforced. Structure is documented below.config(dict) - The configuration options available when specifyingversioned_expr. This field must be specified ifversioned_expris specified and cannot be specified ifversioned_expris not specified. Structure is documented below.srcIpRanges(list) - Set of IP addresses or ranges (IPV4 or IPV6) in CIDR notation to match against inbound traffic. There is a limit of 5 IP ranges per rule. A value of ‘*’ matches all IPs (can be used to override the default behavior).
expr(dict) - User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header. Structure is documented below.expression(str) - Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported.
versionedExpr(str) - Predefined rule expression. If this field is specified,configmust also be specified. Available options:SRC_IPS_V1: Must specify the corresponding
src_ip_rangesfield inconfig.
preview(bool) - When set to true, theactionspecified above is not enforced. Stackdriver logs for requests that trigger a preview action are annotated as such.priority(float) - An unique positive integer indicating the priority of evaluation for a rule. Rules are evaluated from highest priority (lowest numerically) to lowest priority (highest numerically) in order.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
- static
get(resource_name, id, opts=None, description=None, fingerprint=None, name=None, project=None, rules=None, self_link=None)¶ Get an existing SecurityPolicy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – An optional description of this rule. Max size is 64.
fingerprint (pulumi.Input[str]) – Fingerprint of this resource.
name (pulumi.Input[str]) – The name of the security policy.
project (pulumi.Input[str]) – The project in which the resource belongs. If it is not provided, the provider project is used.
rules (pulumi.Input[list]) – The set of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match “*”). If no rules are provided when creating a security policy, a default rule with action “allow” will be added. Structure is documented below.
self_link (pulumi.Input[str]) – The URI of the created resource.
The rules object supports the following:
action(pulumi.Input[str]) - Action to take whenmatchmatches the request. Valid values:“allow” : allow access to target
“deny(status)” : deny access to target, returns the HTTP response code specified (valid values are 403, 404 and 502)
description(pulumi.Input[str]) - An optional description of this rule. Max size is 64.match(pulumi.Input[dict]) - A match condition that incoming traffic is evaluated against. If it evaluates to true, the correspondingactionis enforced. Structure is documented below.config(pulumi.Input[dict]) - The configuration options available when specifyingversioned_expr. This field must be specified ifversioned_expris specified and cannot be specified ifversioned_expris not specified. Structure is documented below.srcIpRanges(pulumi.Input[list]) - Set of IP addresses or ranges (IPV4 or IPV6) in CIDR notation to match against inbound traffic. There is a limit of 5 IP ranges per rule. A value of ‘*’ matches all IPs (can be used to override the default behavior).
expr(pulumi.Input[dict]) - User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header. Structure is documented below.expression(pulumi.Input[str]) - Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported.
versionedExpr(pulumi.Input[str]) - Predefined rule expression. If this field is specified,configmust also be specified. Available options:SRC_IPS_V1: Must specify the corresponding
src_ip_rangesfield inconfig.
preview(pulumi.Input[bool]) - When set to true, theactionspecified above is not enforced. Stackdriver logs for requests that trigger a preview action are annotated as such.priority(pulumi.Input[float]) - An unique positive integer indicating the priority of evaluation for a rule. Rules are evaluated from highest priority (lowest numerically) to lowest priority (highest numerically) in order.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.SecurityScanConfig(resource_name, opts=None, authentication=None, blacklist_patterns=None, display_name=None, export_to_security_command_center=None, max_qps=None, project=None, schedule=None, starting_urls=None, target_platforms=None, user_agent=None, __props__=None, __name__=None, __opts__=None)¶ A ScanConfig resource contains the configurations to launch a scan.
To get more information about ScanConfig, see:
How-to Guides
Warning: All arguments including
authentication.google_account.passwordandauthentication.custom_account.passwordwill be stored in the raw state as plain-text.Read more about secrets in stateimport pulumi import pulumi_gcp as gcp scanner_static_ip = gcp.compute.Address("scannerStaticIp") scan_config = gcp.compute.SecurityScanConfig("scan-config", display_name="scan-config", starting_urls=[scanner_static_ip.address.apply(lambda address: f"http://{address}")], target_platforms=["COMPUTE"])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
authentication (pulumi.Input[dict]) – The authentication configuration. If specified, service will use the authentication configuration during scanning. Structure is documented below.
blacklist_patterns (pulumi.Input[list]) – The blacklist URL patterns as described in https://cloud.google.com/security-scanner/docs/excluded-urls
display_name (pulumi.Input[str]) – The user provider display name of the ScanConfig.
export_to_security_command_center (pulumi.Input[str]) – Controls export of scan configurations and results to Cloud Security Command Center.
max_qps (pulumi.Input[float]) – The maximum QPS during scanning. A valid value ranges from 5 to 20 inclusively. Defaults to 15.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
schedule (pulumi.Input[dict]) – The schedule of the ScanConfig Structure is documented below.
starting_urls (pulumi.Input[list]) – The starting URLs from which the scanner finds site pages.
target_platforms (pulumi.Input[list]) – Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be used as a default.
user_agent (pulumi.Input[str]) – Type of the user agents used for scanning
The authentication object supports the following:
customAccount(pulumi.Input[dict]) - Describes authentication configuration that uses a custom account. Structure is documented below.loginUrl(pulumi.Input[str]) - The login form URL of the website.password(pulumi.Input[str]) - The password of the custom account. The credential is stored encrypted in GCP. Note: This property is sensitive and will not be displayed in the plan.username(pulumi.Input[str]) - The user name of the custom account.
googleAccount(pulumi.Input[dict]) - Describes authentication configuration that uses a Google account. Structure is documented below.password(pulumi.Input[str]) - The password of the custom account. The credential is stored encrypted in GCP. Note: This property is sensitive and will not be displayed in the plan.username(pulumi.Input[str]) - The user name of the custom account.
The schedule object supports the following:
intervalDurationDays(pulumi.Input[float]) - The duration of time between executions in daysscheduleTime(pulumi.Input[str]) - A timestamp indicates when the next run will be scheduled. The value is refreshed by the server after each run. If unspecified, it will default to current server time, which means the scan will be scheduled to start immediately.
authentication: pulumi.Output[dict] = None¶The authentication configuration. If specified, service will use the authentication configuration during scanning. Structure is documented below.
customAccount(dict) - Describes authentication configuration that uses a custom account. Structure is documented below.loginUrl(str) - The login form URL of the website.password(str) - The password of the custom account. The credential is stored encrypted in GCP. Note: This property is sensitive and will not be displayed in the plan.username(str) - The user name of the custom account.
googleAccount(dict) - Describes authentication configuration that uses a Google account. Structure is documented below.password(str) - The password of the custom account. The credential is stored encrypted in GCP. Note: This property is sensitive and will not be displayed in the plan.username(str) - The user name of the custom account.
blacklist_patterns: pulumi.Output[list] = None¶The blacklist URL patterns as described in https://cloud.google.com/security-scanner/docs/excluded-urls
display_name: pulumi.Output[str] = None¶The user provider display name of the ScanConfig.
export_to_security_command_center: pulumi.Output[str] = None¶Controls export of scan configurations and results to Cloud Security Command Center.
max_qps: pulumi.Output[float] = None¶The maximum QPS during scanning. A valid value ranges from 5 to 20 inclusively. Defaults to 15.
name: pulumi.Output[str] = None¶A server defined name for this index. Format: ‘projects/{{project}}/scanConfigs/{{server_generated_id}}’
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
schedule: pulumi.Output[dict] = None¶The schedule of the ScanConfig Structure is documented below.
intervalDurationDays(float) - The duration of time between executions in daysscheduleTime(str) - A timestamp indicates when the next run will be scheduled. The value is refreshed by the server after each run. If unspecified, it will default to current server time, which means the scan will be scheduled to start immediately.
starting_urls: pulumi.Output[list] = None¶The starting URLs from which the scanner finds site pages.
target_platforms: pulumi.Output[list] = None¶Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be used as a default.
user_agent: pulumi.Output[str] = None¶Type of the user agents used for scanning
- static
get(resource_name, id, opts=None, authentication=None, blacklist_patterns=None, display_name=None, export_to_security_command_center=None, max_qps=None, name=None, project=None, schedule=None, starting_urls=None, target_platforms=None, user_agent=None)¶ Get an existing SecurityScanConfig resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
authentication (pulumi.Input[dict]) – The authentication configuration. If specified, service will use the authentication configuration during scanning. Structure is documented below.
blacklist_patterns (pulumi.Input[list]) – The blacklist URL patterns as described in https://cloud.google.com/security-scanner/docs/excluded-urls
display_name (pulumi.Input[str]) – The user provider display name of the ScanConfig.
export_to_security_command_center (pulumi.Input[str]) – Controls export of scan configurations and results to Cloud Security Command Center.
max_qps (pulumi.Input[float]) – The maximum QPS during scanning. A valid value ranges from 5 to 20 inclusively. Defaults to 15.
name (pulumi.Input[str]) – A server defined name for this index. Format: ‘projects/{{project}}/scanConfigs/{{server_generated_id}}’
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
schedule (pulumi.Input[dict]) – The schedule of the ScanConfig Structure is documented below.
starting_urls (pulumi.Input[list]) – The starting URLs from which the scanner finds site pages.
target_platforms (pulumi.Input[list]) – Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be used as a default.
user_agent (pulumi.Input[str]) – Type of the user agents used for scanning
The authentication object supports the following:
customAccount(pulumi.Input[dict]) - Describes authentication configuration that uses a custom account. Structure is documented below.loginUrl(pulumi.Input[str]) - The login form URL of the website.password(pulumi.Input[str]) - The password of the custom account. The credential is stored encrypted in GCP. Note: This property is sensitive and will not be displayed in the plan.username(pulumi.Input[str]) - The user name of the custom account.
googleAccount(pulumi.Input[dict]) - Describes authentication configuration that uses a Google account. Structure is documented below.password(pulumi.Input[str]) - The password of the custom account. The credential is stored encrypted in GCP. Note: This property is sensitive and will not be displayed in the plan.username(pulumi.Input[str]) - The user name of the custom account.
The schedule object supports the following:
intervalDurationDays(pulumi.Input[float]) - The duration of time between executions in daysscheduleTime(pulumi.Input[str]) - A timestamp indicates when the next run will be scheduled. The value is refreshed by the server after each run. If unspecified, it will default to current server time, which means the scan will be scheduled to start immediately.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
Enables the Google Compute Engine Shared VPC feature for a project, assigning it as a Shared VPC host project.
For more information, see, the Project API documentation, where the Shared VPC feature is referred to by its former name “XPN”.
import pulumi import pulumi_gcp as gcp # A host project provides network resources to associated service projects. host = gcp.compute.SharedVPCHostProject("host", project="host-project-id") # A service project gains access to network resources provided by its # associated host project. service1 = gcp.compute.SharedVPCServiceProject("service1", host_project=host.project, service_project="service-project-id-1") service2 = gcp.compute.SharedVPCServiceProject("service2", host_project=host.project, service_project="service-project-id-2")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
project (pulumi.Input[str]) – The ID of the project that will serve as a Shared VPC host project
The ID of the project that will serve as a Shared VPC host project
Get an existing SharedVPCHostProject resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
project (pulumi.Input[str]) – The ID of the project that will serve as a Shared VPC host project
Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
Enables the Google Compute Engine Shared VPC feature for a project, assigning it as a Shared VPC service project associated with a given host project.
For more information, see, the Project API documentation, where the Shared VPC feature is referred to by its former name “XPN”.
import pulumi import pulumi_gcp as gcp service1 = gcp.compute.SharedVPCServiceProject("service1", host_project="host-project-id", service_project="service-project-id-1")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
host_project (pulumi.Input[str]) – The ID of a host project to associate.
service_project (pulumi.Input[str]) – The ID of the project that will serve as a Shared VPC service project.
The ID of a host project to associate.
The ID of the project that will serve as a Shared VPC service project.
Get an existing SharedVPCServiceProject resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
host_project (pulumi.Input[str]) – The ID of a host project to associate.
service_project (pulumi.Input[str]) – The ID of the project that will serve as a Shared VPC service project.
Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.Snapshot(resource_name, opts=None, description=None, labels=None, name=None, project=None, snapshot_encryption_key=None, source_disk=None, source_disk_encryption_key=None, zone=None, __props__=None, __name__=None, __opts__=None)¶ Represents a Persistent Disk Snapshot resource.
Use snapshots to back up data from your persistent disks. Snapshots are different from public images and custom images, which are used primarily to create instances or configure instance templates. Snapshots are useful for periodic backup of the data on your persistent disks. You can create snapshots from persistent disks even while they are attached to running instances.
Snapshots are incremental, so you can create regular snapshots on a persistent disk faster and at a much lower cost than if you regularly created a full image of the disk.
To get more information about Snapshot, see:
How-to Guides
Warning: All arguments including
snapshot_encryption_key.raw_keyandsource_disk_encryption_key.raw_keywill be stored in the raw state as plain-text. Read more about secrets in state.import pulumi import pulumi_gcp as gcp debian = gcp.compute.get_image(family="debian-9", project="debian-cloud") persistent = gcp.compute.Disk("persistent", image=debian.self_link, size=10, type="pd-ssd", zone="us-central1-a") snapshot = gcp.compute.Snapshot("snapshot", source_disk=persistent.name, zone="us-central1-a", labels={ "my_label": "value", })
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – An optional description of this resource.
labels (pulumi.Input[dict]) – Labels to apply to this Snapshot.
name (pulumi.Input[str]) – Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
snapshot_encryption_key (pulumi.Input[dict]) – The customer-supplied encryption key of the snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. Structure is documented below.
source_disk (pulumi.Input[str]) – A reference to the disk used to create this snapshot.
source_disk_encryption_key (pulumi.Input[dict]) – The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. Structure is documented below.
zone (pulumi.Input[str]) – A reference to the zone where the disk is hosted.
The snapshot_encryption_key object supports the following:
rawKey(pulumi.Input[str]) - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. Note: This property is sensitive and will not be displayed in the plan.sha256(pulumi.Input[str]) - - The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
The source_disk_encryption_key object supports the following:
rawKey(pulumi.Input[str]) - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. Note: This property is sensitive and will not be displayed in the plan.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional description of this resource.
disk_size_gb: pulumi.Output[float] = None¶Size of the snapshot, specified in GB.
label_fingerprint: pulumi.Output[str] = None¶The fingerprint used for optimistic locking of this resource. Used internally during updates.
labels: pulumi.Output[dict] = None¶Labels to apply to this Snapshot.
licenses: pulumi.Output[list] = None¶A list of public visible licenses that apply to this snapshot. This can be because the original image had licenses attached (such as a Windows image). snapshotEncryptionKey nested object Encrypts the snapshot using a customer-supplied encryption key.
name: pulumi.Output[str] = None¶Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
snapshot_encryption_key: pulumi.Output[dict] = None¶The customer-supplied encryption key of the snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. Structure is documented below.
rawKey(str) - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. Note: This property is sensitive and will not be displayed in the plan.sha256(str) - - The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
snapshot_id: pulumi.Output[float] = None¶The unique identifier for the resource.
source_disk: pulumi.Output[str] = None¶A reference to the disk used to create this snapshot.
source_disk_encryption_key: pulumi.Output[dict] = None¶The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. Structure is documented below.
rawKey(str) - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. Note: This property is sensitive and will not be displayed in the plan.
storage_bytes: pulumi.Output[float] = None¶A size of the the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion.
zone: pulumi.Output[str] = None¶A reference to the zone where the disk is hosted.
- static
get(resource_name, id, opts=None, creation_timestamp=None, description=None, disk_size_gb=None, label_fingerprint=None, labels=None, licenses=None, name=None, project=None, self_link=None, snapshot_encryption_key=None, snapshot_id=None, source_disk=None, source_disk_encryption_key=None, source_disk_link=None, storage_bytes=None, zone=None)¶ Get an existing Snapshot resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional description of this resource.
disk_size_gb (pulumi.Input[float]) – Size of the snapshot, specified in GB.
label_fingerprint (pulumi.Input[str]) – The fingerprint used for optimistic locking of this resource. Used internally during updates.
labels (pulumi.Input[dict]) – Labels to apply to this Snapshot.
licenses (pulumi.Input[list]) – A list of public visible licenses that apply to this snapshot. This can be because the original image had licenses attached (such as a Windows image). snapshotEncryptionKey nested object Encrypts the snapshot using a customer-supplied encryption key.
name (pulumi.Input[str]) – Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link (pulumi.Input[str]) – The URI of the created resource.
snapshot_encryption_key (pulumi.Input[dict]) – The customer-supplied encryption key of the snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. Structure is documented below.
snapshot_id (pulumi.Input[float]) – The unique identifier for the resource.
source_disk (pulumi.Input[str]) – A reference to the disk used to create this snapshot.
source_disk_encryption_key (pulumi.Input[dict]) – The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. Structure is documented below.
storage_bytes (pulumi.Input[float]) – A size of the the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion.
zone (pulumi.Input[str]) – A reference to the zone where the disk is hosted.
The snapshot_encryption_key object supports the following:
rawKey(pulumi.Input[str]) - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. Note: This property is sensitive and will not be displayed in the plan.sha256(pulumi.Input[str]) - - The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
The source_disk_encryption_key object supports the following:
rawKey(pulumi.Input[str]) - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. Note: This property is sensitive and will not be displayed in the plan.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.Subnetwork(resource_name, opts=None, description=None, ip_cidr_range=None, log_config=None, name=None, network=None, private_ip_google_access=None, project=None, purpose=None, region=None, role=None, secondary_ip_ranges=None, __props__=None, __name__=None, __opts__=None)¶ A VPC network is a virtual version of the traditional physical networks that exist within and between physical data centers. A VPC network provides connectivity for your Compute Engine virtual machine (VM) instances, Container Engine containers, App Engine Flex services, and other network-related resources.
Each GCP project contains one or more VPC networks. Each VPC network is a global entity spanning all GCP regions. This global VPC network allows VM instances and other resources to communicate with each other via internal, private IP addresses.
Each VPC network is subdivided into subnets, and each subnet is contained within a single region. You can have more than one subnet in a region for a given VPC network. Each subnet has a contiguous private RFC1918 IP space. You create instances, containers, and the like in these subnets. When you create an instance, you must create it in a subnet, and the instance draws its internal IP address from that subnet.
Virtual machine (VM) instances in a VPC network can communicate with instances in all other subnets of the same VPC network, regardless of region, using their RFC1918 private IP addresses. You can isolate portions of the network, even entire subnets, using firewall rules.
To get more information about Subnetwork, see:
import pulumi import pulumi_gcp as gcp custom_test = gcp.compute.Network("custom-test", auto_create_subnetworks=False) network_with_private_secondary_ip_ranges = gcp.compute.Subnetwork("network-with-private-secondary-ip-ranges", ip_cidr_range="10.2.0.0/16", region="us-central1", network=custom_test.id, secondary_ip_range=[{ "rangeName": "tf-test-secondary-range-update1", "ip_cidr_range": "192.168.10.0/24", }])
import pulumi import pulumi_gcp as gcp custom_test = gcp.compute.Network("custom-test", auto_create_subnetworks=False) subnet_with_logging = gcp.compute.Subnetwork("subnet-with-logging", ip_cidr_range="10.2.0.0/16", region="us-central1", network=custom_test.id, log_config={ "aggregationInterval": "INTERVAL_10_MIN", "flowSampling": 0.5, "metadata": "INCLUDE_ALL_METADATA", })
import pulumi import pulumi_gcp as gcp custom_test = gcp.compute.Network("custom-test", auto_create_subnetworks=False) network_for_l7lb = gcp.compute.Subnetwork("network-for-l7lb", ip_cidr_range="10.0.0.0/22", region="us-central1", purpose="INTERNAL_HTTPS_LOAD_BALANCER", role="ACTIVE", network=custom_test.id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource. This field can be set only at resource creation time.
ip_cidr_range (pulumi.Input[str]) – The range of IP addresses belonging to this subnetwork secondary range. Provide this property when you create the subnetwork. Ranges must be unique and non-overlapping with all primary and secondary IP ranges within a network. Only IPv4 is supported.
log_config (pulumi.Input[dict]) – Denotes the logging options for the subnetwork flow logs. If logging is enabled logs will be exported to Stackdriver. This field cannot be set if the
purposeof this subnetwork isINTERNAL_HTTPS_LOAD_BALANCERStructure is documented below.name (pulumi.Input[str]) – The name of the resource, provided by the client when initially creating the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.network (pulumi.Input[str]) – The network this subnet belongs to. Only networks that are in the distributed mode can have subnetworks.
private_ip_google_access (pulumi.Input[bool]) – When enabled, VMs in this subnetwork without external IP addresses can access Google APIs and services by using Private Google Access.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
purpose (pulumi.Input[str]) – The purpose of the resource. This field can be either PRIVATE or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing. If unspecified, the purpose defaults to PRIVATE. If set to INTERNAL_HTTPS_LOAD_BALANCER you must also set the role.
region (pulumi.Input[str]) – The GCP region for this subnetwork.
role (pulumi.Input[str]) – The role of subnetwork. Currently, this field is only used when purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining.
secondary_ip_ranges (pulumi.Input[list]) – An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges. Structure is documented below.
The log_config object supports the following:
aggregationInterval(pulumi.Input[str]) - Can only be specified if VPC flow logging for this subnetwork is enabled. Toggles the aggregation interval for collecting flow logs. Increasing the interval time will reduce the amount of generated flow logs for long lasting connections. Default is an interval of 5 seconds per connection. Possible values are INTERVAL_5_SEC, INTERVAL_30_SEC, INTERVAL_1_MIN, INTERVAL_5_MIN, INTERVAL_10_MIN, INTERVAL_15_MINflowSampling(pulumi.Input[float]) - Can only be specified if VPC flow logging for this subnetwork is enabled. The value of the field must be in [0, 1]. Set the sampling rate of VPC flow logs within the subnetwork where 1.0 means all collected logs are reported and 0.0 means no logs are reported. Default is 0.5 which means half of all collected logs are reported.metadata(pulumi.Input[str]) - Can only be specified if VPC flow logging for this subnetwork is enabled. Configures whether metadata fields should be added to the reported VPC flow logs.
The secondary_ip_ranges object supports the following:
ip_cidr_range(pulumi.Input[str]) - The range of IP addresses belonging to this subnetwork secondary range. Provide this property when you create the subnetwork. Ranges must be unique and non-overlapping with all primary and secondary IP ranges within a network. Only IPv4 is supported.rangeName(pulumi.Input[str]) - The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance. The name must be 1-63 characters long, and comply with RFC1035. The name must be unique within the subnetwork.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional description of this resource. Provide this property when you create the resource. This field can be set only at resource creation time.
fingerprint: pulumi.Output[str] = None¶Fingerprint of this resource. This field is used internally during updates of this resource.
gateway_address: pulumi.Output[str] = None¶The gateway address for default routes to reach destination addresses outside this subnetwork.
ip_cidr_range: pulumi.Output[str] = None¶The range of IP addresses belonging to this subnetwork secondary range. Provide this property when you create the subnetwork. Ranges must be unique and non-overlapping with all primary and secondary IP ranges within a network. Only IPv4 is supported.
log_config: pulumi.Output[dict] = None¶Denotes the logging options for the subnetwork flow logs. If logging is enabled logs will be exported to Stackdriver. This field cannot be set if the
purposeof this subnetwork isINTERNAL_HTTPS_LOAD_BALANCERStructure is documented below.aggregationInterval(str) - Can only be specified if VPC flow logging for this subnetwork is enabled. Toggles the aggregation interval for collecting flow logs. Increasing the interval time will reduce the amount of generated flow logs for long lasting connections. Default is an interval of 5 seconds per connection. Possible values are INTERVAL_5_SEC, INTERVAL_30_SEC, INTERVAL_1_MIN, INTERVAL_5_MIN, INTERVAL_10_MIN, INTERVAL_15_MINflowSampling(float) - Can only be specified if VPC flow logging for this subnetwork is enabled. The value of the field must be in [0, 1]. Set the sampling rate of VPC flow logs within the subnetwork where 1.0 means all collected logs are reported and 0.0 means no logs are reported. Default is 0.5 which means half of all collected logs are reported.metadata(str) - Can only be specified if VPC flow logging for this subnetwork is enabled. Configures whether metadata fields should be added to the reported VPC flow logs.
name: pulumi.Output[str] = None¶The name of the resource, provided by the client when initially creating the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
network: pulumi.Output[str] = None¶The network this subnet belongs to. Only networks that are in the distributed mode can have subnetworks.
private_ip_google_access: pulumi.Output[bool] = None¶When enabled, VMs in this subnetwork without external IP addresses can access Google APIs and services by using Private Google Access.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
purpose: pulumi.Output[str] = None¶The purpose of the resource. This field can be either PRIVATE or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing. If unspecified, the purpose defaults to PRIVATE. If set to INTERNAL_HTTPS_LOAD_BALANCER you must also set the role.
region: pulumi.Output[str] = None¶The GCP region for this subnetwork.
role: pulumi.Output[str] = None¶The role of subnetwork. Currently, this field is only used when purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining.
secondary_ip_ranges: pulumi.Output[list] = None¶An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges. Structure is documented below.
ip_cidr_range(str) - The range of IP addresses belonging to this subnetwork secondary range. Provide this property when you create the subnetwork. Ranges must be unique and non-overlapping with all primary and secondary IP ranges within a network. Only IPv4 is supported.rangeName(str) - The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance. The name must be 1-63 characters long, and comply with RFC1035. The name must be unique within the subnetwork.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
- static
get(resource_name, id, opts=None, creation_timestamp=None, description=None, fingerprint=None, gateway_address=None, ip_cidr_range=None, log_config=None, name=None, network=None, private_ip_google_access=None, project=None, purpose=None, region=None, role=None, secondary_ip_ranges=None, self_link=None)¶ Get an existing Subnetwork resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional description of this resource. Provide this property when you create the resource. This field can be set only at resource creation time.
fingerprint (pulumi.Input[str]) – Fingerprint of this resource. This field is used internally during updates of this resource.
gateway_address (pulumi.Input[str]) – The gateway address for default routes to reach destination addresses outside this subnetwork.
ip_cidr_range (pulumi.Input[str]) – The range of IP addresses belonging to this subnetwork secondary range. Provide this property when you create the subnetwork. Ranges must be unique and non-overlapping with all primary and secondary IP ranges within a network. Only IPv4 is supported.
log_config (pulumi.Input[dict]) – Denotes the logging options for the subnetwork flow logs. If logging is enabled logs will be exported to Stackdriver. This field cannot be set if the
purposeof this subnetwork isINTERNAL_HTTPS_LOAD_BALANCERStructure is documented below.name (pulumi.Input[str]) – The name of the resource, provided by the client when initially creating the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.network (pulumi.Input[str]) – The network this subnet belongs to. Only networks that are in the distributed mode can have subnetworks.
private_ip_google_access (pulumi.Input[bool]) – When enabled, VMs in this subnetwork without external IP addresses can access Google APIs and services by using Private Google Access.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
purpose (pulumi.Input[str]) – The purpose of the resource. This field can be either PRIVATE or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing. If unspecified, the purpose defaults to PRIVATE. If set to INTERNAL_HTTPS_LOAD_BALANCER you must also set the role.
region (pulumi.Input[str]) – The GCP region for this subnetwork.
role (pulumi.Input[str]) – The role of subnetwork. Currently, this field is only used when purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining.
secondary_ip_ranges (pulumi.Input[list]) – An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges. Structure is documented below.
self_link (pulumi.Input[str]) – The URI of the created resource.
The log_config object supports the following:
aggregationInterval(pulumi.Input[str]) - Can only be specified if VPC flow logging for this subnetwork is enabled. Toggles the aggregation interval for collecting flow logs. Increasing the interval time will reduce the amount of generated flow logs for long lasting connections. Default is an interval of 5 seconds per connection. Possible values are INTERVAL_5_SEC, INTERVAL_30_SEC, INTERVAL_1_MIN, INTERVAL_5_MIN, INTERVAL_10_MIN, INTERVAL_15_MINflowSampling(pulumi.Input[float]) - Can only be specified if VPC flow logging for this subnetwork is enabled. The value of the field must be in [0, 1]. Set the sampling rate of VPC flow logs within the subnetwork where 1.0 means all collected logs are reported and 0.0 means no logs are reported. Default is 0.5 which means half of all collected logs are reported.metadata(pulumi.Input[str]) - Can only be specified if VPC flow logging for this subnetwork is enabled. Configures whether metadata fields should be added to the reported VPC flow logs.
The secondary_ip_ranges object supports the following:
ip_cidr_range(pulumi.Input[str]) - The range of IP addresses belonging to this subnetwork secondary range. Provide this property when you create the subnetwork. Ranges must be unique and non-overlapping with all primary and secondary IP ranges within a network. Only IPv4 is supported.rangeName(pulumi.Input[str]) - The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance. The name must be 1-63 characters long, and comply with RFC1035. The name must be unique within the subnetwork.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.SubnetworkIAMBinding(resource_name, opts=None, condition=None, members=None, project=None, region=None, role=None, subnetwork=None, __props__=None, __name__=None, __opts__=None)¶ Three different resources help you manage your IAM policy for Compute Engine Subnetwork. Each of these resources serves a different use case:
compute.SubnetworkIAMPolicy: Authoritative. Sets the IAM policy for the subnetwork and replaces any existing policy already attached.compute.SubnetworkIAMBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the subnetwork are preserved.compute.SubnetworkIAMMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the subnetwork are preserved.
Note:
compute.SubnetworkIAMPolicycannot be used in conjunction withcompute.SubnetworkIAMBindingandcompute.SubnetworkIAMMemberor they will fight over what your policy should be.Note:
compute.SubnetworkIAMBindingresources can be used in conjunction withcompute.SubnetworkIAMMemberresources only if they do not grant privilege to the same role.import pulumi import pulumi_gcp as gcp admin = gcp.organizations.get_iam_policy(binding=[{ "role": "roles/compute.networkUser", "members": ["user:jane@example.com"], }]) policy = gcp.compute.SubnetworkIAMPolicy("policy", project=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["project"], region=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["region"], subnetwork=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["name"], policy_data=admin.policy_data)
With IAM Conditions:
import pulumi import pulumi_gcp as gcp admin = gcp.organizations.get_iam_policy(binding=[{ "role": "roles/compute.networkUser", "members": ["user:jane@example.com"], "condition": { "title": "expires_after_2019_12_31", "description": "Expiring at midnight of 2019-12-31", "expression": "request.time < timestamp("2020-01-01T00:00:00Z")", }, }]) policy = gcp.compute.SubnetworkIAMPolicy("policy", project=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["project"], region=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["region"], subnetwork=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["name"], policy_data=admin.policy_data)
import pulumi import pulumi_gcp as gcp binding = gcp.compute.SubnetworkIAMBinding("binding", project=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["project"], region=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["region"], subnetwork=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["name"], role="roles/compute.networkUser", members=["user:jane@example.com"])
With IAM Conditions:
import pulumi import pulumi_gcp as gcp binding = gcp.compute.SubnetworkIAMBinding("binding", project=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["project"], region=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["region"], subnetwork=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["name"], role="roles/compute.networkUser", members=["user:jane@example.com"], condition={ "title": "expires_after_2019_12_31", "description": "Expiring at midnight of 2019-12-31", "expression": "request.time < timestamp("2020-01-01T00:00:00Z")", })
import pulumi import pulumi_gcp as gcp member = gcp.compute.SubnetworkIAMMember("member", project=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["project"], region=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["region"], subnetwork=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["name"], role="roles/compute.networkUser", member="user:jane@example.com")
With IAM Conditions:
import pulumi import pulumi_gcp as gcp member = gcp.compute.SubnetworkIAMMember("member", project=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["project"], region=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["region"], subnetwork=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["name"], role="roles/compute.networkUser", member="user:jane@example.com", condition={ "title": "expires_after_2019_12_31", "description": "Expiring at midnight of 2019-12-31", "expression": "request.time < timestamp("2020-01-01T00:00:00Z")", })
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
condition (pulumi.Input[dict]) –
) An IAM Condition for a given binding. Structure is documented below.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. 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.
region (pulumi.Input[str]) – The GCP region for this subnetwork. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no region is provided in the parent identifier and no region is specified, it is taken from the provider configuration.
role (pulumi.Input[str]) – The role that should be applied. Only one
compute.SubnetworkIAMBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.subnetwork (pulumi.Input[str]) – Used to find the parent resource to bind the IAM policy to
The condition object supports the following:
description(pulumi.Input[str]) - An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.expression(pulumi.Input[str]) - Textual representation of an expression in Common Expression Language syntax.title(pulumi.Input[str]) - A title for the expression, i.e. a short string describing its purpose.
condition: pulumi.Output[dict] = None¶) An IAM Condition for a given binding. Structure is documented below.
description(str) - An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.expression(str) - Textual representation of an expression in Common Expression Language syntax.title(str) - A title for the expression, i.e. a short string describing its purpose.
etag: pulumi.Output[str] = None¶(Computed) The etag of the IAM policy.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. 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.
region: pulumi.Output[str] = None¶The GCP region for this subnetwork. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no region is provided in the parent identifier and no region is specified, it is taken from the provider configuration.
role: pulumi.Output[str] = None¶The role that should be applied. Only one
compute.SubnetworkIAMBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.
subnetwork: pulumi.Output[str] = None¶Used to find the parent resource to bind the IAM policy to
- static
get(resource_name, id, opts=None, condition=None, etag=None, members=None, project=None, region=None, role=None, subnetwork=None)¶ Get an existing SubnetworkIAMBinding resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
condition (pulumi.Input[dict]) –
) An IAM Condition for a given binding. Structure is documented below.
etag (pulumi.Input[str]) – (Computed) The etag of the IAM policy.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. 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.
region (pulumi.Input[str]) – The GCP region for this subnetwork. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no region is provided in the parent identifier and no region is specified, it is taken from the provider configuration.
role (pulumi.Input[str]) – The role that should be applied. Only one
compute.SubnetworkIAMBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.subnetwork (pulumi.Input[str]) – Used to find the parent resource to bind the IAM policy to
The condition object supports the following:
description(pulumi.Input[str]) - An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.expression(pulumi.Input[str]) - Textual representation of an expression in Common Expression Language syntax.title(pulumi.Input[str]) - A title for the expression, i.e. a short string describing its purpose.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.SubnetworkIAMMember(resource_name, opts=None, condition=None, member=None, project=None, region=None, role=None, subnetwork=None, __props__=None, __name__=None, __opts__=None)¶ Three different resources help you manage your IAM policy for Compute Engine Subnetwork. Each of these resources serves a different use case:
compute.SubnetworkIAMPolicy: Authoritative. Sets the IAM policy for the subnetwork and replaces any existing policy already attached.compute.SubnetworkIAMBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the subnetwork are preserved.compute.SubnetworkIAMMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the subnetwork are preserved.
Note:
compute.SubnetworkIAMPolicycannot be used in conjunction withcompute.SubnetworkIAMBindingandcompute.SubnetworkIAMMemberor they will fight over what your policy should be.Note:
compute.SubnetworkIAMBindingresources can be used in conjunction withcompute.SubnetworkIAMMemberresources only if they do not grant privilege to the same role.import pulumi import pulumi_gcp as gcp admin = gcp.organizations.get_iam_policy(binding=[{ "role": "roles/compute.networkUser", "members": ["user:jane@example.com"], }]) policy = gcp.compute.SubnetworkIAMPolicy("policy", project=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["project"], region=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["region"], subnetwork=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["name"], policy_data=admin.policy_data)
With IAM Conditions:
import pulumi import pulumi_gcp as gcp admin = gcp.organizations.get_iam_policy(binding=[{ "role": "roles/compute.networkUser", "members": ["user:jane@example.com"], "condition": { "title": "expires_after_2019_12_31", "description": "Expiring at midnight of 2019-12-31", "expression": "request.time < timestamp("2020-01-01T00:00:00Z")", }, }]) policy = gcp.compute.SubnetworkIAMPolicy("policy", project=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["project"], region=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["region"], subnetwork=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["name"], policy_data=admin.policy_data)
import pulumi import pulumi_gcp as gcp binding = gcp.compute.SubnetworkIAMBinding("binding", project=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["project"], region=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["region"], subnetwork=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["name"], role="roles/compute.networkUser", members=["user:jane@example.com"])
With IAM Conditions:
import pulumi import pulumi_gcp as gcp binding = gcp.compute.SubnetworkIAMBinding("binding", project=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["project"], region=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["region"], subnetwork=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["name"], role="roles/compute.networkUser", members=["user:jane@example.com"], condition={ "title": "expires_after_2019_12_31", "description": "Expiring at midnight of 2019-12-31", "expression": "request.time < timestamp("2020-01-01T00:00:00Z")", })
import pulumi import pulumi_gcp as gcp member = gcp.compute.SubnetworkIAMMember("member", project=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["project"], region=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["region"], subnetwork=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["name"], role="roles/compute.networkUser", member="user:jane@example.com")
With IAM Conditions:
import pulumi import pulumi_gcp as gcp member = gcp.compute.SubnetworkIAMMember("member", project=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["project"], region=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["region"], subnetwork=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["name"], role="roles/compute.networkUser", member="user:jane@example.com", condition={ "title": "expires_after_2019_12_31", "description": "Expiring at midnight of 2019-12-31", "expression": "request.time < timestamp("2020-01-01T00:00:00Z")", })
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
condition (pulumi.Input[dict]) –
) An IAM Condition for a given binding. Structure is documented below.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. 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.
region (pulumi.Input[str]) – The GCP region for this subnetwork. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no region is provided in the parent identifier and no region is specified, it is taken from the provider configuration.
role (pulumi.Input[str]) – The role that should be applied. Only one
compute.SubnetworkIAMBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.subnetwork (pulumi.Input[str]) – Used to find the parent resource to bind the IAM policy to
The condition object supports the following:
description(pulumi.Input[str]) - An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.expression(pulumi.Input[str]) - Textual representation of an expression in Common Expression Language syntax.title(pulumi.Input[str]) - A title for the expression, i.e. a short string describing its purpose.
condition: pulumi.Output[dict] = None¶) An IAM Condition for a given binding. Structure is documented below.
description(str) - An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.expression(str) - Textual representation of an expression in Common Expression Language syntax.title(str) - A title for the expression, i.e. a short string describing its purpose.
etag: pulumi.Output[str] = None¶(Computed) The etag of the IAM policy.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. 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.
region: pulumi.Output[str] = None¶The GCP region for this subnetwork. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no region is provided in the parent identifier and no region is specified, it is taken from the provider configuration.
role: pulumi.Output[str] = None¶The role that should be applied. Only one
compute.SubnetworkIAMBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.
subnetwork: pulumi.Output[str] = None¶Used to find the parent resource to bind the IAM policy to
- static
get(resource_name, id, opts=None, condition=None, etag=None, member=None, project=None, region=None, role=None, subnetwork=None)¶ Get an existing SubnetworkIAMMember resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
condition (pulumi.Input[dict]) –
) An IAM Condition for a given binding. Structure is documented below.
etag (pulumi.Input[str]) – (Computed) The etag of the IAM policy.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. 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.
region (pulumi.Input[str]) – The GCP region for this subnetwork. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no region is provided in the parent identifier and no region is specified, it is taken from the provider configuration.
role (pulumi.Input[str]) – The role that should be applied. Only one
compute.SubnetworkIAMBindingcan be used per role. Note that custom roles must be of the format[projects|organizations]/{parent-name}/roles/{role-name}.subnetwork (pulumi.Input[str]) – Used to find the parent resource to bind the IAM policy to
The condition object supports the following:
description(pulumi.Input[str]) - An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.expression(pulumi.Input[str]) - Textual representation of an expression in Common Expression Language syntax.title(pulumi.Input[str]) - A title for the expression, i.e. a short string describing its purpose.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.SubnetworkIAMPolicy(resource_name, opts=None, policy_data=None, project=None, region=None, subnetwork=None, __props__=None, __name__=None, __opts__=None)¶ Three different resources help you manage your IAM policy for Compute Engine Subnetwork. Each of these resources serves a different use case:
compute.SubnetworkIAMPolicy: Authoritative. Sets the IAM policy for the subnetwork and replaces any existing policy already attached.compute.SubnetworkIAMBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the subnetwork are preserved.compute.SubnetworkIAMMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the subnetwork are preserved.
Note:
compute.SubnetworkIAMPolicycannot be used in conjunction withcompute.SubnetworkIAMBindingandcompute.SubnetworkIAMMemberor they will fight over what your policy should be.Note:
compute.SubnetworkIAMBindingresources can be used in conjunction withcompute.SubnetworkIAMMemberresources only if they do not grant privilege to the same role.import pulumi import pulumi_gcp as gcp admin = gcp.organizations.get_iam_policy(binding=[{ "role": "roles/compute.networkUser", "members": ["user:jane@example.com"], }]) policy = gcp.compute.SubnetworkIAMPolicy("policy", project=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["project"], region=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["region"], subnetwork=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["name"], policy_data=admin.policy_data)
With IAM Conditions:
import pulumi import pulumi_gcp as gcp admin = gcp.organizations.get_iam_policy(binding=[{ "role": "roles/compute.networkUser", "members": ["user:jane@example.com"], "condition": { "title": "expires_after_2019_12_31", "description": "Expiring at midnight of 2019-12-31", "expression": "request.time < timestamp("2020-01-01T00:00:00Z")", }, }]) policy = gcp.compute.SubnetworkIAMPolicy("policy", project=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["project"], region=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["region"], subnetwork=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["name"], policy_data=admin.policy_data)
import pulumi import pulumi_gcp as gcp binding = gcp.compute.SubnetworkIAMBinding("binding", project=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["project"], region=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["region"], subnetwork=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["name"], role="roles/compute.networkUser", members=["user:jane@example.com"])
With IAM Conditions:
import pulumi import pulumi_gcp as gcp binding = gcp.compute.SubnetworkIAMBinding("binding", project=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["project"], region=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["region"], subnetwork=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["name"], role="roles/compute.networkUser", members=["user:jane@example.com"], condition={ "title": "expires_after_2019_12_31", "description": "Expiring at midnight of 2019-12-31", "expression": "request.time < timestamp("2020-01-01T00:00:00Z")", })
import pulumi import pulumi_gcp as gcp member = gcp.compute.SubnetworkIAMMember("member", project=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["project"], region=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["region"], subnetwork=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["name"], role="roles/compute.networkUser", member="user:jane@example.com")
With IAM Conditions:
import pulumi import pulumi_gcp as gcp member = gcp.compute.SubnetworkIAMMember("member", project=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["project"], region=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["region"], subnetwork=google_compute_subnetwork["network-with-private-secondary-ip-ranges"]["name"], role="roles/compute.networkUser", member="user:jane@example.com", condition={ "title": "expires_after_2019_12_31", "description": "Expiring at midnight of 2019-12-31", "expression": "request.time < timestamp("2020-01-01T00:00:00Z")", })
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
policy_data (pulumi.Input[str]) – The policy data generated by a
organizations.getIAMPolicydata source.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. 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.
region (pulumi.Input[str]) – The GCP region for this subnetwork. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no region is provided in the parent identifier and no region is specified, it is taken from the provider configuration.
subnetwork (pulumi.Input[str]) – Used to find the parent resource to bind the IAM policy to
etag: pulumi.Output[str] = None¶(Computed) The etag of the IAM policy.
policy_data: pulumi.Output[str] = None¶The policy data generated by a
organizations.getIAMPolicydata source.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. 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.
region: pulumi.Output[str] = None¶The GCP region for this subnetwork. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no region is provided in the parent identifier and no region is specified, it is taken from the provider configuration.
subnetwork: pulumi.Output[str] = None¶Used to find the parent resource to bind the IAM policy to
- static
get(resource_name, id, opts=None, etag=None, policy_data=None, project=None, region=None, subnetwork=None)¶ Get an existing SubnetworkIAMPolicy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
etag (pulumi.Input[str]) – (Computed) The etag of the IAM policy.
policy_data (pulumi.Input[str]) – The policy data generated by a
organizations.getIAMPolicydata source.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. 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.
region (pulumi.Input[str]) – The GCP region for this subnetwork. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no region is provided in the parent identifier and no region is specified, it is taken from the provider configuration.
subnetwork (pulumi.Input[str]) – Used to find the parent resource to bind the IAM policy to
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.TargetHttpProxy(resource_name, opts=None, description=None, name=None, project=None, url_map=None, __props__=None, __name__=None, __opts__=None)¶ Represents a TargetHttpProxy resource, which is used by one or more global forwarding rule to route incoming HTTP requests to a URL map.
To get more information about TargetHttpProxy, see:
How-to Guides
import pulumi import pulumi_gcp as gcp default_http_health_check = gcp.compute.HttpHealthCheck("defaultHttpHealthCheck", request_path="/", check_interval_sec=1, timeout_sec=1) default_backend_service = gcp.compute.BackendService("defaultBackendService", port_name="http", protocol="HTTP", timeout_sec=10, health_checks=[default_http_health_check.id]) default_url_map = gcp.compute.URLMap("defaultURLMap", default_service=default_backend_service.id, host_rule=[{ "hosts": ["mysite.com"], "pathMatcher": "allpaths", }], path_matcher=[{ "name": "allpaths", "default_service": default_backend_service.id, "path_rule": [{ "paths": ["/*"], "service": default_backend_service.id, }], }]) default_target_http_proxy = gcp.compute.TargetHttpProxy("defaultTargetHttpProxy", url_map=default_url_map.id)
import pulumi import pulumi_gcp as gcp default_url_map = gcp.compute.URLMap("defaultURLMap", default_url_redirect={ "httpsRedirect": True, "stripQuery": False, }) default_target_http_proxy = gcp.compute.TargetHttpProxy("defaultTargetHttpProxy", url_map=default_url_map.id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – An optional description of this resource.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
url_map (pulumi.Input[str]) – A reference to the UrlMap resource that defines the mapping from URL to the BackendService.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional description of this resource.
name: pulumi.Output[str] = None¶Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
proxy_id: pulumi.Output[float] = None¶The unique identifier for the resource.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
url_map: pulumi.Output[str] = None¶A reference to the UrlMap resource that defines the mapping from URL to the BackendService.
- static
get(resource_name, id, opts=None, creation_timestamp=None, description=None, name=None, project=None, proxy_id=None, self_link=None, url_map=None)¶ Get an existing TargetHttpProxy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional description of this resource.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
proxy_id (pulumi.Input[float]) – The unique identifier for the resource.
self_link (pulumi.Input[str]) – The URI of the created resource.
url_map (pulumi.Input[str]) – A reference to the UrlMap resource that defines the mapping from URL to the BackendService.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.TargetHttpsProxy(resource_name, opts=None, description=None, name=None, project=None, quic_override=None, ssl_certificates=None, ssl_policy=None, url_map=None, __props__=None, __name__=None, __opts__=None)¶ Represents a TargetHttpsProxy resource, which is used by one or more global forwarding rule to route incoming HTTPS requests to a URL map.
To get more information about TargetHttpsProxy, see:
How-to Guides
import pulumi import pulumi_gcp as gcp default_ssl_certificate = gcp.compute.SSLCertificate("defaultSSLCertificate", private_key=(lambda path: open(path).read())("path/to/private.key"), certificate=(lambda path: open(path).read())("path/to/certificate.crt")) default_http_health_check = gcp.compute.HttpHealthCheck("defaultHttpHealthCheck", request_path="/", check_interval_sec=1, timeout_sec=1) default_backend_service = gcp.compute.BackendService("defaultBackendService", port_name="http", protocol="HTTP", timeout_sec=10, health_checks=[default_http_health_check.id]) default_url_map = gcp.compute.URLMap("defaultURLMap", description="a description", default_service=default_backend_service.id, host_rule=[{ "hosts": ["mysite.com"], "pathMatcher": "allpaths", }], path_matcher=[{ "name": "allpaths", "default_service": default_backend_service.id, "path_rule": [{ "paths": ["/*"], "service": default_backend_service.id, }], }]) default_target_https_proxy = gcp.compute.TargetHttpsProxy("defaultTargetHttpsProxy", url_map=default_url_map.id, ssl_certificates=[default_ssl_certificate.id])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – An optional description of this resource.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
quic_override (pulumi.Input[str]) – Specifies the QUIC override policy for this resource. This determines whether the load balancer will attempt to negotiate QUIC with clients or not. Can specify one of NONE, ENABLE, or DISABLE. If NONE is specified, uses the QUIC policy with no user overrides, which is equivalent to DISABLE.
ssl_certificates (pulumi.Input[list]) – A list of SslCertificate resources that are used to authenticate connections between users and the load balancer. At least one SSL certificate must be specified.
ssl_policy (pulumi.Input[str]) – A reference to the SslPolicy resource that will be associated with the TargetHttpsProxy resource. If not set, the TargetHttpsProxy resource will not have any SSL policy configured.
url_map (pulumi.Input[str]) – A reference to the UrlMap resource that defines the mapping from URL to the BackendService.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional description of this resource.
name: pulumi.Output[str] = None¶Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
proxy_id: pulumi.Output[float] = None¶The unique identifier for the resource.
quic_override: pulumi.Output[str] = None¶Specifies the QUIC override policy for this resource. This determines whether the load balancer will attempt to negotiate QUIC with clients or not. Can specify one of NONE, ENABLE, or DISABLE. If NONE is specified, uses the QUIC policy with no user overrides, which is equivalent to DISABLE.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
ssl_certificates: pulumi.Output[list] = None¶A list of SslCertificate resources that are used to authenticate connections between users and the load balancer. At least one SSL certificate must be specified.
ssl_policy: pulumi.Output[str] = None¶A reference to the SslPolicy resource that will be associated with the TargetHttpsProxy resource. If not set, the TargetHttpsProxy resource will not have any SSL policy configured.
url_map: pulumi.Output[str] = None¶A reference to the UrlMap resource that defines the mapping from URL to the BackendService.
- static
get(resource_name, id, opts=None, creation_timestamp=None, description=None, name=None, project=None, proxy_id=None, quic_override=None, self_link=None, ssl_certificates=None, ssl_policy=None, url_map=None)¶ Get an existing TargetHttpsProxy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional description of this resource.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
proxy_id (pulumi.Input[float]) – The unique identifier for the resource.
quic_override (pulumi.Input[str]) – Specifies the QUIC override policy for this resource. This determines whether the load balancer will attempt to negotiate QUIC with clients or not. Can specify one of NONE, ENABLE, or DISABLE. If NONE is specified, uses the QUIC policy with no user overrides, which is equivalent to DISABLE.
self_link (pulumi.Input[str]) – The URI of the created resource.
ssl_certificates (pulumi.Input[list]) – A list of SslCertificate resources that are used to authenticate connections between users and the load balancer. At least one SSL certificate must be specified.
ssl_policy (pulumi.Input[str]) – A reference to the SslPolicy resource that will be associated with the TargetHttpsProxy resource. If not set, the TargetHttpsProxy resource will not have any SSL policy configured.
url_map (pulumi.Input[str]) – A reference to the UrlMap resource that defines the mapping from URL to the BackendService.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.TargetInstance(resource_name, opts=None, description=None, instance=None, name=None, nat_policy=None, project=None, zone=None, __props__=None, __name__=None, __opts__=None)¶ Represents a TargetInstance resource which defines an endpoint instance that terminates traffic of certain protocols. In particular, they are used in Protocol Forwarding, where forwarding rules can send packets to a non-NAT’ed target instance. Each target instance contains a single virtual machine instance that receives and handles traffic from the corresponding forwarding rules.
To get more information about TargetInstance, see:
How-to Guides
import pulumi import pulumi_gcp as gcp vmimage = gcp.compute.get_image(family="debian-9", project="debian-cloud") target_vm = gcp.compute.Instance("target-vm", machine_type="n1-standard-1", zone="us-central1-a", boot_disk={ "initialize_params": { "image": vmimage.self_link, }, }, network_interface=[{ "network": "default", }]) default = gcp.compute.TargetInstance("default", instance=target_vm.id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – An optional description of this resource.
instance (pulumi.Input[str]) – The Compute instance VM handling traffic for this target instance. Accepts the instance self-link, relative path (e.g.
projects/project/zones/zone/instances/instance) or name. If name is given, the zone will default to the given zone or the provider-default zone and the project will default to the provider-level project.name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.nat_policy (pulumi.Input[str]) – NAT option controlling how IPs are NAT’ed to the instance. Currently only NO_NAT (default value) is supported.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
zone (pulumi.Input[str]) – URL of the zone where the target instance resides.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional description of this resource.
instance: pulumi.Output[str] = None¶The Compute instance VM handling traffic for this target instance. Accepts the instance self-link, relative path (e.g.
projects/project/zones/zone/instances/instance) or name. If name is given, the zone will default to the given zone or the provider-default zone and the project will default to the provider-level project.
name: pulumi.Output[str] = None¶Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
nat_policy: pulumi.Output[str] = None¶NAT option controlling how IPs are NAT’ed to the instance. Currently only NO_NAT (default value) is supported.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
zone: pulumi.Output[str] = None¶URL of the zone where the target instance resides.
- static
get(resource_name, id, opts=None, creation_timestamp=None, description=None, instance=None, name=None, nat_policy=None, project=None, self_link=None, zone=None)¶ Get an existing TargetInstance resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional description of this resource.
instance (pulumi.Input[str]) – The Compute instance VM handling traffic for this target instance. Accepts the instance self-link, relative path (e.g.
projects/project/zones/zone/instances/instance) or name. If name is given, the zone will default to the given zone or the provider-default zone and the project will default to the provider-level project.name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.nat_policy (pulumi.Input[str]) – NAT option controlling how IPs are NAT’ed to the instance. Currently only NO_NAT (default value) is supported.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link (pulumi.Input[str]) – The URI of the created resource.
zone (pulumi.Input[str]) – URL of the zone where the target instance resides.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.TargetPool(resource_name, opts=None, backup_pool=None, description=None, failover_ratio=None, health_checks=None, instances=None, name=None, project=None, region=None, session_affinity=None, __props__=None, __name__=None, __opts__=None)¶ Manages a Target Pool within GCE. This is a collection of instances used as target of a network load balancer (Forwarding Rule). For more information see the official documentation and API.
import pulumi import pulumi_gcp as gcp default_http_health_check = gcp.compute.HttpHealthCheck("defaultHttpHealthCheck", request_path="/", check_interval_sec=1, timeout_sec=1) default_target_pool = gcp.compute.TargetPool("defaultTargetPool", instances=[ "us-central1-a/myinstance1", "us-central1-b/myinstance2", ], health_checks=[default_http_health_check.name])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
backup_pool (pulumi.Input[str]) – URL to the backup target pool. Must also set failover_ratio.
description (pulumi.Input[str]) – Textual description field.
failover_ratio (pulumi.Input[float]) – Ratio (0 to 1) of failed nodes before using the backup pool (which must also be set).
health_checks (pulumi.Input[str]) – List of zero or one health check name or self_link. Only legacy
compute.HttpHealthCheckis supported.instances (pulumi.Input[list]) – List of instances in the pool. They can be given as URLs, or in the form of “zone/name”. Note that the instances need not exist at the time of target pool creation, so there is no need to use the interpolation to create a dependency on the instances from the target pool.
name (pulumi.Input[str]) – A unique name for the resource, required by GCE. Changing this forces a new resource to be created.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – Where the target pool resides. Defaults to project region.
session_affinity (pulumi.Input[str]) – How to distribute load. Options are “NONE” (no affinity). “CLIENT_IP” (hash of the source/dest addresses / ports), and “CLIENT_IP_PROTO” also includes the protocol (default “NONE”).
backup_pool: pulumi.Output[str] = None¶URL to the backup target pool. Must also set failover_ratio.
description: pulumi.Output[str] = None¶Textual description field.
failover_ratio: pulumi.Output[float] = None¶Ratio (0 to 1) of failed nodes before using the backup pool (which must also be set).
health_checks: pulumi.Output[str] = None¶List of zero or one health check name or self_link. Only legacy
compute.HttpHealthCheckis supported.
instances: pulumi.Output[list] = None¶List of instances in the pool. They can be given as URLs, or in the form of “zone/name”. Note that the instances need not exist at the time of target pool creation, so there is no need to use the interpolation to create a dependency on the instances from the target pool.
name: pulumi.Output[str] = None¶A unique name for the resource, required by GCE. Changing this forces a new resource to be created.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region: pulumi.Output[str] = None¶Where the target pool resides. Defaults to project region.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
session_affinity: pulumi.Output[str] = None¶How to distribute load. Options are “NONE” (no affinity). “CLIENT_IP” (hash of the source/dest addresses / ports), and “CLIENT_IP_PROTO” also includes the protocol (default “NONE”).
- static
get(resource_name, id, opts=None, backup_pool=None, description=None, failover_ratio=None, health_checks=None, instances=None, name=None, project=None, region=None, self_link=None, session_affinity=None)¶ Get an existing TargetPool resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
backup_pool (pulumi.Input[str]) – URL to the backup target pool. Must also set failover_ratio.
description (pulumi.Input[str]) – Textual description field.
failover_ratio (pulumi.Input[float]) – Ratio (0 to 1) of failed nodes before using the backup pool (which must also be set).
health_checks (pulumi.Input[str]) – List of zero or one health check name or self_link. Only legacy
compute.HttpHealthCheckis supported.instances (pulumi.Input[list]) – List of instances in the pool. They can be given as URLs, or in the form of “zone/name”. Note that the instances need not exist at the time of target pool creation, so there is no need to use the interpolation to create a dependency on the instances from the target pool.
name (pulumi.Input[str]) – A unique name for the resource, required by GCE. Changing this forces a new resource to be created.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – Where the target pool resides. Defaults to project region.
self_link (pulumi.Input[str]) – The URI of the created resource.
session_affinity (pulumi.Input[str]) – How to distribute load. Options are “NONE” (no affinity). “CLIENT_IP” (hash of the source/dest addresses / ports), and “CLIENT_IP_PROTO” also includes the protocol (default “NONE”).
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.TargetSSLProxy(resource_name, opts=None, backend_service=None, description=None, name=None, project=None, proxy_header=None, ssl_certificates=None, ssl_policy=None, __props__=None, __name__=None, __opts__=None)¶ Represents a TargetSslProxy resource, which is used by one or more global forwarding rule to route incoming SSL requests to a backend service.
To get more information about TargetSslProxy, see:
import pulumi import pulumi_gcp as gcp default_ssl_certificate = gcp.compute.SSLCertificate("defaultSSLCertificate", private_key=(lambda path: open(path).read())("path/to/private.key"), certificate=(lambda path: open(path).read())("path/to/certificate.crt")) default_health_check = gcp.compute.HealthCheck("defaultHealthCheck", check_interval_sec=1, timeout_sec=1, tcp_health_check={ "port": "443", }) default_backend_service = gcp.compute.BackendService("defaultBackendService", protocol="SSL", health_checks=[default_health_check.id]) default_target_ssl_proxy = gcp.compute.TargetSSLProxy("defaultTargetSSLProxy", backend_service=default_backend_service.id, ssl_certificates=[default_ssl_certificate.id])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
backend_service (pulumi.Input[str]) – A reference to the BackendService resource.
description (pulumi.Input[str]) – An optional description of this resource.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
proxy_header (pulumi.Input[str]) – Specifies the type of proxy header to append before sending data to the backend.
ssl_certificates (pulumi.Input[str]) – A list of SslCertificate resources that are used to authenticate connections between users and the load balancer. Currently, exactly one SSL certificate must be specified.
ssl_policy (pulumi.Input[str]) – A reference to the SslPolicy resource that will be associated with the TargetSslProxy resource. If not set, the TargetSslProxy resource will not have any SSL policy configured.
backend_service: pulumi.Output[str] = None¶A reference to the BackendService resource.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional description of this resource.
name: pulumi.Output[str] = None¶Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
proxy_header: pulumi.Output[str] = None¶Specifies the type of proxy header to append before sending data to the backend.
proxy_id: pulumi.Output[float] = None¶The unique identifier for the resource.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
ssl_certificates: pulumi.Output[str] = None¶A list of SslCertificate resources that are used to authenticate connections between users and the load balancer. Currently, exactly one SSL certificate must be specified.
ssl_policy: pulumi.Output[str] = None¶A reference to the SslPolicy resource that will be associated with the TargetSslProxy resource. If not set, the TargetSslProxy resource will not have any SSL policy configured.
- static
get(resource_name, id, opts=None, backend_service=None, creation_timestamp=None, description=None, name=None, project=None, proxy_header=None, proxy_id=None, self_link=None, ssl_certificates=None, ssl_policy=None)¶ Get an existing TargetSSLProxy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
backend_service (pulumi.Input[str]) – A reference to the BackendService resource.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional description of this resource.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
proxy_header (pulumi.Input[str]) – Specifies the type of proxy header to append before sending data to the backend.
proxy_id (pulumi.Input[float]) – The unique identifier for the resource.
self_link (pulumi.Input[str]) – The URI of the created resource.
ssl_certificates (pulumi.Input[str]) – A list of SslCertificate resources that are used to authenticate connections between users and the load balancer. Currently, exactly one SSL certificate must be specified.
ssl_policy (pulumi.Input[str]) – A reference to the SslPolicy resource that will be associated with the TargetSslProxy resource. If not set, the TargetSslProxy resource will not have any SSL policy configured.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.TargetTCPProxy(resource_name, opts=None, backend_service=None, description=None, name=None, project=None, proxy_header=None, __props__=None, __name__=None, __opts__=None)¶ Represents a TargetTcpProxy resource, which is used by one or more global forwarding rule to route incoming TCP requests to a Backend service.
To get more information about TargetTcpProxy, see:
import pulumi import pulumi_gcp as gcp default_health_check = gcp.compute.HealthCheck("defaultHealthCheck", timeout_sec=1, check_interval_sec=1, tcp_health_check={ "port": "443", }) default_backend_service = gcp.compute.BackendService("defaultBackendService", protocol="TCP", timeout_sec=10, health_checks=[default_health_check.id]) default_target_tcp_proxy = gcp.compute.TargetTCPProxy("defaultTargetTCPProxy", backend_service=default_backend_service.id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
backend_service (pulumi.Input[str]) – A reference to the BackendService resource.
description (pulumi.Input[str]) – An optional description of this resource.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
proxy_header (pulumi.Input[str]) – Specifies the type of proxy header to append before sending data to the backend.
backend_service: pulumi.Output[str] = None¶A reference to the BackendService resource.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional description of this resource.
name: pulumi.Output[str] = None¶Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
proxy_header: pulumi.Output[str] = None¶Specifies the type of proxy header to append before sending data to the backend.
proxy_id: pulumi.Output[float] = None¶The unique identifier for the resource.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
- static
get(resource_name, id, opts=None, backend_service=None, creation_timestamp=None, description=None, name=None, project=None, proxy_header=None, proxy_id=None, self_link=None)¶ Get an existing TargetTCPProxy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
backend_service (pulumi.Input[str]) – A reference to the BackendService resource.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional description of this resource.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
proxy_header (pulumi.Input[str]) – Specifies the type of proxy header to append before sending data to the backend.
proxy_id (pulumi.Input[float]) – The unique identifier for the resource.
self_link (pulumi.Input[str]) – The URI of the created resource.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.URLMap(resource_name, opts=None, default_route_action=None, default_service=None, default_url_redirect=None, description=None, header_action=None, host_rules=None, name=None, path_matchers=None, project=None, tests=None, __props__=None, __name__=None, __opts__=None)¶ UrlMaps are used to route requests to a backend service based on rules that you define for the host and path of an incoming URL.
To get more information about UrlMap, see:
import pulumi import pulumi_gcp as gcp default = gcp.compute.HttpHealthCheck("default", request_path="/", check_interval_sec=1, timeout_sec=1) login = gcp.compute.BackendService("login", port_name="http", protocol="HTTP", timeout_sec=10, health_checks=[default.id]) home = gcp.compute.BackendService("home", port_name="http", protocol="HTTP", timeout_sec=10, health_checks=[default.id]) static_bucket = gcp.storage.Bucket("staticBucket", location="US") static_backend_bucket = gcp.compute.BackendBucket("staticBackendBucket", bucket_name=static_bucket.name, enable_cdn=True) urlmap = gcp.compute.URLMap("urlmap", description="a description", default_service=home.id, host_rule=[ { "hosts": ["mysite.com"], "pathMatcher": "mysite", }, { "hosts": ["myothersite.com"], "pathMatcher": "otherpaths", }, ], path_matcher=[ { "name": "mysite", "default_service": home.id, "path_rule": [ { "paths": ["/home"], "service": home.id, }, { "paths": ["/login"], "service": login.id, }, { "paths": ["/static"], "service": static_backend_bucket.id, }, ], }, { "name": "otherpaths", "default_service": home.id, }, ], test=[{ "service": home.id, "host": "hi.com", "path": "/home", }])
import pulumi import pulumi_gcp as gcp default = gcp.compute.HealthCheck("default", http_health_check={ "port": 80, }) home = gcp.compute.BackendService("home", port_name="http", protocol="HTTP", timeout_sec=10, health_checks=[default.id], load_balancing_scheme="INTERNAL_SELF_MANAGED") urlmap = gcp.compute.URLMap("urlmap", description="a description", default_service=home.id, host_rule=[{ "hosts": ["mysite.com"], "pathMatcher": "allpaths", }], path_matcher=[{ "name": "allpaths", "default_service": home.id, "route_rules": [{ "priority": 1, "header_action": { "requestHeadersToRemoves": ["RemoveMe2"], "request_headers_to_add": [{ "headerName": "AddSomethingElse", "headerValue": "MyOtherValue", "replace": True, }], "responseHeadersToRemoves": ["RemoveMe3"], "response_headers_to_add": [{ "headerName": "AddMe", "headerValue": "MyValue", "replace": False, }], }, "match_rules": [{ "fullPathMatch": "a full path", "header_matches": [{ "headerName": "someheader", "exactMatch": "match this exactly", "invertMatch": True, }], "ignoreCase": True, "metadata_filters": [{ "filterMatchCriteria": "MATCH_ANY", "filter_labels": [{ "name": "PLANET", "value": "MARS", }], }], "query_parameter_matches": [{ "name": "a query parameter", "presentMatch": True, }], }], "url_redirect": { "hostRedirect": "A host", "httpsRedirect": False, "pathRedirect": "some/path", "redirectResponseCode": "TEMPORARY_REDIRECT", "stripQuery": True, }, }], }], test=[{ "service": home.id, "host": "hi.com", "path": "/home", }])
import pulumi import pulumi_gcp as gcp default = gcp.compute.HealthCheck("default", http_health_check={ "port": 80, }) home = gcp.compute.BackendService("home", port_name="http", protocol="HTTP", timeout_sec=10, health_checks=[default.id], load_balancing_scheme="INTERNAL_SELF_MANAGED") urlmap = gcp.compute.URLMap("urlmap", description="a description", default_service=home.id, host_rule=[{ "hosts": ["mysite.com"], "pathMatcher": "allpaths", }], path_matcher=[{ "name": "allpaths", "default_service": home.id, "route_rules": [{ "priority": 1, "match_rules": [{ "prefixMatch": "/someprefix", "header_matches": [{ "headerName": "someheader", "exactMatch": "match this exactly", "invertMatch": True, }], }], "url_redirect": { "pathRedirect": "some/path", "redirectResponseCode": "TEMPORARY_REDIRECT", }, }], }], test=[{ "service": home.id, "host": "hi.com", "path": "/home", }])
import pulumi import pulumi_gcp as gcp default = gcp.compute.HealthCheck("default", http_health_check={ "port": 80, }) home = gcp.compute.BackendService("home", port_name="http", protocol="HTTP", timeout_sec=10, health_checks=[default.id], load_balancing_scheme="INTERNAL_SELF_MANAGED") urlmap = gcp.compute.URLMap("urlmap", description="a description", default_service=home.id, host_rule=[{ "hosts": ["mysite.com"], "pathMatcher": "allpaths", }], path_matcher=[{ "name": "allpaths", "default_service": home.id, "path_rule": [{ "paths": ["/home"], "route_action": { "cors_policy": { "allowCredentials": True, "allowHeaders": ["Allowed content"], "allowMethods": ["GET"], "allowOriginRegexes": ["abc.*"], "allowOrigins": ["Allowed origin"], "exposeHeaders": ["Exposed header"], "maxAge": 30, "disabled": False, }, "fault_injection_policy": { "abort": { "httpStatus": 234, "percentage": 5.6, }, "delay": { "fixed_delay": { "seconds": 0, "nanos": 50000, }, "percentage": 7.8, }, }, "request_mirror_policy": { "backend_service": home.id, }, "retry_policy": { "numRetries": 4, "per_try_timeout": { "seconds": 30, }, "retryConditions": [ "5xx", "deadline-exceeded", ], }, "timeout": { "seconds": 20, "nanos": 750000000, }, "url_rewrite": { "hostRewrite": "A replacement header", "pathPrefixRewrite": "A replacement path", }, "weighted_backend_services": [{ "backend_service": home.id, "weight": 400, "header_action": { "requestHeadersToRemoves": ["RemoveMe"], "request_headers_to_add": [{ "headerName": "AddMe", "headerValue": "MyValue", "replace": True, }], "responseHeadersToRemoves": ["RemoveMe"], "response_headers_to_add": [{ "headerName": "AddMe", "headerValue": "MyValue", "replace": False, }], }, }], }, }], }], test=[{ "service": home.id, "host": "hi.com", "path": "/home", }])
import pulumi import pulumi_gcp as gcp default = gcp.compute.HealthCheck("default", http_health_check={ "port": 80, }) home = gcp.compute.BackendService("home", port_name="http", protocol="HTTP", timeout_sec=10, health_checks=[default.id], load_balancing_scheme="INTERNAL_SELF_MANAGED") urlmap = gcp.compute.URLMap("urlmap", description="a description", default_service=home.id, host_rule=[{ "hosts": ["mysite.com"], "pathMatcher": "allpaths", }], path_matcher=[{ "name": "allpaths", "default_service": home.id, "path_rule": [{ "paths": ["/home"], "route_action": { "cors_policy": { "allowCredentials": True, "allowHeaders": ["Allowed content"], "allowMethods": ["GET"], "allowOriginRegexes": ["abc.*"], "allowOrigins": ["Allowed origin"], "exposeHeaders": ["Exposed header"], "maxAge": 30, "disabled": False, }, "weighted_backend_services": [{ "backend_service": home.id, "weight": 400, "header_action": { "requestHeadersToRemoves": ["RemoveMe"], "request_headers_to_add": [{ "headerName": "AddMe", "headerValue": "MyValue", "replace": True, }], "responseHeadersToRemoves": ["RemoveMe"], "response_headers_to_add": [{ "headerName": "AddMe", "headerValue": "MyValue", "replace": False, }], }, }], }, }], }], test=[{ "service": home.id, "host": "hi.com", "path": "/home", }])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
default_route_action (pulumi.Input[dict]) – defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. Structure is documented below.
default_service (pulumi.Input[str]) – The backend service or backend bucket to use when none of the given paths match.
default_url_redirect (pulumi.Input[dict]) – When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. Structure is documented below.
description (pulumi.Input[str]) – Description of this test case.
header_action (pulumi.Input[dict]) – Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. Structure is documented below.
host_rules (pulumi.Input[list]) – The list of HostRules to use against the URL. Structure is documented below.
name (pulumi.Input[str]) – The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.
path_matchers (pulumi.Input[list]) – The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL’s host portion.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
tests (pulumi.Input[list]) – The list of expected URL mapping tests. Request to update this UrlMap will succeed only if all of the test cases pass. You can specify a maximum of 100 tests per UrlMap. Structure is documented below.
The default_route_action object supports the following:
corsPolicy(pulumi.Input[dict]) - The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing Structure is documented below.allowCredentials(pulumi.Input[bool]) - In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.allowHeaders(pulumi.Input[list]) - Specifies the content for the Access-Control-Allow-Headers header.allowMethods(pulumi.Input[list]) - Specifies the content for the Access-Control-Allow-Methods header.allowOriginRegexes(pulumi.Input[list]) - Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.allowOrigins(pulumi.Input[list]) - Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.disabled(pulumi.Input[bool]) - If true, specifies the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.exposeHeaders(pulumi.Input[list]) - Specifies the content for the Access-Control-Expose-Headers header.maxAge(pulumi.Input[float]) - Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
faultInjectionPolicy(pulumi.Input[dict]) - The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retryPolicy will be ignored by clients that are configured with a faultInjectionPolicy. Structure is documented below.abort(pulumi.Input[dict]) - The specification for how client requests are aborted as part of fault injection. Structure is documented below.httpStatus(pulumi.Input[float]) - The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive.percentage(pulumi.Input[float]) - The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
delay(pulumi.Input[dict]) - The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. Structure is documented below.fixedDelay(pulumi.Input[dict]) - Specifies the value of the fixed delay interval. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
percentage(pulumi.Input[float]) - The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
requestMirrorPolicy(pulumi.Input[dict]) - Specifies the policy on how requests intended for the route’s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. Structure is documented below.backend_service(pulumi.Input[str]) - The full or partial URL to the BackendService resource being mirrored to.
retryPolicy(pulumi.Input[dict]) - Specifies the retry policy associated with this route. Structure is documented below.numRetries(pulumi.Input[float]) - Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1.perTryTimeout(pulumi.Input[dict]) - Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
retryConditions(pulumi.Input[list]) - Specfies one or more conditions when this retry rule applies. Valid values are: 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
timeout(pulumi.Input[dict]) - Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, will use the largest timeout among all backend services associated with the route. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
urlRewrite(pulumi.Input[dict]) - The spec to modify the URL of the request, prior to forwarding the request to the matched service. Structure is documented below.hostRewrite(pulumi.Input[str]) - Prior to forwarding the request to the selected service, the request’s host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters.pathPrefixRewrite(pulumi.Input[str]) - Prior to forwarding the request to the selected backend service, the matching portion of the request’s path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters.
weightedBackendServices(pulumi.Input[list]) - A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. Structure is documented below.backend_service(pulumi.Input[str]) - The full or partial URL to the BackendService resource being mirrored to.header_action(pulumi.Input[dict]) - Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. Structure is documented below.requestHeadersToAdds(pulumi.Input[list]) - Headers to add to a matching request prior to forwarding the request to the backendService. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header to add.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
requestHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.responseHeadersToAdds(pulumi.Input[list]) - Headers to add the response prior to sending the response back to the client. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header to add.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
responseHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
weight(pulumi.Input[float]) - Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user’s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService’s session affinity policy. The value must be between 0 and 1000
The default_url_redirect object supports the following:
hostRedirect(pulumi.Input[str]) - The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters.httpsRedirect(pulumi.Input[bool]) - If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false.pathRedirect(pulumi.Input[str]) - The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.prefixRedirect(pulumi.Input[str]) - The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.redirectResponseCode(pulumi.Input[str]) - The HTTP Status code to use for this RedirectAction. Supported values are:MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
FOUND, which corresponds to 302.
SEE_OTHER which corresponds to 303.
TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
stripQuery(pulumi.Input[bool]) - If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. The default is set to false. This field is required to ensure an empty block is not set. The normal default value is false.
The header_action object supports the following:
requestHeadersToAdds(pulumi.Input[list]) - Headers to add to a matching request prior to forwarding the request to the backendService. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header to add.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
requestHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.responseHeadersToAdds(pulumi.Input[list]) - Headers to add the response prior to sending the response back to the client. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header to add.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
responseHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
The host_rules object supports the following:
description(pulumi.Input[str]) - Description of this test case.hosts(pulumi.Input[list]) - The list of host patterns to match. They must be valid hostnames, except * will match any string of ([a-z0-9-.]*). In that case, * must be the first character and must be followed in the pattern by either - or ..pathMatcher(pulumi.Input[str]) - The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL’s host portion.
The path_matchers object supports the following:
default_route_action(pulumi.Input[dict]) - defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. Structure is documented below.corsPolicy(pulumi.Input[dict]) - The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing Structure is documented below.allowCredentials(pulumi.Input[bool]) - In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.allowHeaders(pulumi.Input[list]) - Specifies the content for the Access-Control-Allow-Headers header.allowMethods(pulumi.Input[list]) - Specifies the content for the Access-Control-Allow-Methods header.allowOriginRegexes(pulumi.Input[list]) - Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.allowOrigins(pulumi.Input[list]) - Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.disabled(pulumi.Input[bool]) - If true, specifies the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.exposeHeaders(pulumi.Input[list]) - Specifies the content for the Access-Control-Expose-Headers header.maxAge(pulumi.Input[float]) - Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
faultInjectionPolicy(pulumi.Input[dict]) - The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retryPolicy will be ignored by clients that are configured with a faultInjectionPolicy. Structure is documented below.abort(pulumi.Input[dict]) - The specification for how client requests are aborted as part of fault injection. Structure is documented below.httpStatus(pulumi.Input[float]) - The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive.percentage(pulumi.Input[float]) - The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
delay(pulumi.Input[dict]) - The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. Structure is documented below.fixedDelay(pulumi.Input[dict]) - Specifies the value of the fixed delay interval. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
percentage(pulumi.Input[float]) - The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
requestMirrorPolicy(pulumi.Input[dict]) - Specifies the policy on how requests intended for the route’s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. Structure is documented below.backend_service(pulumi.Input[str]) - The full or partial URL to the BackendService resource being mirrored to.
retryPolicy(pulumi.Input[dict]) - Specifies the retry policy associated with this route. Structure is documented below.numRetries(pulumi.Input[float]) - Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1.perTryTimeout(pulumi.Input[dict]) - Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
retryConditions(pulumi.Input[list]) - Specfies one or more conditions when this retry rule applies. Valid values are: 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
timeout(pulumi.Input[dict]) - Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, will use the largest timeout among all backend services associated with the route. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
urlRewrite(pulumi.Input[dict]) - The spec to modify the URL of the request, prior to forwarding the request to the matched service. Structure is documented below.hostRewrite(pulumi.Input[str]) - Prior to forwarding the request to the selected service, the request’s host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters.pathPrefixRewrite(pulumi.Input[str]) - Prior to forwarding the request to the selected backend service, the matching portion of the request’s path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters.
weightedBackendServices(pulumi.Input[list]) - A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. Structure is documented below.backend_service(pulumi.Input[str]) - The full or partial URL to the BackendService resource being mirrored to.header_action(pulumi.Input[dict]) - Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. Structure is documented below.requestHeadersToAdds(pulumi.Input[list]) - Headers to add to a matching request prior to forwarding the request to the backendService. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header to add.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
requestHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.responseHeadersToAdds(pulumi.Input[list]) - Headers to add the response prior to sending the response back to the client. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header to add.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
responseHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
weight(pulumi.Input[float]) - Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user’s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService’s session affinity policy. The value must be between 0 and 1000
default_service(pulumi.Input[str]) - The backend service or backend bucket to use when none of the given paths match.default_url_redirect(pulumi.Input[dict]) - When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. Structure is documented below.hostRedirect(pulumi.Input[str]) - The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters.httpsRedirect(pulumi.Input[bool]) - If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false.pathRedirect(pulumi.Input[str]) - The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.prefixRedirect(pulumi.Input[str]) - The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.redirectResponseCode(pulumi.Input[str]) - The HTTP Status code to use for this RedirectAction. Supported values are:MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
FOUND, which corresponds to 302.
SEE_OTHER which corresponds to 303.
TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
stripQuery(pulumi.Input[bool]) - If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. The default is set to false. This field is required to ensure an empty block is not set. The normal default value is false.
description(pulumi.Input[str]) - Description of this test case.header_action(pulumi.Input[dict]) - Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. Structure is documented below.requestHeadersToAdds(pulumi.Input[list]) - Headers to add to a matching request prior to forwarding the request to the backendService. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header to add.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
requestHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.responseHeadersToAdds(pulumi.Input[list]) - Headers to add the response prior to sending the response back to the client. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header to add.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
responseHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
name(pulumi.Input[str]) - The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.pathRules(pulumi.Input[list]) - The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that’s required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis. For example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list. Within a given pathMatcher, only one of pathRules or routeRules must be set. Structure is documented below.paths(pulumi.Input[list]) - The list of path patterns to match. Each must start with / and the only place ais allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here.
routeAction(pulumi.Input[dict]) - In response to a matching matchRule, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. Structure is documented below.corsPolicy(pulumi.Input[dict]) - The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing Structure is documented below.allowCredentials(pulumi.Input[bool]) - In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.allowHeaders(pulumi.Input[list]) - Specifies the content for the Access-Control-Allow-Headers header.allowMethods(pulumi.Input[list]) - Specifies the content for the Access-Control-Allow-Methods header.allowOriginRegexes(pulumi.Input[list]) - Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.allowOrigins(pulumi.Input[list]) - Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.disabled(pulumi.Input[bool]) - If true, specifies the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.exposeHeaders(pulumi.Input[list]) - Specifies the content for the Access-Control-Expose-Headers header.maxAge(pulumi.Input[float]) - Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
faultInjectionPolicy(pulumi.Input[dict]) - The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retryPolicy will be ignored by clients that are configured with a faultInjectionPolicy. Structure is documented below.abort(pulumi.Input[dict]) - The specification for how client requests are aborted as part of fault injection. Structure is documented below.httpStatus(pulumi.Input[float]) - The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive.percentage(pulumi.Input[float]) - The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
delay(pulumi.Input[dict]) - The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. Structure is documented below.fixedDelay(pulumi.Input[dict]) - Specifies the value of the fixed delay interval. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
percentage(pulumi.Input[float]) - The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
requestMirrorPolicy(pulumi.Input[dict]) - Specifies the policy on how requests intended for the route’s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. Structure is documented below.backend_service(pulumi.Input[str]) - The full or partial URL to the BackendService resource being mirrored to.
retryPolicy(pulumi.Input[dict]) - Specifies the retry policy associated with this route. Structure is documented below.numRetries(pulumi.Input[float]) - Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1.perTryTimeout(pulumi.Input[dict]) - Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
retryConditions(pulumi.Input[list]) - Specfies one or more conditions when this retry rule applies. Valid values are: 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
timeout(pulumi.Input[dict]) - Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, will use the largest timeout among all backend services associated with the route. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
urlRewrite(pulumi.Input[dict]) - The spec to modify the URL of the request, prior to forwarding the request to the matched service. Structure is documented below.hostRewrite(pulumi.Input[str]) - Prior to forwarding the request to the selected service, the request’s host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters.pathPrefixRewrite(pulumi.Input[str]) - Prior to forwarding the request to the selected backend service, the matching portion of the request’s path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters.
weightedBackendServices(pulumi.Input[list]) - A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. Structure is documented below.backend_service(pulumi.Input[str]) - The full or partial URL to the BackendService resource being mirrored to.header_action(pulumi.Input[dict]) - Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. Structure is documented below.requestHeadersToAdds(pulumi.Input[list]) - Headers to add to a matching request prior to forwarding the request to the backendService. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header to add.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
requestHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.responseHeadersToAdds(pulumi.Input[list]) - Headers to add the response prior to sending the response back to the client. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header to add.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
responseHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
weight(pulumi.Input[float]) - Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user’s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService’s session affinity policy. The value must be between 0 and 1000
service(pulumi.Input[str]) - The backend service or backend bucket link that should be matched by this test.urlRedirect(pulumi.Input[dict]) - When this rule is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. Structure is documented below.hostRedirect(pulumi.Input[str]) - The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters.httpsRedirect(pulumi.Input[bool]) - If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false.pathRedirect(pulumi.Input[str]) - The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.prefixRedirect(pulumi.Input[str]) - The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.redirectResponseCode(pulumi.Input[str]) - The HTTP Status code to use for this RedirectAction. Supported values are:MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
FOUND, which corresponds to 302.
SEE_OTHER which corresponds to 303.
TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
stripQuery(pulumi.Input[bool]) - If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. The default is set to false. This field is required to ensure an empty block is not set. The normal default value is false.
routeRules(pulumi.Input[list]) - The list of ordered HTTP route rules. Use this list instead of pathRules when advanced route matching and routing actions are desired. The order of specifying routeRules matters: the first rule that matches will cause its specified routing action to take effect. Within a given pathMatcher, only one of pathRules or routeRules must be set. routeRules are not supported in UrlMaps intended for External load balancers. Structure is documented below.header_action(pulumi.Input[dict]) - Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. Structure is documented below.requestHeadersToAdds(pulumi.Input[list]) - Headers to add to a matching request prior to forwarding the request to the backendService. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header to add.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
requestHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.responseHeadersToAdds(pulumi.Input[list]) - Headers to add the response prior to sending the response back to the client. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header to add.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
responseHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
matchRules(pulumi.Input[list]) - The rules for determining a match. Structure is documented below.fullPathMatch(pulumi.Input[str]) - For satifying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL. FullPathMatch must be between 1 and 1024 characters. Only one of prefixMatch, fullPathMatch or regexMatch must be specified.headerMatches(pulumi.Input[list]) - Specifies a list of header match criteria, all of which must match corresponding headers in the request. Structure is documented below.exactMatch(pulumi.Input[str]) - The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch. Only one of presentMatch, exactMatch and regexMatch must be set.headerName(pulumi.Input[str]) - The name of the header to add.invertMatch(pulumi.Input[bool]) - If set to false, the headerMatch is considered a match if the match criteria above are met. If set to true, the headerMatch is considered a match if the match criteria above are NOT met. Defaults to false.prefixMatch(pulumi.Input[str]) - The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.presentMatch(pulumi.Input[bool]) - Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not. Only one of presentMatch, exactMatch and regexMatch must be set.rangeMatch(pulumi.Input[dict]) - The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. Structure is documented below.rangeEnd(pulumi.Input[float]) - The end of the range (exclusive).rangeStart(pulumi.Input[float]) - The start of the range (inclusive).
regexMatch(pulumi.Input[str]) - The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript Only one of presentMatch, exactMatch and regexMatch must be set.suffixMatch(pulumi.Input[str]) - The value of the header must end with the contents of suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
ignoreCase(pulumi.Input[bool]) - Specifies that prefixMatch and fullPathMatch matches are case sensitive. Defaults to false.metadata_filters(pulumi.Input[list]) - Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies. For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels in the provided metadata. metadataFilters specified here can be overrides those specified in ForwardingRule that refers to this UrlMap. metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED. Structure is documented below.filterLabels(pulumi.Input[list]) - The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries. Structure is documented below.name(pulumi.Input[str]) - The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.value(pulumi.Input[str]) - The value of the label must match the specified value. value can have a maximum length of 1024 characters.
filterMatchCriteria(pulumi.Input[str]) - Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match. Supported values are:MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
prefixMatch(pulumi.Input[str]) - The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.queryParameterMatches(pulumi.Input[list]) - Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request. Structure is documented below.exactMatch(pulumi.Input[str]) - The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch. Only one of presentMatch, exactMatch and regexMatch must be set.name(pulumi.Input[str]) - The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.presentMatch(pulumi.Input[bool]) - Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not. Only one of presentMatch, exactMatch and regexMatch must be set.regexMatch(pulumi.Input[str]) - The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript Only one of presentMatch, exactMatch and regexMatch must be set.
regexMatch(pulumi.Input[str]) - The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript Only one of presentMatch, exactMatch and regexMatch must be set.
priority(pulumi.Input[float]) - For routeRules within a given pathMatcher, priority determines the order in which load balancer will interpret routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied. You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number between 0 and 2147483647 inclusive. Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules.routeAction(pulumi.Input[dict]) - In response to a matching matchRule, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. Structure is documented below.corsPolicy(pulumi.Input[dict]) - The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing Structure is documented below.allowCredentials(pulumi.Input[bool]) - In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.allowHeaders(pulumi.Input[list]) - Specifies the content for the Access-Control-Allow-Headers header.allowMethods(pulumi.Input[list]) - Specifies the content for the Access-Control-Allow-Methods header.allowOriginRegexes(pulumi.Input[list]) - Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.allowOrigins(pulumi.Input[list]) - Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.disabled(pulumi.Input[bool]) - If true, specifies the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.exposeHeaders(pulumi.Input[list]) - Specifies the content for the Access-Control-Expose-Headers header.maxAge(pulumi.Input[float]) - Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
faultInjectionPolicy(pulumi.Input[dict]) - The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retryPolicy will be ignored by clients that are configured with a faultInjectionPolicy. Structure is documented below.abort(pulumi.Input[dict]) - The specification for how client requests are aborted as part of fault injection. Structure is documented below.httpStatus(pulumi.Input[float]) - The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive.percentage(pulumi.Input[float]) - The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
delay(pulumi.Input[dict]) - The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. Structure is documented below.fixedDelay(pulumi.Input[dict]) - Specifies the value of the fixed delay interval. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
percentage(pulumi.Input[float]) - The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
requestMirrorPolicy(pulumi.Input[dict]) - Specifies the policy on how requests intended for the route’s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. Structure is documented below.backend_service(pulumi.Input[str]) - The full or partial URL to the BackendService resource being mirrored to.
retryPolicy(pulumi.Input[dict]) - Specifies the retry policy associated with this route. Structure is documented below.numRetries(pulumi.Input[float]) - Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1.perTryTimeout(pulumi.Input[dict]) - Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
retryConditions(pulumi.Input[list]) - Specfies one or more conditions when this retry rule applies. Valid values are: 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
timeout(pulumi.Input[dict]) - Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, will use the largest timeout among all backend services associated with the route. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
urlRewrite(pulumi.Input[dict]) - The spec to modify the URL of the request, prior to forwarding the request to the matched service. Structure is documented below.hostRewrite(pulumi.Input[str]) - Prior to forwarding the request to the selected service, the request’s host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters.pathPrefixRewrite(pulumi.Input[str]) - Prior to forwarding the request to the selected backend service, the matching portion of the request’s path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters.
weightedBackendServices(pulumi.Input[list]) - A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. Structure is documented below.backend_service(pulumi.Input[str]) - The full or partial URL to the BackendService resource being mirrored to.header_action(pulumi.Input[dict]) - Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. Structure is documented below.requestHeadersToAdds(pulumi.Input[list]) - Headers to add to a matching request prior to forwarding the request to the backendService. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header to add.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
requestHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.responseHeadersToAdds(pulumi.Input[list]) - Headers to add the response prior to sending the response back to the client. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header to add.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
responseHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
weight(pulumi.Input[float]) - Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user’s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService’s session affinity policy. The value must be between 0 and 1000
service(pulumi.Input[str]) - The backend service or backend bucket link that should be matched by this test.urlRedirect(pulumi.Input[dict]) - When this rule is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. Structure is documented below.hostRedirect(pulumi.Input[str]) - The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters.httpsRedirect(pulumi.Input[bool]) - If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false.pathRedirect(pulumi.Input[str]) - The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.prefixRedirect(pulumi.Input[str]) - The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.redirectResponseCode(pulumi.Input[str]) - The HTTP Status code to use for this RedirectAction. Supported values are:MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
FOUND, which corresponds to 302.
SEE_OTHER which corresponds to 303.
TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
stripQuery(pulumi.Input[bool]) - If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. The default is set to false. This field is required to ensure an empty block is not set. The normal default value is false.
The tests object supports the following:
description(pulumi.Input[str]) - Description of this test case.host(pulumi.Input[str]) - Host portion of the URL.path(pulumi.Input[str]) - Path portion of the URL.service(pulumi.Input[str]) - The backend service or backend bucket link that should be matched by this test.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
default_route_action: pulumi.Output[dict] = None¶defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. Structure is documented below.
corsPolicy(dict) - The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing Structure is documented below.allowCredentials(bool) - In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.allowHeaders(list) - Specifies the content for the Access-Control-Allow-Headers header.allowMethods(list) - Specifies the content for the Access-Control-Allow-Methods header.allowOriginRegexes(list) - Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.allowOrigins(list) - Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.disabled(bool) - If true, specifies the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.exposeHeaders(list) - Specifies the content for the Access-Control-Expose-Headers header.maxAge(float) - Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
faultInjectionPolicy(dict) - The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retryPolicy will be ignored by clients that are configured with a faultInjectionPolicy. Structure is documented below.abort(dict) - The specification for how client requests are aborted as part of fault injection. Structure is documented below.httpStatus(float) - The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive.percentage(float) - The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
delay(dict) - The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. Structure is documented below.fixedDelay(dict) - Specifies the value of the fixed delay interval. Structure is documented below.nanos(float) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(str) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
percentage(float) - The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
requestMirrorPolicy(dict) - Specifies the policy on how requests intended for the route’s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. Structure is documented below.backend_service(str) - The full or partial URL to the BackendService resource being mirrored to.
retryPolicy(dict) - Specifies the retry policy associated with this route. Structure is documented below.numRetries(float) - Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1.perTryTimeout(dict) - Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route. Structure is documented below.nanos(float) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(str) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
retryConditions(list) - Specfies one or more conditions when this retry rule applies. Valid values are: 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
timeout(dict) - Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, will use the largest timeout among all backend services associated with the route. Structure is documented below.nanos(float) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(str) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
urlRewrite(dict) - The spec to modify the URL of the request, prior to forwarding the request to the matched service. Structure is documented below.hostRewrite(str) - Prior to forwarding the request to the selected service, the request’s host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters.pathPrefixRewrite(str) - Prior to forwarding the request to the selected backend service, the matching portion of the request’s path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters.
weightedBackendServices(list) - A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. Structure is documented below.backend_service(str) - The full or partial URL to the BackendService resource being mirrored to.header_action(dict) - Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. Structure is documented below.requestHeadersToAdds(list) - Headers to add to a matching request prior to forwarding the request to the backendService. Structure is documented below.headerName(str) - The name of the header to add.headerValue(str) - The value of the header to add.replace(bool) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
requestHeadersToRemoves(list) - A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.responseHeadersToAdds(list) - Headers to add the response prior to sending the response back to the client. Structure is documented below.headerName(str) - The name of the header to add.headerValue(str) - The value of the header to add.replace(bool) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
responseHeadersToRemoves(list) - A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
weight(float) - Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user’s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService’s session affinity policy. The value must be between 0 and 1000
default_service: pulumi.Output[str] = None¶The backend service or backend bucket to use when none of the given paths match.
default_url_redirect: pulumi.Output[dict] = None¶When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. Structure is documented below.
hostRedirect(str) - The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters.httpsRedirect(bool) - If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false.pathRedirect(str) - The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.prefixRedirect(str) - The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.redirectResponseCode(str) - The HTTP Status code to use for this RedirectAction. Supported values are:MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
FOUND, which corresponds to 302.
SEE_OTHER which corresponds to 303.
TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
stripQuery(bool) - If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. The default is set to false. This field is required to ensure an empty block is not set. The normal default value is false.
description: pulumi.Output[str] = None¶Description of this test case.
fingerprint: pulumi.Output[str] = None¶Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking.
header_action: pulumi.Output[dict] = None¶Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. Structure is documented below.
requestHeadersToAdds(list) - Headers to add to a matching request prior to forwarding the request to the backendService. Structure is documented below.headerName(str) - The name of the header to add.headerValue(str) - The value of the header to add.replace(bool) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
requestHeadersToRemoves(list) - A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.responseHeadersToAdds(list) - Headers to add the response prior to sending the response back to the client. Structure is documented below.headerName(str) - The name of the header to add.headerValue(str) - The value of the header to add.replace(bool) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
responseHeadersToRemoves(list) - A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
host_rules: pulumi.Output[list] = None¶The list of HostRules to use against the URL. Structure is documented below.
description(str) - Description of this test case.hosts(list) - The list of host patterns to match. They must be valid hostnames, except * will match any string of ([a-z0-9-.]*). In that case, * must be the first character and must be followed in the pattern by either - or ..pathMatcher(str) - The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL’s host portion.
map_id: pulumi.Output[float] = None¶The unique identifier for the resource.
name: pulumi.Output[str] = None¶The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.
path_matchers: pulumi.Output[list] = None¶The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL’s host portion.
default_route_action(dict) - defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. Structure is documented below.corsPolicy(dict) - The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing Structure is documented below.allowCredentials(bool) - In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.allowHeaders(list) - Specifies the content for the Access-Control-Allow-Headers header.allowMethods(list) - Specifies the content for the Access-Control-Allow-Methods header.allowOriginRegexes(list) - Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.allowOrigins(list) - Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.disabled(bool) - If true, specifies the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.exposeHeaders(list) - Specifies the content for the Access-Control-Expose-Headers header.maxAge(float) - Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
faultInjectionPolicy(dict) - The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retryPolicy will be ignored by clients that are configured with a faultInjectionPolicy. Structure is documented below.abort(dict) - The specification for how client requests are aborted as part of fault injection. Structure is documented below.httpStatus(float) - The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive.percentage(float) - The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
delay(dict) - The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. Structure is documented below.fixedDelay(dict) - Specifies the value of the fixed delay interval. Structure is documented below.nanos(float) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(str) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
percentage(float) - The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
requestMirrorPolicy(dict) - Specifies the policy on how requests intended for the route’s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. Structure is documented below.backend_service(str) - The full or partial URL to the BackendService resource being mirrored to.
retryPolicy(dict) - Specifies the retry policy associated with this route. Structure is documented below.numRetries(float) - Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1.perTryTimeout(dict) - Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route. Structure is documented below.nanos(float) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(str) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
retryConditions(list) - Specfies one or more conditions when this retry rule applies. Valid values are: 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
timeout(dict) - Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, will use the largest timeout among all backend services associated with the route. Structure is documented below.nanos(float) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(str) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
urlRewrite(dict) - The spec to modify the URL of the request, prior to forwarding the request to the matched service. Structure is documented below.hostRewrite(str) - Prior to forwarding the request to the selected service, the request’s host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters.pathPrefixRewrite(str) - Prior to forwarding the request to the selected backend service, the matching portion of the request’s path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters.
weightedBackendServices(list) - A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. Structure is documented below.backend_service(str) - The full or partial URL to the BackendService resource being mirrored to.header_action(dict) - Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. Structure is documented below.requestHeadersToAdds(list) - Headers to add to a matching request prior to forwarding the request to the backendService. Structure is documented below.headerName(str) - The name of the header to add.headerValue(str) - The value of the header to add.replace(bool) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
requestHeadersToRemoves(list) - A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.responseHeadersToAdds(list) - Headers to add the response prior to sending the response back to the client. Structure is documented below.headerName(str) - The name of the header to add.headerValue(str) - The value of the header to add.replace(bool) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
responseHeadersToRemoves(list) - A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
weight(float) - Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user’s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService’s session affinity policy. The value must be between 0 and 1000
default_service(str) - The backend service or backend bucket to use when none of the given paths match.default_url_redirect(dict) - When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. Structure is documented below.hostRedirect(str) - The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters.httpsRedirect(bool) - If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false.pathRedirect(str) - The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.prefixRedirect(str) - The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.redirectResponseCode(str) - The HTTP Status code to use for this RedirectAction. Supported values are:MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
FOUND, which corresponds to 302.
SEE_OTHER which corresponds to 303.
TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
stripQuery(bool) - If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. The default is set to false. This field is required to ensure an empty block is not set. The normal default value is false.
description(str) - Description of this test case.header_action(dict) - Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. Structure is documented below.requestHeadersToAdds(list) - Headers to add to a matching request prior to forwarding the request to the backendService. Structure is documented below.headerName(str) - The name of the header to add.headerValue(str) - The value of the header to add.replace(bool) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
requestHeadersToRemoves(list) - A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.responseHeadersToAdds(list) - Headers to add the response prior to sending the response back to the client. Structure is documented below.headerName(str) - The name of the header to add.headerValue(str) - The value of the header to add.replace(bool) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
responseHeadersToRemoves(list) - A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
name(str) - The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.pathRules(list) - The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that’s required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis. For example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list. Within a given pathMatcher, only one of pathRules or routeRules must be set. Structure is documented below.paths(list) - The list of path patterns to match. Each must start with / and the only place ais allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here.
routeAction(dict) - In response to a matching matchRule, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. Structure is documented below.corsPolicy(dict) - The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing Structure is documented below.allowCredentials(bool) - In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.allowHeaders(list) - Specifies the content for the Access-Control-Allow-Headers header.allowMethods(list) - Specifies the content for the Access-Control-Allow-Methods header.allowOriginRegexes(list) - Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.allowOrigins(list) - Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.disabled(bool) - If true, specifies the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.exposeHeaders(list) - Specifies the content for the Access-Control-Expose-Headers header.maxAge(float) - Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
faultInjectionPolicy(dict) - The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retryPolicy will be ignored by clients that are configured with a faultInjectionPolicy. Structure is documented below.abort(dict) - The specification for how client requests are aborted as part of fault injection. Structure is documented below.httpStatus(float) - The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive.percentage(float) - The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
delay(dict) - The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. Structure is documented below.fixedDelay(dict) - Specifies the value of the fixed delay interval. Structure is documented below.nanos(float) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(str) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
percentage(float) - The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
requestMirrorPolicy(dict) - Specifies the policy on how requests intended for the route’s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. Structure is documented below.backend_service(str) - The full or partial URL to the BackendService resource being mirrored to.
retryPolicy(dict) - Specifies the retry policy associated with this route. Structure is documented below.numRetries(float) - Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1.perTryTimeout(dict) - Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route. Structure is documented below.nanos(float) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(str) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
retryConditions(list) - Specfies one or more conditions when this retry rule applies. Valid values are: 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
timeout(dict) - Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, will use the largest timeout among all backend services associated with the route. Structure is documented below.nanos(float) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(str) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
urlRewrite(dict) - The spec to modify the URL of the request, prior to forwarding the request to the matched service. Structure is documented below.hostRewrite(str) - Prior to forwarding the request to the selected service, the request’s host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters.pathPrefixRewrite(str) - Prior to forwarding the request to the selected backend service, the matching portion of the request’s path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters.
weightedBackendServices(list) - A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. Structure is documented below.backend_service(str) - The full or partial URL to the BackendService resource being mirrored to.header_action(dict) - Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. Structure is documented below.requestHeadersToAdds(list) - Headers to add to a matching request prior to forwarding the request to the backendService. Structure is documented below.headerName(str) - The name of the header to add.headerValue(str) - The value of the header to add.replace(bool) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
requestHeadersToRemoves(list) - A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.responseHeadersToAdds(list) - Headers to add the response prior to sending the response back to the client. Structure is documented below.headerName(str) - The name of the header to add.headerValue(str) - The value of the header to add.replace(bool) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
responseHeadersToRemoves(list) - A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
weight(float) - Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user’s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService’s session affinity policy. The value must be between 0 and 1000
service(str) - The backend service or backend bucket link that should be matched by this test.urlRedirect(dict) - When this rule is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. Structure is documented below.hostRedirect(str) - The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters.httpsRedirect(bool) - If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false.pathRedirect(str) - The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.prefixRedirect(str) - The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.redirectResponseCode(str) - The HTTP Status code to use for this RedirectAction. Supported values are:MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
FOUND, which corresponds to 302.
SEE_OTHER which corresponds to 303.
TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
stripQuery(bool) - If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. The default is set to false. This field is required to ensure an empty block is not set. The normal default value is false.
routeRules(list) - The list of ordered HTTP route rules. Use this list instead of pathRules when advanced route matching and routing actions are desired. The order of specifying routeRules matters: the first rule that matches will cause its specified routing action to take effect. Within a given pathMatcher, only one of pathRules or routeRules must be set. routeRules are not supported in UrlMaps intended for External load balancers. Structure is documented below.header_action(dict) - Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. Structure is documented below.requestHeadersToAdds(list) - Headers to add to a matching request prior to forwarding the request to the backendService. Structure is documented below.headerName(str) - The name of the header to add.headerValue(str) - The value of the header to add.replace(bool) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
requestHeadersToRemoves(list) - A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.responseHeadersToAdds(list) - Headers to add the response prior to sending the response back to the client. Structure is documented below.headerName(str) - The name of the header to add.headerValue(str) - The value of the header to add.replace(bool) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
responseHeadersToRemoves(list) - A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
matchRules(list) - The rules for determining a match. Structure is documented below.fullPathMatch(str) - For satifying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL. FullPathMatch must be between 1 and 1024 characters. Only one of prefixMatch, fullPathMatch or regexMatch must be specified.headerMatches(list) - Specifies a list of header match criteria, all of which must match corresponding headers in the request. Structure is documented below.exactMatch(str) - The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch. Only one of presentMatch, exactMatch and regexMatch must be set.headerName(str) - The name of the header to add.invertMatch(bool) - If set to false, the headerMatch is considered a match if the match criteria above are met. If set to true, the headerMatch is considered a match if the match criteria above are NOT met. Defaults to false.prefixMatch(str) - The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.presentMatch(bool) - Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not. Only one of presentMatch, exactMatch and regexMatch must be set.rangeMatch(dict) - The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. Structure is documented below.rangeEnd(float) - The end of the range (exclusive).rangeStart(float) - The start of the range (inclusive).
regexMatch(str) - The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript Only one of presentMatch, exactMatch and regexMatch must be set.suffixMatch(str) - The value of the header must end with the contents of suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
ignoreCase(bool) - Specifies that prefixMatch and fullPathMatch matches are case sensitive. Defaults to false.metadata_filters(list) - Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies. For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels in the provided metadata. metadataFilters specified here can be overrides those specified in ForwardingRule that refers to this UrlMap. metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED. Structure is documented below.filterLabels(list) - The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries. Structure is documented below.name(str) - The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.value(str) - The value of the label must match the specified value. value can have a maximum length of 1024 characters.
filterMatchCriteria(str) - Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match. Supported values are:MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
prefixMatch(str) - The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.queryParameterMatches(list) - Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request. Structure is documented below.exactMatch(str) - The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch. Only one of presentMatch, exactMatch and regexMatch must be set.name(str) - The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.presentMatch(bool) - Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not. Only one of presentMatch, exactMatch and regexMatch must be set.regexMatch(str) - The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript Only one of presentMatch, exactMatch and regexMatch must be set.
regexMatch(str) - The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript Only one of presentMatch, exactMatch and regexMatch must be set.
priority(float) - For routeRules within a given pathMatcher, priority determines the order in which load balancer will interpret routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied. You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number between 0 and 2147483647 inclusive. Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules.routeAction(dict) - In response to a matching matchRule, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. Structure is documented below.corsPolicy(dict) - The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing Structure is documented below.allowCredentials(bool) - In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.allowHeaders(list) - Specifies the content for the Access-Control-Allow-Headers header.allowMethods(list) - Specifies the content for the Access-Control-Allow-Methods header.allowOriginRegexes(list) - Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.allowOrigins(list) - Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.disabled(bool) - If true, specifies the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.exposeHeaders(list) - Specifies the content for the Access-Control-Expose-Headers header.maxAge(float) - Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
faultInjectionPolicy(dict) - The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retryPolicy will be ignored by clients that are configured with a faultInjectionPolicy. Structure is documented below.abort(dict) - The specification for how client requests are aborted as part of fault injection. Structure is documented below.httpStatus(float) - The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive.percentage(float) - The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
delay(dict) - The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. Structure is documented below.fixedDelay(dict) - Specifies the value of the fixed delay interval. Structure is documented below.nanos(float) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(str) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
percentage(float) - The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
requestMirrorPolicy(dict) - Specifies the policy on how requests intended for the route’s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. Structure is documented below.backend_service(str) - The full or partial URL to the BackendService resource being mirrored to.
retryPolicy(dict) - Specifies the retry policy associated with this route. Structure is documented below.numRetries(float) - Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1.perTryTimeout(dict) - Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route. Structure is documented below.nanos(float) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(str) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
retryConditions(list) - Specfies one or more conditions when this retry rule applies. Valid values are: 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
timeout(dict) - Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, will use the largest timeout among all backend services associated with the route. Structure is documented below.nanos(float) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(str) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
urlRewrite(dict) - The spec to modify the URL of the request, prior to forwarding the request to the matched service. Structure is documented below.hostRewrite(str) - Prior to forwarding the request to the selected service, the request’s host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters.pathPrefixRewrite(str) - Prior to forwarding the request to the selected backend service, the matching portion of the request’s path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters.
weightedBackendServices(list) - A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. Structure is documented below.backend_service(str) - The full or partial URL to the BackendService resource being mirrored to.header_action(dict) - Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. Structure is documented below.requestHeadersToAdds(list) - Headers to add to a matching request prior to forwarding the request to the backendService. Structure is documented below.headerName(str) - The name of the header to add.headerValue(str) - The value of the header to add.replace(bool) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
requestHeadersToRemoves(list) - A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.responseHeadersToAdds(list) - Headers to add the response prior to sending the response back to the client. Structure is documented below.headerName(str) - The name of the header to add.headerValue(str) - The value of the header to add.replace(bool) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
responseHeadersToRemoves(list) - A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
weight(float) - Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user’s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService’s session affinity policy. The value must be between 0 and 1000
service(str) - The backend service or backend bucket link that should be matched by this test.urlRedirect(dict) - When this rule is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. Structure is documented below.hostRedirect(str) - The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters.httpsRedirect(bool) - If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false.pathRedirect(str) - The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.prefixRedirect(str) - The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.redirectResponseCode(str) - The HTTP Status code to use for this RedirectAction. Supported values are:MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
FOUND, which corresponds to 302.
SEE_OTHER which corresponds to 303.
TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
stripQuery(bool) - If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. The default is set to false. This field is required to ensure an empty block is not set. The normal default value is false.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
tests: pulumi.Output[list] = None¶The list of expected URL mapping tests. Request to update this UrlMap will succeed only if all of the test cases pass. You can specify a maximum of 100 tests per UrlMap. Structure is documented below.
description(str) - Description of this test case.host(str) - Host portion of the URL.path(str) - Path portion of the URL.service(str) - The backend service or backend bucket link that should be matched by this test.
- static
get(resource_name, id, opts=None, creation_timestamp=None, default_route_action=None, default_service=None, default_url_redirect=None, description=None, fingerprint=None, header_action=None, host_rules=None, map_id=None, name=None, path_matchers=None, project=None, self_link=None, tests=None)¶ Get an existing URLMap resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
default_route_action (pulumi.Input[dict]) – defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. Structure is documented below.
default_service (pulumi.Input[str]) – The backend service or backend bucket to use when none of the given paths match.
default_url_redirect (pulumi.Input[dict]) – When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. Structure is documented below.
description (pulumi.Input[str]) – Description of this test case.
fingerprint (pulumi.Input[str]) – Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking.
header_action (pulumi.Input[dict]) – Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. Structure is documented below.
host_rules (pulumi.Input[list]) – The list of HostRules to use against the URL. Structure is documented below.
map_id (pulumi.Input[float]) – The unique identifier for the resource.
name (pulumi.Input[str]) – The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.
path_matchers (pulumi.Input[list]) – The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL’s host portion.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link (pulumi.Input[str]) – The URI of the created resource.
tests (pulumi.Input[list]) – The list of expected URL mapping tests. Request to update this UrlMap will succeed only if all of the test cases pass. You can specify a maximum of 100 tests per UrlMap. Structure is documented below.
The default_route_action object supports the following:
corsPolicy(pulumi.Input[dict]) - The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing Structure is documented below.allowCredentials(pulumi.Input[bool]) - In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.allowHeaders(pulumi.Input[list]) - Specifies the content for the Access-Control-Allow-Headers header.allowMethods(pulumi.Input[list]) - Specifies the content for the Access-Control-Allow-Methods header.allowOriginRegexes(pulumi.Input[list]) - Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.allowOrigins(pulumi.Input[list]) - Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.disabled(pulumi.Input[bool]) - If true, specifies the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.exposeHeaders(pulumi.Input[list]) - Specifies the content for the Access-Control-Expose-Headers header.maxAge(pulumi.Input[float]) - Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
faultInjectionPolicy(pulumi.Input[dict]) - The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retryPolicy will be ignored by clients that are configured with a faultInjectionPolicy. Structure is documented below.abort(pulumi.Input[dict]) - The specification for how client requests are aborted as part of fault injection. Structure is documented below.httpStatus(pulumi.Input[float]) - The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive.percentage(pulumi.Input[float]) - The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
delay(pulumi.Input[dict]) - The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. Structure is documented below.fixedDelay(pulumi.Input[dict]) - Specifies the value of the fixed delay interval. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
percentage(pulumi.Input[float]) - The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
requestMirrorPolicy(pulumi.Input[dict]) - Specifies the policy on how requests intended for the route’s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. Structure is documented below.backend_service(pulumi.Input[str]) - The full or partial URL to the BackendService resource being mirrored to.
retryPolicy(pulumi.Input[dict]) - Specifies the retry policy associated with this route. Structure is documented below.numRetries(pulumi.Input[float]) - Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1.perTryTimeout(pulumi.Input[dict]) - Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
retryConditions(pulumi.Input[list]) - Specfies one or more conditions when this retry rule applies. Valid values are: 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
timeout(pulumi.Input[dict]) - Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, will use the largest timeout among all backend services associated with the route. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
urlRewrite(pulumi.Input[dict]) - The spec to modify the URL of the request, prior to forwarding the request to the matched service. Structure is documented below.hostRewrite(pulumi.Input[str]) - Prior to forwarding the request to the selected service, the request’s host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters.pathPrefixRewrite(pulumi.Input[str]) - Prior to forwarding the request to the selected backend service, the matching portion of the request’s path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters.
weightedBackendServices(pulumi.Input[list]) - A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. Structure is documented below.backend_service(pulumi.Input[str]) - The full or partial URL to the BackendService resource being mirrored to.header_action(pulumi.Input[dict]) - Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. Structure is documented below.requestHeadersToAdds(pulumi.Input[list]) - Headers to add to a matching request prior to forwarding the request to the backendService. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header to add.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
requestHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.responseHeadersToAdds(pulumi.Input[list]) - Headers to add the response prior to sending the response back to the client. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header to add.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
responseHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
weight(pulumi.Input[float]) - Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user’s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService’s session affinity policy. The value must be between 0 and 1000
The default_url_redirect object supports the following:
hostRedirect(pulumi.Input[str]) - The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters.httpsRedirect(pulumi.Input[bool]) - If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false.pathRedirect(pulumi.Input[str]) - The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.prefixRedirect(pulumi.Input[str]) - The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.redirectResponseCode(pulumi.Input[str]) - The HTTP Status code to use for this RedirectAction. Supported values are:MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
FOUND, which corresponds to 302.
SEE_OTHER which corresponds to 303.
TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
stripQuery(pulumi.Input[bool]) - If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. The default is set to false. This field is required to ensure an empty block is not set. The normal default value is false.
The header_action object supports the following:
requestHeadersToAdds(pulumi.Input[list]) - Headers to add to a matching request prior to forwarding the request to the backendService. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header to add.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
requestHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.responseHeadersToAdds(pulumi.Input[list]) - Headers to add the response prior to sending the response back to the client. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header to add.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
responseHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
The host_rules object supports the following:
description(pulumi.Input[str]) - Description of this test case.hosts(pulumi.Input[list]) - The list of host patterns to match. They must be valid hostnames, except * will match any string of ([a-z0-9-.]*). In that case, * must be the first character and must be followed in the pattern by either - or ..pathMatcher(pulumi.Input[str]) - The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL’s host portion.
The path_matchers object supports the following:
default_route_action(pulumi.Input[dict]) - defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. Structure is documented below.corsPolicy(pulumi.Input[dict]) - The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing Structure is documented below.allowCredentials(pulumi.Input[bool]) - In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.allowHeaders(pulumi.Input[list]) - Specifies the content for the Access-Control-Allow-Headers header.allowMethods(pulumi.Input[list]) - Specifies the content for the Access-Control-Allow-Methods header.allowOriginRegexes(pulumi.Input[list]) - Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.allowOrigins(pulumi.Input[list]) - Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.disabled(pulumi.Input[bool]) - If true, specifies the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.exposeHeaders(pulumi.Input[list]) - Specifies the content for the Access-Control-Expose-Headers header.maxAge(pulumi.Input[float]) - Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
faultInjectionPolicy(pulumi.Input[dict]) - The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retryPolicy will be ignored by clients that are configured with a faultInjectionPolicy. Structure is documented below.abort(pulumi.Input[dict]) - The specification for how client requests are aborted as part of fault injection. Structure is documented below.httpStatus(pulumi.Input[float]) - The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive.percentage(pulumi.Input[float]) - The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
delay(pulumi.Input[dict]) - The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. Structure is documented below.fixedDelay(pulumi.Input[dict]) - Specifies the value of the fixed delay interval. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
percentage(pulumi.Input[float]) - The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
requestMirrorPolicy(pulumi.Input[dict]) - Specifies the policy on how requests intended for the route’s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. Structure is documented below.backend_service(pulumi.Input[str]) - The full or partial URL to the BackendService resource being mirrored to.
retryPolicy(pulumi.Input[dict]) - Specifies the retry policy associated with this route. Structure is documented below.numRetries(pulumi.Input[float]) - Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1.perTryTimeout(pulumi.Input[dict]) - Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
retryConditions(pulumi.Input[list]) - Specfies one or more conditions when this retry rule applies. Valid values are: 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
timeout(pulumi.Input[dict]) - Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, will use the largest timeout among all backend services associated with the route. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
urlRewrite(pulumi.Input[dict]) - The spec to modify the URL of the request, prior to forwarding the request to the matched service. Structure is documented below.hostRewrite(pulumi.Input[str]) - Prior to forwarding the request to the selected service, the request’s host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters.pathPrefixRewrite(pulumi.Input[str]) - Prior to forwarding the request to the selected backend service, the matching portion of the request’s path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters.
weightedBackendServices(pulumi.Input[list]) - A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. Structure is documented below.backend_service(pulumi.Input[str]) - The full or partial URL to the BackendService resource being mirrored to.header_action(pulumi.Input[dict]) - Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. Structure is documented below.requestHeadersToAdds(pulumi.Input[list]) - Headers to add to a matching request prior to forwarding the request to the backendService. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header to add.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
requestHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.responseHeadersToAdds(pulumi.Input[list]) - Headers to add the response prior to sending the response back to the client. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header to add.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
responseHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
weight(pulumi.Input[float]) - Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user’s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService’s session affinity policy. The value must be between 0 and 1000
default_service(pulumi.Input[str]) - The backend service or backend bucket to use when none of the given paths match.default_url_redirect(pulumi.Input[dict]) - When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. Structure is documented below.hostRedirect(pulumi.Input[str]) - The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters.httpsRedirect(pulumi.Input[bool]) - If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false.pathRedirect(pulumi.Input[str]) - The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.prefixRedirect(pulumi.Input[str]) - The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.redirectResponseCode(pulumi.Input[str]) - The HTTP Status code to use for this RedirectAction. Supported values are:MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
FOUND, which corresponds to 302.
SEE_OTHER which corresponds to 303.
TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
stripQuery(pulumi.Input[bool]) - If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. The default is set to false. This field is required to ensure an empty block is not set. The normal default value is false.
description(pulumi.Input[str]) - Description of this test case.header_action(pulumi.Input[dict]) - Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. Structure is documented below.requestHeadersToAdds(pulumi.Input[list]) - Headers to add to a matching request prior to forwarding the request to the backendService. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header to add.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
requestHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.responseHeadersToAdds(pulumi.Input[list]) - Headers to add the response prior to sending the response back to the client. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header to add.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
responseHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
name(pulumi.Input[str]) - The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.pathRules(pulumi.Input[list]) - The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that’s required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis. For example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list. Within a given pathMatcher, only one of pathRules or routeRules must be set. Structure is documented below.paths(pulumi.Input[list]) - The list of path patterns to match. Each must start with / and the only place ais allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here.
routeAction(pulumi.Input[dict]) - In response to a matching matchRule, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. Structure is documented below.corsPolicy(pulumi.Input[dict]) - The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing Structure is documented below.allowCredentials(pulumi.Input[bool]) - In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.allowHeaders(pulumi.Input[list]) - Specifies the content for the Access-Control-Allow-Headers header.allowMethods(pulumi.Input[list]) - Specifies the content for the Access-Control-Allow-Methods header.allowOriginRegexes(pulumi.Input[list]) - Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.allowOrigins(pulumi.Input[list]) - Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.disabled(pulumi.Input[bool]) - If true, specifies the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.exposeHeaders(pulumi.Input[list]) - Specifies the content for the Access-Control-Expose-Headers header.maxAge(pulumi.Input[float]) - Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
faultInjectionPolicy(pulumi.Input[dict]) - The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retryPolicy will be ignored by clients that are configured with a faultInjectionPolicy. Structure is documented below.abort(pulumi.Input[dict]) - The specification for how client requests are aborted as part of fault injection. Structure is documented below.httpStatus(pulumi.Input[float]) - The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive.percentage(pulumi.Input[float]) - The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
delay(pulumi.Input[dict]) - The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. Structure is documented below.fixedDelay(pulumi.Input[dict]) - Specifies the value of the fixed delay interval. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
percentage(pulumi.Input[float]) - The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
requestMirrorPolicy(pulumi.Input[dict]) - Specifies the policy on how requests intended for the route’s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. Structure is documented below.backend_service(pulumi.Input[str]) - The full or partial URL to the BackendService resource being mirrored to.
retryPolicy(pulumi.Input[dict]) - Specifies the retry policy associated with this route. Structure is documented below.numRetries(pulumi.Input[float]) - Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1.perTryTimeout(pulumi.Input[dict]) - Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
retryConditions(pulumi.Input[list]) - Specfies one or more conditions when this retry rule applies. Valid values are: 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
timeout(pulumi.Input[dict]) - Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, will use the largest timeout among all backend services associated with the route. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
urlRewrite(pulumi.Input[dict]) - The spec to modify the URL of the request, prior to forwarding the request to the matched service. Structure is documented below.hostRewrite(pulumi.Input[str]) - Prior to forwarding the request to the selected service, the request’s host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters.pathPrefixRewrite(pulumi.Input[str]) - Prior to forwarding the request to the selected backend service, the matching portion of the request’s path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters.
weightedBackendServices(pulumi.Input[list]) - A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. Structure is documented below.backend_service(pulumi.Input[str]) - The full or partial URL to the BackendService resource being mirrored to.header_action(pulumi.Input[dict]) - Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. Structure is documented below.requestHeadersToAdds(pulumi.Input[list]) - Headers to add to a matching request prior to forwarding the request to the backendService. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header to add.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
requestHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.responseHeadersToAdds(pulumi.Input[list]) - Headers to add the response prior to sending the response back to the client. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header to add.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
responseHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
weight(pulumi.Input[float]) - Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user’s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService’s session affinity policy. The value must be between 0 and 1000
service(pulumi.Input[str]) - The backend service or backend bucket link that should be matched by this test.urlRedirect(pulumi.Input[dict]) - When this rule is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. Structure is documented below.hostRedirect(pulumi.Input[str]) - The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters.httpsRedirect(pulumi.Input[bool]) - If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false.pathRedirect(pulumi.Input[str]) - The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.prefixRedirect(pulumi.Input[str]) - The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.redirectResponseCode(pulumi.Input[str]) - The HTTP Status code to use for this RedirectAction. Supported values are:MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
FOUND, which corresponds to 302.
SEE_OTHER which corresponds to 303.
TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
stripQuery(pulumi.Input[bool]) - If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. The default is set to false. This field is required to ensure an empty block is not set. The normal default value is false.
routeRules(pulumi.Input[list]) - The list of ordered HTTP route rules. Use this list instead of pathRules when advanced route matching and routing actions are desired. The order of specifying routeRules matters: the first rule that matches will cause its specified routing action to take effect. Within a given pathMatcher, only one of pathRules or routeRules must be set. routeRules are not supported in UrlMaps intended for External load balancers. Structure is documented below.header_action(pulumi.Input[dict]) - Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. Structure is documented below.requestHeadersToAdds(pulumi.Input[list]) - Headers to add to a matching request prior to forwarding the request to the backendService. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header to add.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
requestHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.responseHeadersToAdds(pulumi.Input[list]) - Headers to add the response prior to sending the response back to the client. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header to add.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
responseHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
matchRules(pulumi.Input[list]) - The rules for determining a match. Structure is documented below.fullPathMatch(pulumi.Input[str]) - For satifying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL. FullPathMatch must be between 1 and 1024 characters. Only one of prefixMatch, fullPathMatch or regexMatch must be specified.headerMatches(pulumi.Input[list]) - Specifies a list of header match criteria, all of which must match corresponding headers in the request. Structure is documented below.exactMatch(pulumi.Input[str]) - The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch. Only one of presentMatch, exactMatch and regexMatch must be set.headerName(pulumi.Input[str]) - The name of the header to add.invertMatch(pulumi.Input[bool]) - If set to false, the headerMatch is considered a match if the match criteria above are met. If set to true, the headerMatch is considered a match if the match criteria above are NOT met. Defaults to false.prefixMatch(pulumi.Input[str]) - The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.presentMatch(pulumi.Input[bool]) - Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not. Only one of presentMatch, exactMatch and regexMatch must be set.rangeMatch(pulumi.Input[dict]) - The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. Structure is documented below.rangeEnd(pulumi.Input[float]) - The end of the range (exclusive).rangeStart(pulumi.Input[float]) - The start of the range (inclusive).
regexMatch(pulumi.Input[str]) - The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript Only one of presentMatch, exactMatch and regexMatch must be set.suffixMatch(pulumi.Input[str]) - The value of the header must end with the contents of suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
ignoreCase(pulumi.Input[bool]) - Specifies that prefixMatch and fullPathMatch matches are case sensitive. Defaults to false.metadata_filters(pulumi.Input[list]) - Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies. For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels in the provided metadata. metadataFilters specified here can be overrides those specified in ForwardingRule that refers to this UrlMap. metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED. Structure is documented below.filterLabels(pulumi.Input[list]) - The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries. Structure is documented below.name(pulumi.Input[str]) - The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.value(pulumi.Input[str]) - The value of the label must match the specified value. value can have a maximum length of 1024 characters.
filterMatchCriteria(pulumi.Input[str]) - Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match. Supported values are:MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata.
MATCH_ALL: All filterLabels must have matching labels in the provided metadata.
prefixMatch(pulumi.Input[str]) - The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.queryParameterMatches(pulumi.Input[list]) - Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request. Structure is documented below.exactMatch(pulumi.Input[str]) - The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch. Only one of presentMatch, exactMatch and regexMatch must be set.name(pulumi.Input[str]) - The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.presentMatch(pulumi.Input[bool]) - Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not. Only one of presentMatch, exactMatch and regexMatch must be set.regexMatch(pulumi.Input[str]) - The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript Only one of presentMatch, exactMatch and regexMatch must be set.
regexMatch(pulumi.Input[str]) - The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript Only one of presentMatch, exactMatch and regexMatch must be set.
priority(pulumi.Input[float]) - For routeRules within a given pathMatcher, priority determines the order in which load balancer will interpret routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied. You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number between 0 and 2147483647 inclusive. Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules.routeAction(pulumi.Input[dict]) - In response to a matching matchRule, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. Structure is documented below.corsPolicy(pulumi.Input[dict]) - The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing Structure is documented below.allowCredentials(pulumi.Input[bool]) - In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.allowHeaders(pulumi.Input[list]) - Specifies the content for the Access-Control-Allow-Headers header.allowMethods(pulumi.Input[list]) - Specifies the content for the Access-Control-Allow-Methods header.allowOriginRegexes(pulumi.Input[list]) - Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.allowOrigins(pulumi.Input[list]) - Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.disabled(pulumi.Input[bool]) - If true, specifies the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.exposeHeaders(pulumi.Input[list]) - Specifies the content for the Access-Control-Expose-Headers header.maxAge(pulumi.Input[float]) - Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
faultInjectionPolicy(pulumi.Input[dict]) - The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retryPolicy will be ignored by clients that are configured with a faultInjectionPolicy. Structure is documented below.abort(pulumi.Input[dict]) - The specification for how client requests are aborted as part of fault injection. Structure is documented below.httpStatus(pulumi.Input[float]) - The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive.percentage(pulumi.Input[float]) - The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
delay(pulumi.Input[dict]) - The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. Structure is documented below.fixedDelay(pulumi.Input[dict]) - Specifies the value of the fixed delay interval. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
percentage(pulumi.Input[float]) - The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive.
requestMirrorPolicy(pulumi.Input[dict]) - Specifies the policy on how requests intended for the route’s backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. Structure is documented below.backend_service(pulumi.Input[str]) - The full or partial URL to the BackendService resource being mirrored to.
retryPolicy(pulumi.Input[dict]) - Specifies the retry policy associated with this route. Structure is documented below.numRetries(pulumi.Input[float]) - Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1.perTryTimeout(pulumi.Input[dict]) - Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
retryConditions(pulumi.Input[list]) - Specfies one or more conditions when this retry rule applies. Valid values are: 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable
timeout(pulumi.Input[dict]) - Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, will use the largest timeout among all backend services associated with the route. Structure is documented below.nanos(pulumi.Input[float]) - Span of time that’s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.seconds(pulumi.Input[str]) - Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
urlRewrite(pulumi.Input[dict]) - The spec to modify the URL of the request, prior to forwarding the request to the matched service. Structure is documented below.hostRewrite(pulumi.Input[str]) - Prior to forwarding the request to the selected service, the request’s host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters.pathPrefixRewrite(pulumi.Input[str]) - Prior to forwarding the request to the selected backend service, the matching portion of the request’s path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters.
weightedBackendServices(pulumi.Input[list]) - A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. Structure is documented below.backend_service(pulumi.Input[str]) - The full or partial URL to the BackendService resource being mirrored to.header_action(pulumi.Input[dict]) - Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. Structure is documented below.requestHeadersToAdds(pulumi.Input[list]) - Headers to add to a matching request prior to forwarding the request to the backendService. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header to add.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
requestHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.responseHeadersToAdds(pulumi.Input[list]) - Headers to add the response prior to sending the response back to the client. Structure is documented below.headerName(pulumi.Input[str]) - The name of the header to add.headerValue(pulumi.Input[str]) - The value of the header to add.replace(pulumi.Input[bool]) - If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.
responseHeadersToRemoves(pulumi.Input[list]) - A list of header names for headers that need to be removed from the response prior to sending the response back to the client.
weight(pulumi.Input[float]) - Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user’s request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService’s session affinity policy. The value must be between 0 and 1000
service(pulumi.Input[str]) - The backend service or backend bucket link that should be matched by this test.urlRedirect(pulumi.Input[dict]) - When this rule is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. Structure is documented below.hostRedirect(pulumi.Input[str]) - The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters.httpsRedirect(pulumi.Input[bool]) - If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false.pathRedirect(pulumi.Input[str]) - The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.prefixRedirect(pulumi.Input[str]) - The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.redirectResponseCode(pulumi.Input[str]) - The HTTP Status code to use for this RedirectAction. Supported values are:MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301.
FOUND, which corresponds to 302.
SEE_OTHER which corresponds to 303.
TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained.
PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
stripQuery(pulumi.Input[bool]) - If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. The default is set to false. This field is required to ensure an empty block is not set. The normal default value is false.
The tests object supports the following:
description(pulumi.Input[str]) - Description of this test case.host(pulumi.Input[str]) - Host portion of the URL.path(pulumi.Input[str]) - Path portion of the URL.service(pulumi.Input[str]) - The backend service or backend bucket link that should be matched by this test.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.VPNGateway(resource_name, opts=None, description=None, name=None, network=None, project=None, region=None, __props__=None, __name__=None, __opts__=None)¶ Represents a VPN gateway running in GCP. This virtual device is managed by Google, but used only by you.
To get more information about VpnGateway, see:
import pulumi import pulumi_gcp as gcp network1 = gcp.compute.Network("network1") target_gateway = gcp.compute.VPNGateway("targetGateway", network=network1.id) vpn_static_ip = gcp.compute.Address("vpnStaticIp") fr_esp = gcp.compute.ForwardingRule("frEsp", ip_protocol="ESP", ip_address=vpn_static_ip.address, target=target_gateway.id) fr_udp500 = gcp.compute.ForwardingRule("frUdp500", ip_protocol="UDP", port_range="500", ip_address=vpn_static_ip.address, target=target_gateway.id) fr_udp4500 = gcp.compute.ForwardingRule("frUdp4500", ip_protocol="UDP", port_range="4500", ip_address=vpn_static_ip.address, target=target_gateway.id) tunnel1 = gcp.compute.VPNTunnel("tunnel1", peer_ip="15.0.0.120", shared_secret="a secret message", target_vpn_gateway=target_gateway.id) route1 = gcp.compute.Route("route1", network=network1.name, dest_range="15.0.0.0/24", priority=1000, next_hop_vpn_tunnel=tunnel1.id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – An optional description of this resource.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.network (pulumi.Input[str]) – The network this VPN gateway is accepting traffic for.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – The region this gateway should sit in.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional description of this resource.
gateway_id: pulumi.Output[float] = None¶The unique identifier for the resource.
name: pulumi.Output[str] = None¶Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
network: pulumi.Output[str] = None¶The network this VPN gateway is accepting traffic for.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region: pulumi.Output[str] = None¶The region this gateway should sit in.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
- static
get(resource_name, id, opts=None, creation_timestamp=None, description=None, gateway_id=None, name=None, network=None, project=None, region=None, self_link=None)¶ Get an existing VPNGateway resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional description of this resource.
gateway_id (pulumi.Input[float]) – The unique identifier for the resource.
name (pulumi.Input[str]) – Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.network (pulumi.Input[str]) – The network this VPN gateway is accepting traffic for.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – The region this gateway should sit in.
self_link (pulumi.Input[str]) – The URI of the created resource.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_gcp.compute.VPNTunnel(resource_name, opts=None, description=None, ike_version=None, labels=None, local_traffic_selectors=None, name=None, peer_external_gateway=None, peer_external_gateway_interface=None, peer_gcp_gateway=None, peer_ip=None, project=None, region=None, remote_traffic_selectors=None, router=None, shared_secret=None, target_vpn_gateway=None, vpn_gateway=None, vpn_gateway_interface=None, __props__=None, __name__=None, __opts__=None)¶ VPN tunnel resource.
To get more information about VpnTunnel, see:
Warning: All arguments including
shared_secretwill be stored in the raw state as plain-text.import pulumi import pulumi_gcp as gcp network1 = gcp.compute.Network("network1") target_gateway = gcp.compute.VPNGateway("targetGateway", network=network1.id) vpn_static_ip = gcp.compute.Address("vpnStaticIp") fr_esp = gcp.compute.ForwardingRule("frEsp", ip_protocol="ESP", ip_address=vpn_static_ip.address, target=target_gateway.id) fr_udp500 = gcp.compute.ForwardingRule("frUdp500", ip_protocol="UDP", port_range="500", ip_address=vpn_static_ip.address, target=target_gateway.id) fr_udp4500 = gcp.compute.ForwardingRule("frUdp4500", ip_protocol="UDP", port_range="4500", ip_address=vpn_static_ip.address, target=target_gateway.id) tunnel1 = gcp.compute.VPNTunnel("tunnel1", peer_ip="15.0.0.120", shared_secret="a secret message", target_vpn_gateway=target_gateway.id) route1 = gcp.compute.Route("route1", network=network1.name, dest_range="15.0.0.0/24", priority=1000, next_hop_vpn_tunnel=tunnel1.id)
import pulumi import pulumi_gcp as gcp network1 = gcp.compute.Network("network1") target_gateway = gcp.compute.VPNGateway("targetGateway", network=network1.id) vpn_static_ip = gcp.compute.Address("vpnStaticIp") fr_esp = gcp.compute.ForwardingRule("frEsp", ip_protocol="ESP", ip_address=vpn_static_ip.address, target=target_gateway.id) fr_udp500 = gcp.compute.ForwardingRule("frUdp500", ip_protocol="UDP", port_range="500", ip_address=vpn_static_ip.address, target=target_gateway.id) fr_udp4500 = gcp.compute.ForwardingRule("frUdp4500", ip_protocol="UDP", port_range="4500", ip_address=vpn_static_ip.address, target=target_gateway.id) tunnel1 = gcp.compute.VPNTunnel("tunnel1", peer_ip="15.0.0.120", shared_secret="a secret message", target_vpn_gateway=target_gateway.id, labels={ "foo": "bar", }) route1 = gcp.compute.Route("route1", network=network1.name, dest_range="15.0.0.0/24", priority=1000, next_hop_vpn_tunnel=tunnel1.id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – An optional description of this resource.
ike_version (pulumi.Input[float]) – IKE protocol version to use when establishing the VPN tunnel with peer VPN gateway. Acceptable IKE versions are 1 or 2. Default version is 2.
labels (pulumi.Input[dict]) – Labels to apply to this VpnTunnel.
local_traffic_selectors (pulumi.Input[list]) – Local traffic selector to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example
192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.name (pulumi.Input[str]) – Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.peer_external_gateway (pulumi.Input[str]) – URL of the peer side external VPN gateway to which this VPN tunnel is connected.
peer_external_gateway_interface (pulumi.Input[float]) – The interface ID of the external VPN gateway to which this VPN tunnel is connected.
peer_gcp_gateway (pulumi.Input[str]) – URL of the peer side HA GCP VPN gateway to which this VPN tunnel is connected. If provided, the VPN tunnel will automatically use the same vpn_gateway_interface ID in the peer GCP VPN gateway. This field must reference a
compute.HaVpnGatewayresource.peer_ip (pulumi.Input[str]) – IP address of the peer VPN gateway. Only IPv4 is supported.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – The region where the tunnel is located. If unset, is set to the region of
target_vpn_gateway.remote_traffic_selectors (pulumi.Input[list]) – Remote traffic selector to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example
192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.router (pulumi.Input[str]) – URL of router resource to be used for dynamic routing.
shared_secret (pulumi.Input[str]) – Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway. Note: This property is sensitive and will not be displayed in the plan.
target_vpn_gateway (pulumi.Input[str]) – URL of the Target VPN gateway with which this VPN tunnel is associated.
vpn_gateway (pulumi.Input[str]) – URL of the VPN gateway with which this VPN tunnel is associated. This must be used if a High Availability VPN gateway resource is created. This field must reference a
compute.HaVpnGatewayresource.vpn_gateway_interface (pulumi.Input[float]) – The interface ID of the VPN gateway with which this VPN tunnel is associated.
creation_timestamp: pulumi.Output[str] = None¶Creation timestamp in RFC3339 text format.
description: pulumi.Output[str] = None¶An optional description of this resource.
detailed_status: pulumi.Output[str] = None¶Detailed status message for the VPN tunnel.
ike_version: pulumi.Output[float] = None¶IKE protocol version to use when establishing the VPN tunnel with peer VPN gateway. Acceptable IKE versions are 1 or 2. Default version is 2.
label_fingerprint: pulumi.Output[str] = None¶The fingerprint used for optimistic locking of this resource. Used internally during updates.
labels: pulumi.Output[dict] = None¶Labels to apply to this VpnTunnel.
local_traffic_selectors: pulumi.Output[list] = None¶Local traffic selector to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example
192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.
name: pulumi.Output[str] = None¶Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
peer_external_gateway: pulumi.Output[str] = None¶URL of the peer side external VPN gateway to which this VPN tunnel is connected.
peer_external_gateway_interface: pulumi.Output[float] = None¶The interface ID of the external VPN gateway to which this VPN tunnel is connected.
peer_gcp_gateway: pulumi.Output[str] = None¶URL of the peer side HA GCP VPN gateway to which this VPN tunnel is connected. If provided, the VPN tunnel will automatically use the same vpn_gateway_interface ID in the peer GCP VPN gateway. This field must reference a
compute.HaVpnGatewayresource.
peer_ip: pulumi.Output[str] = None¶IP address of the peer VPN gateway. Only IPv4 is supported.
project: pulumi.Output[str] = None¶The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region: pulumi.Output[str] = None¶The region where the tunnel is located. If unset, is set to the region of
target_vpn_gateway.
remote_traffic_selectors: pulumi.Output[list] = None¶Remote traffic selector to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example
192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.
router: pulumi.Output[str] = None¶URL of router resource to be used for dynamic routing.
self_link: pulumi.Output[str] = None¶The URI of the created resource.
Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway. Note: This property is sensitive and will not be displayed in the plan.
Hash of the shared secret.
target_vpn_gateway: pulumi.Output[str] = None¶URL of the Target VPN gateway with which this VPN tunnel is associated.
tunnel_id: pulumi.Output[str] = None¶The unique identifier for the resource. This identifier is defined by the server.
vpn_gateway: pulumi.Output[str] = None¶URL of the VPN gateway with which this VPN tunnel is associated. This must be used if a High Availability VPN gateway resource is created. This field must reference a
compute.HaVpnGatewayresource.
vpn_gateway_interface: pulumi.Output[float] = None¶The interface ID of the VPN gateway with which this VPN tunnel is associated.
- static
get(resource_name, id, opts=None, creation_timestamp=None, description=None, detailed_status=None, ike_version=None, label_fingerprint=None, labels=None, local_traffic_selectors=None, name=None, peer_external_gateway=None, peer_external_gateway_interface=None, peer_gcp_gateway=None, peer_ip=None, project=None, region=None, remote_traffic_selectors=None, router=None, self_link=None, shared_secret=None, shared_secret_hash=None, target_vpn_gateway=None, tunnel_id=None, vpn_gateway=None, vpn_gateway_interface=None)¶ Get an existing VPNTunnel resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
creation_timestamp (pulumi.Input[str]) – Creation timestamp in RFC3339 text format.
description (pulumi.Input[str]) – An optional description of this resource.
detailed_status (pulumi.Input[str]) – Detailed status message for the VPN tunnel.
ike_version (pulumi.Input[float]) – IKE protocol version to use when establishing the VPN tunnel with peer VPN gateway. Acceptable IKE versions are 1 or 2. Default version is 2.
label_fingerprint (pulumi.Input[str]) – The fingerprint used for optimistic locking of this resource. Used internally during updates.
labels (pulumi.Input[dict]) – Labels to apply to this VpnTunnel.
local_traffic_selectors (pulumi.Input[list]) – Local traffic selector to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example
192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.name (pulumi.Input[str]) – Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.peer_external_gateway (pulumi.Input[str]) – URL of the peer side external VPN gateway to which this VPN tunnel is connected.
peer_external_gateway_interface (pulumi.Input[float]) – The interface ID of the external VPN gateway to which this VPN tunnel is connected.
peer_gcp_gateway (pulumi.Input[str]) – URL of the peer side HA GCP VPN gateway to which this VPN tunnel is connected. If provided, the VPN tunnel will automatically use the same vpn_gateway_interface ID in the peer GCP VPN gateway. This field must reference a
compute.HaVpnGatewayresource.peer_ip (pulumi.Input[str]) – IP address of the peer VPN gateway. Only IPv4 is supported.
project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (pulumi.Input[str]) – The region where the tunnel is located. If unset, is set to the region of
target_vpn_gateway.remote_traffic_selectors (pulumi.Input[list]) – Remote traffic selector to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example
192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.router (pulumi.Input[str]) – URL of router resource to be used for dynamic routing.
self_link (pulumi.Input[str]) – The URI of the created resource.
shared_secret (pulumi.Input[str]) – Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway. Note: This property is sensitive and will not be displayed in the plan.
shared_secret_hash (pulumi.Input[str]) – Hash of the shared secret.
target_vpn_gateway (pulumi.Input[str]) – URL of the Target VPN gateway with which this VPN tunnel is associated.
tunnel_id (pulumi.Input[str]) – The unique identifier for the resource. This identifier is defined by the server.
vpn_gateway (pulumi.Input[str]) – URL of the VPN gateway with which this VPN tunnel is associated. This must be used if a High Availability VPN gateway resource is created. This field must reference a
compute.HaVpnGatewayresource.vpn_gateway_interface (pulumi.Input[float]) – The interface ID of the VPN gateway with which this VPN tunnel is associated.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
pulumi_gcp.compute.get_address(name=None, project=None, region=None, opts=None)¶Get the IP address from a static address. For more information see the official API documentation.
import pulumi import pulumi_gcp as gcp my_address = gcp.compute.get_address(name="foobar") prod = gcp.dns.ManagedZone("prod", dns_name="prod.mydomain.com.") frontend = gcp.dns.RecordSet("frontend", type="A", ttl=300, managed_zone=prod.name, rrdatas=[my_address.address])
- Parameters
name (str) – A unique name for the resource, required by GCE.
project (str) – The project in which the resource belongs. If it is not provided, the provider project is used.
region (str) – The Region in which the created address reside. If it is not provided, the provider region is used.
pulumi_gcp.compute.get_backend_bucket(name=None, project=None, opts=None)¶Get information about a BackendBucket.
import pulumi import pulumi_gcp as gcp my_backend_bucket = gcp.compute.get_backend_bucket(name="my-backend")
- Parameters
name (str) – Name of the resource.
project (str) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
pulumi_gcp.compute.get_backend_service(name=None, project=None, opts=None)¶Provide access to a Backend Service’s attribute. For more information see the official documentation and the API.
- Parameters
name (str) – The name of the Backend Service.
project (str) – The project in which the resource belongs. If it is not provided, the provider project is used.
pulumi_gcp.compute.get_certificate(name=None, project=None, opts=None)¶Get info about a Google Compute SSL Certificate from its name.
import pulumi import pulumi_gcp as gcp my_cert = gcp.compute.get_certificate(name="my-cert") pulumi.export("certificate", my_cert.certificate) pulumi.export("certificateId", my_cert.certificate_id) pulumi.export("selfLink", my_cert.self_link)
- Parameters
name (str) – The name of the certificate.
project (str) – The project in which the resource belongs. If it is not provided, the provider project is used.
pulumi_gcp.compute.get_default_service_account(project=None, opts=None)¶Use this data source to retrieve default service account for this project
import pulumi import pulumi_gcp as gcp default = gcp.compute.get_default_service_account() pulumi.export("defaultAccount", default.email)
- Parameters
project (str) – The project ID. If it is not provided, the provider project is used.
pulumi_gcp.compute.get_forwarding_rule(name=None, project=None, region=None, opts=None)¶Get a forwarding rule within GCE from its name.
import pulumi import pulumi_gcp as gcp my_forwarding_rule = gcp.compute.get_forwarding_rule(name="forwarding-rule-us-east1")
- Parameters
name (str) – The name of the forwarding rule.
project (str) – The project in which the resource belongs. If it is not provided, the provider project is used.
region (str) – The region in which the resource belongs. If it is not provided, the project region is used.
pulumi_gcp.compute.get_global_address(name=None, project=None, opts=None)¶Get the IP address from a static address reserved for a Global Forwarding Rule which are only used for HTTP load balancing. For more information see the official API documentation.
import pulumi import pulumi_gcp as gcp my_address = gcp.compute.get_global_address(name="foobar") prod = gcp.dns.ManagedZone("prod", dns_name="prod.mydomain.com.") frontend = gcp.dns.RecordSet("frontend", type="A", ttl=300, managed_zone=prod.name, rrdatas=[my_address.address])
- Parameters
name (str) – A unique name for the resource, required by GCE.
project (str) – The project in which the resource belongs. If it is not provided, the provider project is used.
pulumi_gcp.compute.get_image(family=None, name=None, project=None, opts=None)¶Get information about a Google Compute Image. Check that your service account has the
compute.imageUserrole if you want to share custom images from another project. If you want to use [public images][pubimg], do not forget to specify the dedicated project. For more information see the official documentation and its API.import pulumi import pulumi_gcp as gcp my_image = gcp.compute.get_image(family="debian-9", project="debian-cloud") # ... default = gcp.compute.Instance("default", boot_disk={ "initialize_params": { "image": my_image.self_link, }, })
- Parameters
family (str) – The family name of the image.
name (str) – or
family- (Required) The name of a specific image or a family. Exactly one ofnameoffamilymust be specified. Ifnameis specified, it will fetch the corresponding image. Iffamilyis specified, it will returns the latest image that is part of an image family and is not deprecated.project (str) – The project in which the resource belongs. If it is not provided, the provider project is used. If you are using a [public base image][pubimg], be sure to specify the correct Image Project.
pulumi_gcp.compute.get_instance(name=None, project=None, self_link=None, zone=None, opts=None)¶Get information about a VM instance resource within GCE. For more information see the official documentation and API.
import pulumi import pulumi_gcp as gcp appserver = gcp.compute.get_instance(name="primary-application-server", zone="us-central1-a")
- Parameters
name (str) – The name of the instance. One of
nameorself_linkmust be provided.project (str) – The ID of the project in which the resource belongs. If
self_linkis provided, this value is ignored. If neitherself_linknorprojectare provided, the provider project is used.self_link (str) – The self link of the instance. One of
nameorself_linkmust be provided.zone (str) – The zone of the instance. If
self_linkis provided, this value is ignored. If neitherself_linknorzoneare provided, the provider zone is used.
pulumi_gcp.compute.get_instance_group(name=None, project=None, self_link=None, zone=None, opts=None)¶Get a Compute Instance Group within GCE. For more information, see the official documentation and API
import pulumi import pulumi_gcp as gcp all = gcp.compute.get_instance_group(name="instance-group-name", zone="us-central1-a")
- Parameters
name (str) – The name of the instance group. Either
nameorself_linkmust be provided.project (str) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
self_link (str) – The self link of the instance group. Either
nameorself_linkmust be provided.zone (str) – The zone of the instance group. If referencing the instance group by name and
zoneis not provided, the provider zone is used.
pulumi_gcp.compute.get_instance_serial_port(instance=None, port=None, project=None, zone=None, opts=None)¶Get the serial port output from a Compute Instance. For more information see the official API documentation.
import pulumi import pulumi_gcp as gcp serial = gcp.compute.get_instance_serial_port(instance="my-instance", zone="us-central1-a", port=1) pulumi.export("serialOut", serial.contents)
- Parameters
instance (str) – The name of the Compute Instance to read output from.
port (float) – The number of the serial port to read output from. Possible values are 1-4.
project (str) – The project in which the Compute Instance exists. If it is not provided, the provider project is used.
zone (str) – The zone in which the Compute Instance exists. If it is not provided, the provider zone is used.
pulumi_gcp.compute.get_lbip_ranges(opts=None)¶Use this data source to access IP ranges in your firewall rules.
import pulumi import pulumi_gcp as gcp ranges = gcp.compute.get_lbip_ranges() lb = gcp.compute.Firewall("lb", network=google_compute_network["main"]["name"], allow=[{ "protocol": "tcp", "ports": ["80"], }], source_ranges=ranges.networks, target_tags=["InstanceBehindLoadBalancer"])
pulumi_gcp.compute.get_netblock_ip_ranges(range_type=None, opts=None)¶Use this data source to get the IP addresses from different special IP ranges on Google Cloud Platform.
import pulumi import pulumi_gcp as gcp netblock = gcp.compute.get_netblock_ip_ranges() pulumi.export("cidrBlocks", netblock.cidr_blocks) pulumi.export("cidrBlocksIpv4", netblock.cidr_blocks_ipv4s) pulumi.export("cidrBlocksIpv6", netblock.cidr_blocks_ipv6s)
import pulumi import pulumi_gcp as gcp legacy_hcs = gcp.compute.get_netblock_ip_ranges(range_type="legacy-health-checkers") default = gcp.compute.Network("default") allow_hcs = gcp.compute.Firewall("allow-hcs", network=default.name, allow=[{ "protocol": "tcp", "ports": ["80"], }], source_ranges=legacy_hcs.cidr_blocks_ipv4s)
- Parameters
range_type (str) – The type of range for which to provide results.
pulumi_gcp.compute.get_network(name=None, project=None, opts=None)¶Get a network within GCE from its name.
import pulumi import pulumi_gcp as gcp my_network = gcp.compute.get_network(name="default-us-east1")
- Parameters
name (str) – The name of the network.
project (str) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
pulumi_gcp.compute.get_network_endpoint_group(name=None, self_link=None, zone=None, opts=None)¶Use this data source to access a Network Endpoint Group’s attributes.
The NEG may be found by providing either a
self_link, or anameand azone.import pulumi import pulumi_gcp as gcp neg1 = gcp.compute.get_network_endpoint_group(name="k8s1-abcdef01-myns-mysvc-8080-4b6bac43", zone="us-central1-a") neg2 = gcp.compute.get_network_endpoint_group(self_link="https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-a/networkEndpointGroups/k8s1-abcdef01-myns-mysvc-8080-4b6bac43")
- Parameters
name (str) – The Network Endpoint Group name. Provide either this or a
self_link.self_link (str) – The Network Endpoint Group self_link.
zone (str) – The Network Endpoint Group availability zone.
pulumi_gcp.compute.get_node_types(project=None, zone=None, opts=None)¶Provides available node types for Compute Engine sole-tenant nodes in a zone for a given project. For more information, see the official documentation and API.
import pulumi import pulumi_gcp as gcp central1b = gcp.compute.get_node_types(zone="us-central1-b") tmpl = gcp.compute.NodeTemplate("tmpl", region="us-central1", node_type=data["google_compute_node_types"]["types"]["names"])
- Parameters
project (str) – ID of the project to list available node types for. Should match the project the nodes of this type will be deployed to. Defaults to the project that the provider is authenticated with.
zone (str) – The zone to list node types for. Should be in zone of intended node groups and region of referencing node template. If
zoneis not specified, the provider-level zone must be set and is used instead.
pulumi_gcp.compute.get_region_instance_group(name=None, project=None, region=None, self_link=None, opts=None)¶Get a Compute Region Instance Group within GCE. For more information, see the official documentation and API.
import pulumi import pulumi_gcp as gcp group = gcp.compute.get_region_instance_group(name="instance-group-name")
The most common use of this datasource will be to fetch information about the instances inside regional managed instance groups, for instance:
- Parameters
name (str) – The name of the instance group. One of
nameorself_linkmust be provided.project (str) – The ID of the project in which the resource belongs. If
self_linkis provided, this value is ignored. If neitherself_linknorprojectare provided, the provider project is used.region (str) – The region in which the resource belongs. If
self_linkis provided, this value is ignored. If neitherself_linknorregionare provided, the provider region is used.self_link (str) – The link to the instance group. One of
nameorself_linkmust be provided.
pulumi_gcp.compute.get_regions(project=None, status=None, opts=None)¶Provides access to available Google Compute regions for a given project. See more about regions and zones in the upstream docs.
import pulumi import pulumi_gcp as gcp available = gcp.compute.get_regions() cluster = [] for range in [{"value": i} for i in range(0, len(available.names))]: cluster.append(gcp.compute.Subnetwork(f"cluster-{range['value']}", ip_cidr_range=f"10.36.{range['value']}.0/24", network="my-network", region=available.names[range["value"]]))
- Parameters
project (str) – Project from which to list available regions. Defaults to project declared in the provider.
status (str) – Allows to filter list of regions based on their current status. Status can be either
UPorDOWN. Defaults to no filtering (all available regions - bothUPandDOWN).
pulumi_gcp.compute.get_resource_policy(name=None, project=None, region=None, opts=None)¶Provide access to a Resource Policy’s attributes. For more information see the official documentation or the API.
import pulumi import pulumi_gcp as gcp daily = gcp.compute.get_resource_policy(name="daily", region="us-central1")
- Parameters
name (str) – The name of the Resource Policy.
project (str) – Project from which to list the Resource Policy. Defaults to project declared in the provider.
region (str) – Region where the Resource Policy resides.
pulumi_gcp.compute.get_router(name=None, network=None, project=None, region=None, opts=None)¶Get a router within GCE from its name and VPC.
import pulumi import pulumi_gcp as gcp my_router = gcp.compute.get_router(name="myrouter-us-east1", network="my-network")
- Parameters
name (str) – The name of the router.
network (str) – The VPC network on which this router lives.
project (str) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (str) – The region this router has been created in. If unspecified, this defaults to the region configured in the provider.
pulumi_gcp.compute.get_ssl_policy(name=None, project=None, opts=None)¶- Gets an SSL Policy within GCE from its name, for use with Target HTTPS and Target SSL Proxies.
For more information see the official documentation.
import pulumi import pulumi_gcp as gcp my_ssl_policy = gcp.compute.get_ssl_policy(name="production-ssl-policy")
- Parameters
name (str) – The name of the SSL Policy.
project (str) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
pulumi_gcp.compute.get_subnetwork(name=None, project=None, region=None, self_link=None, opts=None)¶Get a subnetwork within GCE from its name and region.
import pulumi import pulumi_gcp as gcp my_subnetwork = gcp.compute.get_subnetwork(name="default-us-east1", region="us-east1")
- Parameters
name (str) – The name of the subnetwork. One of
nameorself_linkmust be specified.project (str) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region (str) – The region this subnetwork has been created in. If unspecified, this defaults to the region configured in the provider.
self_link (str) – The self link of the subnetwork. If
self_linkis specified,name,project, andregionare ignored.
pulumi_gcp.compute.get_vpn_gateway(name=None, project=None, region=None, opts=None)¶Get a VPN gateway within GCE from its name.
import pulumi import pulumi_gcp as gcp my_vpn_gateway = gcp.compute.get_vpn_gateway(name="vpn-gateway-us-east1")
- Parameters
name (str) – The name of the VPN gateway.
project (str) – The project in which the resource belongs. If it is not provided, the provider project is used.
region (str) – The region in which the resource belongs. If it is not provided, the project region is used.
pulumi_gcp.compute.get_zones(project=None, region=None, status=None, opts=None)¶Provides access to available Google Compute zones in a region for a given project. See more about regions and zones in the upstream docs.
import pulumi import pulumi_gcp as gcp available = gcp.compute.get_zones() foo = [] for range in [{"value": i} for i in range(0, len(available.names))]: foo.append(gcp.compute.InstanceGroupManager(f"foo-{range['value']}", instance_template=google_compute_instance_template["foobar"]["self_link"], base_instance_name=f"foobar-{range['value']}", zone=available.names[range["value"]], target_size=1))
- Parameters
project (str) – Project from which to list available zones. Defaults to project declared in the provider.
region (str) – Region from which to list available zones. Defaults to region declared in the provider.
status (str) – Allows to filter list of zones based on their current status. Status can be either
UPorDOWN. Defaults to no filtering (all available zones - bothUPandDOWN).