Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(datasource/aws-rds): improve readme #29870

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 39 additions & 8 deletions lib/modules/datasource/aws-rds/readme.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
This datasource returns the database engine versions available for use on [AWS RDS](https://aws.amazon.com/rds/) via the AWS API.

Generally speaking, all publicly released database versions are available for use on RDS.
However, new versions may not be available on RDS for a few weeks or months after their release while AWS tests them.
In addition, AWS may pull existing versions if serious problems arise during their use.

**AWS API configuration**
<!-- prettier-ignore -->
!!! warning

The default versioning of the `aws-rds` datasource is _not_ compatible with [AWS Aurora](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html)!
If you use AWS Aurora, you must set your own custom versioning.
Scroll down to see an example.

### AWS API configuration

Since the datasource uses the AWS SDK for JavaScript, you can configure it like other AWS Tools.
You can use common AWS configuration options, for example:
Expand All @@ -14,9 +22,7 @@

Read the [AWS Developer Guide - Configuring the SDK for JavaScript](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/configuring-the-jssdk.html) for more information on these configuration options.

The minimal IAM privileges required for this datasource are:

```json
```json title="Minimal IAM privileges needed for this datasource"

Check failure on line 25 in lib/modules/datasource/aws-rds/readme.md

View workflow job for this annotation

GitHub Actions / lint-docs

Code block style

lib/modules/datasource/aws-rds/readme.md:25 MD046/code-block-style Code block style [Expected: indented; Actual: fenced] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md046.md
{
"Sid": "AllowDBEngineVersionLookup",
"Effect": "Allow",
Expand All @@ -27,14 +33,14 @@

Read the [AWS RDS IAM reference](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonrds.html) for more information.

**Usage**
### Usage

Because Renovate has no manager for the AWS RDS datasource, you need to help Renovate by configuring the custom manager to identify the RDS dependencies you want updated.

When configuring the custom manager, you have to pass a [filter](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rds/interfaces/describedbengineversionscommandinput.html#filters) as minified JSON as the `packageName`.
For example:

```yaml

Check failure on line 43 in lib/modules/datasource/aws-rds/readme.md

View workflow job for this annotation

GitHub Actions / lint-docs

Code block style

lib/modules/datasource/aws-rds/readme.md:43 MD046/code-block-style Code block style [Expected: indented; Actual: fenced] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md046.md
# Getting the latest supported MySQL 5.7 version from RDS as a filter would look like:

[
Expand All @@ -53,9 +59,7 @@
[{"Name":"engine","Values":["mysql"]},{"Name":"engine-version","Values":["5.7"]}]
```

Here's an example of using the custom manager to configure this datasource:

```json
```json title="Using a custom manager to configure this datasource"

Check failure on line 62 in lib/modules/datasource/aws-rds/readme.md

View workflow job for this annotation

GitHub Actions / lint-docs

Code block style

lib/modules/datasource/aws-rds/readme.md:62 MD046/code-block-style Code block style [Expected: indented; Actual: fenced] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md046.md
{
"customManagers": [
{
Expand All @@ -72,8 +76,35 @@

The configuration above matches every YAML file, and recognizes these lines:

```yaml

Check failure on line 79 in lib/modules/datasource/aws-rds/readme.md

View workflow job for this annotation

GitHub Actions / lint-docs

Code block style

lib/modules/datasource/aws-rds/readme.md:79 MD046/code-block-style Code block style [Expected: indented; Actual: fenced] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md046.md
spec:
# amiFilter=[{"Name":"engine","Values":["mysql"]},{"Name":"engine-version","Values":["5.7"]}]
engineVersion: 5.7.34
```

#### Using Terraform, `aws-rds` datasource and Aurora MySQL

Here is the Renovate configuration to use Terraform, `aws-rds` and Aurora MySQL:

```json

Check failure on line 89 in lib/modules/datasource/aws-rds/readme.md

View workflow job for this annotation

GitHub Actions / lint-docs

Code block style

lib/modules/datasource/aws-rds/readme.md:89 MD046/code-block-style Code block style [Expected: indented; Actual: fenced] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md046.md
{
"customManagers": [
{
"description": "Update RDS",
"customType": "regex",
"fileMatch": [".+\\.tf$"],
"matchStrings": [
"\\s*#\\s*renovate:\\s*amiFilter=(?<lookupName>.+?) depName=(?<depName>.*) versioning=(?<versioning>.*)\\s*.*_version\\s*=\\s*\"(?<currentValue>.*)\""
HonkingGoose marked this conversation as resolved.
Show resolved Hide resolved
],
"datasourceTemplate": "aws-rds"
}
]
}
```
rarkins marked this conversation as resolved.
Show resolved Hide resolved

The above configuration will ...insert explanation of bits below...
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need a maintainer suggestion for this line too. 😉


```

Check failure on line 107 in lib/modules/datasource/aws-rds/readme.md

View workflow job for this annotation

GitHub Actions / lint-docs

Code block style

lib/modules/datasource/aws-rds/readme.md:107 MD046/code-block-style Code block style [Expected: indented; Actual: fenced] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md046.md
# renovate:amiFilter=[{"Name":"engine","Values":["aurora-mysql"]},{"Name":"engine-version","Values":["8.0"]}] depName=aurora-mysql versioning=loose
engine_version = "8.0.mysql_aurora.3.05.2"
```
Loading