Subnetwork
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:
Create a Subnetwork Resource
new Subnetwork(name: string, args: SubnetworkArgs, opts?: CustomResourceOptions);def 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);func NewSubnetwork(ctx *Context, name string, args SubnetworkArgs, opts ...ResourceOption) (*Subnetwork, error)public Subnetwork(string name, SubnetworkArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args SubnetworkArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SubnetworkArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SubnetworkArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Subnetwork Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Subnetwork resource accepts the following input properties:
- Ip
Cidr stringRange 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.
- Network string
The network this subnet belongs to. Only networks that are in the distributed mode can have subnetworks.
- Description string
An optional description of this resource. Provide this property when you create the resource. This field can be set only at resource creation time.
- Log
Config SubnetworkLog Config Args 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 string
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.- Private
Ip boolGoogle Access When enabled, VMs in this subnetwork without external IP addresses can access Google APIs and services by using Private Google Access.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Purpose string
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 string
The GCP region for this subnetwork.
- Role string
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 List<SubnetworkRanges Secondary Ip Range Args> 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 stringRange 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.
- Network string
The network this subnet belongs to. Only networks that are in the distributed mode can have subnetworks.
- Description string
An optional description of this resource. Provide this property when you create the resource. This field can be set only at resource creation time.
- Log
Config SubnetworkLog Config 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 string
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.- Private
Ip boolGoogle Access When enabled, VMs in this subnetwork without external IP addresses can access Google APIs and services by using Private Google Access.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Purpose string
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 string
The GCP region for this subnetwork.
- Role string
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 []SubnetworkRanges Secondary Ip Range 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 stringRange 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.
- network string
The network this subnet belongs to. Only networks that are in the distributed mode can have subnetworks.
- description string
An optional description of this resource. Provide this property when you create the resource. This field can be set only at resource creation time.
- log
Config SubnetworkLog Config 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 string
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.- private
Ip booleanGoogle Access When enabled, VMs in this subnetwork without external IP addresses can access Google APIs and services by using Private Google Access.
- project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- purpose string
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 string
The GCP region for this subnetwork.
- role string
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 SubnetworkRanges Secondary Ip Range[] 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_ strrange 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.
- network str
The network this subnet belongs to. Only networks that are in the distributed mode can have subnetworks.
- description 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.
- log_
config Dict[SubnetworkLog Config] 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 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.- private_
ip_ boolgoogle_ access When enabled, VMs in this subnetwork without external IP addresses can access Google APIs and services by using Private Google Access.
- project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- purpose 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 str
The GCP region for this subnetwork.
- role 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_ List[Subnetworkranges Secondary Ip Range] 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the Subnetwork resource produces the following output properties:
- Creation
Timestamp string Creation timestamp in RFC3339 text format.
- Fingerprint string
Fingerprint of this resource. This field is used internally during updates of this resource.
- Gateway
Address string The gateway address for default routes to reach destination addresses outside this subnetwork.
- Id string
- The provider-assigned unique ID for this managed resource.
- Self
Link string The URI of the created resource.
- Creation
Timestamp string Creation timestamp in RFC3339 text format.
- Fingerprint string
Fingerprint of this resource. This field is used internally during updates of this resource.
- Gateway
Address string The gateway address for default routes to reach destination addresses outside this subnetwork.
- Id string
- The provider-assigned unique ID for this managed resource.
- Self
Link string The URI of the created resource.
- creation
Timestamp string Creation timestamp in RFC3339 text format.
- fingerprint string
Fingerprint of this resource. This field is used internally during updates of this resource.
- gateway
Address string The gateway address for default routes to reach destination addresses outside this subnetwork.
- id string
- The provider-assigned unique ID for this managed resource.
- self
Link string The URI of the created resource.
- creation_
timestamp str Creation timestamp in RFC3339 text format.
- fingerprint str
Fingerprint of this resource. This field is used internally during updates of this resource.
- gateway_
address str The gateway address for default routes to reach destination addresses outside this subnetwork.
- id str
- The provider-assigned unique ID for this managed resource.
- self_
link str The URI of the created resource.
Look up an Existing Subnetwork Resource
Get an existing Subnetwork resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: SubnetworkState, opts?: CustomResourceOptions): Subnetworkstatic 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, __props__=None);func GetSubnetwork(ctx *Context, name string, id IDInput, state *SubnetworkState, opts ...ResourceOption) (*Subnetwork, error)public static Subnetwork Get(string name, Input<string> id, SubnetworkState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Creation
Timestamp string Creation timestamp in RFC3339 text format.
- Description string
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 string
Fingerprint of this resource. This field is used internally during updates of this resource.
- Gateway
Address string The gateway address for default routes to reach destination addresses outside this subnetwork.
- Ip
Cidr stringRange 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 SubnetworkLog Config Args 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 string
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 string
The network this subnet belongs to. Only networks that are in the distributed mode can have subnetworks.
- Private
Ip boolGoogle Access When enabled, VMs in this subnetwork without external IP addresses can access Google APIs and services by using Private Google Access.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Purpose string
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 string
The GCP region for this subnetwork.
- Role string
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 List<SubnetworkRanges Secondary Ip Range Args> 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 string The URI of the created resource.
- Creation
Timestamp string Creation timestamp in RFC3339 text format.
- Description string
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 string
Fingerprint of this resource. This field is used internally during updates of this resource.
- Gateway
Address string The gateway address for default routes to reach destination addresses outside this subnetwork.
- Ip
Cidr stringRange 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 SubnetworkLog Config 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 string
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 string
The network this subnet belongs to. Only networks that are in the distributed mode can have subnetworks.
- Private
Ip boolGoogle Access When enabled, VMs in this subnetwork without external IP addresses can access Google APIs and services by using Private Google Access.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Purpose string
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 string
The GCP region for this subnetwork.
- Role string
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 []SubnetworkRanges Secondary Ip Range 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 string The URI of the created resource.
- creation
Timestamp string Creation timestamp in RFC3339 text format.
- description string
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 string
Fingerprint of this resource. This field is used internally during updates of this resource.
- gateway
Address string The gateway address for default routes to reach destination addresses outside this subnetwork.
- ip
Cidr stringRange 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 SubnetworkLog Config 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 string
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 string
The network this subnet belongs to. Only networks that are in the distributed mode can have subnetworks.
- private
Ip booleanGoogle Access When enabled, VMs in this subnetwork without external IP addresses can access Google APIs and services by using Private Google Access.
- project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- purpose string
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 string
The GCP region for this subnetwork.
- role string
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 SubnetworkRanges Secondary Ip Range[] 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 string The URI of the created resource.
- creation_
timestamp str Creation timestamp in RFC3339 text format.
- description 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 str
Fingerprint of this resource. This field is used internally during updates of this resource.
- gateway_
address str The gateway address for default routes to reach destination addresses outside this subnetwork.
- ip_
cidr_ strrange 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 Dict[SubnetworkLog Config] 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 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 str
The network this subnet belongs to. Only networks that are in the distributed mode can have subnetworks.
- private_
ip_ boolgoogle_ access When enabled, VMs in this subnetwork without external IP addresses can access Google APIs and services by using Private Google Access.
- project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- purpose 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 str
The GCP region for this subnetwork.
- role 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_ List[Subnetworkranges Secondary Ip Range] 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 str The URI of the created resource.
Supporting Types
SubnetworkLogConfig
- Aggregation
Interval string 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_MIN
- Flow
Sampling double 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 string
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.
- Aggregation
Interval string 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_MIN
- Flow
Sampling float64 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 string
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.
- aggregation
Interval string 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_MIN
- flow
Sampling number 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 string
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.
- aggregation
Interval 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_MIN
- flow
Sampling 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.
SubnetworkSecondaryIpRange
- Ip
Cidr stringRange 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.
- Range
Name string 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.
- Ip
Cidr stringRange 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.
- Range
Name string 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.
- ip
Cidr stringRange 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.
- range
Name string 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.
- ip_
cidr_ strrange 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.
- range
Name 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.
Package Details
- Repository
- https://github.com/pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.