Skip to content

Commit 75d294c

Browse files
authored
Feat: get externalId for Grafana Assume Role in the frontend (#315)
* Feat: get externalId from GrafanaConfig for Grafana Assume Role * Prepare release 0.8.1
1 parent ce03f19 commit 75d294c

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## v0.8.1
6+
- Feat: get externalId from GrafanaConfig for Grafana Assume Role [#315](https://github.com/grafana/grafana-aws-sdk-react/pull/315)
7+
- Bump the npm-patch-dev-dependencies group with 3 updates [#311](https://github.com/grafana/grafana-aws-sdk-react/pull/311)
8+
- Bump eslint-plugin-jsdoc from 51.4.1 to 54.4.0 [#304](https://github.com/grafana/grafana-aws-sdk-react/pull/304)
9+
510
## v0.8.0
611

712
- Upgrade yarn to v4.10.3 in [#297](https://github.com/grafana/grafana-aws-sdk-react/pull/297)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@grafana/aws-sdk",
3-
"version": "0.8.0",
3+
"version": "0.8.1",
44
"description": "Common AWS features for grafana",
55
"main": "dist/index.js",
66
"module": "dist/esm/index.js",

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('stacks-')) {
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)