Skip to content

Commit 4c07535

Browse files
committed
Feat: get externalId from GrafanaConfig for Grafana Assume Role
1 parent ce03f19 commit 4c07535

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/components/ConnectionConfig.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ export const ConnectionConfig: FC<ConnectionConfigProps> = (props: ConnectionCon
4949
.filter(isAwsAuthType),
5050
[tempCredsFeatureEnabled]
5151
);
52+
if (tempCredsFeatureEnabled && options.jsonData.authType === AwsAuthType.GrafanaAssumeRole) {
53+
if (config.namespace.startsWith('stack-')) {
54+
props.externalId = config.namespace.substring(config.namespace.indexOf('-') + 1);
55+
}
56+
}
5257
const currentProvider = awsAuthProviderOptions.find((p) => p.value === options.jsonData.authType);
5358

5459
useEffect(() => {

0 commit comments

Comments
 (0)