1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Add Meaningful Cloudfront Identity during creation of cloudfront distribution (#37914)

This commit is contained in:
Sean Lok 2018-03-28 08:38:16 +08:00 committed by Will Thames
parent ab9b4479a1
commit 0ee275ca64

View file

@ -1418,7 +1418,7 @@ class CloudFrontValidationManager(object):
if not origin['s3_origin_access_identity_enabled']:
return None
try:
comment = "Origin Access Identity created by Ansible at %s" % self.__default_datetime_string
comment = "access-identity-by-ansible-%s-%s" % (origin.get('domain_name'), self.__default_datetime_string)
cfoai_config = dict(CloudFrontOriginAccessIdentityConfig=dict(CallerReference=self.__default_datetime_string,
Comment=comment))
oai = client.create_cloud_front_origin_access_identity(**cfoai_config)['CloudFrontOriginAccessIdentity']['Id']