We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ca44ea commit eb82720Copy full SHA for eb82720
template-only-bin/cleanup-test-resources
@@ -331,6 +331,15 @@ cleanup_project() {
331
aws ec2 delete-vpc --vpc-id "${vpc_id}" --region "${AWS_REGION}" || echo "Failed to delete VPC ${vpc_id}"
332
done
333
334
+ echo "Cleaning up SNS..."
335
+ local sns_topic_arns
336
+ sns_topic_arns=$(echo "${resources}" | grep 'arn:aws:sns:.*' || echo "")
337
+
338
+ for sns_topic_arn in ${sns_topic_arns}; do
339
+ echo "Deleting SNS Topic: ${sns_topic_arn}"
340
+ aws sns delete-topic --topic-arn "${sns_topic_arn}" --region "${AWS_REGION}" || echo "Failed to delete SNS Topic ${sns_topic_arn}"
341
+ done
342
343
echo "Cleaning up logs..."
344
local log_group_arns
345
log_group_arns=$(echo "${resources}" | grep 'arn:aws:logs:.*:log-group:' || echo "")
0 commit comments