-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
New module - AWS Glue connection #39492
Conversation
5911cfc
to
bcfa627
Compare
The test
The test
|
@Constantin007 @Constantin07 @Deepakkothandan @Etherdaemon @Java1Guy @Lujeni @Madhura-CSI @MichaelBaydoun @Sodki @adq @akazakov @alachaum @amir343 @anryko @bekelchik @bpennypacker @brandond @carsongee @chenl87 @defunctio @dkhenry @fiunchinho @fivethreeo @garethr @gunzy83 @gurumaia @hsingh @hyperized @iiibrad @infectsoldier @j-carl @jarv @Java1Guy @jimbydamonk @jmenga @joelthompson @jonhadfield @jonmer85 @joshsouza @jsdalton @jsmartin @kaczynskid @leedm777 @linuxdynasty @loia @lwade @MichaelBaydoun @michaeljs1990 @minichate @mjschultz @mmochan @nadirollo @nand0p @naslanidis @nathanwebsterdotme @nickball @orthanc @piontas @pjodouin @prasadkatti @psykotox @pwnall @raags @rickmendes @roadmapper @ryansydnor @scicoin-project @scottanderson42 @shepdelacreme @silviud @steynovich @tastychutney @tedder @tgerla @timmahoney @tombamford @tsiganenok @viper233 @whiter @willricardo @wilvk @zacblazic @zbal @zeekin @zimbatm As a maintainer of a module in the same namespace this new module has been submitted to, your vote counts for shipits. Please review this module and add |
#!/usr/bin/python | ||
# This file is part of Ansible | ||
# | ||
# Ansible is free software: you can redistribute it and/or modify |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
''' | ||
|
||
from ansible.module_utils.aws.core import AnsibleAWSModule | ||
from ansible.module_utils.ec2 import camel_dict_to_snake_dict, ec2_argument_spec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AnsibleAWSModule adds the ec2_argument_spec by default, so you can remove this import and just specify the module arguments in a dict. See lower half of https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/cloud/amazon/GUIDELINES.md#porting-code-to-ansibleawsmodule.
if module.params.get("security_groups") is not None or module.params.get("subnet_id") is not None: | ||
params['ConnectionInput']['PhysicalConnectionRequirements'] = dict() | ||
if module.params.get("security_groups") is not None: | ||
params['ConnectionInput']['PhysicalConnectionRequirements']['SecurityGroupIdList'] = module.params.get("security_groups") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
security_groups is documented as taking security group names or IDs. The docs could be updated or get_ec2_security_group_ids_from_names from module_utils.ec2 could be used.
|
||
DOCUMENTATION = ''' | ||
--- | ||
module: glue_connection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe aws_glue_connection instead?
- The type of the connection. Currently, only JDBC is supported; SFTP is not supported. | ||
required: false | ||
default: JDBC | ||
choices: [ 'JDBC', 'SFTP' ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should SFTP be an option even provided at this point?
I added some integration tests as per https://github.com/ansible/community/blob/master/group-aws/integration.md#policy and will work on updating CI with the IAM permissions for those. |
The test
|
* New module = AWS Glue connection * Add a few initial integration tests * Add alias for CI * module rename * finish module rename * add loop when getting glue connection again so we dont get None * Limit number of retries to get new glue connection info
* New module = AWS Glue connection * Add a few initial integration tests * Add alias for CI * module rename * finish module rename * add loop when getting glue connection again so we dont get None * Limit number of retries to get new glue connection info
SUMMARY
New module for AWS Glue Connections
ISSUE TYPE
COMPONENT NAME
glue_connection
ANSIBLE VERSION
ADDITIONAL INFORMATION