amazon.aws
amazon.aws copied to clipboard
deprecate aws-account-attribute-lookup
Summary
The lookup plugin aws-account-attribute-lookup
located at https://docs.ansible.com/ansible/latest/collections/amazon/aws/aws_account_attribute_lookup.html#ansible-collections-amazon-aws-aws-account-attribute-lookup
is no longer supported on the API
from the boto docs: "This attribute is no longer supported. The returned value does not reflect your actual vCPU limit for running On-Demand Instances"
Issue Type
Bug Report
Component Name
aws_account_attribute
Ansible Version
$ ansible --version
ansible [core 2.13.0]
config file = /Users/sean/.ansible.cfg
configured module search path = ['/Users/sean/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.9/site-packages/ansible
ansible collection location = /Users/sean/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible
python version = 3.9.9 (main, Nov 21 2021, 03:23:42) [Clang 13.0.0 (clang-1300.0.29.3)]
jinja version = 3.0.1
libyaml = True
Collection Versions
➜ playbooks ansible-galaxy collection list
# /Users/sean/.ansible/collections/ansible_collections
Collection Version
----------------------------------- -------
amazon.aws 3.2.0
ansible.netcommon 2.0.2
ansible.network 1.2.0
ansible.posix 1.3.0
ansible.product_demos 1.2.12
ansible.utils 2.6.0
ansible.windows 1.5.0
ansible.workshops 1.0.11
arista.eos 2.1.2
awx.awx 19.2.2
azure.azcollection 1.12.0
chocolatey.chocolatey 1.1.0
cisco.ios 2.0.1
cisco.iosxr 2.8.1
cisco.nxos 2.9.0
community.aws 3.2.1
community.crypto 1.6.2
community.general 3.0.2
community.mysql 2.1.0
community.windows 1.3.0
containers.podman 1.9.3
f5networks.f5_modules 1.9.0
frr.frr 1.0.3
junipernetworks.junos 2.1.0
openvswitch.openvswitch 2.1.0
redhat_cop.controller_configuration 2.0.0
redhat_cop.tower_utilities 0.3.2
vyos.vyos 2.8.0
AWS SDK versions
➜ playbooks pip show boto boto3 botocore
Name: boto
Version: 2.49.0
Summary: Amazon Web Services Library
Home-page: https://github.com/boto/boto/
Author: Mitch Garnaat
Author-email: [email protected]
License: MIT
Location: /usr/local/lib/python3.9/site-packages
Requires:
Required-by:
---
Name: boto3
Version: 1.24.51
Summary: The AWS SDK for Python
Home-page: https://github.com/boto/boto3
Author: Amazon Web Services
Author-email:
License: Apache License 2.0
Location: /usr/local/lib/python3.9/site-packages
Requires: botocore, jmespath, s3transfer
Required-by:
---
Name: botocore
Version: 1.27.51
Summary: Low-level, data-driven core of boto 3.
Home-page: https://github.com/boto/botocore
Author: Amazon Web Services
Author-email:
License: Apache License 2.0
Location: /usr/local/lib/python3.9/site-packages
Requires: jmespath, python-dateutil, urllib3
Required-by: boto3, s3transfer```
### Configuration
```console (paste below)
$ ansible-config dump --only-changed
DEFAULT_STDOUT_CALLBACK(/Users/sean/.ansible.cfg) = yaml
GALAXY_SERVER_LIST(/Users/sean/.ansible.cfg) = ['release_galaxy']
HOST_KEY_CHECKING(/Users/sean/.ansible.cfg) = False
OS / Environment
MacOS Monterrey 12.6
Steps to Reproduce
---
- name: Create AWS resources
hosts: localhost
connection: local
gather_facts: false
vars:
account_details: "{{ lookup('aws_account_attribute', wantlist='true') }}"
tasks:
- name: debug account_details
debug:
msg: "{{ account_details }}"
Expected Results
It works, the data is just meaningless now and doesn't match what is configured in the AWS console
Actual Results
TASK [debug account_details] ***************************************************************************************************************************************************************************************************
ok: [localhost] =>
msg:
default-vpc:
- vpc-047de133ce424fe3f
max-elastic-ips:
- '5'
max-instances:
- '20'
supported-platforms:
- VPC
vpc-max-elastic-ips:
- '50'
vpc-max-security-groups-per-interface:
- '5'
Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct
Files identified in the description:
- [
plugins/lookup/aws_account_attribute.py
](https://github.com/['ansible-collections/amazon.aws', 'ansible-collections/community.aws', 'ansible-collections/community.vmware']/blob/main/plugins/lookup/aws_account_attribute.py)
If these files are inaccurate, please update the component name
section of the description or use the !component
bot command.
Looking at the latest API docs https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2.html#EC2.Client.describe_account_attributes I don't think you're correct about the whole of
aws-account-attribute-lookup
as a whole being deprecated.
max-instances
has that message and is deprecated, and max-elastic-ips will also become worth-less soon (with EC2-Classic going away). However, the other values still seem to be valid.
can we just remove the values that are incorrect then?