api_gateway module can not update API Gateway resource configuration with a swagger file
sky-joker opened this issue · 0 comments
sky-joker commented
Summary
After creating a new API Gateway resource with the module and my Swagger file, I updated my Swagger file and tried to modify the resource but could not update it.
Issue Type
Bug Report
Component Name
community.aws.api_gateway
Ansible Version
$ ansible --version
ansible [core 2.15.0]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/runner/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.9/site-packages/ansible
ansible collection location = /home/runner/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.9.16 (main, May 31 2023, 12:21:58) [GCC 8.5.0 20210514 (Red Hat 8.5.0-18)] (/usr/bin/python3.9)
jinja version = 3.1.2
libyaml = True
Collection Versions
$ ansible-galaxy collection list
Collection Version
--------------------------- -------
amazon.aws 6.0.1
(snip)
community.aws 6.3.0
(snip)
AWS SDK versions
$ pip show boto boto3 botocore
Name: boto3
Version: 1.24.95
Summary: The AWS SDK for Python
Home-page: https://github.com/boto/boto3
Author: Amazon Web Services
Author-email: None
License: Apache License 2.0
Location: /usr/local/lib/python3.9/site-packages
Requires: s3transfer, jmespath, botocore
Required-by:
---
Name: botocore
Version: 1.27.95
Summary: Low-level, data-driven core of boto 3.
Home-page: https://github.com/boto/botocore
Author: Amazon Web Services
Author-email: None
License: Apache License 2.0
Location: /usr/local/lib/python3.9/site-packages
Requires: python-dateutil, jmespath, urllib3
Required-by: s3transfer, boto3
Configuration
$ ansible-config dump --only-changed
CONFIG_FILE() = /etc/ansible/ansible.cfg
OS / Environment
RHEL 8
Steps to Reproduce
I created the below playbook and executed it to create a new API Gateway resource.
---
- name: Example
hosts: localhost
gather_facts: false
tasks:
- name: Deploy API
community.aws.api_gateway:
name: "{{ api_gateway.name }}"
region: "{{ api_gateway.region }}"
swagger_file: "{{ lookup('env', 'PWD') + '/' + api_gateway.swagger_file }}"
endpoint_type: "{{ api_gateway.endpoint_type }}"
tags: "{{ api_gateway.tags }}"
stage: "{{ api_gateway.deploy_stage }}"
After updating my swagger file, I executed the playbook again.
Expected Results
API Gateway resource configuration is updated.
Actual Results
I could not update API Gateway resource configuration with the module.
I confirmed I could update API Gateway resource configuration by importing my swagger file manually(import mode is "Overwrite").
As far as I see the result, the module behavior doesn't look like a problem.
Code of Conduct
- I agree to follow the Ansible Code of Conduct