ansible-collections/amazon.aws

amazon.aws.elb_classic_lb does not support deletion_protection argument

Closed this issue · 2 comments

Summary

Unlike the other ELB modules the elb_classic_lb module does not support the deletion_protection argument.
This is somewhat inconsistent as this is a flag supported by all ELB types on AWS. So it would be nice to add it to the Ansible module too.
So one could add this line to all elb modules:
deletion_protection: true

Thank you for your consideration.

Issue Type

Feature Idea

Component Name

amazon.aws.elb_classic_lb

Additional Information

- name: Example ELB task
  amazon.aws.elb_classic_lb:
    name: 'my-classic-elb'
    scheme: internal
    security_group_ids: vpc-abc123
    listeners: [...]
    deletion_protection: true
    state: present

Code of Conduct

  • I agree to follow the Ansible Code of Conduct

Ok, rechecking the AWS Console, it might be that deletion protection might not be available on those ELBs on AWS side. was just confused by the Boto3 docs which make it appear like this is possible for all ELB types.

Hi @stefanhorning, thank you for reporting. Looking at the aws documentation, I think classic load balancers might not support deletion_protection attribute.
https://docs.aws.amazon.com/cli/latest/reference/elb/modify-load-balancer-attributes.html

Whereas Application, Network, Gateway Load balancers do support it.
https://docs.aws.amazon.com/cli/latest/reference/elbv2/modify-load-balancer-attributes.html

Please feel free to reopen the issue if required. Thanks!