diff --git a/src/components/ConnectionConfig.tsx b/src/components/ConnectionConfig.tsx index b700e16..b367508 100644 --- a/src/components/ConnectionConfig.tsx +++ b/src/components/ConnectionConfig.tsx @@ -61,212 +61,221 @@ export const ConnectionConfig: FC = (props: ConnectionCon loadRegions().then((regions) => setRegions(regions.map(toOption))); }, [loadRegions]); + return ( +
+ + + + + + )} + {options.jsonData.authType === 'keys' && ( + <> + + {props.options.secureJsonFields?.accessKey ? ( + + + + + ) : ( + + )} + - return
- - - - - - )} - {options.jsonData.authType === 'keys' && ( - <> - - {props.options.secureJsonFields?.accessKey ? ( - - - - - ) : ( - - )} - - - - {props.options.secureJsonFields?.secretKey ? ( - - - - - ) : ( - - )} - - - )} - - - - {options.jsonData.authType === AwsAuthType.GrafanaAssumeRole && ( -
- setIsARNInstructionsOpen(!isARNInstructionsOpen)} - > -
    -
  1. -

    - 1. Create a new IAM role in the AWS console, and select Another AWS account as the{' '} - Trusted entity. -

    -
  2. -
  3. -

    - 2. Enter the account ID of the Grafana account that has permission to assume this role: - 008923505280 and check the Require external ID box. -

    -
  4. -
  5. -

    - 3. Enter the following external ID:{' '} - {props.externalId || 'External Id is currently unavailable'} and click{' '} - Next. -

    -
  6. -
  7. -

    - 4. Add any required permissions you would like Grafana to be able to access on your behalf. For - more details on our permissions please{' '} - - read through our documentation - - . -

    -
  8. -
  9. -

    - 5. Give the role a name and description, and click Create role. -

    -
  10. -
  11. -

    - 6. Copy the ARN of the role you just created and paste it into the Assume Role ARN{' '} - field below. -

    -
  12. -
-
-
- )} - {awsAssumeRoleEnabled && ( - <> - + {props.options.secureJsonFields?.secretKey ? ( + + + + + ) : ( + + )} + + + )} +
+ + + {options.jsonData.authType === AwsAuthType.GrafanaAssumeRole && ( +
+ setIsARNInstructionsOpen(!isARNInstructionsOpen)} + > +
    +
  1. +

    + 1. Create a new IAM role in the AWS console, and select Another AWS account as the{' '} + Trusted entity. +

    +
  2. +
  3. +

    + 2. Enter the account ID of the Grafana account that has permission to assume this role: + 008923505280 and check the Require external ID box. +

    +
  4. +
  5. +

    + 3. Enter the following external ID:{' '} + {props.externalId || 'External Id is currently unavailable'} and click{' '} + Next. +

    +
  6. +
  7. +

    + 4. Add any required permissions you would like Grafana to be able to access on your behalf. For + more details on our permissions please{' '} + + read through our documentation + + . +

    +
  8. +
  9. +

    + 5. Give the role a name and description, and click Create role. +

    +
  10. +
  11. +

    + 6. Copy the ARN of the role you just created and paste it into the Assume Role ARN{' '} + field below. +

    +
  12. +
+
+
+ )} + {awsAssumeRoleEnabled && ( + <> + - - - {options.jsonData.authType !== AwsAuthType.GrafanaAssumeRole && ( - - - - )} - - )} -
- - {!skipEndpoint && options.jsonData.authType !== AwsAuthType.GrafanaAssumeRole && ( - - - - )} - - - + + {options.jsonData.authType !== AwsAuthType.GrafanaAssumeRole && ( + + + + )} + + )} + + + {!skipEndpoint && options.jsonData.authType !== AwsAuthType.GrafanaAssumeRole && ( + + + + )} + + +