Presets for AWS Adapter Plugin #1430
thescientist13
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Overview
Given the nature of AWS, and how it generally favors working with IaC (Infrastructure) as code tools, the one question coming out of #1419 was what, if anything, could Greenwood do here, past generating predictable build output? Could we maybe some provide some simple pre-generated IaC code for any of the popular IaC tools like SST or Architect?
Presets
Usage
The general design would like something like this, where options could be passed to the plugin from your greenwood.config.js, with an optional "options" bag
With options bag, something like this
SST
SST has a fairly expressive and composable API, but less of a one size fits all approach, allowing SST configuration to be authored in JS / TS. However, in theory this means Greenwood could output its own preset files, and then a user could compose those into their own configs?
However, this would still likely need to deal with customization of all those resources (names, runtime, methods, etc) so not sure how far we can go. However, users can use the Greenwood build output to programmatically build up SST config, which seems the most ideal, as seen in the demo repo above
Architect
One challenge I see with Architect is that unlike SST which has configuration written in JS / TS, Architect configuration seems to only be defined through its own custom text file. Which means unlike SST, you can't "compose" some pre-generated output into your own at least. It seems it would have to be entirely plugin configuration driven.
Thoughts
In general, I am not sure a preset pattern is something we want though, since even for the slightest configuration, like with SST in naming your resources (Router, etc) or wanting to lock down the method for each function, linking other AWS resources like DB or other Lambda function, I think it would generally be a losing battle even trying to support even minimal customization, and how often would users be needing to "eject" anyway?
Not dealing with presets, and just documenting the build output and giving a couple demo examples and in the docs, seems like it should provide enough runway for anyone to adapt any IaC tool to Greenwood's output, and customize it from there.
While I am personally not sure how much mileage we can get out of this and having to deal with picking "winners and losers", I would be curious to see how user's use this plugin in practice, and what their actual "eject" scenarios look like (if any) and try and build a consensus based on that.
Beta Was this translation helpful? Give feedback.
All reactions