docs: document v2 components#212
Conversation
Documentation for v2, generated with the help of AI. Component specific documentation is moved into their respective folders, main `README.md` only references it. The `examples` folder is for now removed and replaced partially by the in documentation examples.
|
I think the best test for the docs would be to have someone who hasn't worked much with icb, to try and deploy some of the components just using the docs. |
| - The primary subnet group always uses `vpc.isolatedSubnetIds`, and the database is always created with `publiclyAccessible: false`. | ||
| - The database security group allows TCP/5432 from the VPC CIDR block. | ||
| - The primary password is always managed through a nested `Password` component. If you omit `password`, that nested component generates a random password and stores it in Secrets Manager. | ||
| - `Database` creates replicas sequentially. Each replica depends on the previous primary/replica instance rather than creating all replicas in parallel. |
There was a problem hiding this comment.
Maybe add explanation why it need to create them sequentially?
| | `password` | `pulumi.Input<string>` | No | generated by `Password` | If omitted, a nested `Password` component generates and stores the secret. | | ||
| | `engineVersion` | `pulumi.Input<string>` | No | `'17.2'` | PostgreSQL engine version. | | ||
| | `multiAz` | `pulumi.Input<boolean>` | No | `false` | Multi-AZ toggle for the primary instance. | | ||
| | `instanceClass` | `pulumi.Input<string>` | No | `'db.t4g.micro'` | Primary instance class. | |
There was a problem hiding this comment.
Instance type of the RDS instance?
| | `allowMajorVersionUpgrade` | `pulumi.Input<boolean>` | No | `false` | Passed through to the primary instance. | | ||
| | `autoMinorVersionUpgrade` | `pulumi.Input<boolean>` | No | `true` | Passed through to the primary instance. | | ||
| | `applyImmediately` | `pulumi.Input<boolean>` | No | `false` | Passed through to the primary instance. | | ||
| | `skipFinalSnapshot` | `pulumi.Input<boolean>` | No | `false` | Passed through to the primary instance. | |
There was a problem hiding this comment.
Add more specific description
| | `applyImmediately` | `pulumi.Input<boolean>` | No | `false` | Passed through to the replica instance. | | ||
| | `allowMajorVersionUpgrade` | `pulumi.Input<boolean>` | No | `false` | Passed through to the replica instance. | | ||
| | `autoMinorVersionUpgrade` | `pulumi.Input<boolean>` | No | `true` | Passed through to the replica instance. | |
There was a problem hiding this comment.
Add more specific description
| | `parameterGroupName` | `pulumi.Input<string>` | No | none | Optional DB parameter group name for the primary instance. | | ||
| | `kmsKeyId` | `pulumi.Input<string>` | No | generated KMS key ARN | Override for storage encryption and encrypted snapshot copies. | | ||
| | `replicaConfigs` | `Map<string, Database.ReplicaConfig>` | No | none | Ordered map of replica names to configs. Replicas are created sequentially in insertion order. | | ||
| | `enableSSMConnect` | `pulumi.Input<boolean>` | No | `false` | Creates the nested `Ec2SSMConnect` helper when truthy. | |
There was a problem hiding this comment.
Maybe change the wording from helper to something else? It's used on multiple places in the file for Ec2SSMConnect
| **Outputs** | ||
|
|
||
| | Output | Type | Description | | ||
| | ---------------- | ----------------------------- | --------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | | ||
| | `name` | `string` | Component name passed to the constructor. | | ||
| | `distribution` | `aws.cloudfront.Distribution` | Primary CloudFront distribution resource configured from the behavior list. | | ||
| | `acmCertificate` | `AcmCertificate | undefined` | Auto-created ACM certificate when `domain` is provided without `certificate`. | |
There was a problem hiding this comment.
This table is not being displayed properly
| ) | ||
| .build(); | ||
|
|
||
| export const dashboards = [logsAndTracesDashboard, customDashboard]; |
There was a problem hiding this comment.
this is a bit misleading as someone would think that these are the actual resources while they are actually functions.
| ### Happy path | ||
|
|
There was a problem hiding this comment.
The happy path shows a builder with .addAmp() but the focus of this README is the connection classes. The example is essentially the same pattern you'd see in the main Grafana README. A better happy path for this file would show constructing an AMPConnection directly, or highlight that addAmp() is the shorthand for creating an AMPConnection under the hood.
| ) | ||
| .build(); | ||
|
|
||
| export const panelFactory = sloSummaryDashboard; |
| - `createBurnRatePanel()` ignores `metric.thresholds` and always returns a `stat` panel with `unit: 'none'`, `reduceOptions.calcs = ['last']`, `colorMode: 'value'`, `graphMode: 'none'`, `textMode: 'value'`, and fixed green/orange/red thresholds at `null`, `1`, and `2`. | ||
| - The availability, success-rate, and latency helpers each return fixed titles and fixed grid positions so they compose into the package's standard SLO dashboard layout. | ||
| - `createAvailabilityPanel()` accepts `target` for config-shape consistency, but the generated availability query itself does not use it. | ||
| - Some SLO panel titles are hard-coded with `250ms`; changing `targetLatency` changes the generated PromQL threshold but does not change those panel titles. |
There was a problem hiding this comment.
this sounds like a bug 😂
Some SLO panel titles are hard-coded with 250ms; changing targetLatency changes the generated PromQL threshold but does not change those panel titles.
| @@ -0,0 +1,326 @@ | |||
| # `src/components/grafana/connections` | |||
There was a problem hiding this comment.
Maybe we should add an example of how to create a custom connection class?
Documentation for v2, generated with the help of AI. Component specific documentation is moved into their respective folders, main
README.mdonly references it.The
examplesfolder is for now removed and replaced partially by the in documentation examples.