Add quack-on-ec2, and add cloudformation list improvements#167
Conversation
… add listing for quack-on-ec2
b952a08 to
7f7c094
Compare
|
I think this can go in, still pending is figuring out testing against live credentials (locally and automated on CI) |
Tmonster
left a comment
There was a problem hiding this comment.
I would like to avoid polluting src/. Would be nice if some of this stuff was under src/cloudformation or something
| // Default-enabled commercial regions swept by the no-argument overload. Hardcoded for now; live enumeration | ||
| // (ec2:DescribeRegions / account:ListRegions) is the accuracy follow-up so newly-enabled opt-in regions are | ||
| // not silently missed. | ||
| static const char *const AWS_DEFAULT_REGIONS[] = { |
There was a problem hiding this comment.
this should go in an aws utils file.
There was a problem hiding this comment.
Also there are china regions that are missed here. Maybe they are not "default" ?
| Value outputs; | ||
| // Empty for a real stack; the AWS error message for a failed-region sentinel row (region set, all stack | ||
| // columns NULL). Discriminates the two row kinds: real stacks have region_error IS NULL. | ||
| string region_error; |
There was a problem hiding this comment.
could this just be a generic error I imagine there could be other errors with stacks that are not region related
| }; | ||
|
|
||
| // Fetch all stacks in one region (paginated), appending to `out`. Throws on AWS error. | ||
| static void DescribeRegionStacks(const string ®ion, vector<CloudFormationDescribeStacksRow> &out) { |
There was a problem hiding this comment.
nit: I don't think Region needs to be in the name. Code documentation makes it clear a region must be present
Addresses review feedback on duckdb#167: disentangle the error slot from the 'region' column and leave room for non-region error conditions later. The sentinel-row semantics are unchanged; only the column/field name differs.
Addresses review feedback on #167: the hardcoded region sweep set no longer lives inline in cloudformation_functions.cpp. A // FIXME records the plan to replace it with live ec2:DescribeRegions/account:ListRegions enumeration.
Two pieces:
aws:cloudformation:quack-on-ec2(based on machinery at Add external resource type registry + SQL level (and C++ level)create_external_resourceduckdb#23731)First piece allows to create resources of type
aws:cloudformation:quack-on-ec2, poll for completion, and thenSecond piece allows to list
cloudformation's stacks, it can be paired with previous features, and could be both of general utility, example:(and indeed, I have at the moment only
us-east-1stacks)Note that there are now 3 versions of listing:
cloudformation_describe_stacks()→ all 17 default regions, parallel, skip-on-error (sentinel rows).cloudformation_describe_stacks('us-east-1')→ one region, throws on error.cloudformation_describe_stacks(['us-east-1','eu-west-1'])→ those regions, parallel, skip-on-error.