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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- aws_config_aggregator - Fix typos in attribute names (https://github.com/ansible-collections/community.aws/pull/553).
8 changes: 4 additions & 4 deletions plugins/modules/aws_config_aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
def resource_exists(client, module, params):
try:
aggregator = client.describe_configuration_aggregators(
ConfigurationAggregatorNames=[params['name']]
ConfigurationAggregatorNames=[params['ConfigurationAggregatorName']]
)
return aggregator['ConfigurationAggregators'][0]
except is_boto3_error_code('NoSuchConfigurationAggregatorException'):
Expand All @@ -128,7 +128,7 @@ def create_resource(client, module, params, result):

def update_resource(client, module, params, result):
current_params = client.describe_configuration_aggregators(
ConfigurationAggregatorNames=[params['name']]
ConfigurationAggregatorNames=[params['ConfigurationAggregatorName']]
)

del current_params['ConfigurationAggregatorArn']
Expand Down Expand Up @@ -181,8 +181,8 @@ def main():
params = {}
if name:
params['ConfigurationAggregatorName'] = name
params['AccountAggregationSources'] = []
if module.params.get('account_sources'):
params['AccountAggregationSources'] = []
for i in module.params.get('account_sources'):
tmp_dict = {}
if i.get('account_ids'):
Expand All @@ -203,7 +203,7 @@ def main():
'AwsRegions': module.params.get('organization_source').get('aws_regions')
})
if module.params.get('organization_source').get('all_aws_regions') is not None:
params['OrganizationAggregationSourcep'].update({
params['OrganizationAggregationSource'].update({
'AllAwsRegions': module.params.get('organization_source').get('all_aws_regions')
})

Expand Down