mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Cloudwatch: Add Support for external ID in assume role (#23685)
Co-authored by: Arve Knudsen
This commit is contained in:
@@ -42,6 +42,7 @@ const setup = (propOverrides?: object) => {
|
||||
},
|
||||
jsonData: {
|
||||
assumeRoleArn: '',
|
||||
externalId: '',
|
||||
database: '',
|
||||
customMetricsNamespaces: '',
|
||||
authType: 'keys',
|
||||
|
||||
@@ -130,6 +130,7 @@ export class ConfigEditor extends PureComponent<Props, State> {
|
||||
onChange={option => {
|
||||
if (options.jsonData.authType === 'arn' && option.value !== 'arn') {
|
||||
delete this.props.options.jsonData.assumeRoleArn;
|
||||
delete this.props.options.jsonData.externalId;
|
||||
}
|
||||
onUpdateDatasourceJsonDataOptionSelect(this.props, 'authType')(option);
|
||||
}}
|
||||
@@ -239,6 +240,22 @@ export class ConfigEditor extends PureComponent<Props, State> {
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="gf-form">
|
||||
<InlineFormLabel
|
||||
className="width-14"
|
||||
tooltip="If you are assuming a role in another account, that has been created with an external ID, specify the external ID here."
|
||||
>
|
||||
External ID
|
||||
</InlineFormLabel>
|
||||
<div className="width-30">
|
||||
<Input
|
||||
className="width-30"
|
||||
placeholder="External ID"
|
||||
value={options.jsonData.externalId || ''}
|
||||
onChange={onUpdateDatasourceJsonDataOption(this.props, 'externalId')}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<div className="gf-form-inline">
|
||||
|
||||
Reference in New Issue
Block a user