Skip to content

Commit

Permalink
replace @ with - when convert email to gcp lable
Browse files Browse the repository at this point in the history
  • Loading branch information
kentnsw committed Apr 4, 2022
1 parent f923c06 commit d927e78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/c7n_gcp/c7n_gcp/filters/iampolicy.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def process(self, resources, event=None):

def gcpLabelaise(self, value):
if isinstance(value, str):
return value.strip().lower().replace(" ", "_").replace(".", "_").replace("@", "_").replace(":", "_").replace("/", "_")
return value.strip().lower().replace(" ", "_").replace(".", "_").replace("@", "-").replace(":", "_").replace("/", "_")
elif isinstance(value, list):
return [self.gcpLabelaise(i) for i in value]
return value
Expand Down

0 comments on commit d927e78

Please sign in to comment.