chaostoolkit-incubator / chaostoolkit-aws

Chaos Toolkit Extension for AWS
https://chaostoolkit.org/drivers/aws/
Apache License 2.0
109 stars 52 forks source link

Allow deleting entire SSM document #100

Closed siwyd closed 3 years ago

siwyd commented 3 years ago

I just got started with Chaos Toolkit and the AWS driver. I immediately ran into issue with automatically creating and deleting documents with every run.

When not specifying version_name, I get the following error:

[2021-01-13 16:14:03 ERROR]   => failed: botocore.exceptions.ParamValidationError: Parameter validation failed:
    Invalid type for parameter VersionName, value: None, type: <class 'NoneType'>, valid types: <class 'str'>

When I do specify the version_name, I get the following error, because it's the only version that exists:

[2021-01-13 16:14:59 ERROR]   => failed: chaoslib.exceptions.ActivityFailed: Failed to delete  document 'chaos-latency': 'Default version of the document can't be deleted.'

So this PR allows for version_name to be empty, so the entire SSM document is deleted.