Skip to content

Commit

Permalink
unique username
Browse files Browse the repository at this point in the history
  • Loading branch information
moukoublen committed Apr 8, 2024
1 parent b4e63c8 commit a8a292c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Resources:
Properties:
UserName: !Join
- '-'
- - "elasticagent-user-cspm"
- - 'elasticagent-user-cspm'
- !Select
- 2
- !Split
Expand Down
10 changes: 8 additions & 2 deletions deploy/cloudformation/elastic-agent-direct-access-key-cspm.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
AWSTemplateFormatVersion: "2010-09-09"

Description: Creates elastic-agent cspm user, role, and access key, and outputs the access key

Parameters: {}
Expand All @@ -8,7 +7,14 @@ Resources:
ElasticCSPMUser:
Type: "AWS::IAM::User"
Properties:
UserName: "elasticagent-cspm"
UserName: !Join
- '-'
- - 'elasticagent-user-cspm'
- !Select
- 2
- !Split
- /
- !Ref AWS::StackId
ManagedPolicyArns:
- 'arn:aws:iam::aws:policy/SecurityAudit'

Expand Down

0 comments on commit a8a292c

Please sign in to comment.