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

Fix KeyError in aws_config_aggregator module #553

Merged
merged 1 commit into from
Apr 25, 2021
Merged

Fix KeyError in aws_config_aggregator module #553

merged 1 commit into from
Apr 25, 2021

Conversation

ichekaldin
Copy link
Contributor

SUMMARY

If organization_source attribute is specified, module fails with the
following error on line 206:

KeyError: 'OrganizationAggregationSourcep'

If organization_source attribute is specified and account_sources
attribute is empty, module fails with the following error on line 119:

KeyError: 'AccountAggregationSources'

This PR fixes both issues.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

aws_config_aggregator

ADDITIONAL INFORMATION

Example of an execution that triggers both errors:

- community.aws.aws_config_aggregator:
    name: test
    account_sources: []
    organization_source:
      all_aws_regions: true
      role_arn: "arn:aws:iam::123412341234:role/my-role"
    state: present

If `organization_source` attribute is specified, module fails with the
following error on line 206:

```
KeyError: 'OrganizationAggregationSourcep'
```

If `organization_source` attribute is specified and `account_sources`
attribute is empty, module fails with the following error on line 119:

```
KeyError: 'AccountAggregationSources'
```

This PR fixes both issues.
@ansibullbot
Copy link

@ansibullbot ansibullbot added bug This issue/PR relates to a bug community_review module module needs_triage plugins plugin (any type) labels Apr 21, 2021
@tremble tremble added the gate label Apr 25, 2021
@tremble
Copy link
Contributor

tremble commented Apr 25, 2021

I've tested this locally and it doesn't break the existing (limited) test suite.

@tremble
Copy link
Contributor

tremble commented Apr 25, 2021

@ichekaldin thanks for your contribution. The fix will hopefully auto-merge now and should be available in the next week or two as a part of a 1.5.0 release.

@ansible-zuul ansible-zuul bot merged commit 1df617a into ansible-collections:main Apr 25, 2021
@ichekaldin ichekaldin deleted the aws_config_aggregator/fix_organization_source branch May 6, 2021 23:22
alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this pull request Jul 19, 2021
…_aggregator/fix_organization_source

Fix KeyError in aws_config_aggregator module

Reviewed-by: Ansibullbot manages ticket workflow
             https://github.com/ansibullbot
alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this pull request Jul 19, 2021
…_aggregator/fix_organization_source

Fix KeyError in aws_config_aggregator module

Reviewed-by: Ansibullbot manages ticket workflow
             https://github.com/ansibullbot
alinabuzachis added a commit to alinabuzachis/community.aws that referenced this pull request May 25, 2022
…ollections#553)

Improve error handling rds.py for RDS cluster and snapshot

SUMMARY


Improve error handling rds.py for rds_cluster
Add handlers for rds_instance_snapshot and rds_cluster_snapshot


ISSUE TYPE


Feature Pull Request

COMPONENT NAME

module_utils/rds.py

Reviewed-by: Mark Chappell <None>
Reviewed-by: Jill R <None>
Reviewed-by: Alina Buzachis <None>
Reviewed-by: Markus Bergholz <[email protected]>
Reviewed-by: Mark Woolley <[email protected]>
Reviewed-by: Joseph Torcasso <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 community_review module module plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants