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

aws_api_gateway only creates REST-API and not HTTP #2011

Open
1 task done
maikbrauer opened this issue Nov 28, 2023 · 0 comments
Open
1 task done

aws_api_gateway only creates REST-API and not HTTP #2011

maikbrauer opened this issue Nov 28, 2023 · 0 comments

Comments

@maikbrauer
Copy link

Summary

When using the community.aws.api_gateway: and import the openAPI3 File via swagger_file: it always creates Protocol: REST instead of HTTP

Issue Type

Bug Report

Component Name

community.aws.api_gateway

Ansible Version

ansible [core 2.14.4]  
python version = 3.10.12 (main, Jun 20 2023, 17:00:24) [Clang 14.0.3 (clang-1403.0.22.14.1)] (/usr/local/opt/[email protected]/bin/python3.10)
jinja version = 3.1.2

Collection Versions

Collection        Version
----------------- -------
amazon.aws        7.0.0  
ansible.utils     2.9.0  
awx.awx           21.14.0
community.aws     7.0.0  
community.general 5.4.0  
kubernetes.core   2.4.0  

# /usr/local/lib/python3.10/site-packages/ansible_collections
Collection                    Version
----------------------------- -------
amazon.aws                    5.4.0  
ansible.netcommon             4.1.0  
ansible.posix                 1.5.1  
ansible.utils                 2.9.0  
ansible.windows               1.13.0 
arista.eos                    6.0.0  
awx.awx                       21.14.0
azure.azcollection            1.15.0 
check_point.mgmt              4.0.0  
chocolatey.chocolatey         1.4.0  
cisco.aci                     2.4.0  
cisco.asa                     4.0.0  
cisco.dnac                    6.6.4  
cisco.intersight              1.0.24 
cisco.ios                     4.4.0  
cisco.iosxr                   4.1.0  
cisco.ise                     2.5.12 
cisco.meraki                  2.15.1 
cisco.mso                     2.2.1  
cisco.nso                     1.0.3  
cisco.nxos                    4.1.0  
cisco.ucs                     1.8.0  
cloud.common                  2.1.3  
cloudscale_ch.cloud           2.2.4  
community.aws                 5.4.0  
community.azure               2.0.0  
community.ciscosmb            1.0.5  
community.crypto              2.11.1 
community.digitalocean        1.23.0 
community.dns                 2.5.2  
community.docker              3.4.3  
community.fortios             1.0.0  
community.general             6.5.0  
community.google              1.0.0  
community.grafana             1.5.4  
community.hashi_vault         4.2.0  
community.hrobot              1.8.0  
community.libvirt             1.2.0  
community.mongodb             1.5.1  
community.mysql               3.6.0  
community.network             5.0.0  
community.okd                 2.3.0  
community.postgresql          2.3.2  
community.proxysql            1.5.1  
community.rabbitmq            1.2.3  
community.routeros            2.8.0  
community.sap                 1.0.0  
community.sap_libs            1.4.1  
community.skydive             1.0.0  
community.sops                1.6.1  
community.vmware              3.5.0  
community.windows             1.12.0 
community.zabbix              1.9.2  
containers.podman             1.10.1 
cyberark.conjur               1.2.0  
cyberark.pas                  1.0.17 
dellemc.enterprise_sonic      2.0.0  
dellemc.openmanage            6.3.0  
dellemc.os10                  1.1.1  
dellemc.os6                   1.0.7  
dellemc.os9                   1.0.4  
dellemc.powerflex             1.5.0  
dellemc.unity                 1.5.0  
f5networks.f5_modules         1.23.0 
fortinet.fortimanager         2.1.7  
fortinet.fortios              2.2.3  
frr.frr                       2.0.0  
gluster.gluster               1.0.2  
google.cloud                  1.1.3  
grafana.grafana               1.1.1  
hetzner.hcloud                1.10.0 
hpe.nimble                    1.1.4  
ibm.qradar                    2.1.0  
ibm.spectrum_virtualize       1.11.0 
infinidat.infinibox           1.3.12 
infoblox.nios_modules         1.4.1  
inspur.ispim                  1.3.0  
inspur.sm                     2.3.0  
junipernetworks.junos         4.1.0  
kubernetes.core               2.4.0  
lowlydba.sqlserver            1.3.1  
mellanox.onyx                 1.0.0  
netapp.aws                    21.7.0 
netapp.azure                  21.10.0
netapp.cloudmanager           21.22.0
netapp.elementsw              21.7.0 
netapp.ontap                  22.4.1 
netapp.storagegrid            21.11.1
netapp.um_info                21.8.0 
netapp_eseries.santricity     1.4.0  
netbox.netbox                 3.11.0 
ngine_io.cloudstack           2.3.0  
ngine_io.exoscale             1.0.0  
ngine_io.vultr                1.1.3  
openstack.cloud               1.10.0 
openvswitch.openvswitch       2.1.0  
ovirt.ovirt                   2.4.1  
purestorage.flasharray        1.17.2 
purestorage.flashblade        1.10.0 
purestorage.fusion            1.4.1  
sensu.sensu_go                1.13.2 
splunk.es                     2.1.0  
t_systems_mms.icinga_director 1.32.2 
theforeman.foreman            3.9.0  
vmware.vmware_rest            2.3.1  
vultr.cloud                   1.7.0  
vyos.vyos                     4.0.1  
wti.remote                    1.0.4 

