community.general.scaleway_security_group_rule (8.5.0) — module

Scaleway Security Group Rule management module

Authors: Antoine Barbare (@abarbare)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

This module manages Security Group Rule on Scaleway account U(https://developer.scaleway.com).

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: Create a Security Group Rule
    community.general.scaleway_security_group_rule:
      state: present
      region: par1
      protocol: TCP
      port: 80
      ip_range: 0.0.0.0/0
      direction: inbound
      action: accept
      security_group: b57210ee-1281-4820-a6db-329f78596ecb
    register: security_group_rule_creation_task

Inputs

    
port:
    description:
    - Port related to the rule, null value for all the ports.
    required: true
    type: int

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Indicate desired state of the Security Group Rule.
    type: str

action:
    choices:
    - accept
    - drop
    description:
    - Rule action.
    required: true
    type: str

region:
    choices:
    - ams1
    - EMEA-NL-EVS
    - par1
    - EMEA-FR-PAR1
    - par2
    - EMEA-FR-PAR2
    - waw1
    - EMEA-PL-WAW1
    description:
    - Scaleway region to use (for example V(par1)).
    required: true
    type: str

api_url:
    aliases:
    - base_url
    default: https://api.scaleway.com
    description:
    - Scaleway API URL.
    type: str

ip_range:
    default: 0.0.0.0/0
    description:
    - IPV4 CIDR notation to apply to the rule.
    type: str

protocol:
    choices:
    - TCP
    - UDP
    - ICMP
    description:
    - Network protocol to use.
    required: true
    type: str

api_token:
    aliases:
    - oauth_token
    description:
    - Scaleway OAuth token.
    required: true
    type: str

direction:
    choices:
    - inbound
    - outbound
    description:
    - Rule direction.
    required: true
    type: str

api_timeout:
    aliases:
    - timeout
    default: 30
    description:
    - HTTP timeout to Scaleway API in seconds.
    type: int

security_group:
    description:
    - Security Group unique identifier.
    required: true
    type: str

validate_certs:
    default: true
    description:
    - Validate SSL certs of the Scaleway API.
    type: bool

query_parameters:
    default: {}
    description:
    - List of parameters passed to the query string.
    type: dict

Outputs

data:
  description: This is only present when O(state=present).
  returned: when O(state=present)
  sample:
    scaleway_security_group_rule:
      action: accept
      dest_port_from: 80
      dest_port_to: null
      direction: inbound
      editable: null
      id: 10cb0b9a-80f6-4830-abd7-a31cd828b5e9
      ip_range: 0.0.0.0/0
      position: 2
      protocol: TCP
  type: dict