@@ -1306,7 +1306,7 @@ export const bucketWithWebsiteRos = {
1306
1306
} ,
1307
1307
ROSTemplateFormatVersion : '2015-09-01' ,
1308
1308
Resources : {
1309
- FCFunctionFormy_bucket_bucket_code_deployment : {
1309
+ FCFunctionForsi_auto_my_bucket_bucket_code_deployment : {
1310
1310
Properties : {
1311
1311
CAPort : 9000 ,
1312
1312
Code : {
@@ -1340,103 +1340,18 @@ export const bucketWithWebsiteRos = {
1340
1340
MemorySize : 128 ,
1341
1341
Runtime : 'python3.10' ,
1342
1342
ServiceName : {
1343
- 'Fn::GetAtt' : [ 'FCServiceFormy_bucket_bucket_code_deployment ' , 'ServiceName' ] ,
1343
+ 'Fn::GetAtt' : [ 'FCServiceForsi_auto_my_bucket_bucket_code_deployment ' , 'ServiceName' ] ,
1344
1344
} ,
1345
1345
Timeout : 3000 ,
1346
1346
} ,
1347
1347
Type : 'ALIYUN::FC::Function' ,
1348
1348
} ,
1349
- FCRoleFormy_bucket_bucket_code_deployment : {
1350
- Properties : {
1351
- AssumeRolePolicyDocument : {
1352
- Statement : [
1353
- {
1354
- Action : 'sts:AssumeRole' ,
1355
- Effect : 'Allow' ,
1356
- Principal : {
1357
- Service : [ 'fc.aliyuncs.com' ] ,
1358
- } ,
1359
- } ,
1360
- ] ,
1361
- Version : '1' ,
1362
- } ,
1363
- DeletionForce : false ,
1364
- IgnoreExisting : false ,
1365
- Policies : [
1366
- {
1367
- PolicyDocument : {
1368
- Statement : [
1369
- {
1370
- Action : [ 'oss:*' ] ,
1371
- Effect : 'Allow' ,
1372
- Resource : [ '*' ] ,
1373
- } ,
1374
- ] ,
1375
- Version : '1' ,
1376
- } ,
1377
- PolicyName : 'AliyunOSSFullAccess' ,
1378
- } ,
1379
- {
1380
- PolicyDocument : {
1381
- Statement : [
1382
- {
1383
- Action : [ 'log:*' ] ,
1384
- Effect : 'Allow' ,
1385
- Resource : [ '*' ] ,
1386
- } ,
1387
- {
1388
- Action : [ 'ram:CreateServiceLinkedRole' ] ,
1389
- Condition : {
1390
- StringEquals : {
1391
- 'ram:ServiceName' : [
1392
- 'audit.log.aliyuncs.com' ,
1393
- 'alert.log.aliyuncs.com' ,
1394
- 'middlewarelens.log.aliyuncs.com' ,
1395
- 'storagelens.log.aliyuncs.com' ,
1396
- 'ai-lens.log.aliyuncs.com' ,
1397
- 'securitylens.log.aliyuncs.com' ,
1398
- ] ,
1399
- } ,
1400
- } ,
1401
- Effect : 'Allow' ,
1402
- Resource : [ '*' ] ,
1403
- } ,
1404
- ] ,
1405
- Version : '1' ,
1406
- } ,
1407
- PolicyName : 'AliyunLogFullAccess' ,
1408
- } ,
1409
- ] ,
1410
- RoleName : {
1411
- 'Fn::Join' : [
1412
- '-' ,
1413
- [
1414
- 'ros-cdk' ,
1415
- {
1416
- 'Fn::Select' : [
1417
- 0 ,
1418
- {
1419
- 'Fn::Split' : [
1420
- '-' ,
1421
- {
1422
- Ref : 'ALIYUN::StackId' ,
1423
- } ,
1424
- ] ,
1425
- } ,
1426
- ] ,
1427
- } ,
1428
- ] ,
1429
- ] ,
1430
- } ,
1431
- } ,
1432
- Type : 'ALIYUN::RAM::Role' ,
1433
- } ,
1434
- FCServiceFormy_bucket_bucket_code_deployment : {
1349
+ FCServiceForsi_auto_my_bucket_bucket_code_deployment : {
1435
1350
Properties : {
1436
1351
DeletionForce : false ,
1437
1352
Description : 'FC service for oss deployment by CDK' ,
1438
1353
Role : {
1439
- 'Fn::GetAtt' : [ 'FCRoleFormy_bucket_bucket_code_deployment ' , 'Arn' ] ,
1354
+ 'Fn::GetAtt' : [ 'si_auto_od_bucket_role ' , 'Arn' ] ,
1440
1355
} ,
1441
1356
ServiceName : {
1442
1357
'Fn::Join' : [
@@ -1483,7 +1398,7 @@ export const bucketWithWebsiteRos = {
1483
1398
} ,
1484
1399
Type : 'ALIYUN::OSS::Bucket' ,
1485
1400
} ,
1486
- my_bucket_bucket_code_deployment : {
1401
+ si_auto_my_bucket_bucket_code_deployment : {
1487
1402
Properties : {
1488
1403
Parameters : {
1489
1404
destinationBucket : {
@@ -1501,11 +1416,38 @@ export const bucketWithWebsiteRos = {
1501
1416
] ,
1502
1417
} ,
1503
1418
ServiceToken : {
1504
- 'Fn::GetAtt' : [ 'FCFunctionFormy_bucket_bucket_code_deployment ' , 'ARN' ] ,
1419
+ 'Fn::GetAtt' : [ 'FCFunctionForsi_auto_my_bucket_bucket_code_deployment ' , 'ARN' ] ,
1505
1420
} ,
1506
1421
Timeout : 3000 ,
1507
1422
} ,
1508
1423
Type : 'ALIYUN::ROS::CustomResource' ,
1509
1424
} ,
1425
+ si_auto_od_bucket_role : {
1426
+ Properties : {
1427
+ AssumeRolePolicyDocument : {
1428
+ Statement : [
1429
+ {
1430
+ Action : 'sts:AssumeRole' ,
1431
+ Effect : 'Allow' ,
1432
+ Principal : {
1433
+ Service : [ 'fc.aliyuncs.com' ] ,
1434
+ } ,
1435
+ } ,
1436
+ ] ,
1437
+ Version : '1' ,
1438
+ } ,
1439
+ DeletionForce : false ,
1440
+ Description :
1441
+ 'roles created by ServerlessInsight for oss deployment to put files to oss bucket during deployment' ,
1442
+ IgnoreExisting : false ,
1443
+ PolicyAttachments : {
1444
+ System : [ 'AliyunOSSFullAccess' , 'AliyunLogFullAccess' ] ,
1445
+ } ,
1446
+ RoleName : {
1447
+ 'Fn::Sub' : 'si-auto-od-bucket-role-${ALIYUN::StackId}' ,
1448
+ } ,
1449
+ } ,
1450
+ Type : 'ALIYUN::RAM::Role' ,
1451
+ } ,
1510
1452
} ,
1511
1453
} ;
0 commit comments