Documentation
¶
Overview ¶
Command deploycheck runs the toolkit's deployment steps against a real AWS account, one step per invocation, so that `./walle compare deploy` and `./walle compare validate` can interleave them with the CDK CLI's, and `./walle compare orphan` can check orphaning (G.1-D11, G.2-D6, G.6-D6, G.7-D8, K.3-D13, K.5-D11, M.10-D9, M.5-D10).
Run it from the repository root, with credentials for the account to deploy to:
go run ./internal/tools/deploycheck [-profile name] [-region name] [-no-rollback] [-force] [-orphan ids] [-concurrency n] [-outputs-file path] [-method name] [-change-set name] [-since ms] [-for duration] [-v] <command> <assembly dir> [stack] [change set]
The commands are:
- prepare: create the named change set for the stack, and leave it for someone else to execute;
- execute: execute the named change set, which someone else created, and wait for the deployment;
- direct: deploy the stack directly, without a change set, and print what came of it as JSON: {"result": "deployed"}, "no-op" or "needs-rollback-first";
- rollback: roll the stack back, with -force skipping the resources that fail a continued rollback, or -orphan the comma-separated logical IDs given, and print what came of it as JSON: {"result": "rolled-back"} or "not-rollbackable";
- skip: print whether a deployment of the stack would be skipped, as JSON: {"skip": true} or false;
- delete-change-set: delete the named change set, leaving the stack, as a REVIEW_IN_PROGRESS stack whose last change set goes is left;
- status: print the stack's status and the logical IDs of the resources of the template GetTemplate returns for it, as JSON;
- destroy: delete the stack, if it exists, and wait for it to go, with deploy.Destroy (G.8);
- destroy-app: destroy every stack of the assembly with Toolkit.Destroy, two at once, which takes no stack (G.8-D7);
- deploy-app: deploy every stack of the assembly with Toolkit.Deploy, which takes no stack: -concurrency stacks at once, with rollback disabled by -no-rollback, forced by -force, by the method -method names, change-set (the default), direct, execute-change-set or hotswap, a hotswap deployment that skips the changes it can't hotswap, executing the change set -change-set names, and writing -outputs-file; it prints what came of it as JSON, {"stacks": [{"name": ..., "noOp": ...}], "requests": [codes], "codes": [codes], "error": ...}, the requests and messages the host was sent, by code, and the error's Code, or its text, and exits with status 1 when the deployment failed;
- rollback-app: roll back every stack of the assembly with Toolkit.Rollback, which takes no stack, with -force and -orphan as for rollback, and prints {"stacks": [{"name": ..., "result": ...}], "error": ...}, exiting with status 1 when the rollback failed (K.3-D13);
- toolkit-stack: print the status of the bootstrap stack named in place of the assembly directory, and its bootstrap version, as JSON, {"status": ..., "version": ...}, reading it without changing it, which status, whose lookup deletes a stack whose creation failed, can't promise;
- drift-app: check every stack of the assembly for drift with Toolkit.Drift, which takes no stack, and print what came of it as JSON, {"stacks": [{"name": ..., "drifted": ..., "unchecked": ..., "records": ...}], "codes": [codes], "error": ...}, the number of drift records CloudFormation returned beside the counts, exiting with status 1 when the action failed (K.5-D11);
- drift-tamper: change an SSM parameter outside CloudFormation, overwriting the value of the parameter named in place of the assembly directory, and delete the parameter named in place of the stack, so that a drift check finds one modified and one deleted (K.5-D11);
- validate-app: validate every stack of the assembly online with Toolkit.Validate, which takes no stack, and print what came of it as JSON, {"conclusion": ..., "reports": [{"plugin": ..., "violations": [{"rule": ..., "description": ..., "logicalId": ...}]}], "codes": [codes], "error": ...}, exiting with status 1 when the action failed, but not when the report concludes in failure (M.10-D9);
- orphan-app: orphan the resources under the construct path given in place of the stack with Toolkit.Orphan, and print what came of it as JSON, {"stack": ..., "resources": [logical IDs], "mapping": {logical ID: {identifier: value}}, "codes": [codes], "error": ...}, exiting with status 1 when the action failed (M.5-D10);
- bucket: print whether the S3 bucket named in place of the assembly directory exists, from HeadBucket, as JSON, {"exists": true} or false (M.5-D10);
- delete-bucket: delete the empty S3 bucket named in place of the assembly directory;
- invoke: invoke the Lambda function whose logical ID is given in place of the stack, in the deployed stack named in place of the assembly directory, and print what it returned as JSON, {"payload": ...};
- logs: find the log groups of the deployed stack with the log monitor's AddStack, tail them from -since, in milliseconds since the epoch, for -for, and print what came of it as JSON, {"groups": [names], "lines": [I5033 texts], "codes": [codes]}, the log groups the monitor started with and the log lines it sent.
For the commands that take a stack, its template must be small enough to send inline, since they publish nothing; deploy-app publishes the assets, as Toolkit.Deploy does (K.7).