permalink |
---|
/compute_network/ |
compute_network
represents the google_compute_network
Terraform resource.
This package contains functions and utilities for setting up the resource using Jsonnet code.
fn new()
fn newAttrs()
fn withAutoCreateSubnetworks()
fn withDeleteDefaultRoutesOnCreate()
fn withDescription()
fn withEnableUlaInternalIpv6()
fn withInternalIpv6Range()
fn withMtu()
fn withName()
fn withNetworkFirewallPolicyEnforcementOrder()
fn withProject()
fn withRoutingMode()
fn withTimeouts()
fn withTimeoutsMixin()
obj timeouts
new()
google.compute_network.new
injects a new google_compute_network
Terraform resource
block into the root module document.
Additionally, this inserts a private function into the _ref
attribute that generates references to attributes of the
resource. For example, if you added a new instance to the root using:
# arguments omitted for brevity
google.compute_network.new('some_id')
You can get the reference to the id
field of the created google.compute_network
using the reference:
$._ref.google_compute_network.some_id.get('id')
This is the same as directly entering "${ google_compute_network.some_id.id }"
as the value.
NOTE: if you are chaining multiple resources together in a merge operation, you may not be able to use super
, self
,
or $
to refer to the root object. Instead, make an explicit outer object using local
.
Args:
resourceLabel
(string
): The name label of the block.auto_create_subnetworks
(bool
): When set to 'true', the network is created in "auto subnet mode" and it will create a subnet for each region automatically across the '10.128.0.0/9' address range.
When set to 'false', the network is created in "custom subnet mode" so
the user can explicitly connect subnetwork resources. When null
, the auto_create_subnetworks
field will be omitted from the resulting object.
delete_default_routes_on_create
(bool
): If set to 'true', default routes ('0.0.0.0/0') will be deleted immediately after network creation. Defaults to 'false'. Whennull
, thedelete_default_routes_on_create
field will be omitted from the resulting object.description
(string
): An optional description of this resource. The resource must be recreated to modify this field. Whennull
, thedescription
field will be omitted from the resulting object.enable_ula_internal_ipv6
(bool
): Enable ULA internal ipv6 on this network. Enabling this feature will assign a /48 from google defined ULA prefix fd20::/20. Whennull
, theenable_ula_internal_ipv6
field will be omitted from the resulting object.internal_ipv6_range
(string
): When enabling ula internal ipv6, caller optionally can specify the /48 range they want from the google defined ULA prefix fd20::/20. The input must be a valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will fail if the speficied /48 is already in used by another resource. If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field. Whennull
, theinternal_ipv6_range
field will be omitted from the resulting object.mtu
(number
): Maximum Transmission Unit in bytes. The default value is 1460 bytes. The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames). Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped with an ICMP 'Fragmentation-Needed' message if the packets are routed to the Internet or other VPCs with varying MTUs. Whennull
, themtu
field will be omitted from the resulting object.name
(string
): 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_firewall_policy_enforcement_order
(string
): Set the order that Firewall Rules and Firewall Policies are evaluated. Default value: "AFTER_CLASSIC_FIREWALL" Possible values: ["BEFORE_CLASSIC_FIREWALL", "AFTER_CLASSIC_FIREWALL"] Whennull
, thenetwork_firewall_policy_enforcement_order
field will be omitted from the resulting object.project
(string
): Set theproject
field on the resulting resource block. Whennull
, theproject
field will be omitted from the resulting object.routing_mode
(string
): 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 to 'GLOBAL', this network's cloud routers will advertise routes with all subnetworks of this network, across regions. Possible values: ["REGIONAL", "GLOBAL"] Whennull
, therouting_mode
field will be omitted from the resulting object.timeouts
(obj
): Set thetimeouts
field on the resulting resource block. Whennull
, thetimeouts
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.compute_network.timeouts.new constructor.
Returns:
- A mixin object that injects the new resource into the root Terraform configuration.
newAttrs()
google.compute_network.newAttrs
constructs a new object with attributes and blocks configured for the compute_network
Terraform resource.
Unlike google.compute_network.new, this function will not inject the resource
block into the root Terraform document. Instead, this must be passed in as the attrs
argument for the
tf.withResource function to build a complete block.
This is most useful when you need to preprocess the attributes with functions, conditional, or looping logic prior to injecting into a complete block.
Args:
auto_create_subnetworks
(bool
): When set to 'true', the network is created in "auto subnet mode" and it will create a subnet for each region automatically across the '10.128.0.0/9' address range.
When set to 'false', the network is created in "custom subnet mode" so
the user can explicitly connect subnetwork resources. When null
, the auto_create_subnetworks
field will be omitted from the resulting object.
delete_default_routes_on_create
(bool
): If set to 'true', default routes ('0.0.0.0/0') will be deleted immediately after network creation. Defaults to 'false'. Whennull
, thedelete_default_routes_on_create
field will be omitted from the resulting object.description
(string
): An optional description of this resource. The resource must be recreated to modify this field. Whennull
, thedescription
field will be omitted from the resulting object.enable_ula_internal_ipv6
(bool
): Enable ULA internal ipv6 on this network. Enabling this feature will assign a /48 from google defined ULA prefix fd20::/20. Whennull
, theenable_ula_internal_ipv6
field will be omitted from the resulting object.internal_ipv6_range
(string
): When enabling ula internal ipv6, caller optionally can specify the /48 range they want from the google defined ULA prefix fd20::/20. The input must be a valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will fail if the speficied /48 is already in used by another resource. If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field. Whennull
, theinternal_ipv6_range
field will be omitted from the resulting object.mtu
(number
): Maximum Transmission Unit in bytes. The default value is 1460 bytes. The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames). Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped with an ICMP 'Fragmentation-Needed' message if the packets are routed to the Internet or other VPCs with varying MTUs. Whennull
, themtu
field will be omitted from the resulting object.name
(string
): 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_firewall_policy_enforcement_order
(string
): Set the order that Firewall Rules and Firewall Policies are evaluated. Default value: "AFTER_CLASSIC_FIREWALL" Possible values: ["BEFORE_CLASSIC_FIREWALL", "AFTER_CLASSIC_FIREWALL"] Whennull
, thenetwork_firewall_policy_enforcement_order
field will be omitted from the resulting object.project
(string
): Set theproject
field on the resulting object. Whennull
, theproject
field will be omitted from the resulting object.routing_mode
(string
): 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 to 'GLOBAL', this network's cloud routers will advertise routes with all subnetworks of this network, across regions. Possible values: ["REGIONAL", "GLOBAL"] Whennull
, therouting_mode
field will be omitted from the resulting object.timeouts
(obj
): Set thetimeouts
field on the resulting object. Whennull
, thetimeouts
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.compute_network.timeouts.new constructor.
Returns:
- An attribute object that can be used with tf.withResource to construct a new
compute_network
resource into the root Terraform configuration.
withAutoCreateSubnetworks()
google.bool.withAutoCreateSubnetworks
constructs a mixin object that can be merged into the bool
Terraform resource block to set or update the auto_create_subnetworks field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(bool
): The value to set for theauto_create_subnetworks
field.
withDeleteDefaultRoutesOnCreate()
google.bool.withDeleteDefaultRoutesOnCreate
constructs a mixin object that can be merged into the bool
Terraform resource block to set or update the delete_default_routes_on_create field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(bool
): The value to set for thedelete_default_routes_on_create
field.
withDescription()
google.string.withDescription
constructs a mixin object that can be merged into the string
Terraform resource block to set or update the description field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(string
): The value to set for thedescription
field.
withEnableUlaInternalIpv6()
google.bool.withEnableUlaInternalIpv6
constructs a mixin object that can be merged into the bool
Terraform resource block to set or update the enable_ula_internal_ipv6 field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(bool
): The value to set for theenable_ula_internal_ipv6
field.
withInternalIpv6Range()
google.string.withInternalIpv6Range
constructs a mixin object that can be merged into the string
Terraform resource block to set or update the internal_ipv6_range field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(string
): The value to set for theinternal_ipv6_range
field.
withMtu()
google.number.withMtu
constructs a mixin object that can be merged into the number
Terraform resource block to set or update the mtu field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(number
): The value to set for themtu
field.
withName()
google.string.withName
constructs a mixin object that can be merged into the string
Terraform resource block to set or update the name field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(string
): The value to set for thename
field.
withNetworkFirewallPolicyEnforcementOrder()
google.string.withNetworkFirewallPolicyEnforcementOrder
constructs a mixin object that can be merged into the string
Terraform resource block to set or update the network_firewall_policy_enforcement_order field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(string
): The value to set for thenetwork_firewall_policy_enforcement_order
field.
withProject()
google.string.withProject
constructs a mixin object that can be merged into the string
Terraform resource block to set or update the project field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(string
): The value to set for theproject
field.
withRoutingMode()
google.string.withRoutingMode
constructs a mixin object that can be merged into the string
Terraform resource block to set or update the routing_mode field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(string
): The value to set for therouting_mode
field.
withTimeouts()
google.obj.withTimeouts
constructs a mixin object that can be merged into the obj
Terraform resource block to set or update the timeouts field.
This function will replace the map with the passed in value
. If you wish to instead merge the
passed in value to the existing map, use the google.obj.withTimeoutsMixin function.
Args:
resourceLabel
(string
): The name label of the block to update.value
(obj
): The value to set for thetimeouts
field.
withTimeoutsMixin()
google.obj.withTimeoutsMixin
constructs a mixin object that can be merged into the obj
Terraform resource block to set or update the timeouts field.
This function will merge the passed in value to the existing map. If you wish
to instead replace the entire map with the passed in value
, use the google.obj.withTimeouts
function.
Args:
resourceLabel
(string
): The name label of the block to update.value
(obj
): The value to set for thetimeouts
field.
new()
google.compute_network.timeouts.new
constructs a new object with attributes and blocks configured for the timeouts
Terraform sub block.
Args:
create
(string
): Set thecreate
field on the resulting object. Whennull
, thecreate
field will be omitted from the resulting object.delete
(string
): Set thedelete
field on the resulting object. Whennull
, thedelete
field will be omitted from the resulting object.update
(string
): Set theupdate
field on the resulting object. Whennull
, theupdate
field will be omitted from the resulting object.
Returns:
- An attribute object that represents the
timeouts
sub block.