PMM-13045 Add RDS assume role field#901
Open
HanCheo wants to merge 1 commit into
Open
Conversation
Author
|
Done! |
1 task
This was referenced May 15, 2026
Author
|
Could you review this? |
|
@HanCheo Thanks for your contribution. Can you please use main as the base branch? Thank you |
There was a problem hiding this comment.
Pull request overview
Adds support for providing an optional AWS IAM Role ARN during Amazon RDS discovery and ensures it is carried through the “select instance → add service” flow in the Percona “Add instance” UI.
Changes:
- Adds
aws_role_arnto credential/payload types and propagates it through the RDS discovery + selection flow. - Updates the RDS credentials UI to include an “AWS IAM role ARN” field (positioned below access/secret key).
- Extends unit tests to cover the new field rendering/order and propagation.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| public/app/percona/add-instance/panel.types.ts | Extends remote credentials model with aws_role_arn. |
| public/app/percona/add-instance/components/Discovery/Discovery.service.ts | Sends aws_role_arn in /services:discoverRDS request body. |
| public/app/percona/add-instance/components/Discovery/Discovery.constants.ts | Adds aws_role_arn to initial discovery credentials. |
| public/app/percona/add-instance/components/Discovery/components/Credentials/Credentials.types.ts | Adds aws_role_arn to the discovery form type. |
| public/app/percona/add-instance/components/Discovery/components/Credentials/Credentials.tsx | Renders the new Role ARN field and adjusts submit handling. |
| public/app/percona/add-instance/components/Discovery/components/Credentials/Credentials.test.tsx | Updates tests to validate field order and propagation. |
| public/app/percona/add-instance/components/Discovery/components/Credentials/Credentials.styles.ts | Adjusts layout to place Role ARN on a second row. |
| public/app/percona/add-instance/components/Discovery/components/Credentials/Credentials.messages.ts | Adds label/placeholder/tooltip copy for Role ARN. |
| public/app/percona/add-instance/components/AddRemoteInstance/AddRemoteInstance.types.ts | Adds aws_role_arn to the RDS add-service payload type. |
| public/app/percona/add-instance/components/AddRemoteInstance/AddRemoteInstance.tools.tsx | Preserves aws_role_arn when extracting RDS credentials. |
| public/app/percona/add-instance/components/AddRemoteInstance/AddRemoteInstance.tools.test.ts | Updates test data/expectations to include aws_role_arn. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+15
to
26
| { aws_access_key, aws_secret_key, aws_role_arn }: RDSCredentialsForm, | ||
| token?: CancelToken, | ||
| disableNotifications = false | ||
| ) { | ||
| return apiManagement | ||
| .post<RDSInstances, RDSCredentialsForm>( | ||
| '/services:discoverRDS', | ||
| { | ||
| aws_access_key, | ||
| aws_secret_key, | ||
| aws_role_arn, | ||
| }, |
| export interface RDSCredentialsForm { | ||
| aws_access_key: string; | ||
| aws_secret_key: string; | ||
| aws_role_arn: string; |
Comment on lines
16
to
20
| const onSubmit = useCallback( | ||
| (values: RDSCredentialsForm) => { | ||
| discover(values); | ||
| discover({ aws_access_key: '', aws_secret_key: '', aws_role_arn: '', ...values }); | ||
| }, | ||
| [discover] |
| replication_set: string; | ||
| aws_access_key: string; | ||
| aws_secret_key: string; | ||
| aws_role_arn: string; |
| @@ -1,2 +1,2 @@ | |||
| export const DISCOVERY_RDS_CANCEL_TOKEN = 'discoveryRds'; | |||
| export const INITIAL_CREDENTIALS = { aws_secret_key: '', aws_access_key: '' }; | |||
| export const INITIAL_CREDENTIALS = { aws_secret_key: '', aws_access_key: '', aws_role_arn: '' }; | |||
Author
|
@fabio-silva Oh i see. I will change it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PMM-13045
Link to the Feature Build: Percona-Lab/pmm-submodules#4357 (SUBMODULES-4357)
Summary
aws_role_arnin/services:discoverRDSrequests.Related work
Testing
yarn jest --config jest.percona.config.js --runInBand --watch=false public/app/percona/add-instance/components/Discovery/components/Credentials/Credentials.test.tsx public/app/percona/add-instance/components/AddRemoteInstance/AddRemoteInstance.tools.test.tsyarn prettier --check <changed files>yarn eslint <changed files> --no-error-on-unmatched-patternyarn build:nominifyScreenshot