Add support for SNS notification ARNs in CloudFormation
This commit is contained in:
parent
2c8b765cf0
commit
bb8e9563cf
1 changed files with 11 additions and 0 deletions
|
@ -54,6 +54,12 @@ options:
|
||||||
required: false
|
required: false
|
||||||
default: null
|
default: null
|
||||||
aliases: []
|
aliases: []
|
||||||
|
notification_arns:
|
||||||
|
description:
|
||||||
|
- The Simple Notification Service (SNS) topic ARNs to publish stack related events.
|
||||||
|
required: false
|
||||||
|
default: null
|
||||||
|
version_added: "2.0"
|
||||||
stack_policy:
|
stack_policy:
|
||||||
description:
|
description:
|
||||||
- the path of the cloudformation stack policy
|
- the path of the cloudformation stack policy
|
||||||
|
@ -228,6 +234,7 @@ def main():
|
||||||
template_parameters=dict(required=False, type='dict', default={}),
|
template_parameters=dict(required=False, type='dict', default={}),
|
||||||
state=dict(default='present', choices=['present', 'absent']),
|
state=dict(default='present', choices=['present', 'absent']),
|
||||||
template=dict(default=None, required=False),
|
template=dict(default=None, required=False),
|
||||||
|
notification_arns=dict(default=None, required=False),
|
||||||
stack_policy=dict(default=None, required=False),
|
stack_policy=dict(default=None, required=False),
|
||||||
disable_rollback=dict(default=False, type='bool'),
|
disable_rollback=dict(default=False, type='bool'),
|
||||||
template_url=dict(default=None, required=False),
|
template_url=dict(default=None, required=False),
|
||||||
|
@ -264,6 +271,8 @@ def main():
|
||||||
else:
|
else:
|
||||||
template_body = json.dumps(yaml.load(template_body), indent=2)
|
template_body = json.dumps(yaml.load(template_body), indent=2)
|
||||||
|
|
||||||
|
notification_arns = module.params['notification_arns']
|
||||||
|
|
||||||
if module.params['stack_policy'] is not None:
|
if module.params['stack_policy'] is not None:
|
||||||
stack_policy_body = open(module.params['stack_policy'], 'r').read()
|
stack_policy_body = open(module.params['stack_policy'], 'r').read()
|
||||||
else:
|
else:
|
||||||
|
@ -304,6 +313,7 @@ def main():
|
||||||
try:
|
try:
|
||||||
cfn.create_stack(stack_name, parameters=template_parameters_tup,
|
cfn.create_stack(stack_name, parameters=template_parameters_tup,
|
||||||
template_body=template_body,
|
template_body=template_body,
|
||||||
|
notification_arns=notification_arns,
|
||||||
stack_policy_body=stack_policy_body,
|
stack_policy_body=stack_policy_body,
|
||||||
template_url=template_url,
|
template_url=template_url,
|
||||||
disable_rollback=disable_rollback,
|
disable_rollback=disable_rollback,
|
||||||
|
@ -326,6 +336,7 @@ def main():
|
||||||
try:
|
try:
|
||||||
cfn.update_stack(stack_name, parameters=template_parameters_tup,
|
cfn.update_stack(stack_name, parameters=template_parameters_tup,
|
||||||
template_body=template_body,
|
template_body=template_body,
|
||||||
|
notification_arns=notification_arns,
|
||||||
stack_policy_body=stack_policy_body,
|
stack_policy_body=stack_policy_body,
|
||||||
disable_rollback=disable_rollback,
|
disable_rollback=disable_rollback,
|
||||||
template_url=template_url,
|
template_url=template_url,
|
||||||
|
|
Loading…
Add table
Reference in a new issue