Ability to show the cloudformation hook status and message in the sceptre output
sujit-kulkarni opened this issue · 2 comments
Cloudformation hook run during the cloudformation stack provisioning is not shown in sceptre output
We use the AWS cloudformation hooks for enforcing the compliance. But either in the Warn mode of Fail mode of the cloudformation hook - the sceptre output doesnot show the hook status, Hook status reason message.
Your environment
- version of sceptre (sceptre --version) -- Sceptre 1.5.0
- version of python (python --version) -- python 3.9.16
- which OS/distro -- Linux
**Edit
Tried on the below version :
Sceptre version -- 4.2.0
python version -- 3.7.19**
Steps to reproduce
Tell us how to reproduce this issue. Please provide sceptre projct files if possible,
you can use https://plnkr.co/edit/ANFHm61Ilt4mQVgF as a base.
Expected behaviour
The sceptre output should show the Aws cloudformation "HookName", "HookStatus" and "HookStatusReason"
Actual behaviour
The sceptre output doesnot show the details of AWS Cloudformation hook.
(venv) [cloudshell-user@ip-10-4-13-6 cfn]$ sceptre create dev/sbucket.yaml
/home/cloudshell-user/venv/lib/python3.7/site-packages/sceptre/stack.py:430: DeprecatedWarning: role_arn is deprecated as of 4.0.0 and will be removed in 5.0.0. It is being renamed to "cloudformation_service_role". You should migrate all uses of "role_arn" to that in order to avoid future breakage.
setattr(self, deprecated_attribute_name, deprecated_value)
Do you want to create 'dev/sbucket.yaml' [y/N]: y
[2023-05-29 05:00:34] - dev/sbucket - Creating Stack
[2023-05-29 05:00:36] - dev/sbucket frp-dev-sbucket AWS::CloudFormation::Stack CREATE_IN_PROGRESS User Initiated
[2023-05-29 05:00:40] - dev/sbucket Bucket AWS::S3::Bucket CREATE_IN_PROGRESS
[2023-05-29 05:00:40] - dev/sbucket Bucket AWS::S3::Bucket CREATE_IN_PROGRESS
[2023-05-29 05:00:40] - dev/sbucket Bucket AWS::S3::Bucket CREATE_IN_PROGRESS
[2023-05-29 05:00:44] - dev/sbucket Bucket AWS::S3::Bucket CREATE_IN_PROGRESS
[2023-05-29 05:00:44] - dev/sbucket Bucket AWS::S3::Bucket CREATE_IN_PROGRESS
[2023-05-29 05:00:44] - dev/sbucket Bucket AWS::S3::Bucket CREATE_IN_PROGRESS Hook invocations complete. Resource creation initiated
[2023-05-29 05:00:44] - dev/sbucket Bucket AWS::S3::Bucket CREATE_IN_PROGRESS Resource creation Initiated
[2023-05-29 05:01:09] - dev/sbucket Bucket AWS::S3::Bucket CREATE_COMPLETE
[2023-05-29 05:01:09] - dev/sbucket frp-dev-sbucket AWS::CloudFormation::Stack CREATE_COMPLETE
(venv) [cloudshell-user@ip-10-4-13-6 cfn]$ sceptre --version
Sceptre, version 4.2.0
(venv) [cloudshell-user@ip-10-4-13-6 cfn]$ python3 --version
Python 3.7.16
(venv) [cloudshell-user@ip-10-4-13-6 cfn]$
sceptre version 1.x is no longer supported. Please try on a newer version.
Hi Zaro,
I tried with the latest version, still sceptre doesnot show any output related to the hookstatus / hooksstatusreason (AWS Cloudformation Hooks)
(venv) [cloudshell-user@ip-10-4-13-6 cfn]$ sceptre create dev/sbucket.yaml
/home/cloudshell-user/venv/lib/python3.7/site-packages/sceptre/stack.py:430: DeprecatedWarning: role_arn is deprecated as of 4.0.0 and will be removed in 5.0.0. It is being renamed to "cloudformation_service_role". You should migrate all uses of "role_arn" to that in order to avoid future breakage.
setattr(self, deprecated_attribute_name, deprecated_value)
Do you want to create 'dev/sbucket.yaml' [y/N]: y
[2023-05-29 05:00:34] - dev/sbucket - Creating Stack
[2023-05-29 05:00:36] - dev/sbucket frp-dev-sbucket AWS::CloudFormation::Stack CREATE_IN_PROGRESS User Initiated
[2023-05-29 05:00:40] - dev/sbucket Bucket AWS::S3::Bucket CREATE_IN_PROGRESS
[2023-05-29 05:00:40] - dev/sbucket Bucket AWS::S3::Bucket CREATE_IN_PROGRESS
[2023-05-29 05:00:40] - dev/sbucket Bucket AWS::S3::Bucket CREATE_IN_PROGRESS
[2023-05-29 05:00:44] - dev/sbucket Bucket AWS::S3::Bucket CREATE_IN_PROGRESS
[2023-05-29 05:00:44] - dev/sbucket Bucket AWS::S3::Bucket CREATE_IN_PROGRESS
[2023-05-29 05:00:44] - dev/sbucket Bucket AWS::S3::Bucket CREATE_IN_PROGRESS Hook invocations complete. Resource creation initiated
[2023-05-29 05:00:44] - dev/sbucket Bucket AWS::S3::Bucket CREATE_IN_PROGRESS Resource creation Initiated
[2023-05-29 05:01:09] - dev/sbucket Bucket AWS::S3::Bucket CREATE_COMPLETE
[2023-05-29 05:01:09] - dev/sbucket frp-dev-sbucket AWS::CloudFormation::Stack CREATE_COMPLETE
(venv) [cloudshell-user@ip-10-4-13-6 cfn]$ sceptre --version
Sceptre, version 4.2.0
(venv) [cloudshell-user@ip-10-4-13-6 cfn]$ python3 --version
Python 3.7.16
(venv) [cloudshell-user@ip-10-4-13-6 cfn]$
Thanks,