Skip to content

Commit

Permalink
Add info for working on the getOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
philipws committed Nov 5, 2024
1 parent cfaa8fb commit 608b944
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
16 changes: 16 additions & 0 deletions util/getOptions/README.md
Original file line number Diff line number Diff line change
@@ -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
```
12 changes: 12 additions & 0 deletions util/getOptions/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""
'';
};
};
}

0 comments on commit 608b944

Please sign in to comment.