community.general.gcp_forwarding_rule – Create, Update or Destroy a Forwarding_Rule.

From Get docs
Ansible/docs/2.10/collections/community/general/gcp forwarding rule module


community.general.gcp_forwarding_rule – Create, Update or Destroy a Forwarding_Rule.

Note

This plugin is part of the community.general collection (version 1.3.2).

To install it use: ansible-galaxy collection install community.general.

To use it in a playbook, specify: community.general.gcp_forwarding_rule.


DEPRECATED

Removed in
version 2.0.0
Why
Updated modules released with increased functionality
Alternative
Use google.cloud.gcp_compute_forwarding_rule or google.cloud.gcp_compute_global_forwarding_rule instead.

Synopsis

Requirements

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

  • python >= 2.6
  • google-api-python-client >= 1.6.2
  • google-auth >= 0.9.0
  • google-auth-httplib2 >= 0.0.2

Parameters

Parameter Choices/Defaults Comments

address

string

IPv4 or named IP address. Must be of the same scope (regional, global). Reserved addresses can (and probably should) be used for global forwarding rules. You may reserve IPs from the console or via the gce_eip module.

credentials_file

string

The path to the JSON file associated with the service account email.

forwarding_rule_name

string / required

Name of the Forwarding_Rule.

load_balancing_scheme

string

  • EXTERNAL

Load balancing scheme. At the moment the only choice is EXTERNAL.

pem_file

string

The path to the PEM file associated with the service account email.

This option is deprecated and may be removed in a future release. Use credentials_file instead.

port_range

string

For global forwarding rules, must be set to 80 or 8080 for TargetHttpProxy, and 443 for TargetHttpsProxy or TargetSslProxy.

project_id

string

The Google Cloud Platform project ID to use.

protocol

string

  • TCP

For global forwarding rules, TCP, UDP, ESP, AH, SCTP or ICMP. Default is TCP.

region

string / required

The region for this forwarding rule. Currently, only 'global' is supported.

service_account_email

string

service account email

service_account_permissions

list / elements=string

service account permissions

state

string / required

  • present
  • absent

The state of the Forwarding Rule. 'present' or 'absent'

target

string

Target resource for forwarding rule. For global proxy, this is a Global TargetProxy resource. Required for external load balancing (including Global load balancing)



Notes

Note

  • Currently only supports global forwarding rules. As such, Load Balancing Scheme is always EXTERNAL.


Examples

- name: Create Minimum GLOBAL Forwarding_Rule
  community.general.gcp_forwarding_rule:
    service_account_email: "{{ service_account_email }}"
    credentials_file: "{{ credentials_file }}"
    project_id: "{{ project_id }}"
    forwarding_rule_name: my-forwarding_rule
    protocol: TCP
    port_range: 80
    region: global
    target: my-target-proxy
    state: present

- name: Create Forwarding_Rule w/reserved static address
  community.general.gcp_forwarding_rule:
    service_account_email: "{{ service_account_email }}"
    credentials_file: "{{ credentials_file }}"
    project_id: "{{ project_id }}"
    forwarding_rule_name: my-forwarding_rule
    protocol: TCP
    port_range: 80
    address: my-reserved-static-address-name
    region: global
    target: my-target-proxy
    state: present

Return Values

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

Key Returned Description

forwarding_rule

dictionary

Always. Refer to GCP documentation for detailed field descriptions.

GCP Forwarding_Rule dictionary


Sample:

{'name': 'my-forwarding_rule', 'target': '...'}

forwarding_rule_name

string

Always

Name of the Forwarding_Rule


Sample:

my-target-proxy

region

boolean

Always

Region for Forwarding Rule.


Sample:

True

state

string

Always.

state of the Forwarding_Rule


Sample:

present




Status

  • This module will be removed in version 2.0.0. [deprecated]
  • For more information see DEPRECATED.

Authors

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/community/general/gcp_forwarding_rule_module.html