@ -39,7 +39,7 @@ options:
- Option when creating an endpoint . If not provided AWS will
- Option when creating an endpoint . If not provided AWS will
utilise a default policy which provides full access to the service .
utilise a default policy which provides full access to the service .
required : false
required : false
policy_ path :
policy_ file :
description :
description :
- The path to the properly json formatted policy file , see
- The path to the properly json formatted policy file , see
U ( https : / / github . com / ansible / ansible / issues / 7005 #issuecomment-42894813)
U ( https : / / github . com / ansible / ansible / issues / 7005 #issuecomment-42894813)
@ -47,6 +47,7 @@ options:
- Option when creating an endpoint . If not provided AWS will
- Option when creating an endpoint . If not provided AWS will
utilise a default policy which provides full access to the service .
utilise a default policy which provides full access to the service .
required : false
required : false
aliases : [ " policy_path " ]
state :
state :
description :
description :
- present to ensure resource is created .
- present to ensure resource is created .
@ -262,7 +263,7 @@ def create_vpc_endpoint(client, module):
elif module . params . get ( ' policy_file ' ) :
elif module . params . get ( ' policy_file ' ) :
try :
try :
with open ( module . params . get ( ' policy ' ) , ' r ' ) as json_data :
with open ( module . params . get ( ' policy _file ' ) , ' r ' ) as json_data :
policy = json . load ( json_data )
policy = json . load ( json_data )
except Exception as e :
except Exception as e :
module . fail_json ( msg = str ( e ) , exception = traceback . format_exc ( ) ,
module . fail_json ( msg = str ( e ) , exception = traceback . format_exc ( ) ,
@ -330,7 +331,7 @@ def main():
vpc_id = dict ( ) ,
vpc_id = dict ( ) ,
service = dict ( ) ,
service = dict ( ) ,
policy = dict ( type = ' json ' ) ,
policy = dict ( type = ' json ' ) ,
policy_file = dict ( type = ' path ' ),
policy_file = dict ( type = ' path ' , aliases = [ ' policy_path ' ] ),
state = dict ( default = ' present ' , choices = [ ' present ' , ' absent ' ] ) ,
state = dict ( default = ' present ' , choices = [ ' present ' , ' absent ' ] ) ,
wait = dict ( type = ' bool ' , default = False ) ,
wait = dict ( type = ' bool ' , default = False ) ,
wait_timeout = dict ( type = ' int ' , default = 320 , required = False ) ,
wait_timeout = dict ( type = ' int ' , default = 320 , required = False ) ,