AWS SDK versions

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: aws
---
Name: boto3
Version: 1.24.2
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: aws-lambda-powertools, c7n
---
Name: botocore
Version: 1.27.2
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: aws-xray-sdk, awscli, boto3, c7n, s3transfer

Configuration

CONFIG_FILE() = /Users/{{username}}/Documents/GitHub/gscluster-manage/ansible.cfg
DEFAULT_JINJA2_EXTENSIONS(/Users{{username}}/Documents/GitHub/gscluster-manage/ansible.cfg) = jinja2.ext.do
DEFAULT_LOAD_CALLBACK_PLUGINS(/Users{{username}}/Documents/GitHub/gscluster-manage/ansible.cfg) = True
DEFAULT_STDOUT_CALLBACK(/Users/{{username}}/Documents/GitHub/gscluster-manage/ansible.cfg) = yaml
DISPLAY_SKIPPED_HOSTS(/Users/{{username}}/Documents/GitHub/gscluster-manage/ansible.cfg) = False
INVENTORY_IGNORE_EXTS(/Users/{{username}}/Documents/GitHub/gscluster-manage/ansible.cfg) = ['.crt', 'secrets']

OS / Environment

Darwin Kernel Version 22.6.0: Wed Oct 4 21:25:26 PDT 2023; root:xnu-8796.141.3.701.17~4/RELEASE_X86_64

Steps to Reproduce

Execute the following Playbook:

- name: Setup AWS API Gateway setup on AWS and deploy API definition
  community.aws.api_gateway:
    #api_id: 8077df4e-1acb-4059-8554-defc59b7ecbd
    swagger_file: "templates/swagger_openapi.yaml"
    stage: prod
    cache_enabled: true
    cache_size: '1.6'
    tracing_enabled: true
    endpoint_type: REGIONAL
    state: present

openAPI File ("templates/swagger_openapi.yaml"):

openapi: "3.0.1"
info:
  title: "MyAPIGateway_Test"
  version: "2023-11-25 15:58:19UTC"
servers:
- url: "https://1234abcd.execute-api.eu-central-1.amazonaws.com/{basePath}"
  variables:
    basePath:
      default: "prod"
paths:
  /GetAuthToken:
    post:
      responses:
        default:
          description: "Default response for POST /myapicontext"
      x-amazon-apigateway-integration:
        payloadFormatVersion: "2.0"
        type: "aws_proxy"
        httpMethod: "POST"
        uri: "arn:aws:apigateway:eu-central-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-central-1:{{myawsaccount}}:function:TestLambda/invocations"
        connectionType: "INTERNET"
        timeoutInMillis: 3000
x-amazon-apigateway-importexport-version: "1.0"

Expected Results

I would expect that the Exported OPENAPI File will be when it gets imported the same Config back.

Actual Results

It will create an API-Gateway with REST Protocoll as you can see in the image:
image

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant