google.cloud.gcp_networkconnectivity_spoke_info module – List NetworkConnectivity.Spoke resources

Note

This module is part of the google.cloud collection (version 1.16.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install google.cloud. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: google.cloud.gcp_networkconnectivity_spoke_info.

Synopsis

  • The NetworkConnectivity Spoke resource

Requirements

The below requirements are needed on the host that executes this module.

  • python >= 3.8

  • requests >= 2.18.4

  • google-auth >= 2.25.1

Parameters

Parameter

Comments

access_token

string

The access token used to authenticate.

auth_kind

string / required

The type of credential used.

Choices:

  • "accesstoken"

  • "application"

  • "machineaccount"

  • "serviceaccount"

env_type

string

Specifies which Ansible environment you’re running this module within.

This should not be set unless you know what you’re doing.

This only alters the User Agent string for any API requests.

filters

list / elements=string

A list of filter expression strings used to filter the resources returned by the API.

Each string is a filter expression (e.g. some_field = "SOME_VALUE").

Multiple expressions are combined with a logical AND.

Refer to the filter topic documentation https://cloud.google.com/sdk/gcloud/reference/topic/filters.

Refer to the AIP-160 filter syntax documentation https://google.aip.dev/160.

location

string / required

The location for the resource.

project

string

The Google Cloud Platform project to use.

scopes

list / elements=string

Array of scopes to be used.

service_account_contents

jsonarg

The contents of a Service Account JSON file,

either in a dictionary or as a JSON string that represents it.

service_account_email

string

An optional service account email address if machineaccount is

selected and the user does not wish to use the default email.

service_account_file

path

The path of a Service Account JSON file if serviceaccount

is selected as type.

Notes

Note

Examples

- name: List all gcp_networkconnectivity_spoke_info resources
  google.cloud.gcp_networkconnectivity_spoke_info:
    project: "{{ gcp_project }}"
    auth_kind: "{{ gcp_cred_kind }}"
    service_account_file: "{{ gcp_cred_file }}"
  register: result

- name: List gcp_networkconnectivity_spoke_info resources matching given filters
  google.cloud.gcp_networkconnectivity_spoke_info:
    filters:
      - display_name = "my-resource"
    project: "{{ gcp_project }}"
    auth_kind: "{{ gcp_cred_kind }}"
    service_account_file: "{{ gcp_cred_file }}"
  register: result

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

changed

boolean

Whether any changes were made (always false for info modules).

Returned: always

resources

list / elements=dictionary

List of NetworkConnectivity.Spoke resources matching the supplied filters. May be empty, contain a single resource, or multiple resources.

Returned: always

createTime

string

Output only.

The time the spoke was created.

Returned: success

description

string

An optional description of the spoke.

Returned: when set

gateway

dictionary

This is a gateway that can apply specialized processing to traffic going through it.

Returned: when set

capacity

string

the capacity of the gateway spoke, in Gbps.

Returned: always

ipRangeReservations

list / elements=dictionary

A list of IP ranges that are reserved for this gateway’s internal infrastructure.

Returned: always

ipRange

string

A block of IP address ranges used to allocate supporting infrastructure for this gateway—for example, 10.1.2.0/23.

The IP address block must be a /23 range.

This IP address block must not overlap with subnets in any spoke or peer network that the gateway can communicate with.

Returned: always

routers

list / elements=string

Set of Cloud Routers that are attached to this NCC-GW.

Returned: success

group

string

The name of the group that this spoke is associated with.

Returned: when set

hub

string

The URI of the hub that this spoke is attached to.

Returned: always

labels

dictionary

Optional labels in key:value format.

For more information about labels, see [Requirements for labels](https://docs.cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).

**Note**: This field is non-authoritative, and will only manage the labels present in your configuration.

Returned: when set

linkedInterconnectAttachments

dictionary

A collection of VLAN attachment resources.

These resources should be redundant attachments that all advertise the same prefixes to Google Cloud.

Alternatively, in active/passive configurations, all attachments should be capable of advertising the same prefixes.

Returned: when set

excludeExportRanges

list / elements=string

Dynamic routes overlapped/encompassed by exclude export ranges are excluded during export to hub.

Returned: when set

excludeImportRanges

list / elements=string

Hub routes overlapped/encompassed by exclude import ranges are excluded during import from hub.

Returned: when set

includeExportRanges

list / elements=string

Dynamic routes fully encompassed by include export ranges are included during export to hub.

Returned: when set

includeImportRanges

list / elements=string

Hub routes fully encompassed by include import ranges are included during import from hub.

“ALL_IPV4_RANGES” or IPv4 CIDR ranges are allowed.

Returned: when set

siteToSiteDataTransfer

boolean

A value that controls whether site-to-site data transfer is enabled for these resources.

Note that data transfer is available only in supported locations.

Returned: always

uris

list / elements=string

The URIs of linked interconnect attachment resources.

Returned: always

linkedProducerVpcNetwork

dictionary

Producer VPC network that is associated with the spoke.

Returned: when set

excludeExportRanges

list / elements=string

IP ranges encompassing the subnets to be excluded from peering.

Returned: when set

includeExportRanges

list / elements=string

IP ranges allowed to be included from peering.

Returned: when set

network

string

The URI of the Service Consumer VPC that the Producer VPC is peered with.

Returned: always

peering

string

The name of the VPC peering between the Service Consumer VPC and the Producer VPC (defined in the Tenant project) which is added to the NCC hub.

This peering must be in ACTIVE state.

Returned: always

producerNetwork

string

The URI of the Producer VPC.

Returned: success

linkedRouterApplianceInstances

dictionary

The URIs of linked Router appliance resources.

Returned: when set

excludeExportRanges

list / elements=string

Dynamic routes overlapped/encompassed by exclude export ranges are excluded during export to hub.

Returned: when set

excludeImportRanges

list / elements=string

Hub routes overlapped/encompassed by exclude import ranges are excluded during import from hub.

Returned: when set

includeExportRanges

list / elements=string

Dynamic routes fully encompassed by include export ranges are included during export to hub.

Returned: when set

includeImportRanges

list / elements=string

Hub routes fully encompassed by include import ranges are included during import from hub.

“ALL_IPV4_RANGES” or IPv4 CIDR ranges are allowed.

Returned: when set

instances

list / elements=dictionary

The list of router appliance instances.

Returned: always

ipAddress

string

The IP address on the VM to use for peering.

Returned: always

virtualMachine

string

The URI of the virtual machine resource.

Returned: always

siteToSiteDataTransfer

boolean

A value that controls whether site-to-site data transfer is enabled for these resources.

Note that data transfer is available only in supported locations.

Returned: always

linkedVpcNetwork

dictionary

VPC network that is associated with the spoke.

Returned: when set

excludeExportRanges

list / elements=string

IP ranges encompassing the subnets to be excluded from peering.

Returned: when set

includeExportRanges

list / elements=string

IP ranges allowed to be included from peering.

Returned: when set

uri

string

The URI of the VPC network resource.

Returned: always

linkedVpnTunnels

dictionary

The URIs of linked VPN tunnel resources.

Returned: when set

excludeExportRanges

list / elements=string

Dynamic routes overlapped/encompassed by exclude export ranges are excluded during export to hub.

Returned: when set

excludeImportRanges

list / elements=string

Hub routes overlapped/encompassed by exclude import ranges are excluded during import from hub.

Returned: when set

includeExportRanges

list / elements=string

Dynamic routes fully encompassed by include export ranges are included during export to hub.

Returned: when set

includeImportRanges

list / elements=string

Hub routes fully encompassed by include import ranges are included during import from hub.

“ALL_IPV4_RANGES” or IPv4 CIDR ranges are allowed.

Returned: when set

siteToSiteDataTransfer

boolean

A value that controls whether site-to-site data transfer is enabled for these resources.

Note that data transfer is available only in supported locations.

Returned: always

uris

list / elements=string

The URIs of linked VPN tunnel resources.

Returned: always

name

string

The name of the spoke.

Spoke names must be unique.

Returned: always

reasons

list / elements=dictionary

The reasons for the current state in the lifecycle.

Returned: success

code

string

The code associated with this reason.

Returned: when set

message

string

Human-readable details about this reason.

Returned: when set

userDetails

string

Additional information provided by the user in the RejectSpoke call.

Returned: when set

state

string

Output only.

The current lifecycle state of this spoke.

Returned: success

uniqueId

string

Output only.

The Google-generated UUID for the spoke.

This value is unique across all spoke resources.

If a spoke is deleted and another with the same name is created, the new spoke is assigned a different unique_id.

Returned: success

updateTime

string

Output only.

The time the spoke was last updated.

Returned: success

Authors

  • Google Inc. (@googlecloudplatform)