Application Load Balancer

application_load_balancer

This is a simple module that supports creating or removing Application Loadbalancers.

Example Syntax


name: Create Application Load Balancer
ionoscloudsdk.ionoscloud.application_load_balancer:
  datacenter: ''
  name: 'AnsibleAutoTestALB'
  ips:
  - 10.12.118.224
  listener_lan: ''
  target_lan: ''
  wait: true
  wait_timeout: 2000
register: alb_response


name: Update Application Load Balancer
ionoscloudsdk.ionoscloud.application_load_balancer:
  datacenter: 'AnsibleAutoTestALB'
  application_load_balancer: ''
  name: 'AnsibleAutoTestALB - UPDATE'
  listener_lan: ''
  target_lan: ''
  wait: true
  state: update
  wait_timeout: 2000
register: alb_response_update


name: Remove Application Load Balancer
ionoscloudsdk.ionoscloud.application_load_balancer:
  application_load_balancer: 'AnsibleAutoTestALB - UPDATE'
  datacenter: ''
  wait: true
  wait_timeout: 2000
  state: absent

Returned object

{
    "changed": true,
    "failed": false,
    "action": "create",
    "application_load_balancer": {
        "entities": null,
        "href": "https://api.ionos.com/cloudapi/v6/datacenters/0c0e3049-ebbd-4465-a766-62f6950c109e/applicationloadbalancers/5c0b9b00-ae36-4626-bff6-e6c30e6d2809",
        "id": "5c0b9b00-ae36-4626-bff6-e6c30e6d2809",
        "metadata": {
            "created_by": "<USER_EMAIL>",
            "created_by_user_id": "<USER_ID>",
            "created_date": "2023-05-29T13:08:28+00:00",
            "etag": "45f17e1cad28dd4973ab127082018599",
            "last_modified_by": "<USER_EMAIL>",
            "last_modified_by_user_id": "<USER_ID>",
            "last_modified_date": "2023-05-29T13:08:28+00:00",
            "state": "BUSY"
        },
        "properties": {
            "ips": [
                "<IP>"
            ],
            "lb_private_ips": null,
            "listener_lan": 1,
            "name": "AnsibleAutoTestALB",
            "target_lan": 2
        },
        "type": "applicationloadbalancer"
    }
}

For more examples please check out the tests here.

state: present

  
name: Create Application Load Balancer
ionoscloudsdk.ionoscloud.application_load_balancer:
  datacenter: ''
  name: 'AnsibleAutoTestALB'
  ips:
  - 10.12.118.224
  listener_lan: ''
  target_lan: ''
  wait: true
  wait_timeout: 2000
register: alb_response

Available parameters for state present:

NameRequiredDescription

name str

True

The Application Load Balancer name.

listener_lan str

True

The ID of the listening (inbound) LAN.

ips list

False

Collection of the Application Load Balancer IP addresses. (Inbound and outbound) IPs of the 'listenerLan' are customer-reserved public IPs for the public load balancers, and private IPs for the private load balancers.

target_lan str

True

The ID of the balanced private target LAN (outbound).

lb_private_ips list

False

Collection of private IP addresses with the subnet mask of the Application Load Balancer. IPs must contain valid a subnet mask. If no IP is provided, the system will generate an IP with /24 subnet.

datacenter str

True

The ID or name of the datacenter.

api_url str

False

The Ionos API base URL.

certificate_fingerprint str

False

The Ionos API certificate fingerprint.

username str

False

The Ionos username. Overrides the IONOS_USERNAME environment variable.

password str

False

The Ionos password. Overrides the IONOS_PASSWORD environment variable.

token str

False

The Ionos token. Overrides the IONOS_TOKEN environment variable.

wait bool

False

Wait for the resource to be created before returning. Default: True Options: [True, False]

wait_timeout int

False

How long before wait gives up, in seconds. Default: 600

state str

False

Indicate desired state of the resource. Default: present Options: ['present', 'absent', 'update']

state: absent

  
name: Remove Application Load Balancer
ionoscloudsdk.ionoscloud.application_load_balancer:
  application_load_balancer: 'AnsibleAutoTestALB - UPDATE'
  datacenter: ''
  wait: true
  wait_timeout: 2000
  state: absent

Available parameters for state absent:

NameRequiredDescription

name str

False

The Application Load Balancer name.

datacenter str

True

The ID or name of the datacenter.

application_load_balancer str

True

The ID or name of the Application Loadbalancer.

api_url str

False

The Ionos API base URL.

certificate_fingerprint str

False

The Ionos API certificate fingerprint.

username str

False

The Ionos username. Overrides the IONOS_USERNAME environment variable.

password str

False

The Ionos password. Overrides the IONOS_PASSWORD environment variable.

token str

False

The Ionos token. Overrides the IONOS_TOKEN environment variable.

wait bool

False

Wait for the resource to be created before returning. Default: True Options: [True, False]

wait_timeout int

False

How long before wait gives up, in seconds. Default: 600

state str

False

Indicate desired state of the resource. Default: present Options: ['present', 'absent', 'update']

state: update

  
name: Update Application Load Balancer
ionoscloudsdk.ionoscloud.application_load_balancer:
  datacenter: 'AnsibleAutoTestALB'
  application_load_balancer: ''
  name: 'AnsibleAutoTestALB - UPDATE'
  listener_lan: ''
  target_lan: ''
  wait: true
  state: update
  wait_timeout: 2000
register: alb_response_update

Available parameters for state update:

NameRequiredDescription

name str

True

The Application Load Balancer name.

listener_lan str

True

The ID of the listening (inbound) LAN.

ips list

False

Collection of the Application Load Balancer IP addresses. (Inbound and outbound) IPs of the 'listenerLan' are customer-reserved public IPs for the public load balancers, and private IPs for the private load balancers.

target_lan str

True

The ID of the balanced private target LAN (outbound).

lb_private_ips list

False

Collection of private IP addresses with the subnet mask of the Application Load Balancer. IPs must contain valid a subnet mask. If no IP is provided, the system will generate an IP with /24 subnet.

datacenter str

True

The ID or name of the datacenter.

application_load_balancer str

True

The ID or name of the Application Loadbalancer.

api_url str

False

The Ionos API base URL.

certificate_fingerprint str

False

The Ionos API certificate fingerprint.

username str

False

The Ionos username. Overrides the IONOS_USERNAME environment variable.

password str

False

The Ionos password. Overrides the IONOS_PASSWORD environment variable.

token str

False

The Ionos token. Overrides the IONOS_TOKEN environment variable.

wait bool

False

Wait for the resource to be created before returning. Default: True Options: [True, False]

wait_timeout int

False

How long before wait gives up, in seconds. Default: 600

state str

False

Indicate desired state of the resource. Default: present Options: ['present', 'absent', 'update']

Last updated