cloudmason 1.0.8 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build.js +2 -1
- package/commands/helpers/stacks/asg.yaml +15 -0
- package/commands/launch_app.js +2 -2
- package/package.json +1 -1
- package/test.bat +1 -1
package/build.js
CHANGED
|
@@ -375,6 +375,21 @@ Resources:
|
|
|
375
375
|
- dynamodb:UpdateItem
|
|
376
376
|
Resource:
|
|
377
377
|
- !GetAtt DynamoDBTable.Arn
|
|
378
|
+
- Effect: Allow
|
|
379
|
+
Action:
|
|
380
|
+
- cognito-idp:AdminCreateUser
|
|
381
|
+
- cognito-idp:AdminDeleteUser
|
|
382
|
+
- cognito-idp:AdminResetUserPassword
|
|
383
|
+
- cognito-idp:ListUsersInGroup
|
|
384
|
+
- cognito-idp:ListUsers
|
|
385
|
+
- cognito-idp:ListGroups
|
|
386
|
+
- cognito-idp:AdminRemoveUserFromGroup
|
|
387
|
+
- cognito-idp:AdminGetUser
|
|
388
|
+
- cognito-idp:AdminListGroupsForUser
|
|
389
|
+
- cognito-idp:CreateGroup
|
|
390
|
+
- cognito-idp:AdminAddUserToGroup
|
|
391
|
+
- cognito-idp:DeleteGroup
|
|
392
|
+
Resource: !Sub 'arn:aws:cognito-idp:${AWS::Region}:${AWS::AccountId}:userpool/${CognitoUserPool}'
|
|
378
393
|
AppEc2Profile:
|
|
379
394
|
Type: AWS::IAM::InstanceProfile
|
|
380
395
|
Properties:
|
package/commands/launch_app.js
CHANGED
|
@@ -33,7 +33,7 @@ exports.main = async function(args){
|
|
|
33
33
|
// I.I WAIT FOR AMI TO BE AVAILABLE
|
|
34
34
|
console.log(`Waiting for AMI ${targetAMI} to be available`);
|
|
35
35
|
let isAvailable = false;
|
|
36
|
-
for (let i = 0; i <
|
|
36
|
+
for (let i = 0; i < 24; i++){
|
|
37
37
|
const status = await EC2.checkAMIStatus(targetAMI,targetRegion);
|
|
38
38
|
if (status === true){
|
|
39
39
|
console.log(`AMI ${targetAMI} available after ${i*30}s`);
|
|
@@ -43,7 +43,7 @@ exports.main = async function(args){
|
|
|
43
43
|
console.log(`\tAMI Status Check ${i} @${i*30}s : Not Available`);
|
|
44
44
|
await Common.sleep(30);
|
|
45
45
|
}
|
|
46
|
-
if (!isAvailable){ throw new Error(
|
|
46
|
+
if (!isAvailable){ throw new Error(`AMI not available after 14 minutes. Try again in a few minutes.`) }
|
|
47
47
|
|
|
48
48
|
// --- II DEPLOY CF STACK ---
|
|
49
49
|
// Get Stack URL
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"cloudmason","version":"1.0.
|
|
1
|
+
{"name":"cloudmason","version":"1.0.10","description":"","main":"main.js","scripts":{"build":"node build.js"},"bin":{"mason":"./main.js"},"repository":{"type":"git","url":"https://github.com/kai-harvey/secure-saas.git"},"author":"Kai Harvey","license":"ISC","dependencies":{"@aws-sdk/client-acm":"^3.418.0","@aws-sdk/client-auto-scaling":"^3.470.0","@aws-sdk/client-cloudformation":"^3.418.0","@aws-sdk/client-ec2":"^3.416.0","@aws-sdk/client-iam":"^3.418.0","@aws-sdk/client-route-53":"^3.425.0","@aws-sdk/client-s3":"^3.418.0","@aws-sdk/client-ssm":"^3.421.0","adm-zip":"^0.5.10"}}
|
package/test.bat
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@REM node main.js init-org -name orgTheorem -region us-west-2
|
|
2
|
-
|
|
2
|
+
node main.js list-apps
|
|
3
3
|
@REM node main.js new-app -name ot -type asg
|
|
4
4
|
@REM node main.js new-instance -app ot -domain local.elmnts.xyz -region us-west-2 -admin kkh@kkh.io -env local
|
|
5
5
|
@REM node main.js update-app -app ot -v 1.0 -path ./commands/starters/asg_node
|