diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/aws_credentials_form/aws_credentials_form_agentless.tsx b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/aws_credentials_form/aws_credentials_form_agentless.tsx index 028d2d1fb5c8d..058697502e0ed 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/aws_credentials_form/aws_credentials_form_agentless.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/aws_credentials_form/aws_credentials_form_agentless.tsx @@ -12,7 +12,7 @@ import { i18n } from '@kbn/i18n'; import { cspIntegrationDocsNavigation } from '../../../common/navigation/constants'; import { DEFAULT_AGENTLESS_AWS_CREDENTIALS_TYPE, - getAwsCredentialsFormManualOptionsAgentless, + getAwsCredentialsFormAgentlessOptions, getAwsCredentialsFormOptions, getInputVarsFields, } from './get_aws_credentials_form_options'; @@ -49,7 +49,7 @@ export const AwsCredentialsFormAgentless = ({ input, newPolicy, updatePolicy }: defaultMessage: 'Preferred method', })} type={awsCredentialsType} - options={getAwsCredentialsFormManualOptionsAgentless()} + options={getAwsCredentialsFormAgentlessOptions()} onChange={(optionId) => { updatePolicy( getPosturePolicy(newPolicy, input.type, { diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/aws_credentials_form/get_aws_credentials_form_options.tsx b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/aws_credentials_form/get_aws_credentials_form_options.tsx index b23a9c5891ff3..a0bc171594294 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/aws_credentials_form/get_aws_credentials_form_options.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/aws_credentials_form/get_aws_credentials_form_options.tsx @@ -111,8 +111,7 @@ const getAwsCredentialsTypeSelectorOptions = ( export const getAwsCredentialsFormManualOptions = (): AwsCredentialsTypeOptions => getAwsCredentialsTypeSelectorOptions(({ value }) => value !== 'cloud_formation'); -// TODO: move strings to constants -export const getAwsCredentialsFormManualOptionsAgentless = (): AwsCredentialsTypeOptions => +export const getAwsCredentialsFormAgentlessOptions = (): AwsCredentialsTypeOptions => getAwsCredentialsTypeSelectorOptions( ({ value }) => value === 'direct_access_keys' || value === 'temporary_keys' );