Skip to content

Commit

Permalink
cloudfront_distribution: no longer crashes when waiting for completio…
Browse files Browse the repository at this point in the history
…n of creation (ansible-collections#1822)

cloudfront_distribution: no longer crashes when waiting for completion of creation

SUMMARY
Fixes ansible-collections#255
Here we were referring to the ["Id"] member of a queried distribution, but there is level of embedding missing: ["Distribution"]["Id"]
(Just how it's used here )
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
cloudfront_distribution

Reviewed-by: Markus Bergholz <[email protected]>
Reviewed-by: Alina Buzachis
  • Loading branch information
gsimon75 authored Jun 1, 2023
1 parent 5594769 commit dbf6362
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- cloudfront_distribution - no longer crashes when waiting for completion of creation (https://github.com/ansible-collections/community.aws/issues/255).
3 changes: 2 additions & 1 deletion plugins/modules/cloudfront_distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -2316,7 +2316,8 @@ def validate_distribution_id_from_alias(self, aliases):

def wait_until_processed(self, client, wait_timeout, distribution_id, caller_reference):
if distribution_id is None:
distribution_id = self.validate_distribution_from_caller_reference(caller_reference=caller_reference)["Id"]
distribution = self.validate_distribution_from_caller_reference(caller_reference=caller_reference)
distribution_id = distribution["Distribution"]["Id"]

try:
waiter = client.get_waiter("distribution_deployed")
Expand Down

0 comments on commit dbf6362

Please sign in to comment.