From 608b94415923ceaea372a10f2ff1b579c6eff17f Mon Sep 17 00:00:00 2001 From: Philip Whiteside Date: Tue, 5 Nov 2024 18:49:16 +0000 Subject: [PATCH] Add info for working on the getOptions --- util/getOptions/README.md | 16 ++++++++++++++++ util/getOptions/flake.nix | 12 ++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 util/getOptions/README.md diff --git a/util/getOptions/README.md b/util/getOptions/README.md new file mode 100644 index 00000000..514da207 --- /dev/null +++ b/util/getOptions/README.md @@ -0,0 +1,16 @@ +# README + +The getOptions runs in the CodePipeline to pull the SSM Parameter Store config and generate a config.json. The config.json is then used aas an input into the CDK deployment. This util can be run directly. + +To pull the correct SSM Parameter Store values we must set the `INSTANCE_NAME` that is used in the prefix. By default this is `main`. + +``` +export INSTANCE_NAME="main" +npm run start +``` + +The CodePipeline synth step copies the result of this util into the CDK working directory (/infrastructure). + +```sh +cp ./config.json ../../infrastructure/config.json && cat ../../infrastructure/config.json +``` \ No newline at end of file diff --git a/util/getOptions/flake.nix b/util/getOptions/flake.nix index b3c9aed2..af9d3778 100644 --- a/util/getOptions/flake.nix +++ b/util/getOptions/flake.nix @@ -12,7 +12,19 @@ devShells.x86_64-linux.default = pkgs.mkShell { packages = with pkgs; [ nodejs_22 + # Optional + bat + jq ]; + shellHook = '' + echo "" + echo "package.json scripts" + echo "" + cat package.json | jq .scripts + echo "" + bat --style=plain --paging=never ./README.md + echo "" + ''; }; }; } \ No newline at end of file