community / community.general / 1.3.11 / module / gcp_forwarding_rule
Removed in 2.0.0
Reason:Updated modules released with increased functionality | Alternative:Use M(google.cloud.gcp_compute_forwarding_rule) or M(google.cloud.gcp_compute_global_forwarding_rule) instead.
Create, Update or Destroy a Forwarding_Rule.
Authors: Tom Melendez (@supertom) <tom@supertom.com>
Install with ansible-galaxy collection install community.general:==1.3.11
collections: - name: community.general version: 1.3.11
Create, Update or Destroy a Forwarding_Rule. See U(https://cloud.google.com/compute/docs/load-balancing/http/target-proxies) for an overview. More details on the Global Forwarding_Rule API can be found at U(https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules) More details on the Forwarding Rules API can be found at U(https://cloud.google.com/compute/docs/reference/latest/forwardingRules)
- 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
state: choices: - present - absent description: - The state of the Forwarding Rule. 'present' or 'absent' required: true type: str region: description: - The region for this forwarding rule. Currently, only 'global' is supported. required: true type: str target: description: - Target resource for forwarding rule. For global proxy, this is a Global TargetProxy resource. Required for external load balancing (including Global load balancing) required: false type: str address: description: - 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. required: false type: str pem_file: description: - 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 I(credentials_file) instead. type: str protocol: choices: - TCP default: TCP description: - For global forwarding rules, TCP, UDP, ESP, AH, SCTP or ICMP. Default is TCP. required: false type: str port_range: description: - For global forwarding rules, must be set to 80 or 8080 for TargetHttpProxy, and 443 for TargetHttpsProxy or TargetSslProxy. required: false type: str project_id: description: - The Google Cloud Platform project ID to use. type: str credentials_file: description: - The path to the JSON file associated with the service account email. type: str forwarding_rule_name: description: - Name of the Forwarding_Rule. required: true type: str load_balancing_scheme: choices: - EXTERNAL default: EXTERNAL description: - Load balancing scheme. At the moment the only choice is EXTERNAL. type: str service_account_email: description: - service account email type: str service_account_permissions: description: - service account permissions type: list
forwarding_rule: description: GCP Forwarding_Rule dictionary returned: Always. Refer to GCP documentation for detailed field descriptions. sample: name: my-forwarding_rule target: '...' type: dict forwarding_rule_name: description: Name of the Forwarding_Rule returned: Always sample: my-target-proxy type: str region: description: Region for Forwarding Rule. returned: Always sample: true type: bool state: description: state of the Forwarding_Rule returned: Always. sample: present type: str