Class: Ansible::Ruby::Modules::Gcp_compute_network

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/cloud/google/gcp_compute_network.rb

Overview

Represents a Network resource. Your Cloud Platform Console project can contain multiple networks, and each network can have multiple instances attached to it. A network allows you to define a gateway IP and the network range for the instances attached to that network. Every project is provided with a default network with preset configurations and firewall rules. You can choose to customize the default network by adding or removing rules, or you can create new networks in that project. Generally, most users only need one network, although you can have up to five networks per project by default. A network belongs to only one project, and each instance can only belong to one network. All Compute Engine networks use the IPv4 protocol. Compute Engine currently does not support IPv6. However, Google is a major advocate of IPv6 and it is an important future direction.

Instance Method Summary collapse

Methods inherited from Base

#ansible_name, #to_h

Methods inherited from Ansible::Ruby::Models::Base

attr_option, attr_options, attribute, fix_inclusion, #initialize, remove_existing_validations, #to_h, validates

Constructor Details

This class inherits a constructor from Ansible::Ruby::Models::Base

Instance Method Details

#auto_create_subnetworksSymbol?

Returns When set to true, the network is created in “auto subnet mode”. When set to false, the network is in “custom subnet mode”.,In “auto subnet mode”, a newly created network is assigned the default CIDR of 10.128.0.0/9 and it automatically creates one subnetwork per region.

Returns:

  • (Symbol, nil)

    When set to true, the network is created in “auto subnet mode”. When set to false, the network is in “custom subnet mode”.,In “auto subnet mode”, a newly created network is assigned the default CIDR of 10.128.0.0/9 and it automatically creates one subnetwork per region.



31
# File 'lib/ansible/ruby/modules/generated/cloud/google/gcp_compute_network.rb', line 31

attribute :auto_create_subnetworks

#descriptionObject?

Returns An optional description of this resource. Provide this property when you create the resource.

Returns:

  • (Object, nil)

    An optional description of this resource. Provide this property when you create the resource.



18
# File 'lib/ansible/ruby/modules/generated/cloud/google/gcp_compute_network.rb', line 18

attribute :description

#gateway_ipv4Object?

Returns A gateway address for default routing to other networks. This value is read only and is selected by the Google Compute Engine, typically as the first usable address in the IPv4Range.

Returns:

  • (Object, nil)

    A gateway address for default routing to other networks. This value is read only and is selected by the Google Compute Engine, typically as the first usable address in the IPv4Range.



21
# File 'lib/ansible/ruby/modules/generated/cloud/google/gcp_compute_network.rb', line 21

attribute :gateway_ipv4

#ipv4_rangeObject?

Returns The range of internal addresses that are legal on this network. This range is a CIDR specification, for example: 192.168.0.0/16. Provided by the client when the network is created.

Returns:

  • (Object, nil)

    The range of internal addresses that are legal on this network. This range is a CIDR specification, for example: 192.168.0.0/16. Provided by the client when the network is created.



24
# File 'lib/ansible/ruby/modules/generated/cloud/google/gcp_compute_network.rb', line 24

attribute :ipv4_range

#nameString?

Returns 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](*[a-z0-9])?` 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.

Returns:

  • (String, nil)

    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](*[a-z0-9])?` 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.



27
# File 'lib/ansible/ruby/modules/generated/cloud/google/gcp_compute_network.rb', line 27

attribute :name

#state:present, ...

Returns Whether the given object should exist in GCP.

Returns:

  • (:present, :absent, nil)

    Whether the given object should exist in GCP



14
# File 'lib/ansible/ruby/modules/generated/cloud/google/gcp_compute_network.rb', line 14

attribute :state