MCPcopy Create free account
hub / github.com/airbnb/binaryalert / destroy

Method destroy

cli/manager.py:166–182  ·  view source on GitHub ↗

Teardown all of the BinaryAlert infrastructure

(self)

Source from the content-addressed store, hash-verified

164 self.apply()
165
166 def destroy(self) -> None:
167 """Teardown all of the BinaryAlert infrastructure"""
168 os.chdir(TERRAFORM_DIR)
169
170 if not self._config.force_destroy:
171 result = get_input('Delete all S3 objects as well?', 'no')
172
173 if result == 'yes':
174 print('Enabling force_destroy on the BinaryAlert S3 buckets...')
175 subprocess.check_call([
176 'terraform', 'apply', '-auto-approve=true', '-refresh=false',
177 '-var', 'force_destroy=true',
178 '-target', 'aws_s3_bucket.binaryalert_binaries',
179 '-target', 'aws_s3_bucket.binaryalert_log_bucket'
180 ])
181
182 subprocess.call(['terraform', 'destroy'])
183
184 def live_test(self) -> None:
185 """Upload test files to BinaryAlert which should trigger YARA matches

Callers 1

test_destroyMethod · 0.80

Calls 1

get_inputFunction · 0.90

Tested by 1

test_destroyMethod · 0.64