Skip to content

Commit 48fd929

Browse files
author
Yuriy Bezsonov
committed
fix url
1 parent d8e949e commit 48fd929

File tree

6 files changed

+155
-148
lines changed

6 files changed

+155
-148
lines changed

infrastructure/cdk/src/main/java/com/unicorn/core/InfrastructureMonitoringJVM.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ private Function createThreadDumpLambda(Bucket s3Bucket, EksCluster eksCluster,
225225
.statements(List.of(
226226
PolicyStatement.Builder.create()
227227
.effect(Effect.ALLOW)
228-
.principals(List.of(new AnyPrincipal()))
228+
.principals(List.of(new AccountRootPrincipal()))
229229
.actions(List.of("execute-api:Invoke"))
230230
.resources(List.of("*"))
231231
.conditions(Map.of(

infrastructure/cfn/ide-gitea-stack.yaml

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ Resources:
447447
VSCodeIdeGiteaIdeLogGroupCD76FEFA:
448448
Type: AWS::Logs::LogGroup
449449
Properties:
450-
LogGroupName: ide-bootstrap-log-20250825-200750
450+
LogGroupName: ide-bootstrap-log-20250826-091350
451451
RetentionInDays: 7
452452
UpdateReplacePolicy: Retain
453453
DeletionPolicy: Retain
@@ -879,9 +879,9 @@ Resources:
879879
description: Bootstrap IDE
880880
parameters:
881881
BootstrapScript:
882-
type: String
883-
description: (Optional) Custom bootstrap script to run.
884882
default: ""
883+
description: (Optional) Custom bootstrap script to run.
884+
type: String
885885
mainSteps:
886886
- inputs:
887887
runCommand:
@@ -1142,56 +1142,16 @@ Resources:
11421142
/opt/aws/bin/cfn-signal -e $exit_code '${waitConditionHandleUrl}'
11431143
11441144
exit $exit_code
1145-
- instanceIamRoleArn:
1145+
- splashUrl: ""
1146+
instanceIamRoleArn:
11461147
Fn::GetAtt:
11471148
- VSCodeIdeGiteaIdeRole90308F47
11481149
- Arn
1149-
splashUrl: ""
1150-
instanceIamRoleName:
1151-
Ref: VSCodeIdeGiteaIdeRole90308F47
1152-
codeServerVersion: 4.103.1
1153-
customBootstrapScript: |
1154-
date
1155-
1156-
echo '=== Clone Git repository ==='
1157-
sudo -H -u ec2-user bash -c "git clone https://github.com/aws-samples/java-on-aws ~/java-on-aws/"
1158-
# sudo -H -u ec2-user bash -c "cd ~/java-on-aws && git checkout refactoring"
1159-
1160-
echo '=== Setup IDE ==='
1161-
sudo -H -i -u ec2-user bash -c "~/java-on-aws/infrastructure/scripts/setup/ide.sh"
1162-
sudo -H -i -u ec2-user bash -c "~/java-on-aws/infrastructure/scripts/setup/idp.sh"
1163-
passwordName:
1164-
Fn::Join:
1165-
- "-"
1166-
- - Fn::Select:
1167-
- 0
1168-
- Fn::Split:
1169-
- "-"
1170-
- Fn::Select:
1171-
- 6
1172-
- Fn::Split:
1173-
- ":"
1174-
- Ref: VSCodeIdeGiteaIdePasswordSecretD25F73F4
1175-
- Fn::Select:
1176-
- 1
1177-
- Fn::Split:
1178-
- "-"
1179-
- Fn::Select:
1180-
- 6
1181-
- Fn::Split:
1182-
- ":"
1183-
- Ref: VSCodeIdeGiteaIdePasswordSecretD25F73F4
1184-
- Fn::Select:
1185-
- 2
1186-
- Fn::Split:
1187-
- "-"
1188-
- Fn::Select:
1189-
- 6
1190-
- Fn::Split:
1191-
- ":"
1192-
- Ref: VSCodeIdeGiteaIdePasswordSecretD25F73F4
1193-
environmentContentsZip: ""
1194-
terminalOnStartup: "true"
1150+
readmeUrl: ""
1151+
waitConditionHandleUrl:
1152+
Ref: VSCodeIdeGiteaIdeBootstrapWaitConditionHandle78036ED5
1153+
extensions: ms-kubernetes-tools.vscode-kubernetes-tools,ms-azuretools.vscode-docker
1154+
domain: ""
11951155
installGitea: |
11961156
dnf install -y nerdctl cni-plugins
11971157
mkdir -p /gitea/config /gitea/data
@@ -1384,11 +1344,51 @@ Resources:
13841344
EOF
13851345
13861346
source /etc/profile.d/gitea.sh
1387-
domain: ""
1388-
extensions: ms-kubernetes-tools.vscode-kubernetes-tools,ms-azuretools.vscode-docker
1389-
waitConditionHandleUrl:
1390-
Ref: VSCodeIdeGiteaIdeBootstrapWaitConditionHandle78036ED5
1391-
readmeUrl: ""
1347+
terminalOnStartup: "true"
1348+
environmentContentsZip: ""
1349+
passwordName:
1350+
Fn::Join:
1351+
- "-"
1352+
- - Fn::Select:
1353+
- 0
1354+
- Fn::Split:
1355+
- "-"
1356+
- Fn::Select:
1357+
- 6
1358+
- Fn::Split:
1359+
- ":"
1360+
- Ref: VSCodeIdeGiteaIdePasswordSecretD25F73F4
1361+
- Fn::Select:
1362+
- 1
1363+
- Fn::Split:
1364+
- "-"
1365+
- Fn::Select:
1366+
- 6
1367+
- Fn::Split:
1368+
- ":"
1369+
- Ref: VSCodeIdeGiteaIdePasswordSecretD25F73F4
1370+
- Fn::Select:
1371+
- 2
1372+
- Fn::Split:
1373+
- "-"
1374+
- Fn::Select:
1375+
- 6
1376+
- Fn::Split:
1377+
- ":"
1378+
- Ref: VSCodeIdeGiteaIdePasswordSecretD25F73F4
1379+
customBootstrapScript: |
1380+
date
1381+
1382+
echo '=== Clone Git repository ==='
1383+
sudo -H -u ec2-user bash -c "git clone https://github.com/aws-samples/java-on-aws ~/java-on-aws/"
1384+
# sudo -H -u ec2-user bash -c "cd ~/java-on-aws && git checkout refactoring"
1385+
1386+
echo '=== Setup IDE ==='
1387+
sudo -H -i -u ec2-user bash -c "~/java-on-aws/infrastructure/scripts/setup/ide.sh"
1388+
sudo -H -i -u ec2-user bash -c "~/java-on-aws/infrastructure/scripts/setup/idp.sh"
1389+
codeServerVersion: 4.103.1
1390+
instanceIamRoleName:
1391+
Ref: VSCodeIdeGiteaIdeRole90308F47
13921392
name: IdeBootstrapFunction
13931393
action: aws:runShellScript
13941394
DocumentFormat: YAML
@@ -1528,10 +1528,10 @@ Resources:
15281528
- Arn
15291529
InstanceId:
15301530
Ref: VSCodeIdeGiteaIdeEC2Instance51274E6D
1531-
SsmDocument:
1532-
Ref: VSCodeIdeGiteaIdeBootstrapDocument7FC8732A
15331531
LogGroupName:
15341532
Ref: VSCodeIdeGiteaIdeLogGroupCD76FEFA
1533+
SsmDocument:
1534+
Ref: VSCodeIdeGiteaIdeBootstrapDocument7FC8732A
15351535
UpdateReplacePolicy: Delete
15361536
DeletionPolicy: Delete
15371537
Outputs:

infrastructure/cfn/ide-stack.yaml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ Resources:
447447
VSCodeIdeIdeLogGroup364F2B78:
448448
Type: AWS::Logs::LogGroup
449449
Properties:
450-
LogGroupName: ide-bootstrap-log-20250825-200730
450+
LogGroupName: ide-bootstrap-log-20250826-091333
451451
RetentionInDays: 7
452452
UpdateReplacePolicy: Retain
453453
DeletionPolicy: Retain
@@ -862,9 +862,9 @@ Resources:
862862
description: Bootstrap IDE
863863
parameters:
864864
BootstrapScript:
865+
type: String
865866
description: (Optional) Custom bootstrap script to run.
866867
default: ""
867-
type: String
868868
mainSteps:
869869
- inputs:
870870
runCommand:
@@ -1125,7 +1125,25 @@ Resources:
11251125
/opt/aws/bin/cfn-signal -e $exit_code '${waitConditionHandleUrl}'
11261126
11271127
exit $exit_code
1128-
- passwordName:
1128+
- instanceIamRoleArn:
1129+
Fn::GetAtt:
1130+
- VSCodeIdeIdeRole21951A1F
1131+
- Arn
1132+
splashUrl: ""
1133+
instanceIamRoleName:
1134+
Ref: VSCodeIdeIdeRole21951A1F
1135+
codeServerVersion: 4.103.1
1136+
customBootstrapScript: |
1137+
date
1138+
1139+
echo '=== Clone Git repository ==='
1140+
sudo -H -u ec2-user bash -c "git clone https://github.com/aws-samples/java-on-aws ~/java-on-aws/"
1141+
# sudo -H -u ec2-user bash -c "cd ~/java-on-aws && git checkout refactoring"
1142+
1143+
echo '=== Setup IDE ==='
1144+
sudo -H -i -u ec2-user bash -c "~/java-on-aws/infrastructure/scripts/setup/ide.sh"
1145+
sudo -H -i -u ec2-user bash -c "~/java-on-aws/infrastructure/scripts/setup/idp.sh"
1146+
passwordName:
11291147
Fn::Join:
11301148
- "-"
11311149
- - Fn::Select:
@@ -1163,24 +1181,6 @@ Resources:
11631181
waitConditionHandleUrl:
11641182
Ref: VSCodeIdeIdeBootstrapWaitConditionHandle0A599C82
11651183
readmeUrl: ""
1166-
instanceIamRoleArn:
1167-
Fn::GetAtt:
1168-
- VSCodeIdeIdeRole21951A1F
1169-
- Arn
1170-
splashUrl: ""
1171-
instanceIamRoleName:
1172-
Ref: VSCodeIdeIdeRole21951A1F
1173-
codeServerVersion: 4.103.1
1174-
customBootstrapScript: |
1175-
date
1176-
1177-
echo '=== Clone Git repository ==='
1178-
sudo -H -u ec2-user bash -c "git clone https://github.com/aws-samples/java-on-aws ~/java-on-aws/"
1179-
# sudo -H -u ec2-user bash -c "cd ~/java-on-aws && git checkout refactoring"
1180-
1181-
echo '=== Setup IDE ==='
1182-
sudo -H -i -u ec2-user bash -c "~/java-on-aws/infrastructure/scripts/setup/ide.sh"
1183-
sudo -H -i -u ec2-user bash -c "~/java-on-aws/infrastructure/scripts/setup/idp.sh"
11841184
name: IdeBootstrapFunction
11851185
action: aws:runShellScript
11861186
DocumentFormat: YAML
@@ -1318,12 +1318,12 @@ Resources:
13181318
Fn::GetAtt:
13191319
- VSCodeIdeIdeBootstrapFunctionADFBCE22
13201320
- Arn
1321-
InstanceId:
1322-
Ref: VSCodeIdeIdeEC2Instance846AE373
13231321
SsmDocument:
13241322
Ref: VSCodeIdeIdeBootstrapDocument8DDB05AD
13251323
LogGroupName:
13261324
Ref: VSCodeIdeIdeLogGroup364F2B78
1325+
InstanceId:
1326+
Ref: VSCodeIdeIdeEC2Instance846AE373
13271327
UpdateReplacePolicy: Delete
13281328
DeletionPolicy: Delete
13291329
Outputs:

0 commit comments

Comments
 (0)