Skip to content

Commit

Permalink
Guard against empty tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Hakan Memisoglu committed Aug 13, 2019
1 parent 4752482 commit 8172628
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/blockstorage/awsefs/awsefs.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,9 @@ func (e *efs) SetTags(ctx context.Context, resource interface{}, tags map[string
}

func (e *efs) setBackupTags(ctx context.Context, arn string, tags map[string]string) error {
if len(tags) == 0 {
return nil
}
req := &backup.TagResourceInput{
ResourceArn: &arn,
Tags: convertToBackupTags(tags),
Expand All @@ -399,6 +402,9 @@ func (e *efs) setBackupTags(ctx context.Context, arn string, tags map[string]str
}

func (e *efs) setEFSTags(ctx context.Context, id string, tags map[string]string) error {
if len(tags) == 0 {
return nil
}
req := &awsefs.CreateTagsInput{
FileSystemId: &id,
Tags: convertToEFSTags(tags),
Expand Down

0 comments on commit 8172628

Please sign in to comment.