mirror of https://github.com/OpenVidu/openvidu.git
openvidu-deployment: Create s3 bucket name based on AWS::StackId to be unique instead of using AWS::StackName
parent
0a1a5e1e67
commit
26cc938756
|
@ -363,7 +363,8 @@ Resources:
|
||||||
- Fn::If:
|
- Fn::If:
|
||||||
# Get bucket name depending if the user defines a bucket name or not
|
# Get bucket name depending if the user defines a bucket name or not
|
||||||
- CreateS3Bucket
|
- CreateS3Bucket
|
||||||
- !Join [ "", [ 'arn:aws:s3:::', !Ref AWS::StackName, '-recordings', '/*'] ]
|
### Unique bucket name using Stack ID
|
||||||
|
- !Join [ "", [ 'arn:aws:s3:::', 'openvidu-recordings-', !Select [0, !Split ["-", !Select [2, !Split [/, !Ref AWS::StackId ]]]], "/*" ]]
|
||||||
- !Join [ "", [ 'arn:aws:s3:::', !Ref S3RecordingsBucketName, '/*'] ]
|
- !Join [ "", [ 'arn:aws:s3:::', !Ref S3RecordingsBucketName, '/*'] ]
|
||||||
- Ref: AWS::NoValue
|
- Ref: AWS::NoValue
|
||||||
- Fn::If:
|
- Fn::If:
|
||||||
|
@ -377,7 +378,8 @@ Resources:
|
||||||
- Fn::If:
|
- Fn::If:
|
||||||
# Get bucket name depending if the user defines a bucket name or not
|
# Get bucket name depending if the user defines a bucket name or not
|
||||||
- CreateS3Bucket
|
- CreateS3Bucket
|
||||||
- !Join [ "", [ 'arn:aws:s3:::', !Ref AWS::StackName, '-recordings' ] ]
|
### Unique bucket name using Stack ID
|
||||||
|
- !Join [ "", [ 'arn:aws:s3:::', 'openvidu-recordings-', !Select [0, !Split ["-", !Select [2, !Split [/, !Ref AWS::StackId ]]]]]]
|
||||||
- !Join [ "", [ 'arn:aws:s3:::', !Ref S3RecordingsBucketName ] ]
|
- !Join [ "", [ 'arn:aws:s3:::', !Ref S3RecordingsBucketName ] ]
|
||||||
- Ref: AWS::NoValue
|
- Ref: AWS::NoValue
|
||||||
- Fn::If:
|
- Fn::If:
|
||||||
|
@ -403,7 +405,8 @@ Resources:
|
||||||
S3bucket:
|
S3bucket:
|
||||||
Type: 'AWS::S3::Bucket'
|
Type: 'AWS::S3::Bucket'
|
||||||
Properties:
|
Properties:
|
||||||
BucketName: !Join ["" , [ !Ref AWS::StackName, '-recordings' ] ]
|
### Unique bucket name using Stack ID
|
||||||
|
BucketName: !Join ["-" , [ 'openvidu-recordings', !Select [0, !Split ["-", !Select [2, !Split [/, !Ref AWS::StackId ]]]]]]
|
||||||
AccessControl: Private
|
AccessControl: Private
|
||||||
PublicAccessBlockConfiguration:
|
PublicAccessBlockConfiguration:
|
||||||
BlockPublicAcls: true
|
BlockPublicAcls: true
|
||||||
|
@ -506,7 +509,8 @@ Resources:
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
- kmsAmi: !FindInMap [KMSAMIMAP, !Ref 'AWS::Region', AMI]
|
- kmsAmi: !FindInMap [KMSAMIMAP, !Ref 'AWS::Region', AMI]
|
||||||
s3BucketName: !Join ["", [ !Ref AWS::StackName, '-recordings' ] ]
|
### Unique bucket name using Stack ID
|
||||||
|
s3BucketName: !Join ["" , [ 'openvidu-recordings-', !Select [0, !Split ["-", !Select [2, !Split [/, !Ref AWS::StackId ]]]]]]
|
||||||
mode: "000755"
|
mode: "000755"
|
||||||
owner: "root"
|
owner: "root"
|
||||||
group: "root"
|
group: "root"
|
||||||
|
|
Loading…
Reference in New Issue