Skip to content

PMM-13045 Add RDS assume role field#901

Open
HanCheo wants to merge 1 commit into
percona:mainfrom
HanCheo:feature/rds-assume-role-discovery-ui
Open

PMM-13045 Add RDS assume role field#901
HanCheo wants to merge 1 commit into
percona:mainfrom
HanCheo:feature/rds-assume-role-discovery-ui

Conversation

@HanCheo
Copy link
Copy Markdown

@HanCheo HanCheo commented May 15, 2026

PMM-13045

Link to the Feature Build: Percona-Lab/pmm-submodules#4357 (SUBMODULES-4357)

Summary

  • Add optional AWS IAM role ARN input to the PMM Amazon RDS discovery form.
  • Send aws_role_arn in /services:discoverRDS requests.
  • Preserve the role ARN through RDS instance selection so Add RDS service payloads include it.
  • Place the role ARN field below access key and secret key in the form.

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.ts
  • yarn prettier --check <changed files>
  • yarn eslint <changed files> --no-error-on-unmatched-pattern
  • yarn build:nominify
  • Verified locally in PMM UI: access key and secret key on the first row, AWS IAM role ARN on the second row.

Screenshot

screenshot

@HanCheo
Copy link
Copy Markdown
Author

HanCheo commented May 15, 2026

I'm sorry. I will update it to comply with the contribution guidelines.

Done!

@HanCheo HanCheo marked this pull request as draft May 15, 2026 14:22
@HanCheo HanCheo changed the title Add RDS assume role field PMM-13045 Add RDS assume role field May 15, 2026
@HanCheo HanCheo marked this pull request as ready for review May 15, 2026 14:28
@HanCheo
Copy link
Copy Markdown
Author

HanCheo commented May 18, 2026

@mattiasimonato

Could you review this?

@fabio-silva
Copy link
Copy Markdown

@HanCheo Thanks for your contribution. Can you please use main as the base branch? Thank you

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_arn to 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: '' };
@HanCheo HanCheo changed the base branch from pmm-3.7.1 to main May 20, 2026 06:20
@HanCheo
Copy link
Copy Markdown
Author

HanCheo commented May 20, 2026

@fabio-silva Oh i see. I will change it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants