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

bugfix - action case #69

Merged
merged 2 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions templates/crowdstrike_init_stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ Resources:
- ParameterKey: SecretStorageMethod
ParameterValue: 'SecretsManager'
- ParameterKey: Action
ParameterValue: 'install'
ParameterValue: 'Install'
- ParameterKey: ScheduleExpression
ParameterValue: !Ref ScheduleExpression
- ParameterKey: MaxErrors
Expand Down Expand Up @@ -1200,14 +1200,14 @@ Resources:
print(('key = %s' %key))
s3.copy_object(CopySource=copy_source, Bucket=dest_bucket,
Key=key)
def bucket_exists():
def bucket_exists(bucket):
s3 = boto3.client('s3')
buckets = s3.list_buckets()
for bucket in buckets['Buckets']:
if bucket in buckets['Buckets']:
return True
def delete_objects(bucket, prefix, objects):
s3 = boto3.client('s3')
if bucket_exists():
if bucket_exists(bucket):
objects = {'Objects': [{'Key': prefix + o} for o in objects]}
s3.delete_objects(Bucket=bucket, Delete=objects)
def timeout(event, context):
Expand Down
2 changes: 1 addition & 1 deletion templates/ssm-association-stackset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Parameters:
Action:
Description: Specify whether or not to install or uninstall the package.
Type: String
AllowedValues: [ "install", "uninstall"]
AllowedValues: [ "Install", "Uninstall"]
SecretStorageMethod:
Description: The method used to store the FalconClientId, FalconClientSecret, and FalconCloud for the CrowdStrike APIs.
Type: String
Expand Down