Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecate aws-account-attribute-lookup #1092

Open
1 task done
IPvSean opened this issue Sep 29, 2022 · 3 comments
Open
1 task done

deprecate aws-account-attribute-lookup #1092

IPvSean opened this issue Sep 29, 2022 · 3 comments
Labels
bug This issue/PR relates to a bug easyfix Good for new comers and easy to start with contribution lookup lookup plugin plugins plugin (any type) python3

Comments

@IPvSean
Copy link
Contributor

IPvSean commented Sep 29, 2022

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

  • I agree to follow the Ansible Code of Conduct
@ansibullbot
Copy link

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot ansibullbot added bug This issue/PR relates to a bug lookup lookup plugin needs_triage plugins plugin (any type) python3 labels Sep 29, 2022
@tremble
Copy link
Contributor

tremble commented Sep 30, 2022

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.

@IPvSean
Copy link
Contributor Author

IPvSean commented Sep 30, 2022

can we just remove the values that are incorrect then?

@gravesm gravesm added easyfix Good for new comers and easy to start with contribution and removed needs_triage labels Oct 4, 2022
abikouo pushed a commit to abikouo/amazon.aws that referenced this issue Sep 18, 2023
Fixing parameter name in example.

SUMMARY
Fixing parameter used in example.
ISSUE TYPE

Docs Pull Request

COMPONENT NAME
aws_acm
ADDITIONAL INFORMATION
Using the example as is gives in an error -
fatal: [localhost]: FAILED! => changed=false 
  msg: 'state is present but all of the following are missing: private_key'

Reviewed-by: Markus Bergholz <[email protected]>
Reviewed-by: Mark Chappell <None>
abikouo pushed a commit to abikouo/amazon.aws that referenced this issue Sep 18, 2023
Fixing parameter name in example.

SUMMARY
Fixing parameter used in example.
ISSUE TYPE

Docs Pull Request

COMPONENT NAME
aws_acm
ADDITIONAL INFORMATION
Using the example as is gives in an error -
fatal: [localhost]: FAILED! => changed=false 
  msg: 'state is present but all of the following are missing: private_key'

Reviewed-by: Markus Bergholz <[email protected]>
Reviewed-by: Mark Chappell <None>
abikouo pushed a commit to abikouo/amazon.aws that referenced this issue Oct 24, 2023
Fixing parameter name in example.

SUMMARY
Fixing parameter used in example.
ISSUE TYPE

Docs Pull Request

COMPONENT NAME
aws_acm
ADDITIONAL INFORMATION
Using the example as is gives in an error -
fatal: [localhost]: FAILED! => changed=false 
  msg: 'state is present but all of the following are missing: private_key'

Reviewed-by: Markus Bergholz <[email protected]>
Reviewed-by: Mark Chappell <None>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug easyfix Good for new comers and easy to start with contribution lookup lookup plugin plugins plugin (any type) python3
Projects
None yet
Development

No branches or pull requests

4 participants