Manage load balancers using libcloud
- codeauthor
Anthony Shaw <[email protected]>
Apache Libcloud load balancer management for a full list of supported clouds, see http://libcloud.readthedocs.io/en/latest/loadbalancer/supported_providers.html
Clouds include Amazon ELB, ALB, Google, Aliyun, CloudStack, Softlayer
New in version 2018.3.0.
This module uses a configuration profile for one or multiple Cloud providers
libcloud_loadbalancer:
profile_test1:
driver: gce
key: GOOG0123456789ABCXYZ
secret: mysecret
profile_test2:
driver: alb
key: 12345
secret: mysecret Example:
Using States to deploy a load balancer with extended arguments to specify region
lb_test:
libcloud_loadbalancer.balancer_present:
- name: example
- port: 80
- protocol: http
- profile: google
- ex_region: us-east1 apache-libcloud
Ensures a load balancer is absent.
name (str) -- Load Balancer name
profile (str) -- The profile key
Ensures a load balancer is present.
name (str) -- Load Balancer name
port (str) -- Port the load balancer should listen on, defaults to 80
protocol (str) -- Loadbalancer protocol, defaults to http.
profile (str) -- The profile key
algorithm (str) -- Load balancing algorithm, defaults to ROUND_ROBIN. See Algorithm type in Libcloud documentation for a full listing.
members (list of dict (ip, port)) -- An optional list of members to create on deployment
Ensure a load balancer member is absent, based on IP and Port
ip (str) -- IP address for the member
port (int) -- Port for the member
balancer_id (str) -- id of a load balancer you want to detach the member from
profile (str) -- The profile key
Ensure a load balancer member is present
ip (str) -- IP address for the new member
port (int) -- Port for the new member
balancer_id (str) -- id of a load balancer you want to attach the member to
profile (str) -- The profile key
© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/states/all/salt.states.libcloud_loadbalancer.html