Connection module for Amazon ALB
New in version 2017.7.0.
configuration: |
This module accepts explicit elb credentials but can also utilize IAM roles assigned to the instance through Instance Profiles. Dynamic credentials are then automatically obtained from AWS API and no further configuration is necessary. More Information available at: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html If IAM roles are not used you need to specify them either in a pillar or in the minion's config file: elbv2.keyid: GKTADJGHEIQSXMKKRBJ08H elbv2.key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs elbv2.region: us-west-2 If a region is not specified, the default is us-east-1. It's also possible to specify key, keyid and region via a profile, either as a passed in dict, or as a string to pull from pillars or minion config: myprofile: keyid: GKTADJGHEIQSXMKKRBJ08H key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs region: us-east-1 |
---|---|
depends: |
boto3 |
Create target group if not present.
CLI example: .. code-block:: bash
salt myminion boto_elbv2.create_target_group learn1give1 protocol=HTTP port=54006 vpc_id=vpc-deadbeef
Delete target group.
CLI example:
salt myminion boto_elbv2.delete_target_group arn:aws:elasticloadbalancing:us-west-2:644138682826:targetgroup/learn1give1-api/414788a16b5cf163
Deregister targets to a target froup of an ALB. targets
is either a instance id string or a list of instance id's.
Returns:
True
: instance(s) deregistered successfullyFalse
: instance(s) failed to be deregisteredCLI example:
salt myminion boto_elbv2.deregister_targets myelb instance_id salt myminion boto_elbv2.deregister_targets myelb "[instance_id,instance_id]"
Get the curret health check status for targets in a target group.
CLI example:
salt myminion boto_elbv2.describe_target_health arn:aws:elasticloadbalancing:us-west-2:644138682826:targetgroup/learn1give1-api/414788a16b5cf163 targets=["i-isdf23ifjf"]
Register targets to a target froup of an ALB. targets
is either a instance id string or a list of instance id's.
Returns:
True
: instance(s) registered successfullyFalse
: instance(s) failed to be registeredCLI example:
salt myminion boto_elbv2.register_targets myelb instance_id salt myminion boto_elbv2.register_targets myelb "[instance_id,instance_id]"
Check to see if an target group exists.
CLI example:
salt myminion boto_elbv2.target_group_exists arn:aws:elasticloadbalancing:us-west-2:644138682826:targetgroup/learn1give1-api/414788a16b5cf163
© 2019 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.boto_elbv2.html