Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entire S3 Bucket (s3.data_bucket_name) deleted if input unchecked #322

Open
ovlords opened this issue Sep 23, 2019 · 1 comment
Open

Entire S3 Bucket (s3.data_bucket_name) deleted if input unchecked #322

ovlords opened this issue Sep 23, 2019 · 1 comment
Labels

Comments

@ovlords
Copy link
Contributor

ovlords commented Sep 23, 2019

When deleting a stack (make delete-full-set), if the stackPrefix input contains a whitespace character e.g. " myStack", the entire S3 Bucket contents may be deleted.

The S3 Bucket is defined in 's3.data_bucket_name' configuration parameter.

Here's the log of an instance of this case, note that the stack itself doesn't delete as it cannot be found.

@ovlords ovlords added the bug label Sep 23, 2019
@ovlords
Copy link
Contributor Author

ovlords commented Sep 23, 2019

build 20-Sep-2019 15:56:07 TASK [Check if a Stack Exists] ************************************************* build 20-Sep-2019 15:56:07 fatal: [127.0.0.1]: FAILED! => changed=true build 20-Sep-2019 15:56:07 cmd: build 20-Sep-2019 15:56:07 - aws build 20-Sep-2019 15:56:07 - cloudformation build 20-Sep-2019 15:56:07 - describe-stacks build 20-Sep-2019 15:56:07 - --stack-name build 20-Sep-2019 15:56:07 - -aem-prerequisites-stack build 20-Sep-2019 15:56:07 - --query build 20-Sep-2019 15:56:07 - Stacks[].StackName build 20-Sep-2019 15:56:07 - --region build 20-Sep-2019 15:56:07 - ap-southeast-2 build 20-Sep-2019 15:56:07 delta: '0:00:02.141810' build 20-Sep-2019 15:56:07 end: '2019-09-20 15:54:05.964015' build 20-Sep-2019 15:56:07 msg: non-zero return code build 20-Sep-2019 15:56:07 rc: 2 build 20-Sep-2019 15:56:07 start: '2019-09-20 15:54:03.822205' build 20-Sep-2019 15:56:07 stderr: |- build 20-Sep-2019 15:56:07 usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters] build 20-Sep-2019 15:56:07 To see help text, you can run: build 20-Sep-2019 15:56:07 build 20-Sep-2019 15:56:07 aws help build 20-Sep-2019 15:56:07 aws <command> help build 20-Sep-2019 15:56:07 aws <command> <subcommand> help build 20-Sep-2019 15:56:07 aws: error: argument --stack-name: expected one argument build 20-Sep-2019 15:56:07 stderr_lines: <omitted> build 20-Sep-2019 15:56:07 stdout: '' build 20-Sep-2019 15:56:07 stdout_lines: <omitted> build 20-Sep-2019 15:56:07 ...ignoring build 20-Sep-2019 15:56:07 build 20-Sep-2019 15:56:07 TASK [Report Stack Problem] **************************************************** build 20-Sep-2019 15:56:07 ok: [127.0.0.1] => build 20-Sep-2019 15:56:07 msg: Stack "-aem-prerequisites-stack" does not exist or some other errors occured build 20-Sep-2019 15:56:07 build 20-Sep-2019 15:56:07 TASK [Delete AEM App Prerequisite Resources Stacks] **************************** build 20-Sep-2019 15:56:07 skipping: [127.0.0.1] => changed=false build 20-Sep-2019 15:56:07 skip_reason: Conditional result was False build 20-Sep-2019 15:56:07 build 20-Sep-2019 15:56:07 TASK [Delete All Stack Data] *************************************************** build 20-Sep-2019 15:56:07 changed: [127.0.0.1] => changed=true build 20-Sep-2019 15:56:07 cmd: build 20-Sep-2019 15:56:07 - aws build 20-Sep-2019 15:56:07 - s3 build 20-Sep-2019 15:56:07 - rm build 20-Sep-2019 15:56:07 - s3://anz-app-state/ build 20-Sep-2019 15:56:07 - --recursive build 20-Sep-2019 15:56:07 - --region build 20-Sep-2019 15:56:07 - ap-southeast-2 build 20-Sep-2019 15:56:07 delta: '0:01:54.398442' build 20-Sep-2019 15:56:07 end: '2019-09-20 15:56:00.669446' build 20-Sep-2019 15:56:07 rc: 0 build 20-Sep-2019 15:56:07 start: '2019-09-20 15:54:06.271004' build 20-Sep-2019 15:56:07 stderr: '' build 20-Sep-2019 15:56:07 stderr_lines: <omitted> build 20-Sep-2019 15:56:07 stdout: |- build 20-Sep-2019 15:56:07 delete: s3://anz-app-state//aem-aws-stack-provisioner-3.6.5.tar.gz build 20-Sep-2019 15:56:07 delete: s3://anz-app-state//aem-orchestrator-2.0.1.jar build 20-Sep-2019 15:56:07 delete: s3://anz-app-state/ anzc4232/deploy-artifacts-descriptor.json build 20-Sep-2019 15:56:07 delete: s3://anz-app-state/617d816e-4a76-4a3d-92af-3b773b3ca1df/i-01b2ecfa78b4a74e1/awsrunShellScript/0.awsrunShellScript/stdout build 20-Sep-2019 15:56:07 delete: s3://anz-app-state/617d816e-4a76-4a3d-92af-3b773b3ca1df/i-0087b588a84a1a21d/awsrunShellScript/0.awsrunShellScript/stdout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant