by antics · 7y ago · 0 comments
Pulumi also does have a number of higher-level constructs, which you can learn about here: https://www.pulumi.com/docs/guides/crosswalk/aws/
And, to the specific point: you absolutely should not have to look up the docs. These values definitely will autocomplete.
Anyway, aside from all that, unions of strings is "the idiomatic way" to do this sort of thing in TypeScript and JavaScript.
[1]: https://www.typescriptlang.org/docs/handbook/advanced-types....
This is what one of the property types actually look like:
/**
* The MySQL or PostgreSQL version to
* use. Can be `MYSQL_5_6`, `MYSQL_5_7`, `POSTGRES_9_6` or `POSTGRES_11` (beta) for second-generation
* instances, or `MYSQL_5_5` or `MYSQL_5_6` for first-generation instances.
* See [Second Generation Capabilities](https://cloud.google.com/sql/docs/1st-2nd-gen-differences)
* for more information.
*/
readonly databaseVersion?: pulumi.Input<string>;
In AWS CDK it was an easy task to select Postgres - in Pulumi case I had to read the comment.