diff options
author | Ethem Cem Özkan <ethemcem.ozkan@gmail.com> | 2024-06-02 04:48:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-02 04:48:56 +0200 |
commit | 37ad690d097df2d467a6a93d890abe8887481587 (patch) | |
tree | b587f9f2cec1347a36412344ffdfb37b01b57486 /awx_collection | |
parent | Modify the link to terraform_state inventory plugin (#15241) (diff) | |
download | awx-37ad690d097df2d467a6a93d890abe8887481587.tar.xz awx-37ad690d097df2d467a6a93d890abe8887481587.zip |
Add AWS SNS notification support for webhook (#15184)
Support for AWS SNS notifications. SNS is a widespread service that is used to integrate with other AWS services(EG lambdas). This support would unlock use cases like triggering lambda functions, especially when AWX is deployed on EKS.
Decisions:
Data Structure
- I preferred using the same structure as Webhook for message body data because it contains all job details. For now, I directly linked to Webhook to avoid duplication, but I am open to suggestions.
AWS authentication
- To support non-AWS native environments, I added configuration options for AWS secret key, ID, and session tokens. When entered, these values are supplied to the underlining boto3 SNS client. If not entered, it falls back to the default authentication chain to support the native AWS environment. Properly configured EKS pods are created with temporary credentials that the default authentication chain can pick automatically.
---------
Signed-off-by: Ethem Cem Ozkan <ethemcem.ozkan@gmail.com>
Diffstat (limited to 'awx_collection')
-rw-r--r-- | awx_collection/plugins/modules/notification_template.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/awx_collection/plugins/modules/notification_template.py b/awx_collection/plugins/modules/notification_template.py index bb1df60d38..e44e2be5e0 100644 --- a/awx_collection/plugins/modules/notification_template.py +++ b/awx_collection/plugins/modules/notification_template.py @@ -50,6 +50,7 @@ options: description: - The type of notification to be sent. choices: + - 'awssns' - 'email' - 'grafana' - 'irc' @@ -219,7 +220,7 @@ def main(): copy_from=dict(), description=dict(), organization=dict(), - notification_type=dict(choices=['email', 'grafana', 'irc', 'mattermost', 'pagerduty', 'rocketchat', 'slack', 'twilio', 'webhook']), + notification_type=dict(choices=['awssns', 'email', 'grafana', 'irc', 'mattermost', 'pagerduty', 'rocketchat', 'slack', 'twilio', 'webhook']), notification_configuration=dict(type='dict'), messages=dict(type='dict'), state=dict(choices=['present', 'absent', 'exists'], default='present'), |